scripts for text editing message_en.lzs
Opened this issue · 22 comments
Hey Marco.
I'm trying to edit text for a translation using Cartographer and Atlas, but I cannot get it to work correct on message_en.lzs. I saw you mentioned having created some scripts for it, do you have those by chance?
Also I can't find the commands to replace edited back into pac.bin on this git.
Here are the scripts together with the tables. You might need to change some paths inside the scripts to load the tables properly.
P.S. of course the message_en.lzs should be in decompressed form, for cartographer and atlas to work.
Data.zip
Do you know the command to decompress message_en.lzs? FF4Tools decompressor and recompresses is that right?
before editing anything, I tested reinserting via Atlas to make sure everything's working and got this message:
Error: "You must specify an address using JMP before inserting text" on line 9 Insertion - 1 error(s), 0 warning(s)
The Atlas commands must be copied at the beginning of the script file, not separated, otherwise atlas does not find them.
Also, i don't think atlas can read multiple scripts, so you should also copy the content of a scripts in a single file. So you should have one script file taht contains the Atlas commands and the whole script.
I see you are extracting multiple scripts (probably because you uncommented some commands in the file I gave you). You should not uncomment them, as the first block in the commands already extracts all texts. Those comments are just leftovers, and you should ingnore them.
The Atlas commands must be copied at the beginning of the script file, not separated, otherwise atlas does not find them.
Ah ok so I started over, leaving everything as they are in Data.zip
Ok, first,
In Cartographer.bat
I use:
cartographer message_en.lzs ff4psp_commands.txt ff4cc_script -s
Copy the contents of atlas_config.txt
in ff4cc_script.txt
so it looks like this:
Then, for reinserting, in Atlas.bat
, I use:
Atlas message_en.lzs ff4cc_script.txt
Lastly, use FF4tools
to recompress message_en.lzs
*note I used the FF4_unpac.exe
(doubled clicked it) supplied with Natreg's FF4 CC Editor to unpac the PAC.bin which also decompressed message_en.lzs
(size is 962kb) (if doing that was OK)
You don't need to recompress, the archiver should automatically decompress when extracting and compress when rebuiliding the PAC.
Moreover, cartographer is extracting the text of the script under comments// so you reinsert you will get an empty message_en. The reason why it comments out text is so that when translating you can write below each comment your translation. The problem with this is that until you completely translate the file, you cannot test the changes in game. So, i suggest to tell cartographer to disable comments
in principle, using the -m command should give the correct script. These are the commands I used:
Cartographer.exe message_en.lzs ff4psp_commands.txt ff4_dump -m
Atlas.exe new_message_en.lzs ff4_dump.txt
in principle, using the -m command should give the correct script. These are the commands I used:
Cartographer.exe message_en.lzs ff4psp_commands.txt ff4_dump -m
Atlas.exe new_message_en.lzs ff4_dump.txt
does this also tell cartographer to disable comments?
I remember with the above commands, I was not getting comments. You should check the script you get from that command.
Alright it took a few tweaking in the commands, but I got cartographer to disable comments.
the last thing i to find are the command usage of ff4tools
FF4Archiver.exe
FF4Decompressor.exe
FF4MiniArchiver.exe
MonstersSorter.exe
where are they? i not see it and its switches in readme/no readme
Simply execute them from the command line without any parameter and they should tell you their usage.
You should never need to use FF4Decompressor, unless in specific circumstances; FF4Archiver and FF4MiniArchiver will take care of automatically decompressing files when extracting them, and recompressing them before packing.
The only case where you would need to use FF4Decompressor is for some compressed graphics that are hard-coded inside the EBOOT, which you need to extract manually, decompress, modify, recompress, and reinsert manually inside the EBOOT.
The usage of most of the tools is simple. FF4Archiver is for the PAC0/PAC1 archive; FF4MiniArchiver is for some small archives that are contained in PAC, such as file like prologue.lzs, title.lzs, icon.lzs, ecc., and MonsterSorter takes the decrypted EBOOT and your modified message_en.lzs, and sorts the monsters in the bestiary alphabetically in the EBOOT according to your translated names in the message_en.lzs you provide.
The only somehow complex tool to use is FF4Archiver.
The archiver allows you to selectively import some files, rather than rebuilding the archive from scratch every time like FF4_pac does. This should make packing your changes in the archive much faster.
Say that you extract all files from the PAC, but now you only want to insert back in the PAC the message_en.lzs file. Then, you do it like this:
Let's assume you saved your modified message_en.lzs in C:\FF4\message_en.lzs, while the PAC0.bin and PAC1.bin are also in C:\FF4. We know message_en.lzs is located in directory /data/message/ in the PAC. So you write:
FF4Archiver.exe -import C:\FF4\PAC0.bin C:\FF4\PAC1.bin /data/message/message_en.lzs=C:\FF4\message_en.lzs
You can also import multiple files at the time, by separating each ...=... entry with a comma, like:
FF4Archiver.exe -import C:\FF4\PAC0.bin C:\FF4\PAC1.bin /data/message/message_en.lzs=C:\FF4\message_en.lzs,/data/message/message_fr.lzs=C:\FF4\message_fr.lzs
You can also import the content of a whole directory. For example, let's say you extracted the whole content of the /data/message directory, and you want to import everything you changed in that directory, and say all such changed files are in C:\FF4\message in your PC. Then you do:
FF4Archiver.exe -import C:\FF4\PAC0.bin C:\FF4\PAC1.bin /data/message=C:\FF4\message
Note: all lzs files on your PC must be decompressed. FF4Archiver will take care of recompressing them before reinserting them in the PAC.
Got it! thank you for detailing!
The only case where you would need to use FF4Decompressor is for some compressed graphics that are hard-coded inside the EBOOT, which you need to extract manually, decompress, modify, recompress, and reinsert manually inside the EBOOT.
Do you know what these files are I can extract?
I am only aware of the SQUARE ENIX logo that appears when starting the game.
I am only aware of the SQUARE ENIX logo that appears when starting the game.
Ah, so that was:
in eboot i saw
squareenix_logo
I was searching everywhere in the pac to find it.
so to edit this, i would do
FF4Decompressor.exe -d squareenix_logo squareenix_logo_out
Yes, given squareenix_logo is the properly extracted compressed logo taken from the EBOOT
Yes, given squareenix_logo is the properly extracted compressed logo taken from the EBOOT
The file was 0kb when i executed it, is that right?
do you know of the bug where editing the battle string texts causes the text strings to be jumbled?
On a pure fresh text dump, the first and only text string i edited was the first battle string
this one:
//POINTER #382 @ $5F8 - STRING #382 @ $19526
The dragon turned into mist!<end>
editing text string causes all the text in the game to become jumbled/misaligned.
Do the scripts recreate the same message_en.lzs if you do not apply any changes?
This is the the text dump I get using the scripts I sent you.
ff4_dump_en_000.txt
Are you using non-English characters in your translation?