Jump to content
Sign in to follow this  
Choppasmith

I HAVE DONE IT! DQ1-3 script extraction!

Recommended Posts

*Mad scientist laughter*

YES ! YES!

 

*ahem*

 

So I enjoyed playing DQ I-III on mobile. But it always bugged me that you had these nice official scripts stuck in an awful mobile port experience. Pining for the idea of a proper console experience with the official script, I looked for ways to find the script, but it looked pretty hopeless. I just came across aluigi's program quickbms and forum dedicated to extracting data from various games. He actually had a script made for DQII mobile. I guess someone asked for it a long time ago, and didn't really detail how to use the script. But I just figured it out and huge thanks to aluigi figured out that DQIII was slightly different in its compression and now have all three games ripped in both text and graphics. Sound might be a different story I'm afraid.

Plans are already in motion to possibly port the script to the NES/SFC versions.

dq123rip.7z

  • Like 1
  • Upvote 6

Share this post


Link to post
Share on other sites

I would love to play the SFC version of these games with the official scripts.

Share this post


Link to post
Share on other sites

This is so awesome, Choppasmith! Thank god you're relentless. (Anybody else see that old E-trade commercial with the baby and a phone and this girl keeps calling... "Relentless") No? *cough* Ok, moving on.

Anyhoo, thank you, thank you so much for cracking those games and getting this out there. You da man! (That one's older, but somebody's gotta remember it, right?) :lrsmile:

Share this post


Link to post
Share on other sites

This is fantastic. Thank you so much for your hard work and for sharing the fruit of your labor.

Looking forward to seeing the compiled gamescripts that I am sure AerynB will be toiling away on next.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, aerynb said:

This is so awesome, Choppasmith! Thank god you're relentless. (Anybody else see that old E-trade commercial with the baby and a phone and this girl keeps calling... "Relentless") No? *cough* Ok, moving on.

Anyhoo, thank you, thank you so much for cracking those games and getting this out there. You da man! (That one's older, but somebody's gotta remember it, right?) :lrsmile:

As I recall, Relentless was the name of the sunken ship in the NES version of DQ2. A slight script alteration might make for a nice nod to the days of yore.  Also, there is a change in mobile for the location of the Life Sigil (formerly Crest) that will make need for some slight tweaking if the script is ported to SFC.

Nonetheless, this is epic!

Share this post


Link to post
Share on other sites

Great work, thank you for sharing these :thumbsup:

Share this post


Link to post
Share on other sites

You don’t get just one excellent for your fine work....you get several.

 

Seriosuly though, awesome work getting the scripts and everything. Job well done, you.

Share this post


Link to post
Share on other sites
5 hours ago, Choppasmith said:

Plans are already in motion to possibly port the script to the NES/SFC versions.

Let me know if you need a coder on the project :)

  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

This is amazing especially considering the fact that I asked if such a project existed on the emulation board not to long ago.So in case we don't get ports of the mobile version on PS4 like they got in Japan than playing the SNES Versions with the official translation will be awesome.

Share this post


Link to post
Share on other sites

So... I ripped DQ1's music from the japanese iOS version before they patched it to archive all the files... Would an example file help you figure out how to extract the sound from DQ2/3?

Share this post


Link to post
Share on other sites
On 8/19/2018 at 7:54 AM, Erdrick The Hero said:

So... I ripped DQ1's music from the japanese iOS version before they patched it to archive all the files... Would an example file help you figure out how to extract the sound from DQ2/3?

No need, good sir! DQ2 and 3 have a sound.dat file that the script (aluigi updated the script on his page to automatically detect and work on all three games) works just fine!

 

There is NO such file in DQ1, it seems like it's those encrypted files in the assets folder. Weird that they updated DQ1 to encrypt the music but not 2 and 3. 3 actually has MUSIC from 1 and 2 included (and I don't mean the "expected" tracks either. Took me a while to figure out how to convert and play the files, thankfully I found a Steam Community post from some modders who were trying to mod FFIV's music which apparently uses the same format.

 

https://steamcommunity.com/app/312750/discussions/0/613936673336049726/?ctp=2#c613936673556522034

 

Quote

Ok heres the full setup i'm using

I have a Music folder into which i have placed cat.exe, head.exe and tail.exe from the UnxUtils
Inside this folder i have 4 more folders:
'cat'
'head'
'ogg'
'src'

I have copied the *.akb files from the games music directory into 'src' (source)

i have 3 .bat files also in the main music folder, these are
'tail.bat' which contains:
for /f "usebackq delims=|" %%f in (`dir /b "src\*.akb" `) do tail --bytes=+205 src\%%f > ogg\%%f.ogg

'head.bat' which contains:
for /f "usebackq delims=|" %%f in (`dir /b "src\*.akb" `) do head --bytes=204 src\%%f > head\%%f.header

