Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on file auto_yus_us.bin #19

Open
wandersonareis opened this issue Feb 19, 2019 · 44 comments
Open

Error on file auto_yus_us.bin #19

wandersonareis opened this issue Feb 19, 2019 · 44 comments

Comments

@wandersonareis
Copy link
Contributor

I have a problem with this file, auto_yus_us.bin. Using unpack and repack without editing, the game crashes.
I could not figure out the problem because all the other files are edited perfectly.

@wandersonareis
Copy link
Contributor Author

Any news about fixing this error?
Only this file is in trouble. The other files work fine.

@pinguallyj
Copy link

Any news about fixing this error?
Only this file is in trouble. The other files work fine.

Hello, I also have the same issue. I am translating this game into russian and only this file causes crash.

@wandersonareis
Copy link
Contributor Author

Any news about fixing this error?
Only this file is in trouble. The other files work fine.

Hello, I also have the same issue. I am translating this game into russian and only this file causes crash.

This auto_yus_us.bin crashes just using the Pulse tool. Without changing anything, just unpack and repack.
But Albeoris still no reply. Very sad for us. This is the only tool I know of for the FF13LR.

@pinguallyj
Copy link

pinguallyj commented Jan 5, 2021

Any news about fixing this error?
Only this file is in trouble. The other files work fine.

Hello, I also have the same issue. I am translating this game into russian and only this file causes crash.

This auto_yus_us.bin crashes just using the Pulse tool. Without changing anything, just unpack and repack.
But Albeoris still no reply. Very sad for us. This is the only tool I know of for the FF13LR.

I think it has to do with ZTR, the text is uncompressed when I pack it, in the original it is compressed. Do you maybe know how to pack ztr, so the text becomes compressed?

Also I wrote to Albeoris privately, let's just hope he responds too. We can try to figure it out together, if you want. Do you have discord?

@wandersonareis
Copy link
Contributor Author

But all ZTR files are decompressed.
Why just this file would issue to be unpacked?
Pulse does not compress any of the files.

@pinguallyj
Copy link

pinguallyj commented Jan 5, 2021

But all ZTR files are decompressed.
Why just this file would issue to be unpacked?
Pulse does not compress any of the files.

Maybe it's some weird coding, you know Square enix.
If you look at hex of changed file, all of the text is decompressed.
In original it is totally compressed. Maybe if we can compress it the same way as in original, then the game will work.

I also noticed. If we take auto_wil_us. Packed ztr is compressed. So you dont see text in hex editor. This is not the case however for auto_yus_us.

@wandersonareis
Copy link
Contributor Author

But all the files after Pulse are uncompressed. Why would this file be a problem? The archives of other cities are uncompressed and work.
This is the only file that causes a problem.

@pinguallyj
Copy link

pinguallyj commented Jan 5, 2021

But all the files after Pulse are uncompressed. Why would this file be a problem? The archives of other cities are uncompressed and work.
This is the only file that causes a problem.

https://ibb.co/3dgMLfS
This is auto_yus before we pack ztr
https://ibb.co/HF97Y2p
This is auto_yus after we pack ztr

Now to compare with other files
https://ibb.co/J5LbDpj
This is auto_wil AFTER we pack ztr

So you see, maybe this auto_yus file has another compression method that is not supported by pulse. or somehow it fails to put the text back, because there is different structure or it cant compress it back
I might be wrong here, I have no idea, but if we put files from other languages like spanish/italian/japanese and etc of the same file, they also work fine.

@wandersonareis
Copy link
Contributor Author

Maybe someone revert this ZtrFileTextUnpacker and make possible compress ZTR file.

@pinguallyj
Copy link

Maybe someone revert this ZtrFileTextUnpacker and make possible compress ZTR file.

Actually, I tested it one more time, if I just pack it without changing, then it is ok.
But as soon as atleast one character changes, then game crashes. This is so weird...

@wandersonareis
Copy link
Contributor Author

Just using the file in the tool already crashes. You don't need to edit anything.

@pinguallyj
Copy link

Just using the file in the tool already crashes. You don't need to edit anything.

Hm? The tool doesn't crash for me, it does unpack it/pack it,

@wandersonareis
Copy link
Contributor Author

Game crash if use this file on Pulse. You do not need to edit anything in the file. Just unpack and repack using this Pulse and the crash game

@pinguallyj
Copy link

Game crash if use this file on Pulse. You do not need to edit anything in the file. Just unpack and repack using this Pulse and the crash game

For me if I just unpack/repack the game doesn't crash, only if I change 1 symbol inside ztr.

@pinguallyj
Copy link

Now it crashes even if it is compressed when I open it with hex. So that is not the problem, I guess.
Interesting thing is, if you put any random file instead of auto_yus then game works. Like if I replace it with auto_wil, it is ok for a game. But as soon as pulse does something ,then it's crash.
My programming skills are not really good, so I don't know what can cause this...
Maybe it's during wpd packing process?

