TyranoScript Tutorial Part 1: TyranoScript Introduction
/ 3 min read
ティラノスクリプト(TyranoScript) is an AVG engine that supports multiple platforms with HTML5. Since I couldn’t find many tutorials on Google or Baidu, I decided to summarize some basic usage and customization methods.
Development Tools
Launcher
tyranorider is completely free and is the most commonly used project generator + launcher. This tutorial will mainly use this tool.
tyranobuilder has a free version, but the full functionality requires payment and is available on Steam. This tool focuses on visual editing and is suitable for students with no programming experience.
Editor
If you don’t use visual editing or need to customize programs, you will definitely need a code editor. I recommend vscode or sublime. (I haven’t used sublime for a long time, but vscode has a .ks file coloring plugin, which makes it much more comfortable to use.)
Project Initialization
There are three ways to initialize a project. The aforementioned tyranorider and tyranobuilder can both generate initial projects. Alternatively, you can clone (or download) the initial project from the official GitHub repository, and I recommend this method as it is the most educational.
Because the GitHub repository includes examples of CG pages and configuration pages, which are not included in the generated projects…they are not…not…
File Structure
The first step is to understand what is included in the generated initial project.
First, pay attention to the data folder. The tyrano folder will be discussed in future customization tutorials.
- bgimage: contains background images
- bgm: contains BGM
- fgimage: contains character illustrations (fg should mean figure, right?)
- image: contains other buttons or material images
- others: contains general-purpose materials (if you can’t find the folder, put things here)
- scenario: focus on this folder, contains script files (surprisingly, some pages are also written in a “script” format)
- sound: contains sound effect files
- system: contains system configuration files
- video: contains video files
Structure of Scripts
Scripts refer to .ks
files, which are composed of various tags.
All tags can be referenced here (English version) or here (Japanese version).
For users unfamiliar with programming, .ks
files are primarily used for script entry, like the example below:
However, title, CG, and configuration pages in the official examples are written in .ks
rather than HTML files…so I’m not very used to this programming approach (of course, after customization, you can use HTML to write these pages, but it might feel strange…because sometimes it’s easy to forget where you wrote certain practicalities 😂). Below is part of the code from cg.ks:
This technique intersperses tags with JavaScript functionality and achieves navigation through buttons and *
tags.
Coming Soon
I plan to start by writing the basics related to layers, so that explaining some tags will be simpler~