Back in the days when Death Rally was new I played the shareware version a lot. Eventually, after finishing the game with a Sentinel, I wanted more and started exploring the game files using an HEX-editor but didn't really succeed. Now, more than 10 years after, I'm still interested in modifying the game files and after seeing Doomfrost's savegame mod I know it can be done.
What am I trying to accomplish?
Trying to understand how the savegames are build up and structured to modify game content.
Why is this difficult?
The savegames don't use plain text and every time you save, the encoding of the savegame will be different.
How did I start?
I run Death Rally using DOSBox and started a new game, didn't sign up for a race and saved the game on the first free savegame slot. This slot will generate file DR.SG0. I downloaded 'Hex Fiend' (HEX-editor for Mac OS, but there are many others out there) and opened the DR.SG0 savegame. Then I started editting the savegame in 8 byte blocks. This way I could notice differences in the game (including lock-ups when loading the savegame) and find out which line in the savegame is used for certain things like playernames and rankings.
After fiddling around with the values I discovered the location for Jane Honda's nickname. Because the savegame is encoded I can't just write a new name but change the hexadecimal value to something else and see what happens. Starting from this I changed every single hexadecimal value to see what would be changed. Due to this I reloaded the savegame a million times, looked at the score, players and their behavior during a game after changing one value. In case I noticed a change I tried to narrow down the change to a correct value which Death Rally understands and wrote it down.
What did I gain?
A table with locations (in bytes), hexadecimal values, binary values, area of effect and the effect. Unfortunately I'm not sure in which way the savegame is encoded but a few interesting bits and bytes are narrowed down to something useful. This includes the 'blocks' (each is 108 bytes) for each player within the savegame, some color variations, nick names and car types. This is the table for my DR.SG0 file:
|Adr. Hex||Adr. Byte||Org. hex||New hex||Org. dec.||New dec.||Player||AoE||Difference|
|C3||195||B7||A7||183||167||2||Score||87 to 215 points|
|C8||200||EE||FE||238||254||2||Ranking||2 to 16386|
|EB||235||2C||34||44||52||3||Name||Jane Honda to Zane Honda|
|EC||236||18||19||24||25||3||Name||Jane Honda to Jene Honda|
|ED||237||CF||D0||207||208||3||Name||Jane Honda to Jave Honda|
|EB||238||68||69||104||105||3||Name||Jane Honda to Janu Honda|
|EC||239||93||94||147||148||3||Name||Jane Honda to Jane@Honda|
|ED||240||AB||AC||171||172||3||Name||Jane Honda to Jane Ionda|
|EE||241||E1||E2||225||226||3||Name||Jane Honda to Jane Hqnda|
|EF||242||F4||F5||244||245||3||Name||Jane Honda to Jane Horda|
|F0||243||5B||5C||91||92||3||Name||Jane Honda to Jane Honla|
|F1||244||8E||8F||142||143||3||Name||Jane Honda to Jane Hondq|
|118||280||B0||A8||176||168||3||Color||Grey (Greg Peck color)|
|157||343||44||43||68||67||4||Name||Nasty Nick to Lasty Nick|
|173||371||D0||C0||200||192||4||Car||Wraith to Shrieker (Nasty Nick)|
|1DF||479||32||1A||50||26||5||Car||Wraith to Dervish (Motor Mary)|
|24B||587||93||7B||147||123||6||Car||Wraith to Dervish (Mad Mac)|
|2B7||702||F4||DC||244||220||7||Car||Wraith to Dervish (Matt Miler)|
|323||803||4E||36||78||54||8||Car||Wraith to Vagabond (Clint West)|
|38F||911||AF||B7||175||183||9||Car||Shrieker to Wraith (Lee Vice)|
|4D3||1235||C3||CB||195||203||12||Car||Sentinel to Shrieker (Iron John)|
|5AB||1451||86||8E||135||142||14||Car||Sentinel to Shrieker (Mori Sato)|
|683||1667||39||41||57||65||16||Car||Dervish to Sentinel (Diesel Joe)|
|6EF||1775||9A||92||154||146||17||Car||Dervish to Vagabond (Liz Arden)|
|75B||1883||F3||FB||243||251||18||Car||Vagabond to Dervish (Bogus Bill)|
|7C7||1986||55||5D||85||93||19||Car||Vagabond to Dervish (Farmer Ted)|
|82A||2090||4F||4E||79||78||20||Upgrade||Engine (error, car can't move)|
|82A||2090||4F||6F||79||111||20||Upgrade||No steering, one engine == strafing|
|82B||2091||C9||CC||201||204||20||Upgrade||Tires full (buggy)|
|82E||2094||81||7A||129||122||20||Upgrade||Tires (error, but works)|
|82F||2095||49||59||73||89||20||Upgrade||Armor (Sold out, error, works)|
|832||2098||5C||4C||92||76||20||Upgrade||Armor (0%, works, perhaps weaker)|
|833||2099||B6||BE||182||190||20||Car||Vagabond to Dervish (Maxi Cosi; player)|
|844||2116||7F||6A||127||106||20||Color||Blue (Bogus Bill grey selectable)|
|847||2119||8C||9C||140||156||20||Money||From 495 to 271|
|85B||2139||CF||DF||207||223||20||Score||From 0 to 128|
|860||2143||6B||6C||107||108||20||Ranking||From 20 to 22|
|864||2148||17||18||23||24||20||Races won||From 0 to 256|
|867||2151||69||70||105||112||20||Total races||From 1 to 57|
|870||2160||E3||E2||227||226||20||Total income||From 0 to 65280|
|873||2163||C2||C3||194||195||20||Market||Mines active and bought|
|87B||2171||F4||F5||244||245||20||Market||Turbo boost active, but not bought|
Racing against Mori Sato in a Shrieker and Diesel Joe in a Sentinel.
Do it yourself
Remember: each time you save the game the values will be different. This means that my table can't be applied onto your savegame. If you want my original savegame you can download it here: DR.SG0. You can download my slightly modified savegame in chapter 'Done it myself'. Also note that HEX-editors can vary a bit so get to know your version of your HEX-editor.
1. Download Hex Fiend (Mac OS X) or XVI32 (Windows);
2. Create a back-up of your savegame;
3. Open the savegame with your HEX-editor;
4. Go to position/byte 1986 or 0x7C7 (for player 19's car) and read the hexadecimal value (i.e. 55)(click for example);
5. Recalculate the hexadecimal value to binary (=85) and add up 8 to go from Vagabond to Dervish;
6. Revert the binary value (85+8=93) back to hexadecimal (=5D);
7. Replace the original hexadecimal value with the new one and save your file;
8. Make sure that the new file is in the root of the Death Rally directory (where is originally was);
9. Load up your game, start a race and hope that player 19 will participate.
Using my DR.SG0 file along with the example above will change Farmer Ted's Vagabond to a Dervish. As you can see there is a pattern in hexadecimal values and if you're familiar with it you won't have to use the hexidecimal/binary converter. Of course you can always try to "just fill something in and see what happens" but this is most likely to fail. Especially with the cars because these values have to be exact (with color, money, nicknames you have more 'freedom').
The trick is to find what everything means. I noticed that the savegame works in blocks of 108 bytes. See the table for example; 371 and 479 change cars for respectively player 4 and 5. This means that 479 + 108 (= 587) will change the car of player 6. Unfortunately this system is not 100% correct as there is just 103 between player 18 and 19.
Remember the following facts when changing values:
- Car values are exact. Increase the binary value by 8 to get a faster car, decrease by 8 for a slower car (Starting from Vagabond and up to Deliverator).
- Be careful when defining to much cars of the same type. You need enough cars to fill up one type of race (i.e. Easy, Normal and Hard Races) otherwise Death Rally will crash. This means it's safe to give Farmer Ted a Dervish (he can participate in Easy and Normal race) but it's dangerous to give all the Deliverator and Wraith racers a Dervish because there aren't enough players left over for the Hard Race. One more thing: you need more than 4 cars that can race with the Hard Race because sometimes a player is not selected for participation. It's safer to have at least 6 players that can participate in each type of race.
- Money and color is defined by up to 3 locations in the file. For instance byte 192, 193 and 194 are used to define the colors for player 2 and you can de/increase 192 by some value but can't do so with 193 and 194. You'll need a different one.
- There are 'weird' values like refund-value of your car. I haven't located them yet and are only interesting to fill out the gaps in the savegame. Especially for AI players because they don't care about money.
Done it myself
In case you don't want to edit yourself but just want to see a slight different game, then see this DR.SG1 (based on my DR.SG0) for a modified game. It has:
- Different player colors selectable;
- Farmer Ted's car is darker;
- Bogus Bill upgraded to Dervish;
- Diesel Joe upgraded to Sentinel;
- Iron John upgraded to Shrieker;
- Mad Mac upgraded to Deliverator.
Modified players, ain't it nice to see a silver Dervish?