Closed Dimoks closed 3 months ago
Thanks for the report. I think I fixed this issue, could you please confirm ?
I guess you want to edit the file and inject it back. For the injection, don't forget to specify the compression_level
to 1 or 2. This will greatly reduce the compressed size compared to the default compression_level = 0
(for img7000, it goes from 33.8MB with level 0 to 609 kB with level 2).
This however adds a lot of computation time. For debug purpose, you can probably use levels 0 or 1.
EDIT : the compression_level
argument is only valid for mzp
images
Now these files are extracts normally. Is it possible to specify compression_level when inserting any files, or is it only possible for mzp?
The choice of the compression level is only for mzp images which use the mzx compression. Cbg images also use a compression algorithm, but there is no choice to make, the file must be compressed a specific way. Some files (including scripts) are stored using the optional LenzuCompressor algorithm, for which I haven't implemented the compression yet (only decompression is implemented).
If you specify the compression in inject (file, compression_level 2) for all inserted files, will this not cause problems when inserting other files? There seemed to be no problems when inserting the cbg.
Yes, I don't have any filter on the keyword arguments (yet), so if you pass a keyword argument to the inject
method that is not expected for this file, it will fail.
EDIT : I indeed forgot to mention in my first message that the compression_level
argument was only for mzp images.
Problem with data02400.hfa. If you extract it using HunexFileArchiveTool, you can convert them to PNG using PS-HuneX_Tools. In this .mzps 25 - 37 entries.
The utilities are wonderful, they allow you to replace .cbg graphics in the archive, and the game works with them.
TypeError: only length-1 arrays can be converted to Python scalars
The above exception was the direct cause of the following exception: