IcySon55 / Kuriimu

A general purpose game translation toolkit for authors of fan translations.
GNU General Public License v3.0
330 stars 50 forks source link

Can't open font.g1t.gz from Persona 5 Scramble (Koei Tecmo) for Switch #646

Closed QTKO closed 3 years ago

QTKO commented 4 years ago

No matter what program I use across multiple operating systems - Kuriimu, 7-Zip, BetterZip (Mac), The Unarchiver (Mac), or Mac OS's built-in decompression - nothing will open this font.g1t.gz file. I've even looked at the hex in 010 Editor, but there doesn't even seem to be a header. I don't know whether this is actually a headerless GZIP file or something different, but after days of multiple approaches I've had no luck.

This is from the Switch version of Persona 5 Scramble. The directory in the file structure is \ROMFS\data\pd\ui\font.g1t.gz. I've attached the file itself in case anyone wants to give it a shot.

Any support would be appreciated. Thanks!

font.g1t.gz

piratesephiroth commented 4 years ago

it clearly isn't a gzip file and has a header, though it's difficult to determine what's what. maybe offsets and sizes but that's just speculation

onepiecefreak3 commented 3 years ago

A quick look reveals that this file contains of a header table and compressed files. As @piratesephiroth said, the header contains offsets and sizes to said files. Each file blob is preceded by the size of the compressed blob, followed by the ZLib compressed data.

onepiecefreak3 commented 3 years ago

Btw, I cannot find any mention of this game being in connection to Koei Tecmo. All Persona games, including Persona 5 Scramble, seem to be developed by Atlus or partnered developers to them. But nowhere Koei Tecmo is mentioned. This format will be implemented under plugin_atlus of Kuriimu2 therefore.

QTKO commented 3 years ago

ATLUS is the publisher, but the Koei Tecmo team Omega Force is the lead developer. All Musou games, such as Dynasty Warriors and Hyrule Warriors, are developed by Omega Force. I've modded ATLUS's Persona file structure and formats before; font.g1t.gz is not a part of it. It's a Koei Tecmo game - putting it under the ATLUS plugin would be a mistake.

image0

onepiecefreak3 commented 3 years ago

I'm surprised you answered. Indeed as you just said, after working a bit longer with the sample given, I could verify that it should be put into the koei_tecmo plugin.

Kuriimu2 in its newest dev build and upcoming Release 1.2.1 (which should be release in the next week) contains support for "GZ" in plugin_koei_tecmo. The plugin can not automatically identify such files, so when asked by the application, choose "GZ" under "plugin_koei_tecmo" to load the file properly.

I could also figure out that this file is actually not an archive. It's basically a compression container. So there will only always be one file shown by Kuriimu2 when opened. By default the original file is split into blocks of 0x40000 bytes and then each block is ZLib compressed. The plugin will stitch the blocks together and decompress them, so the file shown is the complete, decompressed file you're looking for. In the case of your sample it's a font in the G1T file format, which is from Koei Tecmo.