ROM Hack Translation Detective Pikachu Returns cutscene textmesh pro subtitles font location, help!

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
Hello, guys I need someones help who knows where to find the font asset and atlas for the cutscenes in "Detective Pikachu Returns", I want to add polish letters to it like I did for the game dialog here:
https://gbatemp.net/threads/detective-pikachu-returns-how-to-edit-fonts-help-please.641576/
Because after finding all (I think) "FOT-UDKakugo_SmallPr6N-DB SDF" asset and atlas files in the game, the only place the font is still missing polish letters are the cut scenes:
ryujinx_capture_2023-11-22_23-36-37.png


And the missing letters are shown as some gray squares, and not like blank spaces in the dialogs:
1.png


I think it must be a different font file maybe, I don't know?

So if someone knows there to find the subtitles font files in unity games let me know, Please:bow::bow::bow:
 
Last edited by tomx86,

dgyst

Member
Newcomer
Joined
Jan 31, 2019
Messages
6
Trophies
0
Age
20
XP
150
Country
Russia
I managed to fix it, but only on the emulator. When loading the game on the switch, the console hangs. I will write step by step what I did.
1)I dumped the exefs on the console using NXDump.
2)Using NX2ELF, I turned main into main.elf
3)Received dummy dll using IL2CPP Dumper GUI. Executable file = main.elf, global-metadata.dat = Data\Managed\Metadata\global-metadata.dat
4)from the folder DummyDll, i moved all the files to Data\Managed
5) Open UABEA Nightly and Option->disable cpp2il
6)Open romfs\Data\resources.assets and replace font, but It needs to be replaced "m_FileID": 0 by 1 in the section "m_FileID": 0 by 1

"m_Enabled": 1,
"m_Script": {
"m_FileID": 0,
"m_PathID": 1273

I hope this helps, good luck!
 

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
I managed to fix it, but only on the emulator. When loading the game on the switch, the console hangs. I will write step by step what I did.
1)I dumped the exefs on the console using NXDump.
2)Using NX2ELF, I turned main into main.elf
3)Received dummy dll using IL2CPP Dumper GUI. Executable file = main.elf, global-metadata.dat = Data\Managed\Metadata\global-metadata.dat
4)from the folder DummyDll, i moved all the files to Data\Managed
5) Open UABEA Nightly and Option->disable cpp2il
6)Open romfs\Data\resources.assets and replace font, but It needs to be replaced "m_FileID": 0 by 1 in the section "m_FileID": 0 by 1

