tge-was-taken / GFD-Studio

P3D, P4D, P5D & Persona 5 Model Editor
60 stars 25 forks source link

Repacking of .bin files containing .txt in P5 #13

Open amarret opened 4 years ago

amarret commented 4 years ago

Most of the environment textures in P5 are stored in ps3.cpk: model/field_tex/textures/*.bin files, which contain the .dds and a .txt file. GFD studio seems to not handle properly this .txt file, causing crash when repacking.

tge-was-taken commented 4 years ago

Does the crash happen without any edits? If not, then you shouldn't be editing the texture archives directly. You can export a texture dictionary to the bin format using the "Convert to field texture archive" context menu option.

amarret commented 4 years ago

No crash without edits. How can I create a texture dictionary ?

tge-was-taken commented 4 years ago

Note that the following is kind of a workaround as this functionality was meant for custom field models.

amarret commented 4 years ago

Okay, thank you for your assistance.

One more question: some of the game textures are under the format DXT5. GFD studio list them with the flags : "DXT5, Flag80". Importing a new DXT5 .dds gives a file with the flags: "Flag2, Flag4, DXT5, Flag80". Also, importing a .dds extracted from original .bin files also gives the same flags (and not anymore "DXT5, Flag80" only).

These "Flag2, Flag4" need to be removed to not crash the game. Is it possible for GFD studio to not add these "Flag2, Flag4" automatically ? I found that removing them manually does work, but is time consuming.