GTA3:SA Zero's New World Army (hacking the mission timer)
by Wuphon's Reach
Things that you need to know:
- Changing the main.scm file (under data/scripts in the install folder) is dangerous and could corrupt your save files. Make backups of the main.scm, script.img and save game files prior to starting.
- This is for GTA:SA second edition (v2.00 or special edition) for the PC.
- Time is stored in milliseconds in the decompiled source code for the SCM file, so we're looking for a value of 8*60*1000 (480000). In hex, this is 0x0075300.
- Byte order seems to be reversed in the compiled SCM file, so we're looking for "00 53 07 00".
- This only appears in 2 places in the entire main.scm file. The key is that the identifier Z4_M11 appears near one of the two occurences.
001ce4e0h: 02 FD 06 03 44 00 06 00 00 00 3F 06 00 03 6E 00 ; .ý..D.....?...n.
001ce4f0h: 04 00 06 00 03 6F 00 04 03 06 00 03 7F 00 04 03 ; .....o.........
001ce500h: 04 00 02 20 74 01 00 53 07 00 C3 03 02 20 74 04 ; ... t..S..Ã.. t.
001ce510h: 01 09 5A 34 5F 4D 31 31 00 00 F7 04 02 24 74 04 ; ..Z4_M11..÷..$t.
001ce520h: 01 04 01 09 5A 34 5F 4D 30 36 00 00 06 00 03 41 ; ....Z4_M06.....A
The source code for this section when decompiled looks like:
:ZERO4_9417
110@ = 0
111@ = 3
127@ = 3
$ZERO4_TIME = 900000
03C3: set_timer_to $ZERO4_TIME type 1 GXT 'Z4_M11' // global_variable // Timer
04F7: status_text $ZERO4_CAR_HEALTH type 1 line 1 GXT 'Z4_M06' // global_variable // Bandit
65@ = -1000
64@ = 10000
35@ += 1
Notice the "Z4_M11" and "Z4_M06" strings, which gives us a good idea that we've found the right hex code to edit.
We're going to change "00 53 07 00" (480,000 milliseconds or 0x0075300) to "A0 BB 0D 00" (900,000 milliseconds or 0x000DBBA0). I used UltraEdit-32 to make my changes, but you could use other hex editors.
Once changed, load up your save game and start the New Model Army mission, you'll see that the timer now starts at 15 minutes instead of 8 minutes. The other way to check is to use "Sanny Builder 3" and decompile the new main.scm file to double-check that you changed ZERO4_TIME correctly.
Subscribe via RSS