Foams 2018
 

Patch.tjs Xp3filter.tjs [upd]

Technical Analysis of Extension Mechanisms in the Kirikiri Engine: Patch.tjs and Xp3filter.tjs

Abstract

Phase 2: Injection (The role of Patch.tjs) Once scripts are translated, they must be re-inserted. Instead of repacking the archive (which is difficult with custom encryption), translators often place translated scripts in a folder on the disk. They then create a Patch.tjs. This Patch.tjs instructs the engine: "When looking for scene1.ks, look in the patch folder first, before looking in the archive." Patch.tjs Xp3filter.tjs

Xp3filter.tjs: The Filtering Script

Xp3filter.tjs, on the other hand, seems to serve a more specialized purpose. The name suggests that it might be involved in filtering data related to ".xp3" files or data streams. In the context of game modding, .xp3 files often contain game data, such as models, textures, or audio. A filtering script like Xp3filter.tjs could be used to modify or filter this data, perhaps to: Technical Analysis of Extension Mechanisms in the Kirikiri

  • Train Simulator forums: The official Train Simulator forums are a great place to ask questions and get help from experienced players and developers.
  • Game modding communities: Many game modding communities, such as the Train Simulator modding community, offer resources and tutorials on working with game files like Patch.tjs and Xp3filter.tjs.
  • Optimize Data Loading: By filtering out unnecessary data, the script could help optimize how game data is loaded and processed.
  • Apply Modifications: Modders can use Xp3filter.tjs to automatically apply modifications to .xp3 files, making it easier to create and distribute mods.
  • Data Conversion: The script might also be used to convert data from one format to another, facilitating compatibility between different versions of a game or different games altogether.
  • System Core: The engine loads System.tjs first, then reads the Startup.tjs to initialize the game.
  • Archive Structure: Most games pack their assets (scripts, images, sound) into XP3 archives.
  • The Hook: TJS2 allows for prototype inheritance and dynamic overriding. This means you can replace a system function without modifying the original source code.

Background: TJS, Kirikiri, and XP3

  • TJS (TeaScript) is the scripting language used by Kirikiri-based visual novel engines.
  • Kirikiri uses archive formats like XP3 to package game assets (images, audio, scripts).
  • XP3 archives can be read by the engine via built-in filters; modders create custom filters (e.g., Xp3filter.tjs) to intercept, decompress, or alter files as they’re loaded.
  • Patch.tjs is commonly a general-purpose runtime patching script that adjusts engine behavior: replacing functions, hooking resource loaders, or applying binary/text patches to scripts/assets.

Locate your Game Folder: Open the folder on your Android device where your visual novel files (like data.xp3) are stored. Train Simulator forums : The official Train Simulator