This page explains the patch system for TyranoScript V5 and later (Studio).
For V4 or earlier, please refer to this page.
This feature is for PC-packaged games. It does not support browser or smartphone formats.
By using the patch feature in TyranoScript, you can update your game after release.
After distributing your game via CD-ROM, DVD, or similar, you can easily provide patch updates.
TyranoScript's patch system includes many useful functions.
Main use cases for patches:
Creating a patch file is simple.
After your game is released, just place the files that have been added or changed in a folder structured the same as your game project.
Then click the “Create Patch” button in TyranoStudio to generate the patch file.
Let’s try creating one. First, create a new folder for the patch, for example “patch01”.
Suppose we want to patch the following two updates after release:
・data/scenario/scene1.ks
・Image files under data/fgimage/chara/akane/
Place the files into “patch01” using the same structure as the Tyrano project.
In short, only include the updated files, keeping the folder structure of the project intact.
Next, launch TyranoStudio.
From the left menu, select “Export” → “Create Patch”.
Click the “Select Patch Folder” button and choose the patch01 folder.
Finally, click the “Execute Patch Creation” button to generate the patch file.
★Note
If your projectID is still the default "tyranoproject", patch creation will fail.
Open data/system/Config.tjs and change the projectID to a unique value that doesn’t conflict with other games.
Let’s assume the file “mygame.tpatch” is created — this is your patch file.
The patch file must include all files modified since the original release.
For example:
ver1.0 → ver2.0 → ver3.0 → creating patch for ver4.0 requires including all changes since ver1.0.
Now let’s apply the patch file to your game.
It’s simple — just place the patch file in the same folder as the game executable.
For example, if your game is launched via mygame.exe, place mygame.tpatch in the same directory.
Then start the game normally — the patch will be applied automatically.
If you delete the patch file, the game will revert to its pre-patch state.
So when distributing patches, just tell players: “Copy the .tpatch file to the same folder as the game executable.”
For Mac
On macOS Sierra and later, if a folder called “_TyranoGameData” exists in the user’s home directory, place the patch there.
If the folder doesn’t exist, place the patch in the same directory as the .app file.
★ This feature is under development. Please test thoroughly before use.
TyranoScript also allows you to implement online auto-updating with ease.
The process of creating the patch file is exactly the same as before.
In TyranoStudio, when generating the patch file, check the option:
"Generate JSON for online update together".
Then upload the generated patch file and JSON to your server.
We won’t cover how to rent a server here, as many guides are available online.
Let’s say patch.json is available at:
https://tyrano.jp/mygame/patch.json
Then place the following tag in your TyranoScript code:
If a new version is found, a message will prompt the user to download and apply the update.
[check_web_patch url="http://tyrano.jp/mygame/patch.json" ]
★ Tip ★
The version number you entered when creating the patch is compared with game_version in Config.tjs.
Be sure to update the version number each time you release a patch.