Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

Iron Man mod
Post new topic   Reply to topic     Forum Index -> Customization & Modding
View previous topic :: View next topic  
Author Message
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Sun Feb 23, 2014 3:52 am    Post subject: Iron Man mod Reply with quote

I discovered Pirates! this week, and it was a really fun game, but unfortunately it was too easy. The game autosaves every time something bad might happen, so by reloading your game you can avoid all the consequences of mistakes and retry difficult parts until you succeed. This also renders various special items and gameplay elements useless. I don't have the willpower to resist loading my game if I go to prison or something, so I really wanted an Iron Man mode. Since the game doesn't provide one, I decided to mod the game.

Here are the changes I made:
  • You can't load your game except from the main menu.
  • You can't save your game except by quitting, in which case the game will be saved in the "quit" slot. However, quitting in the middle of a battle does not save your game, so don't do that. There are no autosaves, so if you're worried about the game crashing, quit once in a while. (But in 35 hours of playing, it's been stable for me.)
  • The option to abandon your game (i.e. quit without saving) has been disabled, so you can only quit and save.
  • The usual Windows close mechanisms (Alt-F4, etc.) have been disabled. (new in version 2)
Because making complex changes to executables in a hex editor is painful, I didn't make the Iron Man mode optional. It's just always enabled. If you really want to toggle it, you can swap executables. The modded executable works with both the Steam version and the non-Steam version of the game, although it does not integrate with Steam.

Download: http://www.adammil.net/files/120/piratesmod.zip

The mod is also available in The Challenge Pack.

Feel free to give me feedback!

Also, this mod is for the latest English version of the game. If somebody wants to combine this with other EXE mods or change a non-English version of the game, here are the bytes I changed and nearby offsets. The bytes to change are bracketed by underscores and there's enough context to make them unique. If the offsets don't match exactly you can search for the bytes in the first line and change them to those from the second line, but I can't guarantee that these changes will work with any other version or language of the game. Also, you will not find these in the Steam version of the game because the Steam version of the executable is packed and encrypted.

Code:
# disable 'battle' autosave
5E699: 00 6A 00 68 48 BB 86 00 _ E8 3A 38 FA FF _ 8B 1D 64 C1 85 00 A1 FC
5E699: 00 6A 00 68 48 BB 86 00 _ EB 03 90 90 90 _ 8B 1D 64 C1 85 00 A1 FC

# disable 'arrival' autosave
66EB0: 00 6A 00 68 48 BB 86 00 _ E8 23 B0 F9 FF _ A1 54 C1 85 00 83 C4 0C
66EB0: 00 6A 00 68 48 BB 86 00 _ EB 03 90 90 90 _ A1 54 C1 85 00 83 C4 0C

# disable quick-save
72F3B: 04 57 55 68 48 BB 86 00 _ E8 98 EF F8 FF _ 83 C4 0C E9 41 07 00 00
72F3B: 04 57 55 68 48 BB 86 00 _ EB 03 90 90 90 _ 83 C4 0C E9 41 07 00 00

# disable quick-load
72F67: E8 F4 46 08 00 83 C4 04 _ 55 57 55 68 48 _ BB 86 00 33 FF E8 62 F3
72F67: E8 F4 46 08 00 83 C4 04 _ E9 1D 07 00 00 _ BB 86 00 33 FF E8 62 F3

# disable load/save menu in-game
B24A7: 35 FA FF FF 38 5C 24 7C _ 75 26 _ 8B 75 40 3B F3 74 1F 8B
B24A7: 35 FA FF FF 38 5C 24 7C _ 90 90 _ 8B 75 40 3B F3 74 1F 8B

# disable abandoning the game (i.e. quitting without saving)
B5DD9: F1 FF FF E9 1F 02 00 00 _ B8 0C 00 00 00 _ E8 15 89 F7 FF 8B 0D E8
B5DD9: F1 FF FF E9 1F 02 00 00 _ E9 A5 F1 FF FF _ E8 15 89 F7 FF 8B 0D E8

# prevent the game from copying the 'arrival' or 'battle' saved game over your 'quit' slot if you quit in town or a battle
B5FD6: 86 16 04 00 83 C4 04 50 _ E8 2D BD F4 FF _ 83 C4 0C 8D 4C 24 1C E8
B5FD6: 86 16 04 00 83 C4 04 50 _ EB 03 90 90 90 _ 83 C4 0C 8D 4C 24 1C E8

# disable the usual Windows close mechanisms (Alt-F4, etc.)
D4B94: F5 FF 83 C4 04 84 C0 74 _ 11 _ 8B 4C 24 0C 5F C7 01 00
D4B94: F5 FF 83 C4 04 84 C0 74 _ 1D _ 8B 4C 24 0C 5F C7 01 00
F617E: 5B C2 10 00 83 FE 10 74 _ 50 _ 81 FE B1 02 00 00 75 54
F617E: 5B C2 10 00 83 FE 10 74 _ 28 _ 81 FE B1 02 00 00 75 54