@pinguallyj
Copy link

What I also noticed that after packing file thru pulse, those 00 bytes after header get removed
https://ibb.co/MZXbkfX
This is original auto_yus and after we pack it, those 00 bytes are gone.
https://ibb.co/MZXbkfX

Still game runs fine, if we don't change anything. But maybe it corrupts the structure of the file somehow?

@wandersonareis
Copy link
Contributor Author

You can insert ZTR into WPD manually via Hex. Albeoris needs to look at this. Why only this file causes a problem. When all other files work when using Pulse, it is strange that this file causes a problem.

@pinguallyj
Copy link

You can insert ZTR into WPD manually via Hex. Albeoris needs to look at this. Why only this file causes a problem. When all other files work when using Pulse, it is strange that this file causes a problem.

He told me that files are inserted at the end of archive and it can map to a memory which is used by the game. So we need maybe some packer that can put game files in order and implement defragmentation, which will remove gaps in archives. (That’s what Albeoris said)

@wandersonareis
Copy link
Contributor Author

You could delete a few lines of text and leave the empty text keys. If you leave the text uncompressed with the same size as the original compressed and test whether the game gives crash. If the problem is the file size uncompressed and play memory buffer.
I don't have the game here to test.

@pinguallyj
Copy link

You could delete a few lines of text and leave the empty text keys. If you leave the text uncompressed with the same size as the original compressed and test whether the game gives crash. If the problem is the file size uncompressed and play memory buffer.
I don't have the game here to test.

Okay I will try it. But I tried placing files from Spanish version or Italian version to English Version which have different sizes, then game runs fine, no crash.

@wandersonareis
Copy link
Contributor Author

But the uncompressed file is twice the size of the original archive.

@pinguallyj
Copy link

But the uncompressed file is twice the size of the original archive.

Ah yeah you are right, maybe I can also try to remove all lines from Ztr and pack too? I will try when I get home

@wandersonareis
Copy link
Contributor Author

wandersonareis commented Jan 6, 2021

Using this 00000001_auto_yus_us.zip not crash.

WPD file auto_yus_us.zip.
Game not crash using this WPD smaller than original.

Files need compression to function properly on the FF13LR.
We need Albeoris' help.

@pinguallyj
Copy link

Yeah you are right, it works. I wrote him about the issue and that we need compression.

@pinguallyj
Copy link

pinguallyj commented Jan 7, 2021

He told me there is some CompressZTRContent method instead of FakeCompression, which greatly reduces ztr file size, thought not completely like the original file. I packed ztr with this, I determined that maximum file size is 256 kb. If you insert just one more line, it crashes. I used my Russian translation file and for me it is about 1176 lines. After 1177 it crashes.

@wandersonareis
Copy link
Contributor Author

256kb for this WPD and ZTR pack or 256kb for ZTR file?
1176 lines for strings files?

@pinguallyj
Copy link

256kb for this WPD and ZTR pack or 256kb for ZTR file?
1176 lines for strings files?

256 kb for WPD with ZTR.
https://drive.google.com/file/d/1YerCZryZGS-y5NdhucaQ7l72GGuLam5B/view?usp=sharing
Here is working file.

@wandersonareis
Copy link
Contributor Author

Can you send me the method to use CompressZTR?

@pinguallyj
Copy link

Can you send me the method to use CompressZTR?

It is already in Pulse, in file ZtrFileKeysPacker, change FakeCompression to CompressZTRContent.
As Albeoris said, this only compresses keys of ztr, as it was needed by Final Fantasy XIII-2 menus to work correctly, as I remember.

@wandersonareis
Copy link
Contributor Author

I didn't use this on the FF13-2.
The solution was to use something that already existed and I have the translation to finalize the files for so many years.
Did you make any modifications to use Pulse on the FF13LR or as I only use Pulse on ZTR?

@pinguallyj
Copy link

pinguallyj commented Jan 7, 2021

I didn't use this on the FF13-2.
The solution was to use something that already existed and I have the translation to finalize the files for so many years.
Did you make any modifications to use Pulse on the FF13LR or as I only use Pulse on ZTR?

I know little about coding and only can read it.
I also use it only for ztr/file extraction and image previews. I did wpd unpacking with your GUI add-on.

@wandersonareis
Copy link
Contributor Author

ZtrFileKeysPacker use CompressZTRContent and ZtrFileTextPacker use FakeCompress.
Where should I change?

@pinguallyj
Copy link

ZtrFileKeysPacker use CompressZTRContent and ZtrFileTextPacker use FakeCompress.
Where should I change?

Ah then change in TextPacker

@wandersonareis
Copy link
Contributor Author

auto_yus_us.zip
258kb. Should I reduce the text to be 256kb?

@pinguallyj
Copy link

pinguallyj commented Jan 7, 2021

auto_yus_us.zip
258kb. Should I reduce the text to be 256kb?

