Skip to content

Dragon Quest 5 ios save state hacking

August 18, 2015

It looks like I’m the first one to attempt to hack this version of the game.   I’d like to pretend I’m some mad hex editing sleuth, but I’m really just a guy who swung the axe blindly often enough that I ended up hitting stuff.  In any case, you’ll need iFile (jailbroken hex editor for the iPhone) and another hex editor on your computer like HxD that compares two files.

The easiest way to find the data you’re looking for — say, the hero’s strength — is to save one copy of the data, increase it by X, then save another copy.  Send yourself both copies, compare them on HxD.   Just be aware that some values change every time you save no matter what happens, so you may want to compare two save files where nothing changes in the game just to root those out.

Unfortunately, the data is massively encrypted, most likely by some kind of Binary Coded Decimal system.  There’s really no way to guess what the actual value will be when you change it, since some of the bits for each number will increase the value if they’re 0, and others will increase the value when they’re 1.   So, a value of 88 decimal should look like a value of 58 hex, but it probably won’t.  Actually, I’ve found the hero’s strength happens to be unencrypted for some reason, the rest of the attributes are not.

Save slot 1 will have a file named data1.dat, save slot 2 had data2.dat, and so on.

In these files, offset 20, 21, 22, and 23 (in decimal) contained the party’s gold.   Offset 36 (decimal) contained number of mini medals.

For the hero, the values at 1105 onward contained his experience.  The values around 1164 onward contained Strength, resilience, agility,wisdom, and luck.

The wife’s experience was at offset 1308-1310.  At 1369 onward was her strength, resilience, agility, wistom, and luck.

The hero’s son’s experience was at 1921,22,23.

The hero’s daughter’s experience was at 1991 (I think the most significant byte was there, at least).  A value of 29 in that byte turned her experience to 16 million.

Unfortunately I don’t know the item codes or the locations for other characters, monsters and so forth.  You can find them yourself if you do the comparison steps listed in the beginning.

As for what to change in order to compensate the checksum (wherever it is and however it’s calculated), there’s a benign value at offset 9700-9701 that’s usually something like 17 70, or 17 XX, that seems to work.  Just be aware that you may need to change any one of those four digits in order to properly compensate whatever value you changed in your character’s attributes, and it seems pretty random.

One thing to note is that all you really need to do is set your character’s experience points through the roof, and they’ll level up to the right place during the next battle.  The rightmost byte offset is the most powerful when it comes to experience, for some reason.  I changed that bit on my characters and eventually got 16 million plus for all of them.  Talk to a priest and they’ll tell you that you’ve had an “elevated experience” and will see the results of it during the next battle.  Makes me think the programmers threw that in for testing purposes.

As for the actual values, just guess.  Increment the right digit by one or the left digit by one, or take away one.  Then two, then three, then so forth until you find a value that both allows the game to load and gives you what you want. Generally, you’ll need to change the right digit in the checksum compensator if you change the right digit in the value, and the same goes for the left digit.   Remember that increasing the value doesn’t necessarily mean increasing the real value in the game, nor does decreasing mean decreasing the real value.  Each byte seems to use a different random BCD algorithm, so you’ll have to either guess (which will work in a fairly short amount of time), or wait until someone with more spare time really breaks the code for good.

Have fun!


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: