Tutorial Tool Method to run KiriKiri games without locale emulation

Surgy

Member
Modder
Apr 23, 2018
367
1,534
Many KiriKiri games show this when you run them without a correct locale:
crash_due_to_shift_jis.png
There is always the option to run locale emulation of some sort or switching locale to Japanese yet, if you translated a game or want some kind of permanent solution, that's pretty inconvenient. But there is another, less known, method after you extracted the game using or some other tool.

The method is as simple as converting all .ks (unscrambled plain-text) and .tjs game scripts to UTF-16LE (UTF-8 with BOM signature might work too but it fails in some cases). The tools to convert the scripts automatically are attached to this message; the first needs .NET v4.6.2 , which usually comes with Win 10+ already, and the second needs Python installed.

Notes:
  • Some games contain additional text files in Shift-JIS encoding, so they may need to be found and re-encoded too, see the provided .cmd batch script that re-encodes .ks/.tjs on how to do it.
  • The .NET tool won't help if some of the game files were originally encoded in UTF-8 without BOM signature in the first bytes, in which case re-encoding must be done manually on per-file basis or with the Python tool.

To do it, unpack the files to the extracted game folder and run the included reencode.cmd for the .NET tool or textutf16y.py for the Python tool.

Edit: Just in case I added alternative Python tool to do the same, but with detecting files using no-BOM UTF-8 and some other encodings. The file extensions to process are hard-coded in the .py text there.
Edit 1: Password for the first archive with the .NET tool is f95zone since the site misdetects it as a virus otherwise.
Edit 2: Removed encoding detector from Python version because it's unreliable anyway. It now tries to check predefined encodings.
 
Last edited:
  • Like
Reactions: Cruxiz and avarokun

--hi

Member
Modder
May 30, 2021
128
1,262
Thanks for this awesome tool! It will help me a lot with my translations, cheers !