Modding grades and unlocks for vehicle testing
Guides
/
Modding grades and unlocks for vehicle testing
Updated 11 months ago by burninrubber0

Introduction

This guide covers modding vehicle grades for testing vehicles in Pro/Rookie grades for determining what's fastest in full-game runs. Because vehicle grades are saved with unlocks, this covers the rest of the unlock system as well. This is useful for people wanting to unlock everything (or specific things, like hidden liveries) without having to download a save or progress through the game.

If you're using a new save, note that modding unlocks is likely to affect game progression. This use case is untested and may have unintended side effects. Use at your own risk.

Notes on console modding

While this method is PC-focused, the same thing can be done hacked consoles and emulators. Saves from emulators can be used on retail consoles after being put through Bruteforce Save Data (PS3), Velocity (360), or any related tool. This is viable even if you have a bad PC, because all you have to do is run the game, edit, and save—playing isn't necessary. It's also possible to mod the save directly to achieve the same result, but I haven't focused on that here because it'd take too long for something that's very niche, and 360 saves are encrypted anyway (though I've decrypted them before). Regardless, console users will need to keep endianness in mind and byteswap as necessary when following along.

Overview of the unlock system

Unlocks are broken up into chunks headed by their names. These chunks are as follows:

  • Buys: Vehicles purchased and their grades (Rookie/Pro/All-star)
  • CashPrizeUnlocks: Cash prizes used in level-ups
  • CodriverUnlocks: Co-drivers unlocked
  • DashboardUnlocks: Dashboard toys unlocked
  • HornSetsUnlocks: Horns unlocked
  • EventsUnlocks: Events unlocked (both in Dirt Tour and Free Race/Time Trial)
  • LocationUnlocks: Locations available to fly to in Dirt Tour
  • VehicleGradeUnlocks: Vehicle grades unlocked for purchase
  • VehicleUnlocks: Bonus vehicle unlocks (though all vehicles are listed)
  • VehicleLiveryUnlocks: Livery unlocks
  • RVRevealObjectUnlocks: RV video unlocks

For speedrunners, vehicles are most relevant, so that's where we'll start.

Setting up

Requisites (links):

The reason for the custom CE version is Dirt 2's terrible anticheat, which specifically checks whether the title of any open window includes "Cheat Engine", among other things. If you don't trust this version or just prefer the DIY route, you can download the official version and use HxD to replace all instances of "Cheat" with another 5-letter word such as "Dirty". (Warning: CE's official installer has been known to install adware. Use at your own risk.)

Once you have the tools, open the game and CE. Select the dirt2_game.exe process using the button in the top left. Now choose "String" from the "Value Type" dropdown and check the "Case sensitive" checkbox. After that, you should be good to go.

Unlocking vehicles and changing grades

Search for "Buys" (without quotes). There should be no more than 3 instances found; right-click the bottommost one and choose "Browse this memory region". Click the first byte shown, then drag and scroll until the value in the bottom left of the window says "3632 bytes". This should bring you to the beginning of the next chunk, CashPrizeUnlocks. Press Ctrl+C to copy, go to HxD, press Ctrl+N, and press Ctrl+V to paste. At the top of the window (above the tabs), change the bytes per row from 16 to 64 so the values align into columns.

https://i.imgur.com/8x3Nbio.png

It should look something like the above. I've marked and described the relevant fields and values in the image. To unlock vehicles, change the 0s in the column with a blue 08 above it to 1s (changing not bought to bought). I'm not sure if awarded (2) does anything different. Changing the vehicle grade is much the same, just in column 04 instead. Copy and paste it back into CE when done to apply the changes.

Be aware that on bonus cars like the Escort and Pajero, lower grades only stick until reload. After that, they default back to all-star. There's no known way to circumvent this.

Unlocking anything else

"Buys" is a one-off in that it uses a custom structure, VehicleBuyState, to store its data. The rest of the unlocks use what is possibly UnlockState, which is a more standard structure that stores the current and initial state. (For us, both states should always be the same.) Below is the LocationUnlocks chunk:

https://i.imgur.com/sVgWSdn.png

As with vehicles, I've marked the relevant fields. The process is identical to before: Copy up to the start of the next chunk, paste it into HxD, then switch the bytes per row to 64. However, instead of changing column 08 to 1 to unlock things, here columns 0C and 10 need to be set to 2 (unlocked).

Some things, such as vehicle unlocks, will be immediately visible in-game. Others, like locations, will require saving and restarting to appear. The only thing I haven't gotten to unlock is the RV videos.

Final thoughts

I really hope this will be useful to some runners out there looking to do more thorough tests with lower grade vehicles. Or, if not, at least useful for people trying to get stuff unlocked. I highly recommend pairing this guide with Ego Database Editor if you're looking for something specific to unlock, like that one pre-order livery I forgot existed. Regardless, I've probably spent 30+ hours on this in total and 5 just tonight, so it's past time to wrap up.

https://i.imgur.com/1ZIJ4Xv.png

Happy running!

Game stats
Followers
54
Runs
327
Players
25
Latest threads
Posted 1 year ago
0 replies
Posted 2 years ago
2 replies
Posted 5 years ago
0 replies