Dragon Quest Builders 2 Modding: Reinject texture files from Model files

  • Thread starter Thread starter Sapphire645
  • Start date Start date
  • Views Views 6,659
  • Replies Replies 30

Sapphire645

Member
Newcomer
Joined
Jun 13, 2024
Messages
21
Reaction score
19
Trophies
0
XP
153
Country
Spain
I want to document this somewhere, but I don't really know where.

DQB2's files relating to models have a bunch of g1m and g1t all mashed together. The header first has the number of files [0,3] , then the pointers to the beggining of each file, then a bunch of data I haven't deciphered yet.

I made 2 very shoddy python files that can reinject texture files into the .unpack to reimport to the linkdata. It only works for files that have only 2, like character or weapons.

How to use:
-Have the scripts on the same directory as the unpack
-Run ModelUnpackExtractor, and write the name (including the extension) on the terminal
-It will generate a g1m and g1t file. Edit the g1t file as you would a normal g1t file.
-Run UnpackG1tReinjector, and write the name (including the extension) of the .unpack file. It will reinject the .unpack.g1t into the .unpack file.
-Reimport as normal

Example:

1718385027376.png


Has no one documented this before? Compared to everything else I find it sad that as a community we got past injecting normal textures but couldn't figure this one out.
 

Attachments

Last edited by Sapphire645,
Nice work, Sapphire645! I was wondering if there's a way to handle UI textures for fan translation of the game. Both for the original DQB and DQB2. Do you happen to know anything about this matter?
 
Nice work, Sapphire645! I was wondering if there's a way to handle UI textures for fan translation of the game. Both for the original DQB and DQB2. Do you happen to know anything about this matter?
Its all on the UI image file, just replace the file with custom images and volia! There's also a main text file with all the written UI text.
 
  • Like
Reactions: eviltrainer
Its all on the UI image file, just replace the file with custom images and volia! There's also a main text file with all the written UI text.
Yeah, I already managed to translate the text. All that's left is handling the phyre wrapper for the dds textures. I can't find a way to extract and replace them with my edited ones, and then repack them back into a phyre wrapper to be used in the game. All the tools available only support the PC version of the game (well at least the ones I found).
Post automatically merged:

Here's a sample of a texture of the game!
 

Attachments

Last edited by eviltrainer,
It shouldnt be too complicated. The main file of the game (DQB2) is the linkdata. This video has all the tools to replace .dds textures of the game. The only thing you'd have to do is extract the icon sheet, which is a big file containing everything, and replace everything there.

Here is an example of how the image looks like (its shrunk down and .png for visualization purposes). Each language has a different mapping, so based on the language you're basing the translation on you'd have to use a different sheet. For example, european switch version has 5 sheets for its 5 languages.
1718989121583.png

Post automatically merged:

Yeah, I already managed to translate the text. All that's left is handling the phyre wrapper for the dds textures. I can't find a way to extract and replace them with my edited ones, and then repack them back into a phyre wrapper to be used in the game. All the tools available only support the PC version of the game (well at least the ones I found).
Post automatically merged:

Here's a sample of a texture of the game!
Forgot to add, all versions of the game are the same. The index number of the files will change depending on the version, platform, region, etc... so I can't give you a number, but the sheet is after the "tips and tricks" images, which take a whole lot of space so it's easy to land on, and before the text files. Its also before the island name files and the boss monster name files.

It's also the first file after a bunch of empty index files if I'm remembering correctly.

If you have the whole game extracted then it'll be easier to pinpoint the file.

