VN KrkrExtract and GarBro xp3 repackaging

itispouring

New Member
Sep 19, 2020
2
1
I'm looking to do some QoL changes for myself in the game Island Diary. The game allows for a bilingual mode, so I'm currently reading the game in English and Chinese, but the Chinese in the files is Traditional Chinese (I read simplified and yes I should get familiar with Traditional characters) so I was looking to mod the files to replace traditional characters with simplified characters.

Extracting the XP3 files with KrkrExtract (as you can see in troubleshoot1.png) was fine, and I was able to read the resulting .txt.scn (IDK why the files are in this format) using FreeMoteToolkit, specifically PsbDecompile into .txt.json (troubleshoot2.png), which I was able to extract the Traditional Chinese, use Google Translate to get the Simplified Chinese (the one time where I can actually trust machine translation to be nearly 100% accurate), and replace it in. I've done a lot of verification work on this part (I wrote some code to do this for me) and am very confident that the new files are valid. (Bless Gson by the way so I don't have to write my own parser)

The issue for me is when I'm trying to compile back into .txt.scn and then repackage into a patch file. FreeMoteToolkit's PsBuild wants to convert the modded files into a .txt.psb file. It seems that .scn and .psb extensions are equivalent, so I went back and just changed all the file extensions to .scn to match what was originally there. I'm slightly suspicious of this step though....

Then came trying to figure out how to repackage. I couldn't get KrkrExtract to repackage for me (I have no clue how Universal Patch works - it kept erroring on "unknown module type" - and trying "make archive" on several different configurations literally did nothing; KrkrExtract didn't do anything, no output, no acknowledgement I even pressed a button. It didn't even freeze.... (see troubleshoot3.png)

So I instead tried GarBro to repackage. I eventually found a configuration where it would repackage into an .xp3 file which I could name patch.xp3 (troubleshoot4.png - I selected all of the files and hit "Create Archive"). I put it in the main directory... the game loaded but immediately errored out when I started a new game (troubleshoot5.png - translated, the error says that a fatal error has occurred on line 17; the psb file is invalid; also the game works normally without the patch).

Naturally, I assumed that my code had done something wrong; maybe mismatching braces or whatnot in the json file, but I did try this out, which completely baffles me.

I took the original .txt.json files (before I even touched them; the only thing that happened was KrkrExtract and PsbDecompile), and packaged them with GarBro into patch.xp3. In principle, this does nothing because the patch files are literally the files that came with the game. Exactly the same error occurred, which seems to suggest that the issue is in the repackaging or extraction process, rather than the file modification itself.

If someone with more experience may know what's going on, or how to get KrkrExtract to actually compile an xp3 file, etc, etc, that would be very much appreciated. I tried to make this post as detailed as possible, but if there's anything you need to see, I'll be as helpful as possible.
 
  • Like
Reactions: 1Shiba