Skip to content

decryptor/encryptor for NScripter's nscript.dat files, a reverse engineering of the original windows-only nsdec.exe and nscmake.exe tools

Notifications You must be signed in to change notification settings

danmig06/nscript.dat-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

nscript.dat-tool

this is a decryptor/encryptor for NScripter's nscript.dat files and a reverse engineering of the original windows-only nsdec.exe tool, its algorithm boils down to XORing every single byte in the file with the value 0x84 (decimal 132), basically inverting the 8th and 3rd bits starting from the right, and this is not the only encoding the engine supports, it seems that every game written in NScripter either uses scripts in this format (.dat), uses plaintext as its script (not only .txt, but .u and .utf as well), or put the script in an archive file (such as arc.nsa or arc.sar).
this tool will only work with NScripter games that use "compiled" scripts with .dat extentions, that heavily depends on what version of the game you have, and thus can be used on any of the visual novels in the list below as long as you see a nscript.dat file in a game's directory, then follow the steps at the bottom of this file and this tool should do the work for you. As for the newer version of the engine, P(proportional)O(open)Nscripter, i have not tested this algorithm aganist pscript.dat, which i personally think is encoded in a similar manner, i recommend trying that as well.
you can find the list of all the games that use NScripter here.

Why did i make this

As stated in the beginning, as far as i'm aware, there doesn't exist any version of nsdec (the original decryptor for script files in the visual novel engine NScripter) and nscmake (the encryptor) for systems other than windows, and it is close-source like its SDK. (original SDK at http://nscripter.insani.org/sdk.html)

Usage:

to decrypt a script Place the executable in the same folder as the script file named nscript.dat and Run it (it should take a few seconds depending on the length of the script, it should NOT trigger any antivirus, read the readme.txt in the release)
to encrypt a script, likewise, place the executable in the same folder as the script that you need to encrypt, note that the script has to be a text file called nscript.txt

Compiling from source:

NOTE: you will need a compiler that supports C99 or later

for Linux:
$: gcc -o rdat.out rdat.c && chmod +x ./rdat.out

for Windows:
> gcc -o rdat.exe rdat.c

About

decryptor/encryptor for NScripter's nscript.dat files, a reverse engineering of the original windows-only nsdec.exe and nscmake.exe tools

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages