Giter VIP home page Giter VIP logo

kirikiritools's Introduction

KirikiriTools

Tools for the Kirikiri visual novel engine. Download page

If you're looking to translate a Kirikiri game, take a look at VNTextPatch.

KirikiriDescrambler

Some Kirikiri games have their plaintext scripts (.ks/.tjs) scrambled or compressed. Such files can be recognized by the following signatures at the start:

FE FE 00 FF FE
FE FE 01 FF FE
FE FE 02 FF FE

KirikiriDescrambler turns these into regular text files which can be placed right back in the game - no rescrambling needed.

KirikiriUnencryptedArchive

A DLL (named "version.dll") that makes games accept unencrypted .xp3 archives. By using this file, it's no longer necessary to identify and replicate the game's encryption when trying to add/replace .xp3 files; just create an unencrypted one with the Xp3Pack tool in this repository, throw the version.dll in the game's folder, and you're done.

The DLL produces debug messages that can be seen with Microsoft's DebugView tool - this can be handy to confirm it's working.

Some special features are available for helping with .xp3 archives that contain encrypted/hashed file names and aren't supported by other tools. Specifically, these features are available if DebugView shows a message such as "Hooking storage media 'arc'" when the game starts up (this doesn't apply to the media "psb").

  • If there's a file called extract-unencrypted.txt in the game's folder, the DLL will extract any files that the game accesses into a subfolder called "unencrypted", with their original names. Note that the files are only extracted as the game reads them, so if you want to extract everything, you have to skip though the entire game. If you can extract the archives with another tool, use that instead.
  • If a file exists in the "unencrypted" folder, the game will use that one instead of the original in the encrypted .xp3 archives.
  • If a file exists in an archive called "unencrypted.xp3", the game will use that one instead of the original in the encrypted .xp3 archives.

Xp3Pack

Creates unencrypted .xp3 archives for use with the KirikiriUnencryptedArchive DLL. Unlike other packing tools, it sets all hashes in the file table to zero; this serves as a marker for the DLL to bypass the game's decryption for those files.

Typical usage is to place Xp3Pack.exe in the game folder, create a "patch" subfolder containing the files you want to include, and run "Xp3Pack patch" from the command line. This will create a patch.xp3 in the game folder. If the game already has its own patch.xp3, name your folder "patch2" and run "Xp3Pack patch2" instead. If the game already has a patch2.xp3, name your folder "patch3", and so on.

kirikiritools's People

Contributors

arcusmaximus avatar dependabot[bot] avatar geetwentyfive avatar www avatar yescallop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kirikiritools's Issues

`version.dll`: Cannot convert the variable type ((void) to Object)

When using version.dll to extract .xp3 archives shipped with ATRI -My Dear Moments- (Steam version), the game failed to start and an information dialog popped up saying Cannot convert the variable type ((void) to Object) (screenshot attached below).

I provide a debug log that might help locate the source of the problem: debug.log

image

Rescramble .dat file

I'm trying to translate Venus Blood GAIA, game is using Kirikiri Engine. I can use KirikiriDescrambler with .dat file (already extract data.xp3) to descramble and view data inside. But when I repack. Game give me error. I think I have to rescramble that file to make it work. Can you give me some advice or some guide to do that. Thank you very much.
Here is the source file

https://mega.nz/file/rIZmRKjT#Xuwt4-_mH-73xV-uVbHfFlF3Dn4pPvUKwDPz_D_jZGk

Error extracting trial version of upcoming games

Vndb
Link
Direct Download

With this tool, data was extracted in real time to decrypt the trial version of the above link game.
Pimg, Scn files are extracted normally, but some files were extracted abnormally (for example, appconfig.tjs)
Maybe, some TJS2 file header is corrupted.
I will be very grateful if you update the tool.

narrow string to wide string

I have tried lots of tools to repack xp3 (garbro, krkrExtract, etc). KrKrExtract and KiriKiriTools creates patch xp3 but when I place it in folder game gives me this error "cannot convert narrow string to wide string", Garbro tells me it couldn't find the file I am archiving, I don't have much experience regarding repacking and modding xp3 files but please can someone help me explain how to do this correctly?
game : https://vndb.org/v24275

