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. HexAdr. ByteOrg. hexNew hexOrg. dec.New dec.PlayerAoEDifference
C019233?51?2Icon?
C119323?35?2Icon?
C219465?101?2Icon?
C3195B7A71831672Score87 to 215 points
C419677?119?2Score?
C519744?68?2Score?
C619899?153?2Score?
C8200EEFE2382542Ranking2 to 16386
C920199?153?2Ranking?
CA202DD?221?2Ranking?
EB2352C3444523NameJane Honda to Zane Honda
EC236181924253NameJane Honda to Jene Honda
ED237CFD02072083NameJane Honda to Jave Honda
EE23868691041053NameJane Honda to Janu Honda
EF23993941471483NameJane Honda to Jane@Honda
F0240ABAC1711723NameJane Honda to Jane Ionda
F1241E1E22252263NameJane Honda to Jane Hqnda
F2242F4F52442453NameJane Honda to Jane Horda
F32435B5C91923NameJane Honda to Jane Honla
F42448E8F1421433NameJane Honda to Jane Hondq
118280B0A81761683ColorGrey (Greg Peck color)
118280B0A91761693ColorBlack (Invalid?)
157343444368674NameNasty Nick to Lasty Nick
173371D0C02001924CarWraith to Shrieker (Nasty Nick)
1DF479321A50265CarWraith to Dervish (Motor Mary)
24B587937B1471236CarWraith to Dervish (Mad Mac)
2B7702F4DC2442207CarWraith to Dervish (Matt Miler)
3238034E3678548CarWraith to Vagabond (Clint West)
38F911AFB71751839CarShrieker to Wraith (Lee Vice)
4D31235C3CB19520312CarSentinel to Shrieker (Iron John)
5AB1451868E13514214CarSentinel to Shrieker (Mori Sato)
68316673941576516CarDervish to Sentinel (Diesel Joe)
6EF17759A9215414617CarDervish to Vagabond (Liz Arden)
75B1883F3FB24325118CarVagabond to Dervish (Bogus Bill)
7C71986555D859319CarVagabond to Dervish (Farmer Ted)
7D82008BCB418818019ColorMint darkblue
7D82008BCC418819619ColorDark green
82A20904F4E797820UpgradeEngine (error, car can't move)
82A20904F6F7911120UpgradeNo steering, one engine == strafing
82B2091C9CA20120220UpgradeTires -1?
82B2091C9CC20120420UpgradeTires full (buggy)
82E2094817A12912220UpgradeTires (error, but works)
82F20954959738920UpgradeArmor (Sold out, error, works)
83220985C4C927620UpgradeArmor (0%, works, perhaps weaker)
8332099B6BE18219020CarVagabond to Dervish (Maxi Cosi; player)
843211540816412920ColorYellow
84421167F7912712120ColorDark green
84421167F6A12710620ColorBlue (Bogus Bill grey selectable)
84721198C9C14015620MoneyFrom 495 to 271
85021282C?44?20Icon?
85B2139CFDF20722320ScoreFrom 0 to 128
86021436B6C10710820RankingFrom 20 to 22
86421481718232420Races wonFrom 0 to 256
8672151697010511220Total racesFrom 1 to 57
8702160E3E222722620Total incomeFrom 0 to 65280
8732163C2C319419520MarketMines active and bought
87B2171F4F524424520MarketTurbo boost active, but not bought


Image
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.

Some images


Image Image
Modified players, ain't it nice to see a silver Dervish?

02 August 2016 00:15

I would really be interested in seeing this go further. I always wanted different colors for my cars, as the player selection and naming system are very good already. Let me know if you've uncovered anything new!!

04 August 2016 07:39

A while ago I was thinking about diving deeper into this. I'm not sure if I can discover the encryption method of the savegame (although I know it involves date/time as a variable). It would be nice to create a program that can modify settings. If I have more information I'll post it :).

17 November 2016 10:10

I decompiled de original Death rally(because i'm making a open source implementation) and i know how to decrypt/crypt the savegame files. Now you can edit your favourite savegame and give you more money or change your car....

I publish on my github account:
https://github.com/enriquesomolinos/DreeRally/tree/master/tools

If your like this tools please, star my repo.

18 November 2016 21:24

Interesting and great work! :)

16 September 2017 19:51

Interesting stuff, I am the guy that helped Doomfrost spread his mod on the internet, back in the day.

I am trying to get the Adversary's car, but it looks like it's not an easy feat. I remember someone managed to did that back in the day, even though car controls were bugged.

Did you manage to get that car with the hex editor?

16 September 2017 23:17

Wait man.. I actually have it, I really didn't remember I did lol. Really unbelievable... And it's a savegame for the shareware version too! You can download it from here:

http://www.rapidshare.com.cn/obOeqQV

01 October 2017 17:20

I didn't get the Adversary's car using a hex editor. Cool that you've managed to get it! Can you upload the file again? The uploadlink has expired.

08 November 2017 22:16

I just wish I could find a way to get the all of the tracks to not be limited to just Easy Medium Hard. All I can basically do for right now is reorder the track listings in a memory editor. Which has made maps like Suburbia show up in Hard listing.

09 November 2017 04:10

Sounds interesting! Can you shed light some extra light on the way you reorder the tracks using a memory editor? I'd like to know more about that subject :).

10 December 2017 16:39

Guys...someone needs to create a game editor for death rally...PLEASE one of you geniuses out there do it. I love death rally and wish it had different starts every time i load it. Player rankings, cars they start with, etc...it would be REALLY cool if people upgraded their cars on wins too. But for now keep it simple.

10 December 2017 21:02

you can edit your savegames following tye steps described in my repository

https://github.com/enriquesomolinos/DreeRally/tree/master/tools

23 December 2017 16:45

Yeah but I don't know anything about Python or how to run those files at github. Can someone simplify an editor for stupid people like me?

21 February 2018 22:37

wrote on 10 December 2017 21:02:
you can edit your savegames following tye steps described in my repository

https://github.com/enriquesomolinos/DreeRally/tree/master/tools



Thanks to Enrique's project (and tools), and to this article I've done a little savegame editor (Italian and English Version).

Usage: copy file into DR folder and launch it.

Known bugs: for certain values of key byte (maybe less than 64?), savegame loads odd values. Try to save game from DR again and reload file into editor.

Remarks and considerations :

- if you assign a Vagabond to all drivers, you can have fun things such as, for example, Bogus Bill, Cher Stone and Duke Nukem in the same Hard Race.

- Mines value: to my surprise :) this value isn't yes/no, but the number of mines available in race. I've tried with 16 and yes, I've managed to use 16 mines in race! (they are also visible on screen!)

Edit: Screenshot
Image

Italian Version :

https://sport.advancedstudios.it/client/DR_editor/DR_Editor_ITA.jar

English Version :

https://sport.advancedstudios.it/client/DR_editor/DR_Editor.jar


This reply has been editted 1 time.

27 February 2018 21:11

Great work!,


Can I publish your util in my page www.dreerally.com?


28 February 2018 10:11

Thank you very much!

Yes, of course you can. :D

Also, thank you again for your tools and project.

28 February 2018 12:00

Great work guys! :)

14 March 2018 15:16

Nice stuff! I've reuploaded the savegame featuring the Adversary's car:

https://www.mediafire.com/file/bacokiwczwddwcd/DR.sw6

15 March 2018 00:15

Hello to all!

I've downloaded your savegame, but the size isn't 2179 bytes, so loading it in the game doesn't work.

Meanwhile ...
Image

(sorry for the image size :) )

Result obtained by inserting the files of the "file 1" in the archive "file 0" (keeping the names) and adding bytes to respect the size of the original BPA

This reply has been editted 1 time.

15 March 2018 23:37

