Hacking How can I rewrite the fms file of a language file?

shiren

Member
OP
Newcomer
Joined
Jan 29, 2024
Messages
14
Trophies
0
Age
44
XP
60
Country
Japan
I extracted the language files from the cpk files contained in the Nintendo Switch game's romfs.
The file has the extension fms.
I would like to edit this file and create a translation switch mod.

$ xxd ~/Downloads/lang.fms | head
00000000: 464d 5342 c0b0 0300 2000 0000 0000 0000 FMSB.... .......
00000010: 0000 0000 6b07 0000 0300 0000 0000 0000 ....k...........
00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
 
Last edited by shiren,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,282
Trophies
3
XP
12,052
Country
Poland
You didn't mention what game is that.

For example 13 Sentinels is using FMS. I have wrote text extractor long time ago
https://github.com/masagrator/NXGameScripts/blob/main/13 Sentinels/FMS_extracttext.py

python FMS_extracttext.py lang.fms

I didn't write any tool for parsing that back. You can see that there is no additional info attached implying who is talking each line and which chapter is it. You would need to find where are game scripts and write a disassembler that would allow to know how those strings are used.
 
  • Love
  • Like
Reactions: shiren and impeeza

shiren

Member
OP
Newcomer
Joined
Jan 29, 2024
Messages
14
Trophies
0
Age
44
XP
60
Country
Japan
You didn't mention what game is that.

For example 13 Sentinels is using FMS. I have wrote text extractor long time ago
https://github.com/masagrator/NXGameScripts/blob/main/13 Sentinels/FMS_extracttext.py

python FMS_extracttext.py lang.fms

I didn't write any tool for parsing that back. You can see that there is no additional info attached implying who is talking each line and which chapter is it. You would need to find where are game scripts and write a disassembler that would allow to know how those strings are used.
Thank you.
So, there isn't a universal format for FMS files, and one must investigate their structure, correct?
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,282
Trophies
3
XP
12,052
Country
Poland
Thank you.
So, there isn't a universal format for FMS files, and one must investigate their structure, correct?
Overall you shouldn't look at filetype itself, but also with info about game/engine its using.
And if it's the same as 13 Sentinels, you don't have more info in FMS than my script extracts. This is just a bunch of strings connected. You must search in other files info that are referencing strings in FMS file.
 

shiren

Member
OP
Newcomer
Joined
Jan 29, 2024
Messages
14
Trophies
0
Age
44
XP
60
Country
Japan
Overall you shouldn't look at filetype itself, but also with info about game/engine its using.
And if it's the same as 13 Sentinels, you don't have more info in FMS than my script extracts. This is just a bunch of strings connected. You must search in other files info that are referencing strings in FMS file.
I have confirmed that the text decoded by the tool can be extracted, but it seems a bit difficult to create a translation mod, as it needs to be converted back to FMS again.
Thank you very much for your polite response.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: 24,000 hmmmm lol