and finally 'cat.bat' which contains:
del cat\*.akb*
for /f "usebackq delims=|" %%f in (`dir /b "src\*.akb" `) do cat head\%%f.header ogg\%%f.ogg > cat\%%f

head.bat and tail.bat extract the header and the ogg files from the *.akb files in the 'src' directory
cat.bat copies the header and ogg files in the head and src directory back into an *.akb file in 'cat'

so extract the header and ogg files using head.bat and tail.bat, replace the *.ogg files in the 'ogg' directory files you want to replace with your custom versions, run cat.bat to output the music files to the 'cat' directory, then copy these files into the games music directory, run the game and test.

Technically you don't need cat.bat to replace the music. Though if SE DOES release a Steam version of the Erdrick trilogy, it should be possible to mod in Orchestra versions of the music with this method! Theoritically, of course.

 

Anyway, here's the rip, Sound effects included (MODS: If this is not okay, let me know and I'll remove the links)

http://www.mediafire.com/file/24py4vw6y5agejx/dq2sound.7z

http://www.mediafire.com/file/b5ceik23cchenb8/dq3sound.7z

 

Also, my DQ1 Mobile to DW1 NES conversion is coming along nicely. I'll post a separate thread when I get further along.

 

OuZFo5f.png
j1QjWS7.png
QAZ3Tc9.png

 

Replacing the full script might be tricky, I mean look at how the two versions compare in the opening dialog with the king.

 

Dragon Warrior:

Descendant of Erdrick, listen now to my words

It is told that in ages past Erdrick fought demons with a Ball of Light

Then came the Dragonlord who stole the precious globe and hid it in the darkness

Now, ь, thou must help us recover the Ball of Light and restore peace to our land

The Dragonlord must be defeated

Take now whatever thou may find in these Treasure Chests to aid thee in thy quest

Then speak with the guards, for they have much knowledge that may aid thee

May the light shine upon thee, ь

 

Dragon Quest Mobile:

King: <3F<07! Scion of the bloodline of Erdrick, hero of legend! Long have I awaited thy coming!<1A<0C
<11King: In days of yore, thy revered ancestor did receive of the Almighty Goddess the Sphere of Light.<1A<0C
<11King: By its power was our world rid of the menace which did beset it.<1A<0C
<11King: Yet, alas, some few years past, there did arise a new threat—the Dragonlord.<1A<0C
<11King: With his cunning, he did steal away the Sphere of Light from us, plunging the land into darkness once more.<1A<0C
<11King: Should this state of affairs be suffered to continue, the night must surely take unrelenting hold, and our realm perish.<1A<0C
<11King: So I say unto thee, <07 of the bloodline of heroes, vanquish the accursed Dragonlord, and reclaim the Sphere of Light!<1A<0C
<11King: In the chests o'er yonder wilt thou find items to aid thee on thy quest. Take what thou wilt, with my blessing.<1A<0C
<11King: Partake thee also of the wisdom of those loyal subjects gathered here in my throne room.<1A<0C
<11King: Doubt not but that their knowledge will serve thee as well as any shield.<1A<0C
<11King: May the Goddess guide thee to victory, and return thee unto us ere long, brave <07!<0C
Edited by Choppasmith
  • Upvote 1

Share this post


Link to post
Share on other sites

Great work again, I didn't see monster sprites in the DQ3 group, any chance those got pulled out as well?

Share this post


Link to post
Share on other sites
25 minutes ago, Woodus said:

Great work again, I didn't see monster sprites in the DQ3 group, any chance those got pulled out as well?

There's a bunch of files with numbers and no extensions, one of them is all the script data but everything else looks encrypted/compressed much like the music in DQ1. So that's a no-go I'm afraid.

Share this post


Link to post
Share on other sites

OK, no worries, thanks for all the other resources :thumbsup:

Share this post


Link to post
Share on other sites
7 hours ago, Choppasmith said:

Replacing the full script might be tricky, I mean look at how the two versions compare in the opening dialog with the king.

 

Dragon Warrior:


Descendant of Erdrick, listen now to my words

It is told that in ages past Erdrick fought demons with a Ball of Light

Then came the Dragonlord who stole the precious globe and hid it in the darkness

Now, ь, thou must help us recover the Ball of Light and restore peace to our land

The Dragonlord must be defeated

Take now whatever thou may find in these Treasure Chests to aid thee in thy quest

Then speak with the guards, for they have much knowledge that may aid thee

May the light shine upon thee, ь

 

Dragon Quest Mobile:


