Nenkai / FF16Tools

Tools for Final Fantasy XVI / 16.
MIT License
39 stars 4 forks source link

"text" folder missing "T" in folder name #7

Closed ggdog007 closed 2 months ago

ggdog007 commented 2 months ago

Hi, Thanks for your tool. I test it but found a problem. If I unpack a .pac file (eg. 0001.en.pac), then pack it back to .pac file without any modification. Replace the file under game directory, launch the game, all texts are gone. Then I unpack the same file again found the "text" foler is rename to "ext", missing a "t" in the folder name. Can you help have a quick fix of it or any alternative solution? Thanks,

ggdog007 commented 2 months ago

BTW, I'm a newbie. How to launch your tool with GUI? Thanks,

ggdog007 commented 2 months ago

Thanks, With your latest 1.2 release. It seems worked.

ggdog007 commented 2 months ago

Sorry, I found the problem is still there. For example if I unpack "0001.en.pac" and pack it back without any modification. Enter the game, all texts are gone or go wrong. Thanks,

Nenkai commented 2 months ago

Can't reproduce the missing letter. What are the full commands you're running? Make sure to provide the original archive name argument. For 0001, it should be 'nxd'.

ggdog007 commented 2 months ago

Can't reproduce the missing letter. What are the full commands you're running? Make sure to provide the original archive name argument. For 0001, it should be 'nxd'.

Hi I used the command that listed in your readme. First I launch a cmd window from where I unzip your tool, and

FF16Tools.CLI.exe unpack-all -i D:\pac_test\0001.en.pac -o D:\pac_test

I can see a "text" folder as well as bunch of .nxd files. And I put all files and the text folder in sub-directory at D:\pac_test\en. Did no modification. Then pack them back using

FF16Tools.CLI.exe pack -i D:\pac_test\en -o 0001.en.pac

I replace the same 0001.en.pac file under game directory, launch the game, switch to English then text just go either missing or wrong.

Thanks,

Nenkai commented 2 months ago

Try again with 1.2.1, the guidelines for modding has changed a bit so read the README first

ggdog007 commented 2 months ago

Try again with 1.2.1, the guidelines for modding has changed a bit so read the README first

Hi, it seems worked, that I unpack and pack the .pac back, replace it under game directory, launch game, and it is normal.

But currently it seems I can do no modification to the text file. A quick test I did is I unpack the 0001.en.pac, modify the file in "\nxd\text\levent\levent19000170.pzd". There is a dialogue at the very beginning of the demo after the opening that Clive will say "Yes, Sergent", and the branded leader will say "I said focus, Wyvern". If I modify the line "I said focus, Wyvern" to something else like "Seeing this means mod success!" pack the .pac and replace it under game directory and launch, continue game. I could see the leader say "Seeing this means mod success!", but the original sound of this line is muted, I heard nothing.

I also tried different speaking language, the same problem. Further, if I did the similar to 0001.cs.pac, which is what I intend to do to have a localization of this game, both npc's dialogue line and source are disappeared.

I think it may be due to the encoding of the text file of this game. I used notepad++ to open the .pzd file. It seems it has to be utf-8 to show the dialogue text correctly in the .pzd.

My I ask if you have any suggestion on how to do text modification correctly?

Many thanks!

ggdog007 commented 2 months ago

Sorry, I just noticed the last lines of your updated README. So I shouldn't modify the language text file and pack, instead I should have an append file like 0001.diff.en.pac? Would you please give an example of how to modify the text in this game? Much appreciated!

ggdog007 commented 2 months ago

Hi, Sorry to keep bothering you. I found one interesting thing is I can modify the dialog text without loosing the npc voice only if the new string is the same length of the old one. For example as I mentioned above, the branded leader say "I said focus, Wyvern!", if I replace it with "One two three four fi", exactly 21 characters. Then after replacing the .pac file and replay the game, the subtitle will show "One two three four fi" and the npc voice is NOT muted. I guess there must a marker in the .pzd file or an index file to indicating the length of one dialogue string to align with the voice. Thanks,

Nenkai commented 2 months ago

Sorry, I just noticed the last lines of your updated README. So I shouldn't modify the language text file and pack, instead I should have an append file like 0001.diff.en.pac? Would you please give an example of how to modify the text in this game? Much appreciated!

Yes this is correct. Use diff files if you don't want to repack the entire folders. (by the way, thanks for the support!)

ggdog007 commented 2 months ago

Sorry, I just noticed the last lines of your updated README. So I shouldn't modify the language text file and pack, instead I should have an append file like 0001.diff.en.pac? Would you please give an example of how to modify the text in this game? Much appreciated!

Yes this is correct. Use diff files if you don't want to repack the entire folders. (by the way, thanks for the support!)

I tried only repack /nxd/text/levent/levent19000170.pzd this file with command FF16Tools.CLI pack -i D:\pac_test\0001.en.extracted -o D:\pac_test\0001.diff.en.pac But it returns an error "Unhandled exception. System. ArgumentNullException: Value cannot be null. (Parameter 'path2')"

Could you help give an example on how to use .diff file to modify text in the game?

Nenkai commented 2 months ago

This is a known issue that will be fixed in the next release.

ggdog007 commented 2 months ago

This is a known issue that will be fixed in the next release.

Hi, I think I figured it out, when packing, I must have that .path file along with the nxd folder. But text change doesn't work, as I did as below:

1) I unpack only text/levent/levent19000170.pzd to "D:\pac_test\0001.en.extracted", which will only unpack levent19000170.pzd to "D:\pac_test\0001.en.extracted\nxd\text\levent\levent19000170.pzd" 2) change text in the levent19000170.pzd 3) have a .path file(in it, it give the folder name nxd) under D:\pac_test\0001.en.extracted 4) pack the directory "D:\pac_test\0001.en.extracted" as 0001.diff.en.pac 5) put 0001.diff.en.pac under game directory, and copy&rename 0001.pac as 0001.diff.pac.

Then enter the game, but text still doesn't change. Any steps wrong here?

ggdog007 commented 2 months ago

Hi, I googled around and now I understand that when this .pzd file is opened as binary file, I could read the dialogue text from it only as part of it. But if I increase or decrease the length of the string, the program may break and won't load the .pzd correctly. It seems it is difficult to edit the text without breaking the file. I just wondering is there a way to modify the game text correctly? Thanks,

Nenkai commented 2 months ago

Path issues should be solved as of 1.2.2.

For the rest i'm afraid it's offtopic, you might want to ask somewhere such as ResHax

ggdog007 commented 2 months ago

Thanks, For all your help. Will keep checking around.