(Edit, on the European version I use it's index 600)
 
Last edited by Sapphire645,
  • Wow
Reactions: eviltrainer
Ok, it seems to be pretty straight-forward indeed! However, this is for DQB2, right? Could you please try and convert the sample phyre file I sent you before? It is from DQB1, so now I'm curious if the original game is harder to work with than the sequel 🤔
Post automatically merged:

1718996706746.png

I think I have my answer: DQB1 uses a different structure for encapsulating assets (nxarc). I didn't know that because actually a friend of mine is translating the game and it seems he already managed to extract the textures (in phyre format) but doesn't know how to proceed any further than that. And that's where we are now.
 
Last edited by eviltrainer,
Ok, it seems to be pretty straight-forward indeed! However, this is for DQB2, right? Could you please try and convert the sample phyre file I sent you before? It is from DQB1, so now I'm curious if the original game is harder to work with than the sequel 🤔
Post automatically merged:

View attachment 443439
I think I have my answer: DQB1 uses a different structure for encapsulating assets (nxarc). I didn't know that because actually a friend of mine is translating the game and it seems he already managed to extract the textures (in phyre format) but doesn't know how to proceed any further than that. And that's where we are now.
I... unfortunately have no idea about DQB1, sorry. There are tools online that convert Phyre into normal dds and back, although I can't tell you which one would work as I have no experience with it.

DQB1 and DQB2 were "developed by different companies", as in, DQB2 uses Koei Tecmo's own encryption format, while DQB1 uses something else. So they are fundamentaly different in that aspect. Tools that work for one game will not really work for the other.
 
  • Like
Reactions: eviltrainer
I... unfortunately have no idea about DQB1, sorry. There are tools online that convert Phyre into normal dds and back, although I can't tell you which one would work as I have no experience with it.

DQB1 and DQB2 were "developed by different companies", as in, DQB2 uses Koei Tecmo's own encryption format, while DQB1 uses something else. So they are fundamentaly different in that aspect. Tools that work for one game will not really work for the other.
Yeah, that's exactly the case here. DQB1 uses Phyre Engine, an obscure engine from Sony and every tool I found online that converts phyre texture to dds, only work with the PC version of the files. It's always like this lol

Anyway, thanks for taking your time to try and help me! I appreciate it! 😉👍🏻
 
  • Like
Reactions: Sapphire645
Yeah, that's exactly the case here. DQB1 uses Phyre Engine, an obscure engine from Sony and every tool I found online that converts phyre texture to dds, only work with the PC version of the files. It's always like this lol

Anyway, thanks for taking your time to try and help me! I appreciate it! 😉👍🏻
You can try to compare the PC version of the same file to the console version with HxD, the differences might be small enough that you can convert the files to something the tool can read manually. Might be worth a shot?
 
  • Like
Reactions: eviltrainer
You can try to compare the PC version of the same file to the console version with HxD, the differences might be small enough that you can convert the files to something the tool can read manually. Might be worth a shot?
Yeah, I didn't come to that. I forgot that completely, lol
But in fact, as I said before, I'm not the one actively translating the game. But I'll give it a shot! I'm just not good at all at HxD but I know how to at least make something out of the magic and the headers a little 🤣🤣
Post automatically merged:

1719074156789.png

Welp, no deal! On PC the game was developed with Unity, and on Switch, it was with PhyreEngine. Guess I'll have to keep looking :glare:
 
Last edited by eviltrainer,
  • Like
Reactions: Sapphire645
Yeah, I already managed to translate the text. All that's left is handling the phyre wrapper for the dds textures. I can't find a way to extract and replace them with my edited ones, and then repack them back into a phyre wrapper to be used in the game. All the tools available only support the PC version of the game (well at least the ones I found).
Post automatically merged:

Here's a sample of a texture of the game!
if you fund tool that support switch tell me , i will do the same if find one i will give you notice
 
  • Like
Reactions: eviltrainer
for port pc mod and create texture , model mod purpose
Oh, I see! I got it (mostly) working with the help of someone really skilled and developer of a tool that can handle phyre textures. I'll thow the info here in the hopes someone like @masagrator (sorry for the ping, but I do have to call you attention here lol) can help crack the last piece of mystery!

So, BigHead is a developer who created the excellent tool called CTT-PS (Custom Texture Tool PS), that can handle several texture formats. It's a suite for extracting, converting, previewing and injecting textures in selected games (apparently with Focus in Trials of Code Steel and Final Fantasy X/X-2). Those games also were made with Phyre Engine, it seems.

I asked him for help and he kindly got interested in the matter, and cracked the phyre texture archive for the Switch! Well, mostly. The textures in DQB1 come in ARG4444/ARGB888 (uncompressed) and DXT5 (compressed) formats and he simply managed to write the code to unpack and repack those textures on Switch! You can alredy replace textures in this game now thanks to him 😀

However, things are not always rainbows and flowers. Several critical textures (mainly characters/monsters/weapons and some critical UI ones) are stored in a single phyre archive and BigHead couldn't find a way to determine where one texture ends and another one starts.

Also, since it's a pack of textures contained inside a single phyre archive, the archive itself has more than one texture, with different formats (both uncompressed and compressed) that completely break the tool he wrote to crack the archive.

Anyways, here's the thread where I first approached him. In one of the thread's page, you'll find the link to the beta version of the tool that can do everything I just described. Hopefully it can help you 😉

https://forums.dolphin-emu.org/Thread-custom-texture-tool-ps-v52-5?page=124
 
  • Like
Reactions: Sapphire645
Oh, I see! I got it (mostly) working with the help of someone really skilled and developer of a tool that can handle phyre textures. I'll thow the info here in the hopes someone like @masagrator (sorry for the ping, but I do have to call you attention here lol) can help crack the last piece of mystery!

So, BigHead is a developer who created the excellent tool called CTT-PS (Custom Texture Tool PS), that can handle several texture formats. It's a suite for extracting, converting, previewing and injecting textures in selected games (apparently with Focus in Trials of Code Steel and Final Fantasy X/X-2). Those games also were made with Phyre Engine, it seems.

I asked him for help and he kindly got interested in the matter, and cracked the phyre texture archive for the Switch! Well, mostly. The textures in DQB1 come in ARG4444/ARGB888 (uncompressed) and DXT5 (compressed) formats and he simply managed to write the code to unpack and repack those textures on Switch! You can alredy replace textures in this game now thanks to him 😀

However, things are not always rainbows and flowers. Several critical textures (mainly characters/monsters/weapons and some critical UI ones) are stored in a single phyre archive and BigHead couldn't find a way to determine where one texture ends and another one starts.

Also, since it's a pack of textures contained inside a single phyre archive, the archive itself has more than one texture, with different formats (both uncompressed and compressed) that completely break the tool he wrote to crack the archive.

Anyways, here's the thread where I first approached him. In one of the thread's page, you'll find the link to the beta version of the tool that can do everything I just described. Hopefully it can help you 😉

https://forums.dolphin-emu.org/Thread-custom-texture-tool-ps-v52-5?page=124
will , Actually i work on ffx2 , ffx hd remaster modding , i try his tool , dosent extract texture from switch files
 
  • Like
Reactions: Sapphire645
will , Actually i work on ffx2 , ffx hd remaster modding , i try his tool , dosent extract texture from switch files
Oh, I thought you were trying to mod Dragon Quest Builders 1, which was the matter of the discussion here 😅
Maybe I forgot to say that this was a game specific mod of the tool to support currently, DQB1 only. Sorry about that!
 
  • Like
Reactions: Sapphire645
@eviltrainer if you want my help, you should summarize what you actually want (list of files for example) and what will be helpful for us. Reading many pages of forum where most of stuff seems irrelevant seems a bit stretching our patience.

And be sure all informations are written correctly. There is no such thing as ARG4444 or ARGB888. There is though ARGB4444 and ARGB8888 (aka ARGB8).
 
@eviltrainer if you want my help, you should summarize what you actually want (list of files for example) and what will be helpful for us. Reading many pages of forum where most of stuff seems irrelevant seems a bit stretching our patience.

And be sure all informations are written correctly. There is no such thing as ARG4444 or ARGB888. There is though ARGB4444 and ARGB8888 (aka ARGB8).
Sorry about the typos, I'm aware the correct compression name is ARGB 😅

Ok, to be more specific: Dragon Quest Builders 1 on Switch was developed on Phyre Engine and current bms scripts and tools for this engine simply won't work on Switch's textures. So, the guy in the thread managed to write code to actually unpack and repack a few compressed and uncompressed phyre textures that I could inject back into to the game so I could work on my translation project.

If you feel like taking a look at it, here's a a few samples with the problematic textures 👍🏻
 

Attachments

  • Like
Reactions: Sapphire645
Oh, I thought you were trying to mod Dragon Quest Builders 1, which was the matter of the discussion here 😅
Maybe I forgot to say that this was a game specific mod of the tool to support currently, DQB1 only. Sorry about that!
its okey , may you please ask him if could fix the issue by adding support ffx-ffx2 texture switch in his tools , since your already in touch with him
 

Site & Scene News

Popular threads in this forum