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

Changing the Date
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page Previous  1, 2
View previous topic :: View next topic  
Author Message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Fri Jan 31, 2014 11:04 pm    Post subject: save game editor Reply with quote

Look up jlangsdo's save game editor. There should be some game dates stored in the savegame that create the differences.
Back to top
View user's profile Send private message
galdis
Powder Monkey
Posts: 9


215 Gold -

PostPosted: Sat Feb 01, 2014 2:07 am    Post subject: Reply with quote

- Trainer is 3.2
- I got it from CheatHappens, or from here
- Windows 7
- Steam version
- Steam folder
- Desktop and the same folder as executable, neither worked

Parks, I'm not sure where to find that one. Is it on Hooked On Pirates?
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4600



26028 Gold -

PostPosted: Sat Feb 01, 2014 2:49 am    Post subject: Reply with quote

galdis wrote:
- Trainer is 3.2
- I got it from CheatHappens, or from here
- Windows 7
- Steam version
- Steam folder
- Desktop and the same folder as executable, neither worked

Parks, I'm not sure where to find that one. Is it on Hooked On Pirates?


I don't have the Steam version, so I can't offer any advice. Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
galdis
Powder Monkey
Posts: 9


215 Gold -

PostPosted: Sat Feb 01, 2014 3:36 am    Post subject: Reply with quote

Steam runs on Version 1.0.2.0.
Back to top
View user's profile Send private message
fleetp
Helmsman
Posts: 4600



26028 Gold -

PostPosted: Sat Feb 01, 2014 3:49 am    Post subject: Reply with quote

Some trainers don't work with Steam games. I did a google search and found a post with a link to a trainer that supposedly works with only the Steam version.
http://www.cheathappens.com/show_board2.asp?headID=84306&titleID=13434
Back to top
View user's profile Send private message Send e-mail
galdis
Powder Monkey
Posts: 9


215 Gold -

PostPosted: Sun Feb 02, 2014 1:39 am    Post subject: Reply with quote

Well, I managed to figure out how to make PHTrainer to work. This could work for my purposes, but I am still very curious what the offset value to a save's date is.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Sun Feb 02, 2014 5:14 pm    Post subject: also check out the savegame editor Reply with quote

I have the trainer but have always used jlangsdo's savegame editor whenever I need to verify savegame data. Look at this thread: Working on a perl savegame editor (for Mac).
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Thu Feb 06, 2014 3:30 pm    Post subject: Reply with quote

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



4759 Gold -

PostPosted: Tue Feb 25, 2014 2:52 am    Post subject: Re: Name Change Reply with quote

Pirate wrote:
The only drawback is in 99% of the situations this won't work in the way that you would like because whatever new name you choose would have to have the same number of letters as the old name.

Sorry to resurrect an old discussion, but actually the rule is that when editing strings inside the EXE, it must be the same number of letters or shorter. (If it's shorter, you have to end it with a zero byte.) But for data files that are known to support various lengths of strings, such as your save file, it's usually quite easy to make a string longer or shorter.

For example, the first bytes of my save file are:
Code:
2F 00 00 00 4D 75 72 6C 69 74 6F 7C 28 52 6F 67 75 65 29 7C 6E 65 61 72 20 43 61 6D 70 65 63 68 65 7C 31 37 20 44 65 63 65 6D 62 65 72 2C 20 31 36 37 33 66 00 00 00 99 00 00 00

This is rendered in ASCII as:
Code:
/...Murlito|(Rogue)|near Campeche|17 December, 1673f.......

The key is the first four bytes: 2F 00 00 00. This is a 32-bit integer describing how long the next field is. That's frequently how variable-length fields are represented in binary: a number describing the length, followed by the data. And indeed, if you examine the next 0x2F (=47) bytes, you'll see that they correspond to "Murlito|(Rogue)|near Campeche|17 December, 1673" -- exactly the string describing our character. So that's confirmation that we're dealing with a length-prefixed string.

Now all you need to do, then, is adjust the length appropriately when you change the string. So if I wanted to change my name to "Captain Murlito", I would insert eight bytes into my name ("Captain ") and then increase the length prefix by 8, making it 37 00 00 00. (Be careful to actually insert the bytes. Most hex editors default to overwriting bytes so you may need to press the Insert key to change modes. If that doesn't work, get a better hex editor.) In fact, pretty much all the strings in the save file are prefixed by a 4-byte length, so you can change all of them.

Now, this isn't always guaranteed to work. Sometimes there are multiple lengths that have to be changed (e.g. a length for a single string, as well as a length for the entire group of strings it belongs to). Sometimes the file has absolute offsets that need to be adjusted. (I'm not saying these are the case for Pirates! save files, but they may be the case in general.) But I'm quite confident that changing your name in this case is that simple. (Err, I haven't tested it though, because I'd have to reboot to do that. :-)

Maybe it's too late for Hector/Luke, but I hope it helps someone in the future. :-)
Back to top
View user's profile Send private message Visit poster's website
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

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

Using my savegame editor, I have changed the names of the pirate, the intro line, cities/settlements, and player ships. As long as the 4 byte integer describing how long the text will be is recalculated, it works fine.

Those are the only variable length fields in the savegame file. I think it was no accident that they are placed at the start and end of the file - that way none of the fixed length fields can be referenced by a simple byte number from the front or back of the file.
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
Goto page Previous  1, 2
Page 2 of 2

 
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