Last edited by AdamMil on Sun Mar 16, 2014 9:43 am; edited 11 times in total
Back to top
View user's profile Send private message Visit poster's website
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Sun Feb 23, 2014 3:00 pm    Post subject: Reply with quote

Nice one. I also like to play without restarts but can`t always trust myself. I do like the auto-saves though in the event of a random crash. That may be why they have so many because the game has lots of bugs.

Can I isolate each non-save function at all? Like only restricting battle saves and restarts.
Back to top
View user's profile Send private message
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Sun Feb 23, 2014 5:23 pm    Post subject: Reply with quote

dogcigar wrote:
Can I isolate each non-save function at all? Like only restricting battle saves and restarts.

Yes. It wouldn't be too difficult to, for instance, only allow the autosave when you quit or enter a town (although then you could reload if you got imprisoned while trying to sneak into an enemy town). I'll add some comments about what each change does after I get some sleep.

I lost a sword fight and got stranded on an island and knocked all the way back to a basic sloop with 8 guns and no upgrades. :-( But that'll teach me to fight Montalban without filling his ship with grapeshot first... I stopped playing for the night after that, but it's fun. I feel like every fight and dance matters now.


Last edited by AdamMil on Thu May 08, 2014 6:07 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Mon Feb 24, 2014 2:13 am    Post subject: Reply with quote

AdamMil wrote:
dogcigar wrote:
Can I isolate each non-save function at all? Like only restricting battle saves and restarts.
I'll add some comments about what each change does after I get some sleep

Alright, I did that. You should be able to select which changes you want.
Back to top
View user's profile Send private message Visit poster's website
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Tue Feb 25, 2014 5:53 pm    Post subject: Reply with quote

Very cool! Very Happy
Back to top
View user's profile Send private message
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Wed Feb 26, 2014 2:11 pm    Post subject: new version Reply with quote

Version 2 (posted just now) disables quitting via Alt-F4, etc.
Back to top
View user's profile Send private message Visit poster's website
brwngator
Swabbie
Posts: 58



27 Gold -

PostPosted: Thu Feb 27, 2014 1:13 am    Post subject: Reply with quote

Arr!

Very impressive work, Adam. This will be very helpful to keep myself from abusing reloads.
_________________
Stay Away from my rum


I Accept Donations Smile
Back to top
View user's profile Send private message
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Thu Feb 27, 2014 12:46 pm    Post subject: Reply with quote

Thanks. :-) I know there are some mod managers floating around to allow binary patches to be applied more easily (for people who don't want to just download the .exe). If any of those are actually in common use, I'd like to include a patch file in the .zip for use with the mod manager(s). Does anybody know the details of the patch formats for the popular managers, if any?
Back to top
View user's profile Send private message Visit poster's website
parksbanyon
Gunner
Posts: 565



13127 Gold -

PostPosted: Thu Mar 06, 2014 5:44 pm    Post subject: Welcoe Aboard! Reply with quote

Its always good to have a coder/programmer come onboard. I'm still working on a mod manager but the patch file is pretty much the standard used except I added the TAR: line, here is a sample patch file for changing the mail runner into the interceptor mod:

TAR:
Hex!.exe
OLD:
6400 0000 6400 0000 6400 0000 6400 0000 0300 0000 0200 0000 0100 0000 5000 0000 0C00 0000 1E00 0000 8000 0000 2C01 0000 B004 0000 C004 0000 0000 0000 0800 0000 0E01 0000 6400 0000 6400 0000 6400 0000
NEW:
6400 0000 6400 0000 6400 0000 6400 0000 0300 0000 0200 0000 0100 0000 5000 0000 1400 0000 1E00 0000 8000 0000 2C01 0000 B004 0000 C004 0000 0000 0000 0800 0000 0E01 0000 6400 0000 6400 0000 6400 0000
EOF:
Back to top
View user's profile Send private message
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Fri Mar 07, 2014 12:17 am    Post subject: Re: Welcoe Aboard! Reply with quote

parksbanyon wrote:
TAR:
Hex!.exe
OLD:
6400 0000 6400 0000 6400 0000 6400 0000 0300 0000 0200 0000 ...
NEW:
6400 0000 6400 0000 6400 0000 6400 0000 0300 0000 0200 0000 ...
TAR indicates the file to patch? Can the old/new bytes be different lengths? Must they be in 16-bit chunks, or can any arbitrary whitespace be added? Is there a way to add comments? Can there be wildcards (allowing patches to overlap because the wildcard bytes are ignored)? If not, take those as feature requests. :-)

parksbanyon wrote:
Its always good to have a coder/programmer come onboard.
I was hoping to collaborate with others to maybe do some of these things that have been declared "impossible". :-)
Back to top
View user's profile Send private message Visit poster's website
Pirate
Helmsman
Posts: 5579



109543 Gold -

PostPosted: Sat Mar 08, 2014 7:47 am    Post subject: Libertalia Reply with quote

One of the things I think would be a big hit would be if we could find a to change the pirate government so we can loot and plunder all nations and still dance with the Pirate Kings daughter and all the other goodies that come from sailing for a nation. Yeah you know like Libertalia.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group