Page 1 of 1

Cheats via editing the save file

Posted: October 10th, 2021, 8:59 am
by Zukelik
Hello. When pressing quicksave button (F6), SDLpop creates a file named QUICKSAVE.SAV in the current directory. I have tried to make two saves in row without moving and found the offset where the time is stored with that command:

Code: Select all

$ diff -ru0 --color=auto <(hexdump -C 21seconds_left.sav) <(hexdump -C QUICKSAVE.SAV)
--- /dev/fd/63
+++ /dev/fd/62
@@ -69,2 +69,2 @@
-00000440  00 06 00 00 00 00 00 01  00 06 00 83 03 02 02 00  |................|
-00000450  01 00 01 83 82 04 01 00  00 00 00 00 00 00 00 00  |................|
+00000440  00 03 00 00 00 00 00 01  00 06 00 83 03 02 02 00  |................|
+00000450  01 00 01 83 82 03 01 00  00 00 00 00 00 00 00 00  |................|
@@ -152,2 +152,2 @@
-00000a70  00 00 00 00 00 00 00 00  00 14 00 09 b4 2e c0 01  |................|
-00000a80  00 04 01 00 00 00 00 00  00 00 ff 00 00 00 00 ff  |................|
+00000a70  00 00 00 00 00 00 00 00  00 14 00 7b a6 ef 35 01  |...........{..5.|
+00000a80  00 0b 00 00 00 00 00 00  00 00 ff 00 00 00 00 ff  |................|
Only offset which seem to have lower value was 0xA80 so I used this command, which did indeed affect the remaining time:

Code: Select all

echo -en '\x00\x00\x00\x00' | dd conv=notrunc bs=1 count=4 seek=2688 of=QUICKSAVE.SAV
I didn't quite figure out the format of time it is storing there, however, so I don't really know what is the best value, but 0x00000000 seems to work fine. Anyway, I was able to complete the game after using this cheat, so it was useful and I decided to share it.

Re: Cheats via editing the save file

Posted: October 16th, 2021, 6:08 pm
by David
Zukelik wrote: October 10th, 2021, 8:59 am I didn't quite figure out the format of time it is storing there, however, so I don't really know what is the best value, but 0x00000000 seems to work fine.
From offset 0xA7F is the remaining minutes on 2 bytes, then the remaining ticks also on 2 bytes. (1 tick = 1/12 second)

If I set the byte at 0xA7F to 0x01 (as in your example) and fill the next four bytes with zeroes, then I get "5461 SECONDS LEFT".

Re: Cheats via editing the save file

Posted: October 18th, 2021, 6:36 pm
by Zukelik
So I have figured the offset wrong, it seems.
So, when ticks get to 0, the game will decrease it, get 65535 and divide it by 12 and display 5461, dropping the fractional part. The game seems to check for amount of minutes to figure it out whenever to game over or not, so it has to be at least 1.

I have experimented with this a little bit and it seems that if the value of minutes is signed and if it's negative, it'd say "xxx MINUTES PASSED". I'm wondering why is it there?

Code: Select all

echo -en '\xFF\xFF\x01\x00' | dd conv=notrunc bs=1 count=4 seek=2687 of=QUICKSAVE.SAV
So this is the corrected command. Disregard the previous command since it's affecting the byte which doesn't belong to remaining time.

Re: Cheats via editing the save file

Posted: October 23rd, 2021, 6:36 pm
by David
Zukelik wrote: October 18th, 2021, 6:36 pm I have experimented with this a little bit and it seems that if the value of minutes is signed and if it's negative, it'd say "xxx MINUTES PASSED". I'm wondering why is it there?
The "MINUTES PASSED" message was added by Falcury for the unlimited time mode also by him.
I think he added this mode for his mod Secrets of the Citadel which has unlimited time.