Мы вам поможем!
Пишите нам на почту: [email protected] и мы вам ответим в ближайшее время, так же вы можете воспользоваться формой обратной связи прямо с сайта.
Based on the filenames Patch.tjs and Xp3filter.tjs, you are likely looking at Kirikiri/Z-Game Engine (often used for visual novels). These files are typically used for modding, extraction, or file replacement without modifying the original game archives (.xp3 files).
Here are the specific features these two files provide when used together:
For modders/developers:
Xp3filter.tjs is configured to bypass checks for certain files, it allows loading unencrypted/modified assets.Simple path redirect filter
Decryption filter
On-the-fly text patch
// open xp3, read header, iterate file table
var xp3 = openXP3("game/data.xp3");
var entries = xp3.listEntries();
for (var i = 0; i < entries.length; ++i)
print(entries[i].path + " size:" + entries[i].size);
The existence of Patch.tjs presents a significant security consideration for developers using the Kirikiri engine. Because the engine automatically executes code in Patch.tjs without integrity checks, it becomes a trivial vector for: Patch.tjs Xp3filter.tjs
Plugins.link command.To mitigate this, developers often:
Patch.tjs in a recompiled version of the engine executable.// create patch: replace image at path with new file
var patch = new Patch("game/data.xp3");
patch.replace("/image/bg/title.png", readFile("mods/new_title.png"));
patch.apply(); // writes new archive or produces .patch package
While Patch.tjs handles runtime logic, Xp3filter.tjs handles load-time security. This file is executed when the Kirikiri engine initializes its file system (the Storages layer). Based on the filenames Patch
The "filter" in its name is literal: it filters which files from an XP3 archive are allowed to be read, and how they should be decrypted or decompressed.
When the engine attempts to read a file from an XP3 archive: Hot-reloading: Changes made to files in the patch
Xp3filter.tjs) is registered, the raw data is passed to this filter.