What's new

TES Encryption


kR1pt0n1t3

Tentacle God
Joined
Dec 14, 2011
Messages
1,298
Reputation score
573
So I tried playing these OneOne1 games and they seem to be getting better. Because of that, I started making a partial for their latest games but I hit the wall.

Apparently, the game uses some script called TES - to pull out game text. Like it wasn't enough as it is, it's all in Japanese...

This script allows you to have all game dialog in one place and then pull it in-game using functions in comments. Anyhow, because of that, it's impossible to translate story and quite a few other things.

I've downloaded the source program and tried to tinker around but it seems the only way to get to the files is to decrypt the file which contains the dialog. That file in their latest game is located inside folder ARC and is called "main.rvdata2".

Is there a program that could decrypt the rvdata2 file to get to dialog or could someone make such a tool? I'm not even sure what program they used to encrypt the dialog in rvdata2. Maybe if we could somehow find out, it would be easier to reverse the whole process.

If someone with more knowledge about programming could take a look maybe it would be easy. The source program can be found on the link above and it even comes with a sample and full tutorial about how to use the script but it's all in Japanese.
 
Re: TES Encryption

I haven't looked much into it, but wouldn't it be much easier to change a few lines of code inside the script in RPG maker so that once the game decrypts the file for you, you can dump it on a text file?
 
Re: TES Encryption

Indeed, the decryption process is in the scripts of the game. In fact, it's in the script you e-mailed to me when asking about this. The function is just below the comment "標準アーカイブ用難読化", and the unobfuscation key a bit below it.

It wouldn't be too hard to implement an unpacker for it. The trick will be to find a programmer who has the time to help you with it - at present, that's not me.
 
Re: TES Encryption

Here is the TES patcher I wrote.
Because it's written in Ruby I attached the source code as well as a "compiled" executable.

Executable:



Explanation:
1) Extract the game data so that the Data folder containing a bunch of .rvdata2 files is accessible
2) Copy TES_Patcher.exe into the game base directory (the directory containing Game.exe and the Data folder)
3) Open a command line in the folder and run:
TES_Patcher.exe -e

This will extract the encrypted dialogs and save them into several different text files inside the folder "extract_main"
The used patching file format is similar to the one from RPGMakerTrans e.g. just insert your translation in the blank section
between > VALUE ID: and > END STRING and as with RPGMakerTrans don't touch any of the other stuff, it might break something during
the patching process.

Once the translation is done run:
TES_Patcher.exe -p
This will then replace the original text with the translated text or leave it as the original if the translated text is empty.

After the patching is done a file called main_patched.rvdata2 will be created in the game main directory, this is the patched
version of the original main.rvdata2 file (main.rvdata2 contains the encrypted dialogs) just rename it to main.rvdata2 and copy
it into the Data folder (make sure to create a backup of the original main.rvdata2 file just in case something went wrong).
Once the patched file is copied the translated dialogs should show up in the game.

For a list of available commands run:
TES_Patcher.exe -h

Don't run TES_Patcher.exe -T ... it's weird and I'm not sure why it is still in there.

PS: Use the -m switch if main.rvdata2 is not inside the data folder.
Also, full main dumping is not implemented so nothing will happen.

I case of problems or errors please contact me.
 

Attachments

  • TES_Patcher_src.zip
    18 KB · Views: 22
Re: TES Encryption

Nice!

It seems it's working.

Gonna try translating something once I get home from work.

Thanks for posting the TES patcher!
 
Back
Top