marcussacana / SacanaWrapper

Use my dll tools as plugin's
41 stars 2 forks source link

Issue with NUT editor crashing game #20

Closed HoodedTissue closed 2 years ago

HoodedTissue commented 2 years ago

I'm trying to port the English version of KamiYaba over to the Vita and the StringTool is able to extract the text perfectly fine but when I'm repacking the script, I have to keep the number of characters in each line the same or else the game will crash. Would you be able to take a look at the script file and maybe write a fix? Script (Script is .nut script, just doesn't have file extension) Thanks

marcussacana commented 2 years ago

As said in the readme the "NUT Editor is a brute tool that aim to translate the nut files", this is error has expected when I made the tool but don't happened in my target game to that tool (totono) The tool just update the string and his length in the script, there's no dissassembly or update of jump opcodes in the tools, and this is the most probabbly reason to you get an error. To fix that I should need create a proper nut tool, and isn't a job that i'm hyped enought to do right now at least, since usually instead reverse the engine VM I just patch the engine with my StringReloads tool, will be hard to see disassembly tools comming from me. I have little interest in this game, maybe when I try to play in the future it I can try to make corrections in the tool. Problem also that you mentioned that you are doing a port to Vita, I don't have the console and much less the emulator is reliable enough to do debugging and testing to create tools, so it's even more unlikely that I'll fix this problem, sorry :(

marcussacana commented 2 years ago

What you can do currently, add a single character in the first line, and check how much dialogues the game works before the error. Bettewen the Last working dialogue and the first broken one, probabbly there's a jump instruction with a offset, you should update that offset as well (+1 since you put only one more character in the string in this test), and should be fixed until the next jump opcode as well, negative jumps should be -1 instead +1 as well. Usually you will found a common prefix to the jump opcode offset, if you find this pattern you can do a search in the entire nut file and know where you must update one by one.

Cosetto commented 2 years ago

@HoodedTissue Fixed in https://github.com/arcusmaximus/VNTranslationTools/issues/57, try the lastest release of vntextpatch