OpenKH / OpenKh

Kingdom Hearts libraries, tools, game engine and documentation
https://openkh.dev
Apache License 2.0
302 stars 83 forks source link

[BUG] - Panacea loading btltbl.bin and remastered/btltbl.bin/UK_AbilityName.bin causing glitched text #1084

Closed SuperfieldCU closed 2 months ago

SuperfieldCU commented 4 months ago

OpenKH Build 1151

OpenKH Program Mod Manager

Describe the Bug In KH1FM, when using a mod or combination of mods via Panacea that include BOTH:

a lot of system text is glitched and uses seemingly random characters. The areas where this happens includes the command menu, the magic shortcut menu, and most camp menus (items, equipment, abilities, and Sora's customization).

This occurs even when the modded files are unaltered from stock.

To Reproduce Steps to reproduce the behavior:

  1. Install one or more KH1 mods that include btltbl.bin and remastered/btltbl.bin/UK_AbilityName.bin between them via Panacea. The files do not need to have been altered from stock. One such mod that includes both files is Kingdom Hearts Final Mix - Idealized Edition.
  2. Run KH1 and open a save file.
  3. You will see the glitched text in the command menu.

Expected behavior If the files in the mod were unchanged from stock, the command menu and other text should appear identical to how they would if the game was unmodded.

Screenshots 20240720224640_1 20240720224709_1 20240720224721_1 20240720224728_1 20240720224735_1 20240720230625_1

Additional context I have used a mod that alters remastered/btltbl.bin/UK_AbilityName.bin for some time now with no issues; it was only when I introduced a file that altered btltbl.bin that the text suddenly became screwed up. Turning off the former mod and only using the latter also produced no issues. It's only when the two are used together that problems occur. This behavior has been witnessed on both a Windows 10 PC and on Steam Deck.

Vladabdf commented 2 months ago

Do the mods in question edit text in KH1? If I remember correctly, KH1 requires text strings to be the same length upon modification, unless some other values are set within the game to accommodate the changes. The same goes for BbS for certain, but I can't recall right now if that is the case with KH1. If so, that is a problem with the mods in question, not OpenKH.

SuperfieldCU commented 2 months ago

No, mods do not need to alter any text to produce the glitched text. In fact, no changes need to be made at all; even if Panacea is loading stock versions of btltbl.bin and remastered/btltbl.bin/UK_AbilityName.bin, the text will still be glitched. You can try it out for yourself with the attached file; it contains a KH1PCPATCH file that only contains stock versions of those two files. BtlTbl Test.zip

MainMemory commented 2 months ago

Can confirm this is indeed the case, though I haven't the faintest idea why as yet.