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
Has anyone figured out a way to convert DQXIS saves to or from the Switch and new PC versions? They seem to use a similar file format, but when I try and delete an existing PC save and rename my switch files to match it, I get (in japanese) a message about the save file being broken. I'm trying to import to the Game Pass version, which doesnt use readable names like the Steam and Switch versions, but seems to be effectively the same. Importing a Steam demo file to the Game Pass version in this method worked, so it seems to be an issue between PC and Switch versions, not an issue with the Game Pass version specifically. For reference I uploaded my saves from all 3 versions.
 

Attachments

  • DQXISaves.7z
    3 MB · Views: 456
  • Like
Reactions: GameSystem

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
So just looking for common elements between the three save files in hex, one minor discovery:
The Gamepass and Switch saves I used the name Makoto, in the Steam demo save I used the name Rinka. There's a huge section towards the end of the files of repeating lines (with occasional lines in between - these aren't common between any of the three). It seems that this is related to the name - The Gamepass and Switch saves share the same repeating lines, whereas the Steam save is different. However, the offset that these start is shared by the gamepass and steam saves (00022C408), but is 60 earlier in the Switch save (00022BE08)
The specific lines that repeat are
Makoto (Gamepass/Switch): 36 D0 5E 84 EA CA 65 99 30 65 E3 31 51 A1 19 D3
Rinka (Steam): F6 76 9E F5 12 38 23 71 32 32 46 44 EF C6 AC 13
At 0002DEA08 (0002DE408 on the switch version), they switch to a different line
Makoto (Gamepass/Switch): A0 7C 8C 45 33 20 07 7F B9 68 DC 47 1E 10 9E 1B
Rinka (Steam): AB DA 3F 8E 77 12 B7 8B D9 DA B1 14 B5 04 EF F2
Somewhere between that and the end of the repeating (0002FA07) the difference in offsets is reduced to just 20, with the switch offset being 0002F9E07. At 00030FB08 this gap closes to 10 (so 00030FA08 for the switch), but it increases back to 20 by 00034E37/00034E17. There were some other common lines/patterns -
And I just tried making a char named Rinka on the gamepass version and Makoto on the steam version and those lines stayed the same, so I guess that's just something about it being a demo file. (And the names weren't even the same anyway)

So I made new saves on the gamepass version and switch versions, same name, same settings etc, remaking them after to check what differences there were (the only lines that were different between saves from the same platform 000000508 to 000000607, 00022C308 to 00022C407 (0002BD08 to 0002BE07 on Switch) and 000365308 to 000365407 (end) (000365208 to 000365307 on switch)). I've also included a steam save file, although because of the demo differences it's not as good for comparison.
Things I found:
0000000000 being 01 seems to indicate that a save file is from the full game, while 0000000001 indicates it is from the demo. 0000000008 to 0000000017 seem to be a platform-specific line, as both the normal saves (data000.sav) and autosaves (data255.sav) from the same version (switch, gamepass, steam) have the same values, and all of my switch saves have it the same as well. The extra 32 bytes of data seems to come from 36 D0 5E 84 EA CA 65 99 30 65 E3 31 51 A1 19 D3 at 00000088 being repeated, whereas its only there once for the switch save (however, there are other discrepancies in the placement of that same line, so there must be other additions/subtractions).
It should also be noted that the steam save DOES work with the gamepass full game, so it's not an issue of the saves being platform-specific.
 

Attachments

  • Saves.7z
    895 KB · Views: 331
  • Like
Reactions: GameSystem

GameSystem

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
So saves between Gamepass and Steam do work, but Gamepass/Steam to/from Switch do not work? It's a shame if that's true. I was looking forward to finishing this game since I no longer have access to a Switch, but got my save file from checkpoint in the hopes I could do it one day. I guess I'll just wait a year or something until Yuzu supports it.
 

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
@Retrospectre
So I've made some progress, thanks to previous work from @unknowndatax, and a lot of hand holding from spiritovod on rin. The saves use the same encryption keys as the switch version (so C5VbD9SJxe4FhK7wnWxy_LVSuHfbQjAU for the full version, D4FDrH92HO8ztZ1Bs492F4a3o9c3gixt for the demo version). There are a bunch of small changes made in the PC version, and so far only by changing everything to how it is on PC (i.e. ending up with the exact same file in the end) was I able to get a switch save to ""work"" on PC. If anyone has one, it would be super helpful to get a PC save with a decent amount of game progress in order to compare how things added to the file as the game goes on are handled (unfortunately we won't be able to get near like for like saves for that like we can for the initial save).
Attached is a collection of what I used and learned from my research, including a variety of saves from different platforms in both decrypted and encrypted forms (see files.txt), a disorganized text file with my findings/guesses about the differences between the files, a BMS script made by spiritovod for decrypting/encrypting saves (file needs to be edited to change between decryption and encryption or full game saves and demo saves - steps are in the files comments), and quickbms for using that script. While he's not invested enough to actively work to get the saves working, spiritovod has also offered to update the script for changes that can be easily automated, as well as give insight on the changes between save files, so if anyone has any specific questions (e.g. a value in the saves that you can't figure out the function of) I can contact him.
Hopefully someone with more experience in this kind of stuff can help further progress things.
 