The DR.SW6 savegame is for the shareware version of Death Rally. Great work getting the Adversary's car in that version! Never thought that the Adversary's car would steer that bad! But it's fast and tough, however :).

I fixed your image by the way, Simo :).

Mirror of the DR.SW6 file: DR.SW6.

This reply has been editted 4 times.

15 March 2018 23:59

Thanks for both then :)

I didn't remember that the file sizes were different from shareware to full version :)

The Adversary's car lasts only one race, but great work anyway!

16 March 2018 11:07

Great work guys!!

16 March 2018 18:22

I publish on my website a f1 2018 mod savegame for death rally. I hope you enjoy it!

http://www.dreerally.com/f1-2018-savegame-mod-for-death-rally/

This reply has been editted 2 times.

16 March 2018 22:00

Hi Enrique! Good work!

(I can't comment on your site at the moment)

Below I write a consideration about your mod, that can be useful also in this topic.

Quote: "Driver face image can be repeated because at this moment we can’t change the faces to substitute with the real faces."

Maybe yes, they could be changed. I'm testing your bpk file algorithm from tools (I'm looking at the BPK algorithm for track BPAs), but in addition to the wrong palette, I can only decrypt part of the image (the first GIF block I think). However, in DreeRally the images are seen well, so you should have the updated and correct algorithm (in your dr.c source seems a LZW/GIF decompression with modified palette). The idea would be to extract BPK from the BPA, convert it into a gif image, modify it, reconvert it into BPK and store it again in the BPA, keeping the size of the entire BPA file unchanged.

16 March 2018 22:02

Sorry for the Anonymous mistake :) the message above is mine.

17 March 2018 17:25

Hi,

Firstable, comments have been fixed in my blog now :) thanks.

About the BKP files we have a problem. I know that the palette is worng in my tool but if you want to put a custom image in Death Rally probably you need to change the palette, and as far as I know the Death Rally palettes are used too much. When I decompile I see that the same palette (256 colours) is used for faces, cars, menus and more, so I think it's difficult to change bkp files correctly.

17 March 2018 20:55

You are welcome :D

Yes, but it's also true that if you launch your DreeRally executable, the images are shown correctly as stated also in the screenshot of your project :) . So you have, even if "indirectly", a functional BPK decode algorithm for entire images. In other words, you can decode an image with its correct "shape" only with wrong colors.

(It's not your fault, palettes and/or BPKs should be bit rotated)

All this if I'm not mistaken, of course :P

Can these considerations described at this external link be useful to you?

http://forum.xentax.com/viewtopic.php?f=18&t=3601

I'm trying also an "inverse deduction" : if you take a screenshot from the game and cut out pixels of sprite for example for Sam Speed face, then save it in BMP format so you have the correct solution of which color should result in that particular pixel, and from here, BPK file and PAL file, deduce correct bit transformation.

19 March 2018 23:05

Hi to all,

As we know, in the shareware version we can use the adversary's car for one race, and now we can do this in the full version!. After decompilation and tests time I publish the savegame to do this:



http://www.dreerally.com/do-you-want-to-play-a-race-with-the-adversary-car/



I hope you'll enjoy it :)

20 March 2018 21:27

Excellent work! Can't wait 'till you publish the how-to next week :).

In the past I've also seen a screenshot with a player against the Adversary in one of the regular maps. In other words: play the final round in any other map than the Arena. Would that be the next challenge to achieve in savegame modding? ;)

This reply has been editted 1 time.

21 March 2018 10:58

Hi,

This situation cannot be achieved with a savegame, we need to make a trainer or something like that to modifing the executable in run time.

See the updates in
http://www.dreerally.com/ because in few weeks you have great news about that!

28 March 2018 19:55

Hi to all :D

After several tries, a small but maybe important mod in game.

Image

Image

Image

27 April 2018 06:48

follow updates on www.dreerally.com. A new death rally editor and launcher are released!

Post new reply as Anonymous user
Want your own account? Create one, it's free!
Insert reply
Your validation code is: 1337