The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Crowley on March 04, 2007, 10:45:23 am



Title: Questions about editing saved games
Post by: Crowley on March 04, 2007, 10:45:23 am
How can I change the date and the ships in my fleet using a hex editor? I would also be interested in knowing how messing about with the date would affect the game. Are events like Spathi slave shielding, Pkunk journey to Yehat and Kohr-Ah victory directly connected to the date or do they run on a separate timer?


Title: Re: Questions about editing saved games
Post by: Novus on March 04, 2007, 03:22:22 pm
The best description of the UQM save format is probably the save source code (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/src/sc2code/save.c?view=markup) in src/sc2code/save.c.

UQM maintains an event queue with date-stamped future events (src/sc2code/gameev.c and src/sc2code/clock.c). The dates are stored in an absolute format, so changing the date may cause events (such as those you mention) to be skipped or delayed.

I suspect that adapting the loader code will be easier than using a hex editor, due to the use of compression in the saves and the variable-length and optional sections in the saves.