King: <3F<07! Scion of the bloodline of Erdrick, hero of legend! Long have I awaited thy coming!<1A<0C
<11King: In days of yore, thy revered ancestor did receive of the Almighty Goddess the Sphere of Light.<1A<0C
<11King: By its power was our world rid of the menace which did beset it.<1A<0C
<11King: Yet, alas, some few years past, there did arise a new threat—the Dragonlord.<1A<0C
<11King: With his cunning, he did steal away the Sphere of Light from us, plunging the land into darkness once more.<1A<0C
<11King: Should this state of affairs be suffered to continue, the night must surely take unrelenting hold, and our realm perish.<1A<0C
<11King: So I say unto thee, <07 of the bloodline of heroes, vanquish the accursed Dragonlord, and reclaim the Sphere of Light!<1A<0C
<11King: In the chests o'er yonder wilt thou find items to aid thee on thy quest. Take what thou wilt, with my blessing.<1A<0C
<11King: Partake thee also of the wisdom of those loyal subjects gathered here in my throne room.<1A<0C
<11King: Doubt not but that their knowledge will serve thee as well as any shield.<1A<0C
<11King: May the Goddess guide thee to victory, and return thee unto us ere long, brave <07!<0C

There's definitely a jump in text length, that's for sure. I don't envy you, this seems like a tough project. But I do hope you can figure it out. *crosses fingers*

Share this post


Link to post
Share on other sites
16 hours ago, Choppasmith said:

Replacing the full script might be tricky, I mean look at how the two versions compare in the opening dialog with the king.

Dragon Warrior 1 is a 64KB MMC1 game, which was large for its time. But even without changing the PCB type, I figure you could add potentially 28 new 16KB PRG banks without too much trouble. Much more than you need for the new script.

What I'd do is make an entirely new bank (or set of banks) dedicated to the new dialogue and the logic to handle them. Replace several of the routines that load text into the dialog boxes with a bankswitch and jump to a new bank with the new routines, and then switch back before you return to the original game code. You wouldn't even need to compress the text - but a better option is probably to just use the same compression format as the original game does.
I'd replace all the original dialogue simply with pointers to the new dialogue system, rather than trying to squeeze in text in the same area.

That's probably easier said than done, but I've done similar stuff for a few other games, and I don't think it would be a problem.

Edited by Sumez

Share this post


Link to post
Share on other sites

Is there any update on injecting the English script into the SNES version?  Very interested in this project.

Share this post


Link to post
Share on other sites
1 hour ago, Sackchief said:

Is there any update on injecting the English script into the SNES version?  Very interested in this project.

I'm actually planning to do both the NES AND SNES versions of I-III and I'm hoping to finish the first (Dragon Warrior) soon. If I run into some kind of roadblock, I'll skip ahead.

  • Like 1

Share this post


Link to post
Share on other sites
I'm actually planning to do both the NES AND SNES versions of I-III and I'm hoping to finish the first (Dragon Warrior) soon. If I run into some kind of roadblock, I'll skip ahead.
This is awesome man. I can't wait to play 3 SNES with the DQ-ified localization.

Share this post


Link to post
Share on other sites
I'm actually planning to do both the NES AND SNES versions of I-III and I'm hoping to finish the first (Dragon Warrior) soon. If I run into some kind of roadblock, I'll skip ahead.

Sounds great! I’m really looking forward to DQ3 on SNES with the official translation.

Share this post


Link to post
Share on other sites

Its honestly more significant than what SE has released in terms of the original trilogy. To me, the SNES versions will be the definitive versions of the game with the mobile translations simply because of controls.

  • Like 1

Share this post


Link to post
Share on other sites
Its honestly more significant than what SE has released in terms of the original trilogy. To me, the SNES versions will be the definitive versions of the game with the mobile translations simply because of controls.

I can’t remember if the SNES version had the bonus dungeon or not. Is it as complete as the GBC version?

Share this post


Link to post
Share on other sites
29 minutes ago, Sackchief said:


I can’t remember if the SNES version had the bonus dungeon or not. Is it as complete as the GBC version?

SNES had a bonus dungeon, but not the monster medal dungron.

  • Like 1

Share this post


Link to post
Share on other sites

@Choppasmith how goes the progress on the script transplants?

Share this post


Link to post
Share on other sites

Just for the fun of it, I decided to take a few minutes to muck about with the Dragon Warrior III ROM. Turns out editing the script is much much easier than I would have thought.

First of all, the text isn't compressed at all, it's all stored as completely plain text.

Second, dialogues aren't indexed to have a specific size/length/number of paragraphs. It just uses one character to indicate a pause/button prompt, and another to indicate the end of the dialogue. This means you don't really have to change anything to have essentially much, much longer pieces of dialogue. Hell, with compression you could even fit much more dialogue into the same space, but it would be easier to just increase the ROM size, and store the dialogue somewhere else.

If I find a few hours to do it, I could make a small application to load any script into the game, replacing all the original dialogue.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...