### Skip Start ([skipstart]) Source: https://tyranobuilder.com/tag Initiates 'skip mode', which accelerates text display and character movement for faster gameplay. ```APIDOC ## [skipstart] Skip Start ### Description Start “skip mode” where the characters move faster. ### Parameters There are no parameters ``` -------------------------------- ### Start Skip Mode Source: https://tyranobuilder.com/tag Initiates 'skip mode', which accelerates character text display. ```TyranoScript [skipstart] ``` -------------------------------- ### Example: Full 3D Image Lifecycle Source: https://tyranobuilder.com/tag Demonstrates the complete process of creating a 3D image, showing it, hiding it, and finally deleting it and its definition. ```TyranoScript ; Show a 3D image [3d_image_new name = "myimg" texture = "room.jpg" width = 200 doubleside = true] [3d_show name = "myimg"] ; Hide the image [p] [3d_hide name = "myimg"] ; Delete the object and remove its definition [p] [3d_delete name = "myimg"] ``` -------------------------------- ### Initialize 3D Functionality Source: https://tyranobuilder.com/tag Running this tag adds a 3D scene to the game. This tag must be run before other 3D tags (start with 3d_) can be used. Run the tag just before using 3D features. Run the [3d_close] tag once 3D functionality is no longer in use. ```APIDOC ## _[3d_init]_Initialize 3D functionality Running this tag adds a 3D scene to the game. This tag must be run before other 3D tags (start with 3d_) can be used. Run the tag just before using 3D features. Run the [3d_close] tag once 3D functionality is no longer in use. Parameter | Required? | Description | Default ---|---|---|--- layer | No | Sets the layer on which the 3D model is placed. | camera | No | Sets the camera mode. “Perspective” (with perspective) “Orthographic” (parallel projection without perspective) The default is Perspective. | near | No | Sets how close to the camera to draw an object. The default is 1. | far | No | Sets how far from the camera to draw an object. High values can impact the performance of the game, so setting to the smallest possible value is recommended. The default is 5000. | ``` [3d_init layer = 0] ``` ``` -------------------------------- ### _[3d_event_start]_Start a registered 3D event Source: https://tyranobuilder.com/tag Starts a registered 3D event, re-enabling events that were disabled after triggering. ```APIDOC ## _[3d_event_start]_Start a registered 3D event Starts a registered 3D event. All events will be disabled once an event has triggered; this tag is used to enable them again. Parameter | Required? | Description | Default ---|---|---|--- There are no parameters ``` -------------------------------- ### vostart Source: https://tyranobuilder.com/tag Starts automatic voice-over playback. ```APIDOC ## _[vostart]_Start automatic VO playback ### Description Begins the automatic playback of the VO set in `[voconfig]`. Following this tag, when a name is specified using the `#` mark, the related VO will be played. ### Parameters There are no parameters. ``` -------------------------------- ### Start Automatic VO Playback Source: https://tyranobuilder.com/tag Begins the automatic playback of voice-overs configured with the [voconfig] tag. VO will play when a character name is specified with the # mark. ```tyranocript [vostart] ``` -------------------------------- ### _[start_keyconfig]_Enable Key Config Source: https://tyranobuilder.com/tag Re-enables key configuration if it has been disabled. ```APIDOC ## _[start_keyconfig]_Enable Key Config ### Description If key config is disabled, this will re-enable it. ### Parameters There are no parameters. ### Request Example ``` [start_keyconfig] ``` ``` -------------------------------- ### Initialize and Show a 3D Model Source: https://tyranobuilder.com/tag Initializes a 3D layer and then loads and displays a custom 3D model. Ensure the model file is placed in the correct folder. ```TyranoScript [3d_init layer = 0] [3d_model_new name = "mymodel" storage = "mymodel / scene.gltf"] [3d_show name = "mymodel" pos = "100,20,20" rot = "1,1,1" scale = 10] ``` -------------------------------- ### _[web]_Open a Webpage Source: https://tyranobuilder.com/tag Opens a website in the default browser. Requires an 'await click' immediately before it, as many environments prohibit opening browsers without user action. ```APIDOC ## _[web]_Open a Webpage ### Description Opens a website in the default browser. Note: An await click must be used immediately before this tag. In many environments, opening a browser without a user action is prohibited. ### Parameters #### Query Parameters - **url** (string) - Required - Enter the URL of the webpage to be opened. ### Request Example ``` ; Should be preceded by an await click Open the TyranoBuilder Website[p] [web url="http://tyranobuilder.com"] ``` ``` -------------------------------- ### End Keyframe Definition with [endkeyframe] Source: https://tyranobuilder.com/tag This tag signifies the end of a keyframe definition started by the [keyframe] tag. It has no parameters. ```TyranoScript [endkeyframe] ``` -------------------------------- ### Start a Registered 3D Event Source: https://tyranobuilder.com/tag Enables registered 3D events that were previously disabled. This is used to re-activate events after they have been triggered or stopped. ```TyranoScript [3d_event_start] ``` -------------------------------- ### Load a Plugin Source: https://tyranobuilder.com/tag Loads external plugins from the `/data/others/plugin/` directory. Parameters can be passed to the plugin, which can be accessed in `init.ks` via `mp.`. Macro functions cannot be used for parameters. ```TyranoScript ; Change the theme [plugin name="original1" ] ; Parameters can be freely passed [plugin name="original1" font_color="black" arg2="aaaaaa" ] ``` -------------------------------- ### Initiate Auto Mode Source: https://tyranobuilder.com/tag Starts the automatic advancement of text display at a set rate. The rate can be adjusted via the autoSpeed option in config.tjs. ```TyranoScript [autostart] ``` -------------------------------- ### Show Menu ([showmenu]) Source: https://tyranobuilder.com/tag Displays the main menu of the game. ```APIDOC ## [showmenu] Show Menu ### Description Show menu. ### Parameters There are no parameters ### Request Example ```tyranobuilder [showmenu] ``` ``` -------------------------------- ### Plugin Initialization and Macro Usage Source: https://tyranobuilder.com/tutorials/more/create-your-own-plugins Shows how to load a TyranoScript plugin named 'bg_no_message' and then use the macro defined within it. The init.ks file in the plugin directory makes the macro available globally after the plugin is called. ```tyranots ; Call the plugin [plugin name = "bg_no_message"] ; Now you can use the macro [bg_no_message storage = "room.jpg" time = 2000 wait_time = 5000] ``` -------------------------------- ### Assigning Variables with iScript Source: https://tyranobuilder.com/tutorials/more/using-flags-and-variables-tyranoscript The iScript component allows using JavaScript for variable assignments, offering more flexibility. This example shows equivalent assignments to the TyranoScript version. ```javascript [iscript] sf.variable1 = 'Sample Text' f.flag1 = 1000 tf.flag1 = f.flag2 [endscript] ``` -------------------------------- ### Show Menu Source: https://tyranobuilder.com/tag Displays the game menu. ```TyranoScript [showmenu] ``` -------------------------------- ### [3d_scene] Source: https://tyranobuilder.com/tag Configure settings for a 3D scene, such as tone mapping and ambient light. ```APIDOC ## _[3d_scene]_3D scene settings Open a specified website in the browser. Note: an ‘await click’ must be placed immediately this tag. Many environments restrict browsers from opening without user initiation. Parameter | Required? | Description | Default ---|---|---|--- tonemap | No | Sets tone mapping for the scene. Available parameters are: No / Linear Reinhard/ Uncharted2 / Cineon / ACES Filmic. The default is No (no tone mapping). | tonemap_value | No | Sets the strength of tone mapping. The default is 0.8. | light_amb | No | light_amb × Sets the intensity of ambient light. The default is 1, 0.5 is dark, 2 is bright, etc. | ``` [3d_scene light_amb = "2" tonemap = ""] ``` ``` -------------------------------- ### Show Load Screen ([showload]) Source: https://tyranobuilder.com/tag Displays the load game screen, allowing the player to load a previously saved game. ```APIDOC ## [showload] Show Load Screen ### Description Show load screen. ### Parameters There are no parameters ### Request Example ```tyranobuilder [showload] ``` ``` -------------------------------- ### Configure 3D Scene Settings in TyranoScript Source: https://tyranobuilder.com/tag Sets up the 3D scene with options for tone mapping and ambient light intensity. Note that 'await click' must follow this tag in many environments to ensure user initiation for browser actions. ```TyranoScript [3d_scene light_amb = "2" tonemap = ""] ``` -------------------------------- ### Initialize 3D Functionality Source: https://tyranobuilder.com/tag Adds a 3D scene to the game and must be called before any other 3D tags. Configures the layer, camera mode (perspective/orthographic), and near/far clipping planes. Remember to use [3d_close] when finished. ```TyranoScript [3d_init layer = 0] ``` -------------------------------- ### _[autostart]_Initiate Auto Mode Source: https://tyranobuilder.com/tag Automatically advances the text display at a set rate. The rate can be adjusted via the autoSpeed option in config.tjs. ```APIDOC ## _[autostart]_Initiate Auto Mode Automatically advances the text display at a set rate. Use the autoSpeed option in config.tjs to change the rate. ### Parameters There are no parameters. ``` -------------------------------- ### Open Website with TyranoScript Source: https://tyranobuilder.com/tag Use this tag to open a specified URL in the browser. An 'await click' must precede this tag, as many environments restrict browser opening without user initiation. ```TyranoScript ; First, await click Open the official website [p] [web url = "https://www.nyu-media.com/"] ``` -------------------------------- ### Preload Image Files ([preload]) Source: https://tyranobuilder.com/tag Loads image or music files before they are needed to ensure smooth presentation. The 'wait' parameter can pause the game until files are loaded. ```APIDOC ## [preload] Preloads Image Files ### Description Using the preload tag, you can load files (images or music) before they are needed. The presentation will be smooth when they are needed. ### Parameters #### Path Parameters - **storage** (string) - Required - enter the full path for previously entered images. They are set in the order that they are passed in. - **wait** (boolean) - Optional - this can be set to true or false. The default is false. When this is set to true all the game is paused until the images are loaded. You will need a loading screen. ### Request Example ```tyranobuilder ;Use the full path below the project directory [preload storage="data/fgimage/girl.jpg"] ;You can also specify an array [iscript] f.preload_images = ["data/fgimage/girl.jpg","data/fgimage/haruko.png","data/fgimage/miku1.png","data/fgimage/miku2.png"]; [endscript] [preload storage=&f.preload_images] ``` ``` -------------------------------- ### Show Load Screen Source: https://tyranobuilder.com/tag Displays the load game screen. ```TyranoScript [showload] ``` -------------------------------- ### Preload Image Files Source: https://tyranobuilder.com/tag Use the [preload] tag to load image or music files before they are needed to ensure smooth presentation. The 'wait' parameter can pause the game until loading is complete, requiring a loading screen. ```TyranoScript ;Use the full path below the project directory [preload storage="data/fgimage/girl.jpg"] ``` ```TyranoScript ;You can also specify an array [iscript] f.preload_images = ["data/fgimage/girl.jpg","data/fgimage/haruko.png","data/fgimage/miku1.png","data/fgimage/miku2.png"]; [endscript] [preload storage=&f.preload_images] ``` -------------------------------- ### _[3d_model_new]_Create a 3D model Source: https://tyranobuilder.com/tag Loads and defines a 3D model from an external file. The model is not displayed until [3d_show] is called. Place 3D model files in the data/others/3d/model folder. ```APIDOC ## _[3d_model_new]_Create a 3D model ### Description Loads and defines a 3D model in an external file format. The model will not be displayed in the game screen when this tag is run. Use the tag [3d_show] to display the model. Place 3D model files in the data / others / 3d / model folder. ### Parameters #### Path Parameters - **name** (string) - Required - The name of the 3D object. Used to display or hide the model. - **storage** (string) - Required - Sets the 3D file (gltf obj format) to be used. Place the file in the others / 3d / model folder. - **pos** (string) - Optional - Sets the coordinates at which to place the 3D object. Takes the xyz coordinates as comma-separated values. - **rot** (string) - Optional - Sets the rotation of the 3D object. Takes the rotation of the xyz axes as comma-separated values. - **scale** (number or string) - Optional - Sets the scale of the 3D object. Enter scales for the axes as comma-separated values. - **tonemap** (boolean) - Optional - Sets whether tone mapping is applied to this object or not (tone mapping must be enabled for the scene.) The default value is true. - **motion** (string) - Optional - Sets name of the motion if there is a motion in the file. If not specified, the first motion file will be applied automatically. - **folder** (string) - Optional - Sets the folder where 3D models are located. ### Request Example ``` [3d_init layer = 0] [3d_model_new name = "mymodel" storage = "mymodel / scene.gltf"] [3d_show name = "mymodel" pos = "100,20,20" rot = "1,1,1" scale = 10] ``` ``` -------------------------------- ### voconfig Source: https://tyranobuilder.com/tag Configures voice-over playback settings. ```APIDOC ## _[voconfig]_VO (voice-over) Playback Settings ### Description Configures voice-over playback settings, linking character names with VO filenames. Must be followed by the `[vostart]` tag to begin playback. ### Parameters #### Path Parameters - **sebuf** (integer) - Optional - Sets the playse buffer used by the VO. - **name** (string) - Optional - Sets the name of the character that will use the VO. This is the name set in the `chara_new` tag. - **vostorage** (string) - Optional - Sets the template of the filename that will be used as the voice file. `[number]` below is the number of times that VO has been played plus 1. - **number** (integer) - Optional - The default is 0. The number stored in `vostorage` can be reset by specifying a value here. ### Request Example ``` [voconfig sebuf=2 name="akane" vostorage="akane_{number}.ogg" number=1 ] [voconfig sebuf=2 name="yamato" vostorage="yamato_{number}.ogg" number=1 ] ``` ``` -------------------------------- ### Load a Plugin Source: https://tyranobuilder.com/tag Loads third-party plugins. Plugins should be placed in the /data/others/plugin/ folder. Parameters can be passed to the plugin. ```APIDOC ## _[plugin]_Load a Plugin ### Description Use this to load third party plugins. Plugins should be placed in the folder /data/others/plugin/ The plugin tag can also freely pass parameters. For example: [plugin name=”original1” font_color=”black” myname=”Johnny Appleseed” ] In the above example, parameters such as mp.font_color and mp.myname may be available in init.ks which uses the plugin. This allows the creation of customizable plugins. Please note: macros functions such as %font_color cannot be used. ### Parameters #### Query Parameters - **name** (string) - Required - Select a folder (plugin) name from within /data/others/plugin. - **storage** (string) - Optional - Use this to change the scenario file that will be read first. The default is init.ks . ### Request Example ``` ; Change the theme [plugin name="original1" ] ; Parameters can be freely passed [plugin name="original1" font_color="black" arg2="aaaaaa" ] ``` ``` -------------------------------- ### Show Menu Button Source: https://tyranobuilder.com/tag Displays the menu button. ```TyranoScript [showmenubutton] ``` -------------------------------- ### _[wt]_Wait on Transition Source: https://tyranobuilder.com/tag wait until transition is finished ```APIDOC ## _[wt]_Wait on Transition wait until transition is finished Sample Code [backlay] [image layer=base page=back storage=rouka.jpg] [trans time=2000] ;don't advance until transition is finished [wt] Parameter | Required? | Description | Default ---|---|---|--- There are no parameters ``` -------------------------------- ### bgmopt Source: https://tyranobuilder.com/tag Sets background music options, such as volume. ```APIDOC ## _[bgmopt]_Set Background Music Options ### Description Changes the background music options. Note that when the user is playing from a smartphone browser, the smartphone itself will not allow you to change the volume. ### Parameters #### Path Parameters - **volume** (integer) - Optional - Sets the volume of the BGM (0-100) - **effect** (boolean) - Optional - Set to true or false. (Defaults to true.) If true the change to the BGM will take place for the song current playing. ### Request Example ``` [bgmopt volume=50 ] ``` ``` -------------------------------- ### Show Menu Button ([showmenubutton]) Source: https://tyranobuilder.com/tag Displays the menu button, typically used for accessing game options or the main menu during gameplay. ```APIDOC ## [showmenubutton] Show Menu Button ### Description Show menu button. ### Parameters There are no parameters ### Request Example ```tyranobuilder [showmenubutton] ``` ``` -------------------------------- ### _[wait_bgmovie]_Wait for the Movie Backdrop to Complete Source: https://tyranobuilder.com/tag Waits for the movie backdrop to finish playing before proceeding. ```APIDOC ## _[wait_bgmovie]_Wait for the Movie Backdrop to Complete ### Description Wait for the movie backdrop to complete. ### Parameters There are no parameters. ``` -------------------------------- ### Configure QR Code Settings with qr_config Source: https://tyranobuilder.com/tag Use this tag to set various parameters for QR code operations. It allows you to specify the QR code's behavior, such as triggering in-game transitions or opening web links. ```TyranoScript ; Enable only in-project jumps for QR codes [qr_config qrcode = "jump"] ``` -------------------------------- ### _[pushlog]_Insert Text into the Backlog Source: https://tyranobuilder.com/tag Allows free insertion of characters or text into the backlog, even for text like [mtext] which is not normally written. ```APIDOC ## _[pushlog]_Insert Text into the Backlog ### Description Can be used to freely insert characters or text into the backlog. For example, text such as [mtext] is not usually written to the backlog, but by utilizing this tag in macros, etc. additional text can be inserted to the backlog. ### Parameters #### Query Parameters - **text** (string) - Required - Add this text to the backlog. - **join** (string) - Optional - Specify whether to prefix the text to the backlog or not. When set to ‘true’, the text will precede the backlog. The default is ‘false’. ### Request Example ``` [pushlog text="This text has been inserted into the backlog."] ``` ``` -------------------------------- ### _[showlog]_Display the Backlog Source: https://tyranobuilder.com/tag Shows the message backlog. ```APIDOC ## _[showlog]_Display the Backlog ### Description Shows the message backlog. ### Parameters There are no parameters. ``` -------------------------------- ### Load a CSS File Source: https://tyranobuilder.com/tag Loads a CSS file while a game is in progress. ```APIDOC ## _[loadcss]_Load a CSS File ### Description Load CSS while a game is in progress. ### Parameters #### Query Parameters - **file** (string) - Required - Specify the CSS file to be loaded. ### Request Example ``` [loadcss file="./data/others/css/mystyle.css"] ``` ``` -------------------------------- ### Output to Console with [trace] Source: https://tyranobuilder.com/tag Outputs values to the console. Use Shift+F4 to activate display in KAG3/Kirikiri, or enable logMode in Config.tjs. For TyranoScript in a browser, check the web inspector console. ```tyranoscript [trace exp="f.test"] ; ? game variable test's details are output to the console ``` -------------------------------- ### Open Webpage Source: https://tyranobuilder.com/tag Opens a specified URL in the default web browser. This tag requires an 'await click' immediately preceding it due to browser security restrictions on opening links without user interaction. ```TyranoScript ; Should be preceded by an await click Open the TyranoBuilder Website[p] [web url="http://tyranobuilder.com"] ``` -------------------------------- ### Enable Key Config Source: https://tyranobuilder.com/tag Re-enables key configuration if it has been previously disabled. This tag has no parameters. ```TyranoScript [start_keyconfig] ``` -------------------------------- ### Adding Initial Story Text Source: https://tyranobuilder.com/tutorials/adding-story-branches-and-player-choices This code block sets up the initial dialogue and narrative for a scene in TyranoBuilder. ```tyranoscript #Yuko A meteorite fell at the back of the mountain! We have to go look for it! # What? You think I’d fall for that? #Yuko I’m being serious! I saw it last night! It fell and landed at the back of the mountain! Let’s go look for it! ``` -------------------------------- ### Calling the TyranoScript Macro Source: https://tyranobuilder.com/tutorials/more/create-your-own-plugins Demonstrates how to call the 'bg_no_message' macro with specific parameters for background image, transition time, and wait time. This is how you would use the macro in your game script. ```tyranots [bg_no_message storage = "room.jpg" time = 2000 wait_time = 5000] ``` -------------------------------- ### live2d_show Source: https://tyranobuilder.com/tag Displays a Live2D model on the screen with optional transition time. ```APIDOC ## _[live2d_show]_Display a Live2D Model ### Description Displays a Live2D model with an optional transition time. ### Parameters #### Path Parameters - **name** (string) - Required - Live2D Model’s ID (name applied to model.json) - **time** (integer) - Optional - Transition time (1000=1 second) ### Request Example ``` [live2d_show name="nasuka"] ``` ``` -------------------------------- ### _[backlay]_Copy Information from the Surface Page Source: https://tyranobuilder.com/tag The layer that you designate or all of the layer information is copied from the front page to the back page. The image of the front page layer marked with the [trans] tag moves to the back page’s image layer. In order to do that, before the transition, the image is moved to the back with the [backlay] tag. On the back page, after the layer is manipulated, the transition is performed. ```APIDOC ## _[backlay]_Copy Information from the Surface Page The layer that you designate or all of the layer information is copied from the front page to the back page. The image of the front page layer marked with the [trans] tag moves to the back page’s image layer. In order to do that, before the transition, the image is moved to the back with the [backlay] tag. On the back page, after the layer is manipulated, the transition is performed. Parameter | Required? | Description | Default ---|---|---|--- set the layer target | if set as “base” then it becomes the background layer | if set as an integer above zero then it becomes the foreground if you set as message0 or message1 then it will become that message layer. layer No if you set is as message it will become the message layer of whatever the [current] tag is set to. Even if the message layer is the back page it will copy that message layer from the front to the back. if this is omitted the information of every layer is copied to the back page | ``` ;The background change is executed via a transition @layopt layer=message0 visible=false [backlay] [image layer=base page=back storage=rouka.jpg] [trans time=2000] [wt] ``` ``` -------------------------------- ### Define Custom QR Code Actions with qr_define Source: https://tyranobuilder.com/tag Replaces a QR code URL with an in-project jump or other defined actions. Use this to replace the QR code on an object or product with an in-game event. Requires a URL and can optionally specify storage and target for jumps. ```TyranoScript [qr_define url = "https://tyrano.jp" storage = "scene1.ks" target = "test"] ``` -------------------------------- ### _[qr_config]_QR code settings Source: https://tyranobuilder.com/tag Use this tag to set various parameters for QR code operations. ```APIDOC ## _[qr_config]_QR code settings ### Description Use this tag to set various parameters for QR code operations. ### Parameters #### Parameters - **qrcode** (string) - Optional - Sets the operation to trigger when the QR code is read. “Jump” (for QR codes that trigger only in-game transitions), “web” (for links to other sites), “define” (for operations defined using qr_define), “all” (for all), “off” (does not respond to QR codes). The default is “off”. ### Examples ```tyranoscript ; Enable only in-project jumps for QR codes [qr_config qrcode = "jump"] ``` ``` -------------------------------- ### Configure Voice-Over Playback Source: https://tyranobuilder.com/tag Configure voice-over playback settings, including buffer, character name, and filename template. This tag must be followed by [vostart] to begin playback. ```tyranocript [voconfig sebuf=2 name="akane" vostorage="akane_{number}.ogg" number=1 ] [voconfig sebuf=2 name="yamato" vostorage="yamato_{number}.ogg" number=1 ] ; Begin automatic playback. This is a must-have step [vostart] #akane Play the VO clip here (akane_1.ogg)[p] #akane The next VO clip (akane_2.ogg)[p] #yamato Play Yamato's VO (yamato_1.ogg)[p] #akane Play Akane's VO (akane_3.ogg)[p] ``` -------------------------------- ### [3d_camera] Source: https://tyranobuilder.com/tag Sets the camera's position and rotation for a 3D scene. ```APIDOC ## _[3d_camera]_3D camera Sets the camera for a 3D scene. Note: To check the coordinates of the camera, we recommend using [camera_debug], which allows testing of the coordinates and tilt. Parameter | Required? | Description | Default ---|---|---|--- pos | No | Sets the camera coordinates. Enter the xyz coordinates as comma-separated values. | rot | No | Sets the tilt of the camera. Set the rotation of the xyz axes as comma-separated values. | tonemap | No | Sets tone mapping for the scene. Available types are: No / Linear / Reinhard / Uncharted2 / Cineon / ACES Filmic. The default is No (no tone mapping). | lookat | No | The name of the target 3D object in the scene that the camera will point to. Alternatively, you can point the camera at that coordinate by setting the pos tag. | ``` [3d_camera pos = "10,20,30"] ``` ``` -------------------------------- ### Show 3D Object Source: https://tyranobuilder.com/tag Displays a registered 3D object on the game screen with options for transition time and waiting. ```APIDOC ## _[3d_show]_Show a 3D object Display a registered 3D object on the game screen. Parameter | Required? | Description | Default ---|---|---|--- name | Yes | The name of the 3D object to be displayed. | time | No | The time in milliseconds over which the object will appear. The default is 500. | wait | No | Sets whether to wait for object to completely display before proceeding. The default value is true. | pos | No | Sets the coordinates to position the 3D object. Takes xyz coordinatesas comma-separated values. | rot | No | Sets the rotation of the 3D object. Takes the rotation of the xyz axes as comma-separated values. | scale | No | Sets the scale of the 3D object. Enter the scales for the axes as comma-separated values. | ``` ; Show an images as a 3D object [3d_image_new name = "myimg" texture = "room.jpg" width = 200 doubleside = true] [3d_show name = "myimg"] ``` ``` -------------------------------- ### Generate Live2D Model in TyranoScript Source: https://tyranobuilder.com/tag Generates and displays a Live2D model on the screen. Requires the model's name and can be positioned, sized, and layered using various parameters. ```TyranoScript [live2d_new name="nasuka"] ``` -------------------------------- ### Show Save Screen Source: https://tyranobuilder.com/tag Displays the save game screen. ```TyranoScript [showsave] ``` -------------------------------- ### Display Background Image with Transition Source: https://tyranobuilder.com/tag Use this snippet to switch background images with a visual transition effect. Ensure the target layer is initially hidden and then revealed after the transition. ```tyranoscript ;Use a transition to switch the background image. @layopt layer=message0 visible=false [backlay] [image layer=base page=back storage=rouka.jpg] [trans time=2000] [wt] @layopt layer=message0 visible=true ``` -------------------------------- ### Show Save Screen ([showsave]) Source: https://tyranobuilder.com/tag Displays the save game screen, allowing the player to save their progress. ```APIDOC ## [showsave] Show Save Screen ### Description Show save screen. ### Parameters There are no parameters ### Request Example ```tyranobuilder [showsave] ``` ``` -------------------------------- ### _[check_web_patch]_Check and Apply an Update from a Server Source: https://tyranobuilder.com/tag Checks for and applies updates from a server, available from TyranoScript v470 onwards. Notifies the user of available patches and requires a game restart to complete the update. ```APIDOC ## _[check_web_patch]_Check and Apply an Update from a Server Available from TyranoScript v470 and later. Use this to automatically display a message and notify the user when a patch is available on a server. Upload the json and patch files to the server. The game must be restarted to complete applying the patch. ### Parameters - **url** (string) - Required - Specify the URL of json file on the server, starting with http:// ### Request Example ``` [check_web_patch url="http://tyrano.jp/patch/mygame.json" ] ``` ``` -------------------------------- ### Performing Calculations with Game Variables in TyranoScript Source: https://tyranobuilder.com/tutorials/more/using-flags-and-variables-tyranoscript Demonstrates performing arithmetic operations, including addition and multiplication, with game variables using the `eval` command. The result is stored back into a variable. ```tyranoscript [eval exp="f.flag1 = f.flag1 + f.flag2 * f.flag3"] ``` -------------------------------- ### _[awakegame]_Restore a Game From Paused State Source: https://tyranobuilder.com/tag Restores a game that has been paused with the [gamesleep] tag. Game variables changed during the paused state will be reflected upon restoration. Processing passes through make.ks before returning to the game. ```APIDOC ## _[awakegame]_Restore a Game From Paused State Restores a game that has been paused with the [gamesleep] tag. Any variables (f) that were changed while the game was asleep will be reflected after the game is restored. Processing will pass through the make.ks file before returning to the game. If you want to change any variables (f) before returning to the game, you can insert logic into the make.ks file to determine if [awakegame] is being used. ### Parameters - **variable_over** (boolean) - Optional - Set to true or false. If this is set to true, game variables changed during sleepgame will be carried over once play is resumed. Defaults to true. - **bgm_over** (boolean) - Optional - Set to true or false. If set to true, BGM played during sleepgame will continue to play. Defaults to true. If set to false, the BGM that was used when sleepgame was executed will play once more. ``` -------------------------------- ### Load a CSS File Dynamically Source: https://tyranobuilder.com/tag Loads a CSS file while the game is running. Specify the path to the CSS file to be loaded. ```TyranoScript [loadcss file="./data/others/css/mystyle.css"] ``` -------------------------------- ### Apply Local Patch File Source: https://tyranobuilder.com/tag Applies a patch file to the game, available from TyranoScript v470 onwards. Primarily used for packaging and distribution. The 'file' parameter is required, and 'reload' can be set to true to reload the game after patching. ```TyranoScript [apply_local_patch file="test.tpatch" ] ``` -------------------------------- ### Jump to Scenario - TyranoScript Source: https://tyranobuilder.com/tag Transfers execution to a specified label within a scenario file. Can only be used if a jump is on the call stack. ```tyranoscript ; Go to the scenario file second.ks in the place with the label: *start [jump storage=second.ks target=*start] ``` -------------------------------- ### Define and Use a New Tag with Macro Source: https://tyranobuilder.com/tag Register a new tag by defining its behavior between [macro] and [endmacro]. The new tag can then be used like any other TyranoScript tag. Parameters prefixed with '%' are passed through to inner tags. ```tyranoscript [macro name="newtag"][font color=0xff0000]new tag[resetfont][endmacro] [newtag] ``` ```tyranoscript [macro name="colortag"][font color=%iro]color tag[resetfont][endmacro] [colortag iro=0x332211] ``` ```tyranoscript ; ? iro is passed through colortag to the [font] tag within the macro by using a "%" [macro name="transwait"][trans *][wt][endmacro] ; ? transwait all of the properties passed to the [transwait] tag are passed to the [trans] tag with a "*" ``` ```tyranoscript [macro name="colortag"][font color=%iro|0xff0000]the iro property is supplied if not set[resetfont][endmacro] ; ? in conjunction with the "%" syntax the "|" is used to supply default parameters ``` -------------------------------- ### Define Plugin Parameters in TyranoBuilder Source: https://tyranobuilder.com/tutorials/more/create-your-own-plugins This code defines the parameters for a TyranoBuilder plugin, including image selection, numerical inputs with spinners, and validation rules. Use this structure to specify the inputs your plugin will require from the user. ```javascript param:{ /* Define the parameters. 'storage' represents the parameter name. */ /* Image selection example */ "storage" : { type : "ImageSelect", /* The parameter type. In this case, an image selection. */ file_path : "bgimage/", /* The background image folder is set as default */ base_img_url : "data/bgimage/", /* Set the target selection folder */ name : TB.$.s("background image"), /* Parameter name */ help : TB.$.s("Change the background image."), /* Parameter explanation. Displayed in the help bar at the bottom of the screen. */ vital : true, /* Sets optional or not. Recommended to be left as is. */ default_val : "", /* Set the default value of the component */ line_preview: "on", /* Set whether or not to preview in the Scene Editor */ validate : { required : true } }, /* Numerical input examples */ "time" : { type : "Num", /* Set input type to number */ name : "Time", /* Parameter name */ unit : "ms", /* Units */ help : TB.$.s("The background will change over the specified duration."), default_val : 1000, /* Default value */ /* spinner expresses the number in spinner format */ spinner : { min : 0, /* Minimum input value * / max : 10000, /* Maximum Input Value */ step : 500 /* The step value for one spin */ }, validate : { number : true /* Check if the input is a valid number */ } }, "wait_time" : { type : "Num", /* Set input type to number */ name : "Wait Time", /* Parameter name */ unit : "ms", /* Units */ help : TB.$.s("Set the time to wait after the background has changed."), default_val : 1000, /* Default value */ /* spinner expresses the number in spinner format */ spinner : { min : 0, /* Minimum input value */ max : 10000, /* Maximum Input Value */ step : 500 /* The step value for one spin */ }, validate : { number : true /* Check if the input is a valid number */ } }, } ``` -------------------------------- ### Change System Screen Files Source: https://tyranobuilder.com/tag Replaces the default HTML files used for system functions like saving, loading, backlog, and the menu. Specify the type of system screen and the path to the new HTML file. ```TyranoScript [sysview type="save" storage="./data/others/plugin/mytheme/html/save.html"] [sysview type="load" storage="./data/others/plugin/mytheme/html/load.html"] [sysview type="backlog" storage="./data/others/plugin/mytheme/html/backlog.html"] [sysview type="menu" storage="./data/others/plugin/mytheme/html/menu.html"] ``` -------------------------------- ### Set 3D Camera in TyranoScript Source: https://tyranobuilder.com/tag Configures the camera for a 3D scene by setting its position, rotation, and look-at target. Use the 'camera_debug' tag to test coordinates and tilt. ```TyranoScript [3d_camera pos = "10,20,30"] ``` -------------------------------- ### Change System Screen Files Source: https://tyranobuilder.com/tag Changes the HTML files used for system functions like saving, loading, backlog, and menu. ```APIDOC ## _[sysview]_Change System Screen Files ### Description Change the HTML files used for system functions. ### Parameters #### Query Parameters - **type** (string) - Required - Set to ‘save’, ‘load’, ‘backlog’, or ‘menu’. - **storage** (string) - Required - Set the path of the HTML file. ### Request Example ``` [sysview type="save" storage="./data/others/plugin/mytheme/html/save.html"] [sysview type="load" storage="./data/others/plugin/mytheme/html/load.html"] [sysview type="backlog" storage="./data/others/plugin/mytheme/html/backlog.html"] [sysview type="menu" storage="./data/others/plugin/mytheme/html/menu.html"] ``` ``` -------------------------------- ### l Source: https://tyranobuilder.com/tag Waits for a click to proceed. Displays text and pauses execution until the user clicks. ```APIDOC ## l ### Description This tag allows waiting for a click. ### Parameters There are no parameters ### Sample Code ``` show some text...[l] show some more text...[l][r] ``` ``` -------------------------------- ### Stream Camera Output to Background with bgcamera Source: https://tyranobuilder.com/tag Use the output of the device camera as the background. Browser games must be deployed in a location accessible via https for this tag to work. You can specify various parameters like time, fit, position, and camera mode. ```TyranoScript ; Display camera input in the background [bgcamera time = 2000] ``` ```TyranoScript ; Set coordinates at which to display camera input [bgcamera width = 300 height = 200 left = 100 top = 100] ``` ```TyranoScript ; When reacting to a QR code. Specify rear camera [bgcamera mode = "back" fit = true qrcode = "all"] ``` -------------------------------- ### Generate a Live2D Model Source: https://tyranobuilder.com/tag Generates a new Live2D model on the screen with specified properties like position, size, and opacity. ```APIDOC ## Generate a Live2D Model ### Description Generate a Live2D Model. ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **name** (Yes) - Live2D Model’s ID (name applied to model.json) - **left** (No) - x position of the Live2D model - **top** (No) - y position of the Live2D model - **width** (No) - width of the Live2D model - **height** (No) - height of the Live2D model - **zindex** (No) - depth of the Live2D model - **opacity** (No) - transparency of the Live2D model (0~1.0) - **glleft** (No) - x position of the Live2D model within the canvas (approximately 0.0?2.0) - **gltop** (No) - y position of the Live2D model within the canvas (approximately 0.0?2.0) - **glscale** (No) - scaling of the Live2D model (approximately 0.0?2.0) ### Request Example ```tyranoscript [live2d_new name="nasuka"] ``` ### Response #### Success Response (200) - None explicitly documented. #### Response Example - None explicitly documented. ``` -------------------------------- ### _[playse]_Play a Sound Effect Source: https://tyranobuilder.com/tag Plays a sound effect. Sound effect files are stored in the project's \sound folder. ```APIDOC ## _[playse]_Play a Sound Effect Play a sound effect Sound effect files are stored in the project’s \sound folder Parameter | Required? | Description | Default ---|---|---|--- storage | Yes | Set the playback file | loop | No | set true or false (default). true will repeat the sound when it is done | clear | No | true or false (default). When another sound effect is playing interrupt it and start playing this. true could be useful for voice | ``` [playse storage=sound.mp3 loop=false ] ``` ``` -------------------------------- ### _[cursor]_Set an Image for the Mouse Cursor Source: https://tyranobuilder.com/tag Sets a custom image for the mouse cursor. The image file should be placed in the data/image folder and can be in GIF, PNG, or JPG format. To revert to the default cursor, specify 'default'. ```APIDOC ## _[cursor]_Set an Image for the Mouse Cursor Sets the image for the mouse cursor to the file specified by the storage parameter. Please put the image in the data/image folder. Allowable file formats are gif, png, and jpg. The cursor can be changed several times throughout the course of the game. To set the default cursor, please use the cursor Default variable in system/config.tjs. To return to the default cursor, specify “default”. ### Parameters - **storage** (string) - Required - Sets the image file used for the cursor. Please put the file in data/image. ### Request Example ``` [cursor storage="my_cursor.gif"] ``` ``` -------------------------------- ### Display Live2D Model Source: https://tyranobuilder.com/tag Use this tag to display a Live2D model. Specify the model's name and optionally a transition time. ```tyranocript [live2d_show name="nasuka"] ``` -------------------------------- ### Check and Apply Web Patch Source: https://tyranobuilder.com/tag Checks for and applies updates from a specified server URL. Requires TyranoScript v470 or later. The game must be restarted for the patch to take effect. ```TyranoScript [check_web_patch url="http://tyrano.jp/patch/mygame.json" ] ``` -------------------------------- ### Play a Sound Effect (SE) Source: https://tyranobuilder.com/tag Plays a sound effect. Sound files are located in the project's \sound folder. The 'storage' parameter is required. ```TyranoScript [playse storage=sound.mp3 loop=false ] ``` -------------------------------- ### Create Hyperlink (Choice) Source: https://tyranobuilder.com/tag Creates a selectable hyperlink that can fire a jump event on click or key event. This tag cannot be used to visit a different page. The text between [link] and [endlink] is selectable. ```TyranoScript pick what you like[l][r][r] [link target=*select1] 1- first choice[endlink][r] [link target=*select2] 2- second choice[endlink][r] [s] *select1 [cm] you clicked the first choice @jump target=*common *select2 [cm] you clicked the second choice @jump target=*common *common [cm] Common Route ``` -------------------------------- ### Create a New 3D Image Model Source: https://tyranobuilder.com/tag Defines a 3D model using an image as a texture. Specify the name, texture file, and dimensions. Optional parameters control appearance and positioning. ```TyranoScript [3d_image_new name = "myimg" texture = "room.jpg" width = 200 doubleside = true] ``` -------------------------------- ### Blend Movie with Game Screen using layermode_movie Source: https://tyranobuilder.com/tag Blends a movie file with the game screen. Recommended for PC games. Ensure movie files are in the /video folder. Compatibility may vary by game; use webm for PC. ```TyranoScript [layermode_movie video=test.webm time=1500 wait=true] ``` -------------------------------- ### Create New Character Source: https://tyranobuilder.com/tag Sets up a new character with a unique name, image storage, and optional display name. This character can then be manipulated by other tags. ```TyranoScript [chara_new name="yuko" storage="yuko.png" jname="???"] ```