Encoding/character problems using Xp3Pack.

I extracted game files using GARbro and used xp3pack to make a patch file for version.dll. When the only files were .scn files made with VNTextPatch there were no problems.
However, when inserting .tjs files, even unmodified ones, into the patch, it would cause the game to not launch, giving "Illegal character" errors. The character listed as being illegal is not actually in the file, though (examples: '\x19' or '\x1e')

When i made the exact same patch using the "Create Archive" utility in GARbro, there was no such problem, and I confirmed that the .tjs file changes were actually applied.
The encryption type GARbro lists is CxEncryption. The "Storage Media" reported by version.dll are cxfilter and psb. The error dialog appears after version.dll prints "Creating unencrypted XP3 stream for file.tjs" twice for the same file.

Error using KirikiriUnenecryptedArchive

Hey guys, first of all, great work!

I have a problem with the UnencryptedArchive.tpm patch. (I'm a huge noob with stuff like this, so maybe it's me who's doing something wrong.) The game I'm trying to mod is Love3 -love cube- (Demo).

I couldn't find a tpm file in the folders I downloaded from here, so I compiled them in VisualStudio. After that I got a "1KirikiriUnencryptedArchive.tpm" file. I placed that in the plugin folder, but I keep getting this error:

Access Violation: The thread attempts to read from or write to a virtual adress for which it does not have access.

I tried all the basic stuff like launching as Admin, and compatebility settings and such, but can't seem to get past this error... I also tried the ArchiveLauncher.exe, in case the game has CxDex ( which I doubt, because there already was 1 tpm file in the games plugin folder: xp3dec.tpm) but then i get this error:

Script exeption raised.
Cannot convert given narrow string to wide string.

Any ideas?

Path collisions when extracting archives

I have noticed that in Atri -My Dear Moments- at least two pairs of storage media resources exist with the same paths:

psb://quickmenu.pimg/1711.tlg ~ psb://submenu.pimg/1711.tlg
psb://quickmenu.pimg/1717.tlg ~ psb://submenu.pimg/1717.tlg

This has caused a problem that only one resource will be used for the two resources in each pair. One menu button is thus seen to be improperly rendered:

image

On the other hand, the README of this project says that

Specifically, these features are available if DebugView shows a message such as "Hooking storage media 'arc'" when the game starts up (this doesn't apply to the media "psb").

These seem have brought up two questions:

  1. Are we to hook the storage media "psb" at all? Should there be a blacklist or a whitelist for the media names?
  2. Are path collisions also possible for .xp3 archives? Should we adjust the extraction procedure so that files from different archives are placed in separate directories?

Is it possible to force kirikiri games to use unpacked script files?

I mean in a native generic way. If not, can you, please, make an interceptor for game read operations that reads from external file instead of .xp3 and fallback to reading from .xp3 if the external file doesn't exist.

For example if game tries to read from scenario\script1.ks inside data.xp3 it will redirect read operation to .\data\scenario\script1.ks file.

Support for new KiriKiriZ version with more complex protection

Hi. I would like to know if there will be support for the new version of KiriKiriZ, where more complex protection? GARbro and KrkrExtract can't put translation in this version of KiriKiriZ. Because of this protection, xmoe will not update KrkrExtract and GARbro is abandoned. So, I will be very grateful if you can add support KirikiriUnencryptedArchive for this engine version.

Some VNs on this engine version:
花鐘カナデ*グラム Chapter:1 小桜結
七ヶ音学園 -旅行部-

Work on Linux

I tried the version.dll on Steam Deck with most versions of Proton, but with this dll the game does not start. Im trying to use forked GARbro with ATRI -My Dear Moments- for unpack xp3 (that worked), translate and then pack to xp3, but I didn't see any difference in game. WIth version.dll and pack with Xp3Pack from this tools everything working fine on Windows, but linux with proton when version.dll in game folder cant run game.

kirikiroid2-version.dll

On pc, after packing the game folder to xp3 and putting the version.dll file in the game folder, the game working fine, the problem is how to do it on the phone with the kirikiroid2 app, when this app doesn't read the dll files, please help me, thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.