Attachments

  • DQXISaveResearch.7z
    7.8 MB · Views: 277
  • Like
Reactions: GameSystem

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
Also, potentially of interest outside of the conversion aspect, I found what seem to be the values that indicate unlocked dlc - could be useful as an alternative to forcing them through the command console. Adding the values to a save alone breaks it though, but I'm thinking that's because of some sort of filesize check, going to try to figure that out now.
 
  • Like
Reactions: GameSystem

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
Alright, I've found at least one of the file size checks, 03 - 05 are the filesize in bytes - 8 (it seems like there are always 8 bytes of 00's at the end, I assume that's whats removed). Keep in mind its in reverse order and in hex.
So for example, for the initial gamepass save, it has 40 65 03 and is 222536 bytes. reversing the order of the bytes, you get 036540, which = 222528 in hex. 222528 + 8 = 222536. So for example, if you wanted to remove 2 bytes from the file, you'd change 40 65 03 to 3E 65 03.
 
  • Like
Reactions: GameSystem

Asia81

Yuri Lover ~
Member
Joined
Nov 15, 2014
Messages
6,656
Trophies
3
Age
29
XP
3,496
Country
France
@Retrospectre
So I've made some progress, thanks to previous work from @unknowndatax, and a lot of hand holding from spiritovod on rin. The saves use the same encryption keys as the switch version (so C5VbD9SJxe4FhK7wnWxy_LVSuHfbQjAU for the full version, D4FDrH92HO8ztZ1Bs492F4a3o9c3gixt for the demo version). There are a bunch of small changes made in the PC version, and so far only by changing everything to how it is on PC (i.e. ending up with the exact same file in the end) was I able to get a switch save to ""work"" on PC. If anyone has one, it would be super helpful to get a PC save with a decent amount of game progress in order to compare how things added to the file as the game goes on are handled (unfortunately we won't be able to get near like for like saves for that like we can for the initial save).
Attached is a collection of what I used and learned from my research, including a variety of saves from different platforms in both decrypted and encrypted forms (see files.txt), a disorganized text file with my findings/guesses about the differences between the files, a BMS script made by spiritovod for decrypting/encrypting saves (file needs to be edited to change between decryption and encryption or full game saves and demo saves - steps are in the files comments), and quickbms for using that script. While he's not invested enough to actively work to get the saves working, spiritovod has also offered to update the script for changes that can be easily automated, as well as give insight on the changes between save files, so if anyone has any specific questions (e.g. a value in the saves that you can't figure out the function of) I can contact him.
Hopefully someone with more experience in this kind of stuff can help further progress things.
I have a PC save 100% completed if needed, but it's not the S version, It's the first steam version.
 

Niko_of_Death

Well-Known Member
OP
Member
Joined
Aug 10, 2016
Messages
151
Trophies
0
Age
29
XP
1,205
Country
United States
Spiritovod has managed to find out most of the issues getting in the way of using switch saves, and managed to successfully modify a switch save (albeit an initial save that can be compared side to side - we don't know if there are any further differences that will get in the way down the line) to work on pc. Here are the details of how it's done:
https://zenhax.com/viewtopic.php?f=9&t=1005&p=61840#p61840
I'll be trying to convert my proper saves and will post results. Theoretically this should be able to be automated.
 
  • Like
Reactions: GameSystem

GameSystem

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
Incredible progress. I really appreciate the work you put into this. I can't wait to hear your results.
I would also thank spiritovod, but I think it's a bit overkill to make a new account on another forum just to thank someone. I'll thank him from GBAtemp.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: or well somewhat