Tutorial Others Extract, Edit (Uncensor Live2D) and Rebuild TyranoBuilder VNs

lorm

Newbie
Nov 5, 2016
99
18
TyranoBuilder games are usually distributed as large EXE files. Much like RPG Maker MV, these games contain a NodeJS web server-browser, but lumped together with the assets in one big file. This tutorial describes how to extract the assets and rebuild the exe with modified assets, which would be useful for editing game scripts to translate VNs, or in the given example uncensoring Live2D games :D

EXTRACTING

The assets are all packed in a zip file appended to the end of the exe. An easy way separate the zip is to use .
Place arc_unpacker.exe from the zip in the same folder as your executable. You can either drag your exe onto arc_unpacker (which is slow), or invoke it through the command prompt or a batch file containing (change game.exe to the appropriate name):
Code:
arc_unpacker --dec=microsoft/exe game.exe
Assuming all is well, you will end up with a folder called game~.exe containing many files. The file 'extra_data' is a .zip that contains all the game's assets. It can be opened with your favorite archiver, such as 7-Zip.

View attachment 539504

Extract it to a new folder. The game's scripts can be found in data\scenario for those looking to do translations.

EDITING: Uncensor Live2D

If your game contains uncensored textures, Live2D games can be uncensored by editing data\others\live2d\Live2Dtyrano.js

Open it in your favorite text editor and look for the string "this.mosaicDraw = true;"
View attachment 539522
There's even a handy dandy comment telling you that changing "true" to "false" will disable mosaic censorship :)

Save your changes. Go back to top of the extracted extra_data folder, highlight all files and pack into a zip archive
View attachment 539528

REBUILDING WITH MODIFIED ASSETS

Now we have three important files:
Original game EXE
extra_data (original assets)
extra_data~.zip (modified assets)

For this process we'll need a hex editor. I use generally, but it is not a good option for large files since it reads the entire file in RAM.

Open extra_data in your hex editor. If using XVI32, hold shift and press down a couple times to highlight the first couple rows of bytes
View attachment 539544
With the bytes highlighted, go to edit->clipboard->copy as hex string

Now open your game's exe in XVI32. Hit Search->find, click the bubble next to "Hex string", make sure everything in the box is highlighted and paste
View attachment 539546
Hit OK and you will be taken to the part of the file where the asset zip starts. 50/"P" should be highlighted. Hit edit->Delete from cursor to trim the ZIP archive off of the file.
View attachment 539551
Now file->save as and name this new file "part1"
Rename the zip you created in the editing step "part2". You will need to ensure you have to remove the .zip part of the filename.

Make sure your "part1" and "part2" files are in the same folder.
View attachment 539554

Now you will need to either open a command prompt + cd to the folder with the parts, or create a .bat file containing:
Code:
copy /b part1+part2 modded.exe
You'll now have a new .exe ready for testing!
View attachment 539556
Move it alongside the original .exe and you're done. Give it a run!

i did it like that with 2 different games and its not working
i think it would work if we could repack it but how?
 
Last edited:

renato186a

Active Member
Sep 6, 2020
657
697
TyranoBuilder games are usually distributed as large EXE files. Much like RPG Maker MV, these games contain a NodeJS web server-browser, but lumped together with the assets in one big file. This tutorial describes how to extract the assets and rebuild the exe with modified assets, which would be useful for editing game scripts to translate VNs, or in the given example uncensoring Live2D games :D

EXTRACTING

The assets are all packed in a zip file appended to the end of the exe. An easy way separate the zip is to use .
Place arc_unpacker.exe from the zip in the same folder as your executable. You can either drag your exe onto arc_unpacker (which is slow), or invoke it through the command prompt or a batch file containing (change game.exe to the appropriate name):
Code:
arc_unpacker --dec=microsoft/exe game.exe
Assuming all is well, you will end up with a folder called game~.exe containing many files. The file 'extra_data' is a .zip that contains all the game's assets. It can be opened with your favorite archiver, such as 7-Zip.

View attachment 539504

extract also with garbro in the exe link

EDITING: Uncensor Live2D

If your game contains uncensored textures, Live2D games can be uncensored by editing data\others\live2d\Live2Dtyrano.js

Open it in your favorite text editor and look for the string "this.mosaicDraw = true;"
View attachment 539522
There's even a handy dandy comment telling you that changing "true" to "false" will disable mosaic censorship :)

Save your changes. Go back to top of the extracted extra_data folder, highlight all files and pack into a zip archive
View attachment 539528

REBUILDING WITH MODIFIED ASSETS

Now we have three important files:
Original game EXE
extra_data (original assets)
extra_data~.zip (modified assets)

For this process we'll need a hex editor. I use generally, but it is not a good option for large files since it reads the entire file in RAM.

Open extra_data in your hex editor. If using XVI32, hold shift and press down a couple times to highlight the first couple rows of bytes
View attachment 539544
With the bytes highlighted, go to edit->clipboard->copy as hex string

