1. Home
  2. Docs
  3. KAG References
  4. Patching KAG Games

Patching KAG Games

By default the KiriKiri game reads resources in this folder / archive sequentially, the script found later will overwrite the previous resource:

  1. Data folder
  2. data.xp3
  3. patch.xp3
  4. patch2.xp3
  5. patch3.xp3
  6. patch4.xp3
  7. … and so on…

This means that the first.ks scenario in the Data folder will be overwritten with the first.ks in data.xp3. And the first.ks in data.xp3 will be overwritten with the one found in patch.xp3 and so on.

This behavior allows us to make translations without modifying data.xp3 (or any of the original achieve in the game) by creating patch.xp3.

Translator++ has a tool to easily repack folders into xp3.

The ugly and beauty of patch.xp3

By default kirikiri only reads data in the root directory in the patch.xp3 file.
Because all data both images, tjs and scenarios are collected in one folder the internal structure of patch.xp3 can be very ugly….not to mention, it doesn’t allow us to have files with the same name (which were previously in different folders).

However, there is a way to make the KAG engine read the folder in patch.xp3. By adding a definition in the Config.tjs file

An example of patch’s structure definition inside Config.tjs will looks like this:

This definition will allows us to create a patch.xp3 file with its original folder structure.

However, you need to move the Config.tjs file to the root directory (originally in the system folder). Because Config.tjs will be read before the kirikiri engine has the ability to read folders.

The structure of a working patch.xp3

Was this article helpful to you? Yes 1 No