Macross 30

How to translate the files of a game
alanm
Posts: 21
Joined: Mon Aug 17, 2020 4:54 am

Macross 30

Post by alanm »

Credit to aluigi who researched PIDX and FSTS formats and created QuickBMS script to extract data[1].dat and filelist[0-2].dat archives.
See :https://zenhax.com/viewtopic.php?f=9&t=2212&p=68064&hilit=macross#p67939 for the scripts:
macross_pidx.bms
macross_fsts.bms

macross_pidx_offset2.bms is my modification of macross_pidx.bms to extract a second set of FSTS files packed inside data.dat. the GOP text that show up in game are packed inside these FSTS files within data.dat.

It is possible to translate dialog text and mission text within the limit of the original file size. I am working on tool to export/import GOP text files. I fed the exported Japanese text to Google translate webpage. The translated text is kind of weird.
Screenshots from RPCS3 emulator, this game cannot be completed using emulator.

Image
Image
Image
kurisunyanyan
Posts: 4
Joined: Sun Aug 22, 2021 2:38 am

Re: Macross 30

Post by kurisunyanyan »

How can I reimport these gop file? I tried using quickbms to repack those files, but it didn't work in rpcs3.
It would be greatly appreciated if you could answer this question.
kurisunyanyan
Posts: 4
Joined: Sun Aug 22, 2021 2:38 am

Re: Macross 30

Post by kurisunyanyan »

Code: Select all

 endian big
findloc OFFSET binary "GENESTRT"
goto OFFSET
getdstring SIGN 8
get SIZE longlong
savepos BASE_OFF
get STRINGS long
get INFO_OFF long
get STRINGS_OFF long
get OTHER_OFF long
math STRINGS_OFF + BASE_OFF
for i = 0 < STRINGS
    get OFFSET long

    savepos TMP
    math OFFSET + STRINGS_OFF
    goto OFFSET
    slog "" -1 -1
    goto TMP
next i

there is a quickbms script ,I have tried this ,it works
alanm
Posts: 21
Joined: Mon Aug 17, 2020 4:54 am

Re: Macross 30

Post by alanm »

kurisunyanyan wrote:How can I reimport these gop file? I tried using quickbms to repack those files, but it didn't work in rpcs3.
It would be greatly appreciated if you could answer this question.


Trying to remember what I did.
To extract the gop txt file:

copy data.dat to a temp location

mkdir data_off2
quickbms.exe macross_pidx_offset2.bms data.dat data_off2\
- you will get a bunch of files under data_off2\ directory. delete everything except a file named "gop"

mkdir gop_mod
quickbms.exe macross_fsts.bms data_off2\gop gop_mod\
- you should find a bunch of .gop file under gop_mod\data\gop\ . delete all the .gop except the one that you want to translate (i.e. gop_battletext.gop).

Translate and modify content of that gop file. The text strings position is guarded by a offset table. If you change a string's starting file offset the corresponding offset table entry need to be updated. that is why this is best done with a specialize script.

P.S. So far I can only modify text string inside .gop file text section but not changing the section size. Changing starting position of each text strings is okay as long as the corresponding offset entries in the file header are updated. some translated text is longer than the original Japanese text, some shorter. So far the combine size did not exceed the original text section size. If gop file size is altered the game will not run. Also, if the translated gop file compressed to a bigger size than the original gop, quickbms's re-import workaround may also cause game to crash. So far I haven't have any compress file size issue with the translated gop file I tested.

To repack the modified file:

quickbms.exe -w -r macross_fsts.bms data_off2\gop gop_mod\
- you should see a message saying the modified file(s) was/were re-imported to gop

quickbms.exe -w -r macross_pidx_offset2.bms data.dat data_off2\
- you should see a message the "gop" archive was re-imported back to data.dat

copy this data.dat to you emulator hard drive or a modded PS3 hard drive replacing the original data.dat and start the game to test it.
kurisunyanyan
Posts: 4
Joined: Sun Aug 22, 2021 2:38 am

Re: Macross 30

Post by kurisunyanyan »

alanm wrote:
kurisunyanyan wrote:How can I reimport these gop file? I tried using quickbms to repack those files, but it didn't work in rpcs3.
It would be greatly appreciated if you could answer this question.


Trying to remember what I did.
To extract the gop txt file:

copy data.dat to a temp location

mkdir data_off2
quickbms.exe macross_pidx_offset2.bms data.dat data_off2\
- you will get a bunch of files under data_off2\ directory. delete everything except a file named "gop"

mkdir gop_mod
quickbms.exe macross_fsts.bms data_off2\gop gop_mod\
- you should find a bunch of .gop file under gop_mod\data\gop\ . delete all the .gop except the one that you want to translate (i.e. gop_battletext.gop).

Translate and modify content of that gop file. The text strings position is guarded by a offset table. If you change a string's starting file offset the corresponding offset table entry need to be updated. that is why this is best done with a specialize script.

P.S. So far I can only modify text string inside .gop file text section but not changing the section size. Changing starting position of each text strings is okay as long as the corresponding offset entries in the file header are updated. some translated text is longer than the original Japanese text, some shorter. So far the combine size did not exceed the original text section size. If gop file size is altered the game will not run. Also, if the translated gop file compressed to a bigger size than the original gop, quickbms's re-import workaround may also cause game to crash. So far I haven't have any compress file size issue with the translated gop file I tested.

To repack the modified file:

quickbms.exe -w -r macross_fsts.bms data_off2\gop gop_mod\
- you should see a message saying the modified file(s) was/were re-imported to gop

quickbms.exe -w -r macross_pidx_offset2.bms data.dat data_off2\
- you should see a message the "gop" archive was re-imported back to data.dat

copy this data.dat to you emulator hard drive or a modded PS3 hard drive replacing the original data.dat and start the game to test it.


My gratitude is beyond words,I have imported the game text, and I am trying to modify the text displayed in the main menu, I found that there are some files in the menu.fsts file but they are in .ark format, I try to use any encoding I know to view those .ark file, but didn't get any useful information.