Now open your game's exe in XVI32. Hit Search->find, click the bubble next to "Hex string", make sure everything in the box is highlighted and paste
View attachment 539546
Hit OK and you will be taken to the part of the file where the asset zip starts. 50/"P" should be highlighted. Hit edit->Delete from cursor to trim the ZIP archive off of the file.
View attachment 539551
Now file->save as and name this new file "part1"
Rename the zip you created in the editing step "part2". You will need to ensure you have to remove the .zip part of the filename.

Make sure your "part1" and "part2" files are in the same folder.
View attachment 539554

Now you will need to either open a command prompt + cd to the folder with the parts, or create a .bat file containing:
Code:
copy /b part1+part2 modded.exe
You'll now have a new .exe ready for testing!
View attachment 539556
Move it alongside the original .exe and you're done. Give it a run!
garbro mod
 
  • Like
Reactions: Aka645

AkagiVoid

Active Member
Feb 12, 2020
539
415
Requesting help with " Cage of Tentacles " (uses a TyranoBuilder game btw) but when I rebuild it won't work it just keeps stuck in the black window with the window title saying "Loading TryanoScript" for INF. TwT
I need 2 fix a few bugs in the 0.9.0 version until sumone updates it with 0.9.1. >w<


The only tool dat seems 2 work with Asar files is btw.
Here is the BMS script dat U'll need 2 load first after DLing QuickBMS tool "
". :3

You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:

Weta

Member
Jan 27, 2018
390
526
Requesting help with " Cage of Tentacles " (uses a TyranoBuilder game btw) but when I rebuild it won't work it just keeps stuck in the black window with the window title saying "Loading TryanoScript" for INF. TwT
I need 2 fix a few bugs in the 0.9.0 version until sumone updates it with 0.9.1. >w<


The only tool dat seems 2 work with Asar files is btw.
Here is the BMS script dat U'll need 2 load first after DLing QuickBMS tool "
". :3

You don't have permission to view the spoiler content. Log in or register now.
Instead of rebuilding the tyrano .exe file, you can just put all the modified files into a zip archive and rename it to (original exe filename).tpatch. So if the game was named Game1234.exe, you name the file Game1234.tpatch
Just make sure that the Data\scenario and whatnot folder structure is maintained properly in the patch archive.
 

AkagiVoid

Active Member
Feb 12, 2020
539
415
Instead of rebuilding the tyrano .exe file, you can just put all the modified files into a zip archive and rename it to (original exe filename).tpatch. So if the game was named Game1234.exe, you name the file Game1234.tpatch
Just make sure that the Data\scenario and whatnot folder structure is maintained properly in the patch archive.
Theres problem with dat. >w>
Dis is wat the game folder looks like:
1668634231263.png , 1668634269979.png , and when I extract it and try launching the game with exe its breaks (is no expert on how tyrano works). >w<
And I even tried it through tyranobuilder by importing it into a blank project and running it through the editor. >w>
 
Last edited:

Somedude222_4

Newbie
Oct 16, 2022
31
55
Theres problem with dat. >w>
Dis is wat the game folder looks like:
View attachment 2174356 , View attachment 2174358 , and when I extract it and try launching the game with exe its breaks (is no expert on how tyrano works). >w<
And I even tried it through tyranobuilder by importing it into a blank project and running it through the editor. >w>
All of the tyranobuilder code and assets are in resources/app.asar. You can use "npx asar" command to unpack (See ). I assume the .exe is a generic file from tyrannobuilder that actually just uses the .asar file.

The important code is stored in .ks files (a tyranobuilder scripting language -> ).
I have modified one such file to remove the RNG (https://f95zone.to/threads/cage-of-...koro-erufu-tea-plantation.131466/post-9702574).
 
Last edited:

ndj865

Newbie
Dec 22, 2017
22
17
There is a plugin for 7zip that can extract data from app.asar. It is called .
This plugin allows you to open, create, or modify ASAR archives (used for packaging applications based on the Electron framework).
For older Tyranobuilder games that doesn't have "app.asar", or can be used to extract data.
 
  • Like
Reactions: eime44 and wibuntr

BradleyLuck

Newbie
Oct 26, 2022
18
7
can anyone please answer my question, the extra_data is not inside the exe but separated on resources folder with .asap encryption
i do manage to unpack and pack the asap back but my translation still didn't work, why?
 

ndj865

Newbie
Dec 22, 2017
22
17
can anyone please answer my question, the extra_data is not inside the exe but separated on resources folder with .asap encryption
i do manage to unpack and pack the asap back but my translation still didn't work, why?
cminside
How did you extract data from app.asar archive?
Did you use Asar7z addon for 7zip?
 

GoKillRe

Newbie
Nov 28, 2017
79
41
I have used this tutorial to operate many games. After opening "Live2Dtyrano.js", I cannot search for "this.mosaicDraw"