Yes, otherwise it will crash. I tested with other files like auto_wil and it is the same.
Why auto_yus is special - it has many lines and that is why wdb file is so big 190 kb. that is like more than half of a file. There are some empty lines inside ztr, we can delete them and also delete corresponding script file, this may help shrink some kb.

Also 256 kb might be some standard block transfer which is imposed by the game somehow, and it tells the game to transfer it in one go, or give some memory overflow error otherwise, but that's just my assumption.

@wandersonareis
Copy link
Contributor Author

wandersonareis commented Jan 7, 2021

String = 110kb
ZTR = 69kb
WPD = 258kb

For tests game not crash with this yus 258kb.
But I was unable to verify the texts in the game. why am I using only the yus file.
If you extract this file with compressZTRContent the texts are wrong.

@wandersonareis
Copy link
Contributor Author

Can you send me the method to use CompressZTR?

It is already in Pulse, in file ZtrFileKeysPacker, change FakeCompression to CompressZTRContent.
As Albeoris said, this only compresses keys of ztr, as it was needed by Final Fantasy XIII-2 menus to work correctly, as I remember.

// WARNING BUG: Don't use it for text packing or fix BlockOffset first!
// It should be contains offset if the begining of the entry was mixed with a previous tail.

This warning needs to fix this BlockOffset.
Did you fix this BlockOffset?
Why if you unzip the compressed text appears problems in the strings file.
I did not test in the game if the text gets in trouble.

@pinguallyj
Copy link

Can you send me the method to use CompressZTR?

It is already in Pulse, in file ZtrFileKeysPacker, change FakeCompression to CompressZTRContent.
As Albeoris said, this only compresses keys of ztr, as it was needed by Final Fantasy XIII-2 menus to work correctly, as I remember.

// WARNING BUG: Don't use it for text packing or fix BlockOffset first!
// It should be contains offset if the begining of the entry was mixed with a previous tail.

This warning needs to fix this BlockOffset.
Did you fix this BlockOffset?
Why if you unzip the compressed text appears problems in the strings file.
I did not test in the game if the text gets in trouble.

Yeah, some text gets corrupted with this, because of the tags. But auto yus has no tags and that’s why it works fine, I think. At least for me there is no problem. But don’t pack any other text with it.

@wandersonareis
Copy link
Contributor Author

Using the extraction of this compressed auto-yus the string file is missing text characters.

Are you somewhere in the game where I can test this file?
I tested it and it didn't crash but I couldn't find where the texts appear but walking around the city of Yusnan. I have save before facing Snow before opening the door with Sarah's necklace.

@pinguallyj
Copy link

Using the extraction of this compressed auto-yus the string file is missing text characters.

Are you somewhere in the game where I can test this file?
I tested it and it didn't crash but I couldn't find where the texts appear but walking around the city of Yusnan. I have save before facing Snow before opening the door with Sarah's necklace.

Ah it’s because you also need to change encoding and how Pulse encodes text. For me I changed it from CreateEuro to CreateCyrillic, then text started to show. Maybe you can try to do that. But I don’t remember where is this method should be changed. In visual studio just search for CreateEuro and try to replace it.

@pinguallyj
Copy link

pinguallyj commented Feb 8, 2021

Using the extraction of this compressed auto-yus the string file is missing text characters.
Are you somewhere in the game where I can test this file?
I tested it and it didn't crash but I couldn't find where the texts appear but walking around the city of Yusnan. I have save before facing Snow before opening the door with Sarah's necklace.

Ah it’s because you also need to change encoding and how Pulse encodes text. For me I changed it from CreateEuro to CreateCyrillic, then text started to show. Maybe you can try to do that. Because previously before changing I tried to unpack ztr and it was just ###### symbols, is it the same problem?
But I don’t remember where is this method should be changed. In visual studio just search for CreateEuro and try to replace it.

@wandersonareis
Copy link
Contributor Author

I'm using like this:
var unpacker = new ZtrFileUnpacker(fs, FFXIIITextEncodingFactory.CreateEuro());
change to?
var unpacker = new ZtrFileUnpacker(fs, FFXIIITextEncodingFactory.CreateCyrillic());

This works to extract or pack.
Should I use CreateCyrillic to pack this auto_yus?

@wandersonareis
Copy link
Contributor Author

00000001_auto_yus_us.zip

Unpacked missing characteres:
"The Patron seems like his old self again. I'm gl";
".{End}{End}I hear the savior knocked over the statue.
".{End}{End}Inquisitors from Luxerion are coming here to investigate.

I have doubts if this happens during the game.

Can you send me your auto_yus file that you compressed?

@pinguallyj
Copy link

Yeah it inserts those random tags during packing because of this compress method, but for my Russian text it worked for some reason. I don’t have that file available right now since I’m at another city. Try change the text around, maybe it will work. Or just use default method to compress but remove some parts of text where lines repeat and also remove those script files in web as well, that can help to shrink the size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants