FanTranslatorsInternational / Kuriimu2

Kuriimu is a general purpose game translation project manager and toolkit for authors of fan translations and game mods.
GNU General Public License v3.0
308 stars 56 forks source link

Yo-Kai Watch - Y School Hero's file errors #247

Open InochiPM opened 2 years ago

InochiPM commented 2 years ago

Game Name:
妖怪ウォッチJam 妖怪学園Y ワイワイ学園生活 Yo-kai Watch Jam Yo-kai Gakuen Y Wai-Wai Gakuen Seikatsu Console:
Switch Format extension(s):
.g4tx & .nxtch Type: .g4tx - Archive .nxtch - Texture

Bug details: When trying to change/swap the texture out in Kuriimu2 the program takes a long time to encode the texture then errors with an out of index range error, then it partially saves the texture and breaks the file completely. not letting you open it and throwing the same error.
image

It does this for every texture file and breaks them every time.

Sample files (if possible): https://www.dropbox.com/sh/cjdwia2lmdlt4ra/AAB5ssjzYd3A-QIdGwAq8PMta?dl=0 I included the Archive, the texture file and my edited texture in png format.

jewelmahou commented 1 year ago

A solution to this issue has been found. (Thanks to Vidpic and Noroino Hanako)

When you save your edited .nxtch files, the output file is all written as normal except for the mipMapCount, which is at offset 0x28. This byte should be 01, but it is being written as 00. Use a hex editor to change it back to 01, and your edited .nxtch file is all good! Then you can replace the original .nxtch file in the corresponding .g4tx archive.

Unfortunately, I am experiencing issues with Kuriimu's CPK repacker (for the YW series games at least) so I am looking for an alternative that works. That is the last thing we need for our edited graphics to appear in-game. There is no data being output at all when I try repack the CPK with Kuriimu, so I cannot look into the issue myself.

For now, at least we know how to fix this issue. Take care!

onepiecefreak3 commented 1 year ago

We need samples for this somehow. Please create a new issue, describing the CPK problem.

jewelmahou commented 1 year ago

@onepiecefreak3 I opened an issue here: #267