fx-chun / uchuujin

Nichijou: Uchuujin translation project
29 stars 5 forks source link

Game crashes if data files are different sizes than the original #10

Closed fx-chun closed 6 years ago

fx-chun commented 6 years ago

When modifying the script CPK, if the CPK is larger or smaller than the original CPK, the game will refuse to progress when starting a new game.

Potentially a show-stopper, as some translations take up more space than the original Japanese text.

Will look into what's causing this.

fx-chun commented 6 years ago

Still poking around with the debugger.

Initial investigation hasn't yielded much. Problem seems to be with how the binary processes ITOC tables and not with how the CPKs are packed.

EDIT: incorrect speculation

fx-chun commented 6 years ago

Not much progress. Seems to be a limitation of the engine rather than a bug that can be fixed with a one-byte patch.

I'll keep at it some more, but I'm kinda stumped.

If anyone has experience with any of the following:

I would appreciate any help! Please comment for any questions.

Resources:

fx-chun commented 6 years ago

Possible solution: using one byte per character (ASCII) instead of the original two byte encoding scheme (Shift-JIS), thereby halving the size of the translations.

This would still require a custom assembly routine, but it is certainly easier than reverse engineering a substantial portion of CRIWare's file routines. Will work on this.

fx-chun commented 6 years ago

I'm happy to report that the routine has been implemented and works very well! I'm now seeing space reductions of translated script files compared to their originals. I'll close the issue once I commit the newly-updated patching script.