"m_Enabled": 1,
"m_Script": {
"m_FileID": 0,
"m_PathID": 1273

I hope this helps, good luck!
Thanks for the reply, but I can't get the nx2elf to work I get (0x000007b) error.
 
Last edited by tomx86,

dgyst

Member
Newcomer
Joined
Jan 31, 2019
Messages
6
Trophies
0
Age
20
XP
150
Country
Russia
Try this link gbatemp.net/threads/about-the-main-file-in-exefs-folder.533701/post-8554295. If it doesn't work out, I'll pack dummy dll tomorrow.
 

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
YEAH! it works:
010007500f27c000_2023-12-16_16-14-38-077.png

Thanks to @dgyst
I made it work on Ryujinx\Console (sort of), after making a resources.assets that works with yuzu, by importing the FOT-UDKakugo_SmallPr6N-DB SDF.json file @dgyst give me inside Data\Managed I had to edit the first lines to look like this:
0 MonoBehaviour Base
0 PPtr<GameObject> m_GameObject
0 int m_FileID = 1
0 SInt64 m_PathID = 0
1 UInt8 m_Enabled = 1
0 PPtr<MonoScript> m_Script
0 int m_FileID = 1
0 SInt64 m_PathID = 1273
1 string m_Name = "FOT-UDKakugo_SmallPr6N-DB SDF"
Then I imported The atlas file and saved the file and it works in yuzu perfectly.
Now for Ryujinx\Console just edit the first lines in FOT-UDKakugo_SmallPr6N-DB SDF in the working yuzu resources.assets like this:
0 MonoBehaviour Base
0 PPtr<GameObject> m_GameObject
0 int m_FileID = 1
0 SInt64 m_PathID = 0
1 UInt8 m_Enabled = 1
0 PPtr<MonoScript> m_Script
0 int m_FileID = 1
0 SInt64 m_PathID = 560532488646354119
1 string m_Name = "FOT-UDKakugo_SmallPr6N-DB SDF"
The game will start but you get this in cut scenes:
ryujinx_capture_2023-12-16_19-53-19.png
To fix that just start the game and go to language select choose a Asian language confirm the language change and the go back to the Polski(English) language and it will work, but you need to do this every tine you start the game:
ryujinx_capture_2023-12-16_19-54-24.png

and belive me I tried for hours to fix it but that's the best I got maybe @dgyst will have better luck.
If it wasn't for a past error I wouldn't even figure it out, because when I used to start the game without the resources.assets while testing the Polish font, every time I changed to a Asian language and back to Polski(English) I got this error:
ryujinx_capture_2023-12-16_19-55-48.png

This was fixed by resetting the game, but today while trying to make the new resources.assets to work with Ryujinx\Console I started the game wit the original resources.assets, and even that fixed that error, so after I finally made a resources.assets that didn't crush in Ryujinx\Console when I saw that texture in the cut scenes I've put two things together and it worked, but its still not perfect, oh well.
And the thing that fixed the language change error was editing this line in FOT-UDKakugo_SmallPr6N-DB SDF:
0 PPtr<$Material> material
0 int m_FileID = 0
0 SInt64 m_PathID = 6527268995890988509
to this:
0 PPtr<$Material> material
0 int m_FileID = 0
0 SInt64 m_PathID = 22
So thanks again to @dgyst, have a good life :toot:
:grog:

Post automatically merged:

YOOOOOOO i DID IT!
The problem was the Atlas file PathID in the FOT-UDKakugo_SmallPr6N-DB SDF.json you gave in the Data\Managed folder, to make it work for all emulators and the console, I edited my FOT-UDKakugo_SmallPr6N-DB SDF.json with extra Polish letters and changed those lines:
0 PPtr<MonoScript> m_Script
0 int m_FileID = 0
0 SInt64 m_PathID = 560532488646354119
1 string m_Name = "FOT-UDKakugo_SmallPr6N-DB SDF"
0 int hashCode = -1304660035
0 PPtr<$Material> material
0 int m_FileID = 0
0 SInt64 m_PathID = 6527268995890988509

and also those:

0 vector m_AtlasTextures
1 Array Array (1 items)
0 int size = 1
[0]
0 PPtr<$Texture2D> data
0 int m_FileID = 0
0 SInt64 m_PathID = 6083195755817863084

to:

0 PPtr<MonoScript> m_Script
0 int m_FileID = 1
0 SInt64 m_PathID = 1273
1 string m_Name = "FOT-UDKakugo_SmallPr6N-DB SDF"
0 int hashCode = -1304660035
0 PPtr<$Material> material
0 int m_FileID = 0
0 SInt64 m_PathID = 22

and also those:

0 vector m_AtlasTextures
1 Array Array (1 items)
0 int size = 1
[0]
0 PPtr<$Texture2D> data
0 int m_FileID = 0
0 SInt64 m_PathID = 172

Because those files have different File and Path IDs inside the resources.assets file:
TMP_FontAsset
FOT-UDKakugo_SmallPr6N-DB Atlas Material
FOT-UDKakugo_SmallPr6N-DB SDF Atlas
And finally import the new Atlas file with extra Polish letters, and it's done!
So once again thanks to you @dgyst :toot: :toot:
And I hope this will help others, with similar problem.

END OF THREAD
 
Last edited by tomx86,
  • Like
Reactions: cearp

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
@tomx86 Dude, you are a self-made genius! :rofl2::rofl2:

Everything you proposed yourself to do with this game, you persevered and succeded in the end! Congrats!
I wish I was this succesful on my attempt on porting a PC translation of a game to its Switch version, but it's been 3 weeks since I started trying to do this and I'm almost losing my mind :wacko:
 

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
@tomx86 Dude, you are a self-made genius! :rofl2::rofl2:

Everything you proposed yourself to do with this game, you persevered and succeded in the end! Congrats!
I wish I was this succesful on my attempt on porting a PC translation of a game to its Switch version, but it's been 3 weeks since I started trying to do this and I'm almost losing my mind :wacko:
Thanks, and good luck on your project, and what game it is may I ask!
 
Last edited by tomx86,
  • Like
Reactions: eviltrainer

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
Thanks, and good luck on your project, and what game it is may I ask!
It's Resident Evil 0 HD Remaster. I have all the textures translated and ready to use from PC, but I can't find a tool that can unswizzle and swizzle them back on Switch. Everything I find works with the same files on PC but they're encoded differently on Switch. And the same thing happens with audio since I tried to port a fandub project as well haha
 

whisky9

Well-Known Member
Newcomer
Joined
Aug 20, 2020
Messages
76
Trophies
0
XP
542
Country
Vietnam
It's Resident Evil 0 HD Remaster. I have all the textures translated and ready to use from PC, but I can't find a tool that can unswizzle and swizzle them back on Switch. Everything I find works with the same files on PC but they're encoded differently on Switch. And the same thing happens with audio since I tried to port a fandub project as well haha
What is the file type of swizzle image? Can you upload a sample file?
 
  • Like
Reactions: eviltrainer

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
What is the file type of swizzle image? Can you upload a sample file?
It's a goddamn .tex file for textures that can't be extracted with its swizzle info. And the same thing happen with the encode info for the opus files the game uses on Nintendo Switch.


Audio format used in the game:
MT-00_eng.opus

And here is the PC version of the same audio from the PC version (this is the fandub edited file):
MT-00_eng.sngw

I'm sending you both the Switch and PC's .tex files (the PC one has the .tex file, a .txt with metadata and the .DDS of the translated texture).
 

Attachments

  • yad_ID.7z
    67.2 KB · Views: 11
  • yad_ID_Fan_Translated.7z
    31.2 KB · Views: 8
Last edited by eviltrainer,

whisky9

Well-Known Member
Newcomer
Joined
Aug 20, 2020
Messages
76
Trophies
0
XP
542
Country
Vietnam
It's a goddamn .tex file for textures that can't be extracted with its swizzle info. And the same thing happen with the encode info for the opus files the game uses on Nintendo Switch.


Audio format used in the game:
MT-00_eng.opus
Is this what you are looking for? It is BC7, offset 0x18, switch swizzle.
 

Attachments

  • yad_ID.png
    yad_ID.png
    170.6 KB · Views: 11
  • Wow
Reactions: eviltrainer

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
Is this what you are looking for? It is BC7, offset 0x18, switch swizzle.
That's exactly it 😮😮

Please tell me how to swap this vanilla file with the edited one I sent you! I really wanna know how to unswizzle and swizzle them!
Post automatically merged:

Dude, I'm almost a month looking for a way to achieve that and you come here and show it to me in seconds 🤣🤣🤣
I would really really appreciate if you can teach me how to do that! The closest to it I've been was opening this .tex file in raw texture cooker and texture finder. There, I got them swizzled and couldn't proceed any further 😥
 

whisky9

Well-Known Member
Newcomer
Joined
Aug 20, 2020
Messages
76
Trophies
0
XP
542
Country
Vietnam
That's exactly it 😮😮

Please tell me how to swap this vanilla file with the edited one I sent you! I really wanna know how to unswizzle and swizzle them!
Post automatically merged:

Dude, I'm almost a month looking for a way to achieve that and you come here and show it to me in seconds 🤣🤣🤣
I would really really appreciate if you can teach me how to do that! The closest to it I've been was opening this .tex file in raw texture cooker and texture finder. There, I got them swizzled and couldn't proceed any further 😥
I just use raw texture cooker to play around and unswizzle image. The Switch tex file has BC7, offset 0x18 and switch swizzle. The PC tex file has BC3, offset 0x24, no swizzled (of course).

1710732736491.png1710732767009.png

I found someone asked the same question like you, to replace Switch texture with PC, you will need a tool called Noesis. Or you can programing a tool by yourself to re-swizzle the image since you already knew its offset, format, size, etc.,
 
  • Wow
Reactions: eviltrainer

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
I just use raw texture cooker to play around and unswizzle image. The Switch tex file has BC7, offset 0x18 and switch swizzle. The PC tex file has BC3, offset 0x24, no swizzled (of course).

View attachment 426320View attachment 426321

I found someone asked the same question like, to replace Switch texture with PC, you will need a tool called Noesis. Or you can programing a tool by yourself to re-swizzle the image since you already knew its offset, format, size, etc.,
Dude, how?! I used this tool for hours and couldn't unswizzle anything! :hateit:

I have noesis installed and could do nothing with it. It can't preview .tex files and not even export them. I use kuriimu2 to replace files, but it didn't work with those files. I really need a tutorial or something to use noesis then :cry:
If you can teach me I'll be eternally grateful 😁😁
Post automatically merged:

Also, how did you get the offset, width info on the Switch textures?! I'm sorry about all those questions, but I almost lost my mind trying to find a way to extract those textures! It was like for almost a month now :rofl2::rofl2:
Post automatically merged:

Seriously?! It can export the .dds image an specific texture file for almost all RE games, but RE0 😥😥😥
1710734682417.png
 
Last edited by eviltrainer,

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
It's Resident Evil 0 HD Remaster. I have all the textures translated and ready to use from PC, but I can't find a tool that can unswizzle and swizzle them back on Switch. Everything I find works with the same files on PC but they're encoded differently on Switch. And the same thing happens with audio since I tried to port a fandub project as well haha
See you asked for help and you got it, I hope @whisky9 will help you, good luck:D
 
  • Like
Reactions: eviltrainer

eviltrainer

Member
Newcomer
Joined
Sep 13, 2009
Messages
24
Trophies
1
XP
61
Country
Brazil
See you asked for help and you got it, I hope @whisky9 will help you, good luck:D
Thank you!! I'm really excited that I'll finally be able to move forward with my port! Now I'm stuck again just waiting for more help :rofl2: :rofl2:
Post automatically merged:

Also, when I'm done with this I'll probably bother you asking for help with Detective Pikachu @tomx86 :rofl:

See how the 4th word in the title screen of the attached image reads "Configuraçöes"? It was supposed to read "Configurações". That must be kinda the same issue you ran into, right?
 

Attachments

  • 1710805163732.png
    1710805163732.png
    610.8 KB · Views: 11
Last edited by eviltrainer,

tomx86

Well-Known Member
OP
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,187
Country
Poland
Thank you!! I'm really excited that I'll finally be able to move forward with my port! Now I'm stuck again just waiting for more help :rofl2: :rofl2:
Post automatically merged:

Also, when I'm done with this I'll probably bother you asking for help with Detective Pikachu @tomx86 :rofl:

See how the 4th word in the title screen of the attached image reads "Configuraçöes"? It was supposed to read "Configurações". That must be kinda the same issue you ran into, right?
Here is the CHARACTER LIST of DPR Arabic letters:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{}~¡¥©®¿ÀÂÄÆÇÈÉÊËÌÎÏÑÒÓÔÖÙÛÜßàâäæçèéêëìîïñòóôöùûü
And sadly Õõ are not there so you will have to follow my guide and create a new font, with all missing characters, here is the .oft you will need:
 

Attachments

  • FOT-UDKakugo_SmallPr6N-DB.rar
    3.1 MB · Views: 6
  • Like
Reactions: eviltrainer

whisky9

Well-Known Member
Newcomer
Joined
Aug 20, 2020
Messages
76
Trophies
0
XP
542
Country
Vietnam
Thank you!! I'm really excited that I'll finally be able to move forward with my port! Now I'm stuck again just waiting for more help :rofl2: :rofl2:
Sorry for late response. Here is the .tex file I tried to mod for switch (already re-swizzling). Try it on your console to see if it work. I don't have that game so I'm unable to test.

Btw, may I know what is this tool?
Seriously?! It can export the .dds image an specific texture file for almost all RE games, but RE0 😥😥😥
View attachment 426325
 

Attachments

  • 2024-04-01_09-12-48.jpg
    2024-04-01_09-12-48.jpg
    45.4 KB · Views: 7
  • Switch_yad_ID.zip
    54.1 KB · Views: 5
Last edited by whisky9,
  • Love
Reactions: eviltrainer

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Metoroid0 @ Metoroid0: im more interested in metroid prime 4