ROM Hack Question Dragon Quest XI S Save conversion

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
It works!
Spiritovod's explanation in the post I linked explains all the technical details, but I'll list out the exact steps you need to take.
0. Have a hacked switch and use a save tool (checkpoint, JKSV) to extract your saves and transfer them to your PC
1. Download dq_xi_s_saves_decrypt_v2.bms from the link above, as well as quickbms to run it (https://aluigi.altervista.org/quickbms.htm)
2. Drag and drop the .bms file onto quickbms (or double click quickbms and select the .bms file) to run it, select the switch save you want to convert, and wherever you'd like as the output folder.
3. Open the dataXXX.sav_decrypted file this creates in a hex editor (HXD, 010 Editor, etc.)
4. Add 60 (in hex) to the filesize at offset 0x04 (before the "SQEX" in text). Since it's in little endian format, the bytes are right to left. For example, for me the filesize here was F0 FE 07 00, so I put 7FEF0 into a hex calculator (likely under "programmer mode" or something like that) and added 60, getting 7FF50, so I changed the values to 50 FF 07 00.
5. Change the value at 0x0C (the value right after the "SQEX" in text - 53 51 45 58 in hex) from "89" to "8E".
6. add 60 to the filesize at offset 0x35, in the same manner as in step 4. (in my case, it was changing DD FE 07 00 to 3D FF 07 00)
7. insert 4 empty bytes (so 00 00 00 00) after the 04 at the offset found at 0x39 (88 in my case), then add 4 to the value at 0x39 (so, in my case, I changed it to 8C).
8. Find the offset listed right before the actual data starts (it'll be between an 04 and an 0C, in my case it was 04 00 00 00 00 00 00 00 DC 76 06 00 0C, with DC 76 06 00 being the value), and add 60 to it (so in my case, it changed to 3C 77 06 00)
9. Hit ctrl f and set the find feature to hex values, and search for 050X000000, with X being the save slot as it is in the filename (e.g. since mine was data006.sav, I searched 0506000000. There should be a "S040_01200" in plaintext shortly above, and M00X_E001 shortly after), and insert the following data after the 05 (make sure you are inserting and not overwriting - hitting "ins" on your keyboard should change modes, and your editor will usually tell you what mode you're in at the bottom): "00000000FFFFFFFF000000004C00000037302F36392F36382F34302F33392F34322F36342F37352F34312F32312F32332F37392F38302F38312F38322F31342F31362F31352F32372F32362F32382F32322F33342F33332F33352F00". Note that it doesn't necessarily have to be this data, but since it's just settings that can be changed in game (mainly keybindings), just using these (which is the default settings) is easier.
So in my case
"05 06 00 00 00"
became
"05 00 00 00 00 FF FF FF FF 00 00 00 00 4C 00 00
00 37 30 2F 36 39 2F 36 38 2F 34 30 2F 33 39 2F
34 32 2F 36 34 2F 37 35 2F 34 31 2F 32 31 2F 32
33 2F 37 39 2F 38 30 2F 38 31 2F 38 32 2F 31 34
2F 31 36 2F 31 35 2F 32 37 2F 32 36 2F 32 38 2F
32 32 2F 33 34 2F 33 33 2F 33 35 2F 00 06 00 00
00"
10. Change the filesize value that matches the one from 0x35 as you did in step 6 (it should be the 8 - B column of the second to last row.)
11. Select from 0x08 (which should have a value of 53) to the offset at the new value used in step 6 and step 10 (so 07FF3D in my case) + 7 (07FF44 for me) - including the values at those offsets, not between them. The number of bytes selected (which should be displayed at the bottom) should be that number from step 6 and 10 (so in my case the hex editor says "Sel: 7FF3D"), and find the checksum tool on your hex editor (for example, in the "analysis" tab at the top for HxD or the "Tools" tab for 010 Editor). Select just "CRC-32" in the list of algorithms, and make sure the range is set to "selection" rather than "entire file". In my case it was "8C930FD6"
12. Change the 4 bytes next to the ones from step 10 (so in the C-F columns of the second to last row - the last values before 8 bytes of 00s) to this checksum, again in reverse order (so I put in "D6 0F 93 8C"), and save the file.
13. Open the .bms file from step 2 in a text editor, and change line 15 from
"encryption aes KEY "" 0 32"
to "encryption aes KEY "" 1 32". Make sure to save it.
14. Open the .bms file with quickbms again, and select the modified decrypted save file (so data006.sav_decrypted for me). You'll now have a file called "dataXXX.sav_decrypted_decrypted" (if you care, you can change line 2 of the bms file as well to make it say encrypted)
15. Move that file to your save folder, "Documents\My Games\DRAGON QUEST XI S\Steam\<user-id>\Saved\SaveGames\Book" for steam, "%LOCALAPPDATA%\Packages\<letters/numbers>.DQXIS_<letters/numbers>\SystemAppData\wgs\<letters/numbers>_<letters/numbers>\<letters/numbers>" for gamepass. For Steam, all you have to do is remove the _decrypted_decrypted from the file extension and it should work (to my knowledge). Since the data for windows store is obfuscated, the easiest way to inject the save is to make a new save game in the slot you're inserting into (so for me, it was making a save in slot 7 since I was using data006.sav), and copy the name of the newly created file (it should be around 220kb - there are some meta ms store files and settings files that get made too), delete that file, and rename the switch save to that. If you did everything right, the save should now show up in the game.

I should note of course that there are no guarantees that this converted save will be perfect - theoretically there could be other changes to how the save file works that aren't clear with the initial save that will cause issues, however I wouldn't expect that to be the case. Additionally it should be noted that these steps are specific to doing just these steps. Spiritovod's post explains these elements in more general terms for other forms of editing.

As a bonus, since this is the other major reason people might want to edit their saves, here's how to edit draconian quest restrictions (if you want to do this alongside the conversion, just do it before step 11 - you'll only be modifying data, so you don't need to worry about filesize, but the checksum will change of course):
The data is included in the file twice. The first is right after the empty bytes you added in step 7 - look for the next "0A". The second can be found by hitting ctrl f, setting the search to look for text rather than hex, and searching "DLC". You should be brought to some values that say DLC_00, DLC_01 etc. A few rows above that you'll have a "0A" again.
Here's what an initial save with no draconian quest options looks like:
0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
and here's what one with every draconian quest option looks like:
0A 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00
Only worry about the 8 values that change between these two, the 01 that's in the no draconian quest save is for something else (it became 00 in the save I converted). Change the values corresponding to the draconian quest restrictions you want to. They're not in the exact order they're shown in game as, the ones I've identified for sure are that the first 01 is "No shopping" (the first one listed), the fifth 01 is "Party Wiped Out if Protagonist Perishes" (the eighth one listed). I believe the 6th 01 is "All enemies are super strong" (fourth listed) and the 8th 01 is "Townsfolk Talk Tripe" (since those were two on my save), but they could be the other way around. Make sure to change both, and to correct the checksum after doing so.
EDIT: confirmed (since I was adding it in for my own save) that the 7th one is Reduced Experience from Easy Fights. My guess as to what the full order is:
First: No Shopping (confirmed)
Second: No Armour
Third: Shypox
Fourth: Super Shypox
Fifth: Party Wiped Out if Protagonist Perishes (confirmed)
Sixth: All Enemies are Super Strong
Seventh: Reduced Experience from Easy Fights (confirmed)
Eight: Townsfolk Talk Tripe

Should also note that the DLC stuff right after that seems to be what tracks whether or not you've claimed a DLC reward - so for example "00 00 00 07 00 00 00 44 4C 43 5F 30 30 00 01" means you have claimed DLC_00, whereas "00 00 00 07 00 00 00 44 4C 43 5F 30 30 00 00" means you haven't. Switch saves will have DLC_03-DLC_07 as well, but the pc version doesn't do anything with those values (the number of DLCs is stored right before DLC_00, "08" for Switch and "03" for PC, so I don't think you should have to remove the extra ones from switch saves. I didn't for my save.). I assume this means they removed the code for unlocking the remaining DLCs completely (even though the DLC itself is still in the game I believe, I think people have managed to use console commands to cheat them in). Curious what DLC_05-07 are since only 00-04 were actually usable in the switch version (at least in NA, maybe they were JP exclusive?)
 

Attachments

  • DRAGON QUEST XI S_2021_01_30_21_09_34_742.png
    DRAGON QUEST XI S_2021_01_30_21_09_34_742.png
    192.2 KB · Views: 371
  • DRAGON QUEST XI S_2021_01_30_21_41_57_340.png
    DRAGON QUEST XI S_2021_01_30_21_41_57_340.png
    3.2 MB · Views: 426
Last edited by Niko_of_Death,

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
You should copy this post and then create/paste it as a tutorial. You'll get exp and stuff on the forum.
Might not be necessary. Spiritovod has made a new BMS script that automatically converts switch saves to PC, for mine at least it worked perfectly. Let me know if you guys have any problems with it.
 
  • Like
Reactions: GameSystem

Andazu

New Member
Newbie
Joined
Dec 8, 2020
Messages
4
Trophies
0
Age
24
XP
66
Country
Denmark
Holy crap Niko this is freaking amazing! Awesome discovery, if we could make an official tutorial i would totally donate for the work you put in for this. Totally gonna homebrew my switch for this no doubt, thanks again dude.
 

Andazu

New Member
Newbie
Joined
Dec 8, 2020
Messages
4
Trophies
0
Age
24
XP
66
Country
Denmark
Holy crap Niko this is freaking amazing! Awesome discovery, if we could make an official tutorial i would totally donate for the work you put in for this. Totally gonna homebrew my switch for this no doubt, thanks again dude.

It actually works. I followed Spiritovod's new updated tutorial on the zenhax forum you linked. He has made an easy conversion script that skips all the hex editor stuff, super neat! Someone should do a YouTube tutorial on this, i could do it but i don't wanna take the credit for this work.

Good job again, and thanks.
 

unknowndatax

Well-Known Member
Newcomer
Joined
Jan 23, 2016
Messages
68
Trophies
0
Age
35
XP
1,256
Country
United States
7. insert 4 empty bytes (so 00 00 00 00) after the 04 at the offset found at 0x39 (88 in my case), then add 4 to the value at 0x39 (so, in my case, I changed it to 8C).
The value at 0x39 is not an offset, but the size of the save information. 0x3d + [0x39] will always land you at the 8byte indicator (0x4) for the string table. Adding any bytes could corrupt the save.
 

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
The value at 0x39 is not an offset, but the size of the save information. 0x3d + [0x39] will always land you at the 8byte indicator (0x4) for the string table. Adding any bytes could corrupt the save.
Bytes need to be added because of the differences in the formats.
 

unknowndatax

Well-Known Member
Newcomer
Joined
Jan 23, 2016
Messages
68
Trophies
0
Age
35
XP
1,256
Country
United States
It does, but not in that area since it's the same between platforms. The offset at 0x39 does not always land around 04. I've seen it land 12 bytes ahead because the save point info is a long string.
 

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
It does, but not in that area since it's the same between platforms. The offset at 0x39 does not always land around 04. I've seen it land 12 bytes ahead because the save point info is a long string.
Then what would adding 3d to the value do to change that? That would also be 12 bytes ahead in that case.
Where do you think the bytes should be added instead?
 

unknowndatax

Well-Known Member
Newcomer
Joined
Jan 23, 2016
Messages
68
Trophies
0
Age
35
XP
1,256
Country
United States
I've attached the 010 Editor template that I created to show the header information; works on all platforms for DQ11 S. I've also attached a picture of what it looks like.
 

Attachments

  • Template.png
    Template.png
    55.1 KB · Views: 390
  • DQ11S.zip
    626 bytes · Views: 272

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
I've attached the 010 Editor template that I created to show the header information; works on all platforms for DQ11 S. I've also attached a picture of what it looks like.
Thanks, attached are how it looks with my original switch save, the switch save converted from the process I listed, and a pc autosave made off of that. I don't get where else the extra bytes would be added.
 

Attachments

  • switchog.PNG
    switchog.PNG
    74 KB · Views: 325
  • switchconvert.PNG
    switchconvert.PNG
    70.1 KB · Views: 287
  • pcafter.PNG
    pcafter.PNG
    73.1 KB · Views: 303

unknowndatax

Well-Known Member
Newcomer
Joined
Jan 23, 2016
Messages
68
Trophies
0
Age
35
XP
1,256
Country
United States
You'll have to figure out what those values in the red area represents. Once you do, you should be able to add the 4 bytes into the right spot.
 

Maswa

Member
Newcomer
Joined
Nov 13, 2019
Messages
21
Trophies
0
Age
29
XP
62
Country
Italy
Does it only works from Switch to PC? Or also from PC to switch? Because in 2018 i finished DQ XI on pc, now i would play XI S on switch with dlc and so on but i'm not interested in playing 100+ hours to get it.
 

GameSystem

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
Does it only works from Switch to PC? Or also from PC to switch? Because in 2018 i finished DQ XI on pc, now i would play XI S on switch with dlc and so on but i'm not interested in playing 100+ hours to get it.
Dragon Quest XI and Dragon Quest XI S are functionally not the same game, so you can't transfer saves between them. As far as I'm aware, the only new content is 2D mode, Tickington, and some interludes between chapters. If you were really interested, you could always start a new save in XI S and then just cheat your stats to what they were in the old version via debug mode or whatever so you can just steamroll through the content you don't care about. You can unlock all zoom locations, edit levels, skill points, acquire gear and items, etc, so it shouldn't be hard to get back to where you were.
 

fractalsauce

Member
Newcomer
Joined
Aug 11, 2021
Messages
6
Trophies
0
Age
35
XP
111
Country
United States
Can someone that has the dq_xi_s_saves_decrypt_v2.bms script upload it to a file hosting site or something? The zenhax forum seems to be down and I'd really like to get my Switch save over to PC. Thanks for your work on this btw I really hope I can get this working.

EDIT: Never mind, it turns out Malwarebytes Anti-Malware was blocking it. I was able to download the script and convert my Switch save to PC and my PC save back to Switch! This is so awesome thank you so much for this :)
 
Last edited by fractalsauce,

soniczx123

Well-Known Member
Member
Joined
Jul 24, 2015
Messages
589
Trophies
0
Age
26
XP
430
Country
Going to be testing this as soon as I see a good sale for DQ XI S on Steam (already got my saves extracted from the switch). I have one question: In what order do you run the bms scripts that are available? Do you run the decrypt script and then the conversion script?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @K3Nv2, AncientBoi be like https://www.youtube.com/watch?v=zxLoR6H7GxQ