Search tag

TyranoScript Tags Reference

Note

  • Terms surrounded by [] are tags.
  • Lines starting with @ are also recognized as tags, but the complete tag must appear on one line.
  • Lines starting with ; are treated as comments.
  • To create a multi-line comment, begin the comment with /* and end with */.
  • All tags can be given cond attributes. You can input a JavaScript formula, and the tag will only be executed if the result is true.
  • Begin a line with an underbar (_) use blank spaces before text.

3D-related

[3d_anim]3D animation

Use to animate 3D objects in a scene.

Parameter Required? Description Default
name Yes The name of the 3D object. Use this name to animate a 3D object. To animate the camera,set the name to “camera”.
pos No Set the coordinates to place the 3D object when the animation ends. The xyz coordinates are set as comma-separated values.
rot No Sets the rotation of the 3D object when the animation ends. Enter rotation of the axes as comma-separated values.
scale No Sets the scale of the 3D object when the animation ends. Enter the scales for the axes as comma-separated values.
time No Sets the duration of the animation in milliseconds. The default is 1,000.
wait No Sets whether to wait for the animation to complete before proceeding. Takes true or false. The default value is true.
lookat No Used only when animating the camera. Point the camera in a specific direction by specifying the name or pos coordinates of the object.
effect No Sets the effect to apply to the transformation. The following effects are available: jswing | def | easeInQuad | easeOutQuad | easeInOutQuad | easeInCubic | easeOutCubic | easeInOutCubic | easeInQuart | easeOutQuart | easeInOutQuart | easeInQuint | easeOutQuint | easeInOutQuint |
effect No easeInSine | easeOutSine | easeInOutSine | easeInExpo | easeOutExpo | aseInOutExpo | easeInCirc | easeOutCirc easeInOutCirc | easeInElastic | easeOutElastic | easeInOutElastic | easeInBack | easeOutBack | easeInOutBack | easeInBounce | easeOutBounce | easeInOutBounce
[3d_model_new name = "mymodel" storage = "mymodel / scene.gltf"]
[3d_anim name = "miruku" pos = "79, -458,727" scale = "318.45,318.45,318.45" rot = "0.13,
-0.64,0" effect = "easeInCubic" wait = true]

[3d_anim_stop]Stop a 3D animation

Use to stop the animation of a 3D object.

Parameter Required? Description Default
name Yes The name of the target 3D object.
finish No animation ends. If true, the object will continue to move to the position set by the animation. The default value is true.

[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 = ""]

[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"]

[3d_gyro]3D gyro settings

Allows the player to control of the camera by tilting the smartphone.
For PC games, the gyro effect can be reproduced by the position of the mouse.

Parameter Required? Description Default
max_x No Sets the max X-axis tilt as an angle. The default is 30 degrees.
max_y No Sets the max the Y-axis tilt as an angle. The default is 30 degrees.
mode No Sets the gyro mode to ‘position’ or ‘rotation’. The selected mode determines whether the camera is affected by rotation or a change in position with respect to tilt. The default is rotation.
[3d_gyro max_x = "20" max_y = "20"]

[3d_gyro_stop]3D gyro stop

Smartphone only.
Disables movement of the gyro.
To return the camera position, set the position using 3d_camera immediately after this tag.
To re-enable the gyro, use the [3d_gyro] tag.

Parameter Required? Description Default
There are no parameters

[3d_debug_camera]3D camera debugging

Adjust the camera coordinates in a 3D scene by dragging and dropping with the mouse.
To end debugging, click the button at the top left of the screen.

Mouse operations:
Left click: Camera orientation (rot)
Right click: Camera position (pos)
Center click: Z-axis of the position

Parameter Required? Description Default
button_text No Customizes the text of the button that ends debugging. The default text is “Close Camera Inspector”.
menu No Toggles the debug menu. If false is specified, only the button to end debugging will be visible. Default is true (sets the debug menu to visible).
[3d_debug_camera]

[3d_motion]Adjust the motion of a 3D model

Adjust the camera coordinates in a 3D scene by dragging and dropping with the mouse.
To end debugging, click the button at the top left of the screen.

Mouse operations:
Left click: Camera orientation (rot)
Right click: Camera position (pos)
Center click: Z-axis of the position

Parameter Required? Description Default
name Yes The name of the target 3D object.
motion Yes Sets the motion name.
; Define the model. Will first display a motion named ‘Running’.
[3d_model_new name = "Robot" storage = "Robot.glb" pos = "0,0,0" scale = "2" motion =
"Running"]
[3d_show name = "Robot" rot = "0.28,0.67,0" pos = "-129, -24,910" scale = "9.68"]

Now let's change the motion. [p]

[3d_motion name = "Robot" motion = "Punch"]

[3d_debug]3D debugging

Adjust an object in the 3D scene by dragging and dropping them with the mouse.
To end debugging, click the button at the top left of the screen.

Mouse operations:
Left click: Camera orientation (rot)
Right click: Camera position (pos)
Center click: Z-axis of the position
Scroll: Scale

Parameter Required? Description Default
name Yes The name of the 3D object to be debugged.
button_text No Use to customize the text of the button that ends debugging. The default is “Close Camera Inspector”.
menu No Toggles the debug menu. If false is specified, only the button to end debugging will be visible. Default is true (sets the debug menu to visible).
overlap No Takes true or false as a parameter. When set to true, the model will be displayed in the foreground. Set this to true for the model to appear in front of the menu. The default is false.
reset No Takes true or false as a parameter. When set to true, the model will return to the position it was in before debugging once debugging ends. The default is false.
[3d_model_new name = "Robot" storage = "Robot.glb"]
[3d_show name = "Robot" rot = "0.28,0.67,0" pos = "-129, -24,910" scale = "9.68"]
Now let's Change the motion. [p]
[3d_debug name = "Robot"]

[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_model_new]Create a 3D model

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.

posNoSets the coordinates at which to place the 3D object. Takes the xyz coordinates as comma-separated values.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
storage Yes Sets the 3D file (gltf obj format) to be used. Place the file in the others / 3d / model folder.
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 scales for the axes as comma-separated values.
tonemap No 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 No 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 No Sets the folder where 3D models are located.
[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]

[3d_sphere_new]Define a spherical 3D model

Define a 3D model as a sphere.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
texture No Applies a texture to the sphere. Place the texture image under “others / 3d / texture”.We recommend using 256×256 or 512×512-sized textures.
color No Sets the color of the sphere. Takes 0xRRGGBB format.
pos No Sets the coordinates to position the 3D object. Takes xyz coordinates as 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.
radius No Sets the radius of the sphere. The default is 300.
width No Sets the width of the sphere. The default is 30.
height No Sets the height of the sphere. The default is 30.
tonemap No Sets whether tone mapping is applied to this object or not (tone mapping must be enabled for the scene.) The default value is true.
[3d_sphere_new name = "tama"]
[3d_show name = tama pos = "365,145,0" rot = "0.92, -4.3,0" scale = "0.77,0.77,0.77" time = 2000]

[3d_sprite_new]3D model (sprite)

Defines a 3D model as a sprite.
The difference between this and a 3D image is that a sprite object always faces the camera.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
storage Yes Sets the image file to be displayed. Place the file under the “others / 3d / sprite” folder.
pos No Sets the coordinates to position the 3D object. Takes xyz coordinates as 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.
tonemap No Sets whether tone mapping is applied to this object or not (tone mapping must be enabled for the scene.) The default value is true.
[3d_sprite_new name = "yamato" storage = "doki.png"]
[3d_show name = "yamato"]

[3d_event]Defines a 3D event

Used to trigger an event when an object in a 3D scene is clicked.
The event will not trigger unless an [s] tag has run.
Once the event triggers, events are automatically disabled (the event definition itself will remain).
To generate the event again, an [3d_event_start] tag must be used first.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
storage No Sets the name of the scenario file to use. If omitted, the current scenario file will be used.
target No Sets the label name of the jump destination. If omitted, it will be executed from the beginning.
; Define and display a 3D model
[3d_model_new name = "miruku" storage = "miruku / scene.gltf" scale = 300 pos = "0, -300,500"]
[3d_event name = "miruku" target = "miruku"]

; Show a 3D box
[3d_box_new name = "box" width = 100 height = 100 depth = 100 scale = 2 tone = false color = "0xFFFFFF"]
[3d_show name = "box" time = 2000]

; Event definition
[3d_event name = "miruku" target = "miruku_click"]
[3d_event name = "box" target = "box_click"]

[s]
* miruku_click
3D model clicked [p]

@jump target = "common"
* box_click
Box clicked [p]

* common
Resume the event [p]
@ 3d_event_start

[3d_event_delete]Delete a 3D event

Disables a registered 3D event.

Parameter Required? Description Default
name Yes The name of the target 3D object. This is the name of the 3D object for which the event will be deleted.
; Show a 3D box
[3d_box_new name = "box" width = 100 height = 100 depth = 100 scale = 2 tone = false color = "0xFFFFFF"]
[3d_show name = "box" time = 2000]

; Delete the event definition. This will make it unresponsive when clicked.
[3d_event_delete name = "box"]

[s]

[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

[3d_event_stop]Stop 3D event

Stops a registered 3D event.
The registered event will not disappear after it is stopped and can restarted using the [3d_event_start] tag.

Parameter Required? Description Default
There are no parameters

[3d_box_new]3D model (cube)

Defines a 3D model as a cube.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
texture No Applies a texture to the cube. Place the texture image under “others / 3d / texture”. If one texture is set, all faces will use the same image; different textures can be applied to each face by using 6 textures separated by commas.
color No Sets the color of the cube. Takes 0xRRGGBB format.
width No Sets the width of the cube. The default is 1.
height No Sets the height of the cube. The default is 1.
depth No Sets the depth of the cube. The default is 1.
pos No Sets the coordinates to position the cube. Takes xyz coordinates as comma-separated values.
rot No Sets the rotation of the cube. Takes the rotation of the xyz axes as comma- separated values.
scale No Sets the scale of the cube. Enter the scales for the axes as comma- separated values.
tonemap No Sets whether tone mapping is applied to this object or not (tone mapping must be enabled for the scene.) The default value is true.
; Define and display a cube
[3d_box_new name = "mybox1"]
[3d_show name = "mybox1" pos = "365,145,0" rot = "0.92, -4.3,0" scale = "0.77,0.77,0.77"
time = 2000]
; Example of using a different texture image for each of the 6 sides
[3d_box_new name = "mybox2" width = 100 height = 100 depth = 100 texture = "dice / 1.png, dice / 2.png, dice / 3.png, dice / 4.png, dice / 5.png, dice / 6.png "]]
[3d_show name = "mybox2" time = 2000]

[3d_image_new]3D model (image)

Defines a 3D model of an image.
Images are added to 3D scenes as flat plates.

Parameter Required? Description Default
name Yes The name of the 3D object. Used to display or hide the model.
texture No Applies a texture to the 3D object. Place the texture image under “others / 3d / texture”.
width Yes Sets the width of the 3D object. The default is 1.
height No Sets the height of the 3D object. If omitted, the aspect ratios of the imagewill be used to calculate the height.
depth No Sets the depth of the 3D object. The default is 1.
pos No Sets the coordinates to position the 3D object. Takes xyz coordinates as 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.
tonemap No Sets whether tone mapping is applied to this object or not (tone mapping must be enabled for the scene.) The default value is true.
; Show an images as a 3D object
[3d_image_new name = "myimg" texture = "room.jpg" width = 200 doubleside = true]
[3d_show name = "myimg"]

[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"]

[3d_hide]Hide a 3D object

Hide a 3D object on the game screen.
Executing this tag does not delete the definition of the 3D model.
Use the [3d_show] tag to show the model again.

Parameter Required? Description Default
name Yes The name of the 3D object to be hidden.
time No The time in milliseconds over which the object will disappear. The default is 500.
wait No Sets whether to wait for object to completely disappear before proceeding. The default value is true.
; 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"]

[3d_hide_all]Hide all 3D objects

Hide all 3D objects on the game screen.
Executing this tag does not delete the definitions of the objects.
To display the objects again, use the [3d_show] tag.

Parameter Required? Description Default
time No The time in milliseconds over which all 3D objects will disappear. The default is 500.
wait No Sets whether to wait for objects to completely disappear before proceeding. The default value is true.

[3d_delete]Delete a 3D object

Delete a 3D object.
This tag also deletes the object definition.
To use the object again, it must be re-registered using a *_new tag.
Frequently deleting 3D objects that are no longer in use will improve the performance of the game.

Parameter Required? Description Default
name Yes The name of the 3D object to be deleted.
; Show a 3D image
[3d_image_new name = "myimg" texture = "room.jpg" width = 200 doubleside = true]
[3d_show name = "myimg"]

; Hide it. [p]
[3d_hide name = "myimg"]

; Delete the object and remove its definition [p]
[3d_delete name = "myimg"]

[3d_delete_all]Delete all 3D objects

Delete all 3D objects and their definitions.
This tag is used when resetting a 3D scene.

Parameter Required? Description Default
There are no parameters

[3d_canvas_show]Show the 3D canvas

Displays the 3D canvas.
This is useful, for example, if the game frequently switches between a 3D scene and visual novel gameplay.

Parameter Required? Description Default
time No The time in milliseconds over which the 3D canvas will appear. The default is 1000.

[3d_canvas_show]Show the 3D canvas

Hides, but does not delete the 3D canvas.
This is useful, for example, if the game frequently switches between a 3D scene and visual novel gameplay.

Parameter Required? Description Default
time No The time in milliseconds over which the 3D canvas will disappear. The default is 1000.

Camera

[camera]Move the Camera

You can add instructions to zoom or pan the camera. Using this functionality you can focus on a character’s expression, or carry out a number of impressive effects using a single still image.

To use the camera function, you must set the useCamera tag to true in config.tjs.
Also, when using the camera function, screen centering will be disabled.

Camera coordinates are defined relative to the center of the screen, which is (x:0,y:0). For example, the upper right of the screen is x:200, y:200, and the lower left is x:-200, y:-200.
To return the camera to its original position, use the [reset_camera] tag. To wait for the camera effect to complete, use the [wait_camera] tag.

*IMPORTANT*
When your camera effect is finished, please ensure you use the [reset_camera] tag to return the camera to its original position. If you do not do this, you will be unable to use the background change tag [bg], or other tags.

Parameter Required? Description Default
There are no parameters

[reset_camera]Reset the Camera

Sets the camera back to the default position.
After you’ve finished using the [camera] tag, please be sure to use the [reset_camera] tag to return it to the original position. If you do not, you will not be able to change backgrounds or use other functionality.

Parameter Required? Description Default
time No Sets the time in milliseconds for the camera to return to its original position. Default is 1,000.
wait No Sets whether to wait for the camera to finish moving. If this is set to false, the game can continue during the camera movement. Defaults to true.
ease_type No Controls how the camera returns to its default position. Defaults to ease. See camera tag for details.
layer No Sets the layer. Use “base” for background and any positive number for the foreground layer. Allows you to set the camera effect to only take place on a certain layer.

[wait_camera]Wait for the Camera Movement to Complete

You can use this when controlling the camera to force the game to wait for the camera effect to be completed. For example, you can set the wait attribute to false in the camera tag to allow the game to proceed, and then use this tag a few lines later to force the game to stop at a certain point.

Sample Code

[camera zoom=2 x=180 y=100 time=5000]
The camera is moving.[p]
The camera is still moving.[p]
[wait_camera]
Camera movement has finished and now the game will proceed.[p]

Parameter Required? Description Default
There are no parameters

Animation

[anim]Animation

With this you can animate a picture, button or even the contents of a layer.
You should call the element that you want to animate by using the name you gave it when it was created with the [ptext] or [ button ] tags.
When you set a layer, the animation will affect all elements in the layer.
This tag does not wait for the animation to stop. If you use the [wa] tag, you can wait for the completion of all animations that are being performed.
You can set the position of the animation using the values of -100 through 100. (From where it is currently, it can be moved to the left 100px)
If you set the opacity, you can also make something disappear.

Parameter Required? Description Default
name No use this property to look up the button layer or picture to animate
layer No if a name is set this will be ignored. Otherwise this to set the foreground layer
left No animate it horizontally to the position you set
top No animate it vertically to the position you set
width No set the width
height No set the height
opacity No set the value from 0-255. It will animate to the given opacity.
color No set the color
time No time taken by the animation. Default is 2000 milliseconds
define the effect of the animation. examples are defined as follows jswing |def |easeInQuad |easeOutQuad |easeInOutQuad |easeInCubic |easeOutCubic |easeInOutCubic |easeInQuart |easeOutQuart |easeInOutQuart |easeInQuint |
effect No |easeOutQuint |easeInOutQuint |easeInSine |easeOutSine |easeInOutSine |easeInExpo |easeOutExpo |easeInOutExpo |easeInCirc |easeOutCirc |easeInOutCirc |easeInElastic |easeOutElastic |easeInOutElastic |easeInBack |easeOutBack |easeInOutBack |easeInBounce |easeOutBounce |easeInOutBounce
[ptext layer=1 page=fore text="example text" size=30 x=0 y=0 color=red vertical=true]

[image layer=0 left=100 top=100 storage = yuko1.png page=fore visible=true name=yuko,chara ]
[image layer=1 left=300 top=100 storage = haruko1.png page=fore visible=true name=haruko ]

;set the name attribute animate
[anim name="haruko" left="=100" time=10000 effect=easeInCirc opacity=0 ]

;set the layer and animate
[anim layer=1 left="=100" effect=easeInCirc opacity=0 ]

;pause all animations
[wa]

Animations over

[wa]Pause Animation

Pause the currently playing animation

Parameter Required? Description Default
There are no parameters

[keyframe]Set Animation Keyframe

Set animation keyframe. The defined animation can be used by setting the [kanim] tag.

Parameter Required? Description Default
name Yes Sets the names of the key frame. This will be the name to use if you use the kanim tag later.
;----setting the keyframe
[keyframe name="fuwafuwa"]
[frame p=40% x="100" ]
[frame p=100% y="-200" opacity=0 ]
[endkeyframe]
;-----run the defined animation

[endkeyframe]End Keyframe

Stop the definition of keyframe animations

Parameter Required? Description Default
There are no parameters

[frame]Keyframe Animation Settings

This defines the key frame animation. The defined animation can be used by setting the [kanim] tag.

Parameter Required? Description Default
p Yes Set the percentage. For example an animation that takes 5 seconds you will want to set each slide at 20% (?). Set it to 0-100%. If you omit putting it to 0% you can continue from the previous animation and start a new animation.
x No Set the pixels the amount that the animation should move on the X axis. Or if you start it with an asterisk (*) you can set it at an absolute position. (For example) x
y No Set the pixels the amount that the animation should move on the Y axis. Or if you start it with an asterisk (*)
at an absolute No “100” (it will move 100px forward) y
z No Set the pixels the amount that the animation should move on the Z axis. Or if you start it with an asterisk (*) you can set it at an absolute position. (For example) z
rotate No You can rotate the target. As an example using notation like rotate
rotateX No You can rotate the target on the X axis. As an example
like rotate No “360deg” will turn the image 360 degrees.
rotateY No You can rotate the target on the Y axis. As an example
like rotate No “360deg” will turn the image 360 degrees.
rotateZ No You can rotate the target on the Z axis. As an example
like rotate No “360deg” will turn the image 360 degrees.
scale No You can enlarge or shrink the target. (Ex) scale
scaleX No Enlarge or shrink the target horizontally.
scaleY No Enlarge or shrink the target vertically.
scaleZ No Enlarge or shrink the target in the 3rd dimension.
skew No skew
skewX No Xskew
skewY No Yskew
perspective No You can change perspective. Only select browsers.
opacity No By setting this to 0-1 you can set the opacity of every element. It is possible to make an element disappear this way. At 0 it is completely transparent.
Others No You can also use CSS to set other properties.

[kanim]Execute Keyframe

This executes a keyframe animation. You can implement a complex animation by defining the name as well as the text and pictures you want to animate with the [keyframe] tag.

Parameter Required? Description Default
name No sets the name of the text or image that will be animated
layer No if you don’t set the name and set the layer instead this will animate all elements in the layer
keyframe Yes sets the name of the keyframe animation
time No the time of the animation in milliseconds
easing No set the pattern of change for the animation.Some of the things you can set are:ease(smoothly at the beginning and end)linear(plays at a set interval)ease- in(plays back slowly at the beginning)ease-out(plays back slowly at the end)ease-in-out(plays back slowly at the beginning and end)it’s possible to set the easing your own way by using the cubic-bezier function
delay No milliseconds before playback. default is 0
direction No animations can alternate between their reverse and normal progression. default is “normal” and “alternate” sets the animation to alternate between normal and reverse
mode No set the status before and after playback. Default is “forwards” and it maintains the same configuration after play. If set to “none” it will not maintain the same configuration.

Audio

[playbgm]Play BGM

Play BGM in HTML5 standard audio format (ogg, mp3, mp4, webm).
Playback files should be stored in the project’s bgm folder.

Parameter Required? Description Default
storage Yes Set the file to be used
loop No set as true (default) or false. true will repeat the loop
click No Set to true or false (default) when used for smart phone browsers. If set to true a click is needed before playback will start in smart phone browsers.With smart phones without a click no sound is assigned to play. For example after a scene change when you want music playback if you do not set this to true no music will play. In the middle of most text false is ok for playback. Check if music is playing on smartphones and set this to true if necessary.
time No number of milliseconds for the playback to start
[playbgm storage="music.mp3"]

[stopbgm]Stop BGM

Stop BGM

Sample Code

[stopbgm ]

Parameter Required? Description Default
There are no parameters

[fadeinbgm]Fade in BGM

Gradually fade in BGM
PLEASE NOTE: This is not compatible with Firefox and Safari browsers. In these cases, they will fall back to playbgm

Parameter Required? Description Default
storage Yes set the file for music playback
loop No set as true (default) or false. true will repeat the loop
click No Set to true or false (default) when used for smartphone browsers. If set to true a click is needed before playback will start in smartphone browsers.With smart phones without a click no sound is assigned to play. For example after a scene change when you want music playback if you do not set this to true no music will play. In the middle of most text false is ok for playback. Check if music is playing on smartphones and set this to true if necessary.
time Yes number of milliseconds for the fade in to occur
[fadeinbgm storage=sample.mp3 loop=false time=3000]

[fadeoutbgm]Fade out BGM

Fade Out BGM
PLEASE NOTE: This is not compatible with Firefox and Safari browsers. In these cases, they will fall back to playbgm

Parameter Required? Description Default
time No Time in milliseconds for fade out to occur
[fadeoutbgm time=3000]

[xchgbgm]Crossfade BGM

Crossfade BGM
Mix one music in as another fades out.
PLEASE NOTE: This is not compatible with Firefox and Safari browsers. In these cases, they will fall back to playbgm

Parameter Required? Description Default
storage Yes set the next file for playback
loop No set true (default) or false. true will repeat the sound when it is done
click No Set to true or false (default) when used for smart phone browsers. If set to true a click is needed before playback will start in smart phone browsers.With smart phones without a click no sound is assigned to play. For example after a scene change when you want music playback if you do not set this to true no music will play. In the middle of most text false is ok for playback. Check if music is playing on smartphones and set this to true if necessary.
time Yes number of milliseconds for the cross fade to occur
[xchgbgm storage=new.mp3 loop=true time=3000]

[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 ]

[stopse]Stop a Sound Effect

Stop a sound effect

Sample Code

[stopse ]

Parameter Required? Description Default
There are no parameters

[fadeinse]Fade in a Sound Effect

Fade in a sound effect

Parameter Required? Description Default
storage Yes Set the file to be used
loop No set as true or false(default). true will repeat the playback
time Yes set the fade in time in milliseconds
[fadeinse storage=sound.mp3 loop=false time=2000 ]

[fadeoutse]Sound Effect Fadeout

Sound Effect fadeout

Parameter Required? Description Default
time No fadeout in milliseconds
[fadeoutse time=2000 ]

[wb]Pause BGM Playback

Pause BGM playback

Parameter Required? Description Default
There are no parameters

Macros, Variables, JavaScript Interface

[eval]Evaluate Expression

exp allows evaluation of expressions?variables can be assigned to numbers, etc.
exp allows for arbitrary TJS(JS) so, any valid TJS(JS) can be evaluated.

Parameter Required? Description Default
exp Yes TJS expression to be evaluated
[eval exp="f.test=500"]
;?assign to game variable test to a number
[eval exp="f.test2='Example String'"]
;?assign game variable test2 to Example String
[eval exp="sf.test=400"]
;?assign system variable test to a number
[eval exp="f.test2=f.test*3"]
;?assign game variable test2 to 3x game variable test

[clearvar]Clear All Game Variables

Clear all game variables.

Parameter Required? Description Default
There are no parameters

[clearsysvar]Clear All System Variables

Clear all system variables.

Parameter Required? Description Default
There are no parameters

System Functions

[close]Close a Window

Close a window.

Parameter Required? Description Default
ask No if true is set a confirmation will be requested. If false is set no confirmation will occur. This attribute is set to true by default.

Other

[trace]Console Output

Outputs values to the console
In the case of KAG3 or Kirikiri: use Shift+F4 activate the display in the console, or turn on logMode in Config.tjs to type.
In the case of TyranoScript in a browser: Check in the web inspector console of the browser

Parameter Required? Description Default
exp No ATJS(JS) expression to be evaluated
[trace exp="f.test"]
; ? game variable test's details are output to the console

System Functions

[title]Set Title

Sets the game title.
You can also change each chapter title for the player.
In Kirikiri the application window title will change.
In TyranoScript the title attribute of the browser is changed.

Parameter Required? Description Default
name Yes The name you want for your title
[title name="Title after change"]

Macros, Variables, JavaScript Interface

[iscript]Enter JavaScript

You can use JavaScript between [iscript] and [endscript].
TJS can also be used, but TyranoScript variables are unavailable.

Sample Code

[iscript]
var test = 22;
f.name = test;
alert("javascript functions are available");
//jquery commands and javascript methods can also be used.
$("body").html();
[endscript]

Parameter Required? Description Default
There are no parameters

[endscript]End JavaScript

End JavaScript description.

Parameter Required? Description Default
There are no parameters

Other

[html]Add an HTML Layer

In between [html] and [endhtml] HTML can be entered.
This feature is very powerful. Of course JavaScript, Canvas, and next generation web expressions are supported.
For example a Youtube video player can be inserted and any number of public APIs can be accessed.
By using this tag, any HTML elements can be added.
If you use the [cm] tag and do not clear everything, even if you click the game cannot continue.
By all means use graphic buttons, etc. to ensue that you can jump to a game state where you can still continue.
Inside of this tag, variables of TyranoScript can be used.
[emb] tags inside of previously set HTML can be used.

Parameter Required? Description Default
left No sets the horizontal position of the [HTML] tag in pixels
top No sets the vertical position of the [HTML] tag in pixels
name No you can set the name of the HTML area. Using this name animations can be performed with the HTML.
;place the youtube player in a designated spot
;use the embed tag for youtube
[html top=100 left=300]










[endhtml]

[endhtml]End HTML

End HTML input

Parameter Required? Description Default
There are no parameters

Macros, Variables, JavaScript Interface

[emb]Embed Expression

The the result of an evaluated expression can be embedded.
Use this when you want to display a variable in a scenario.

Parameter Required? Description Default
exp Yes An TJS (JS) expression that can be displayed with the [emb] tag
[eval exp="f.value1='variable level'"]
The variable f.value1 is now stored.
[emb exp="f.value1"]
The variable is shown above here.

[if]If

if the evaluation of the expression is true (or a non-zero number), the statements and tags up until elsif, else and endif tag are executed, otherwise those statements and tags are ignored and the statements and tags inside of elsif or else would be executed instead.

Parameter Required? Description Default
exp Yes a TJS expression to be evaluated. If the expression is false (or 0)- the statements and tags will be ignored until an elsif else or endif tag.
; example 1 [if exp="false"]
This will not be displayed
[else]
This will be displayed
[endif]

; example 2 [if exp="false"]
This will not be displayed
[elsif exp="false"]
This will not be displayed
[else]
This will be displayed
[endif]

; example 3 [if exp="false"]
This will not be displayed
[elsif exp="true"]
This will be displayed
[else]
This will not be displayed
[endif]

; example 4 [if exp="true"]
This will be displayed
[elsif exp="true"]
This will not be displayed
[else]
This will not be displayed
[endif]

[elsif]Else If

between the [if] and [endif] tags, this can be used. If statements in a previous [if] or [elsif] tag have not been executed yet, the statements in this tag will be evaluated if the expression in the exp parameter evaluates to true until the point where an elsif, else, or endif tag is reached.
For usage examples, see the entry for the [if] tag.

Parameter Required? Description Default
exp Yes Sets the js expression to be evaluated.

[else]Else

If an [if] tag or [elsif] tag have not been executed, statements between [else] and [endif] are executed.
For usage examples, see the entry for the [if] tag.

Parameter Required? Description Default
There are no parameters

[endif]End If

End an if statement. when you use an [if] tag, you must have an [endif]

Parameter Required? Description Default
There are no parameters

[call]Call a Subroutine

Call a subroutine by label and scenario file.
if a subroutine contains a [return] tag, execution will pick up after where the subroutine was called

Parameter Required? Description Default
storage No Set the scenario file containing the subroutine you wish to call. If parameter is missing the current scenario file is used.
target No The label of the subroutine you wish to call. The first label found in the file is used.

[return]Return from Subroutine

Return to where the subroutine was called from.
This is deprecated in KAG3.
(when you need this, use call instead)

Parameter Required? Description Default
There are no parameters

[macro]Describe Macro

Start macro definition.
The statements between this tag and the [endmacro]tag will register a new tag named after the name attribute. Then you can use this new tag.
When an inner tag’s attribute value is prefixed with the % symbol, that parameter is passed through when defined by the macro. If a | is used in conjunction with the %, a default parameter can be defined.
Also, all parameters are passed through when the “*” is used.

Parameter Required? Description Default
name Yes The name of the new tag to register as a macro. Afterwards this name can be used as a normal tag.
[macro name="newtag"][font color=0xff0000]new tag[resetfont][endmacro]
[newtag]
[macro name="colortag"][font color=%iro]color tag[resetfont][endmacro]
[colortag iro=0x332211]
; ? 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 "*"
[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

[endmacro]End Macro

This ends the macro

Parameter Required? Description Default
There are no parameters

[erasemacro]Erase Macro

Deletes registered macro

Parameter Required? Description Default
name Yes The name of the macro to be deleted

System Functions

[savesnap]Create a Save Snapshot

Save the current game conditions. After that, tyrano.ks’s expansion [setsave] is performed. This records the
save data.

Parameter Required? Description Default
title Yes Sets the title of the save data

Macros, Variables, JavaScript Interface

[ignore]Start Ignore

When the expression evaluates to true (or is a non-zero number) do not execute any tags or statements until after the [endignore] tag

Parameter Required? Description Default
exp Yes this is the expression (in TJS) that is evaluated.

[endignore]End Ignore

End ignore

Parameter Required? Description Default
There are no parameters

Input Forms

[edit]Text Box

Show a text box.
The value entered via the commit tag is stored as a variable that was set by this tag’s name attribute.
Inside of form display the scenario is paused. (even if you click the story cannot continue)
So when you display a graphical button, you must provide a target label to jump to.
To make a small change to the display, you can edit tyrano.css.

Parameter Required? Description Default
name Yes the name of the variable to store on commit
length No width
color No The color of the text. The default is black
left No The horizontal position of the text box
top No The vertical position of the text box
size No sets the text size. The default is 20 pixels
width No The width of the text box
height No The height of the text box
maxchars No The maximum number of characters that can be entered.
[edit name="f.test"]
[locate x=200 y=300 ]
[button graphic="start.png" target=*commit]
[s]
*commit
[commit]
[cm]
;show the contents of entered Text
Value is set as[l]
[emb exp=f.test]?This is what you entered.[l]

System Functions

[preload]Preloads Image Files

Using the preload tag, you can load files (images or music) before they are needed
The presentation will be smooth when they are needed.

Parameter Required? Description Default
storage Yes enter the full path for previously entered images. They are set in the order that they are passed in.
wait No 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.
;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]

Layers

[clearfix]Clears the Fix Layer

by setting the name property, only the corresponding element can be deleted

Parameter Required? Description Default
name No the name used when the fix layer was declared
;add a fix Layer
[ptext name="sample" layer=fix page=fore text="TextText" size=30 x=200 y=100 color=red ]

;clear fix Layer
[clearfix name="sample"]

Input Forms

[commit]Submit Form

The value of the text box is saved as a variable from the [edit] tag’s name property.
Keep in mind that while [commit] is executed, the text Box of the form are displayed.

Parameter Required? Description Default
There are no parameters

Macros, Variables, JavaScript Interface

[loadjs]Load JavaScript File

Read in external JavaScript File
There are no restrictions on how the js will work.
The JS file should be in data/others folder

Parameter Required? Description Default
storage Yes the name of the JavaScript file to load.
[loadjs storage="sample.js" ]

Other

[movie]Play Movie

Play an mp4 video

Parameter Required? Description Default
storage Yes the file where an mp4 is stored
skip No set whether or not this is skippable.
[movie storage="" skip=false ]

System Functions

[showsave]Show Save Screen

Show save screen

Sample Code

[showsave]

Parameter Required? Description Default
There are no parameters

[showload]Show Load Screen

Show load screen

Sample Code

[showload]

Parameter Required? Description Default
There are no parameters

[showmenu]Show Menu

Show menu

Sample Code

[showmenu]

Parameter Required? Description Default
There are no parameters

[showmenubutton]Show Menu Button

Show menu button

Sample Code

[showmenubutton]

Parameter Required? Description Default
There are no parameters

[hidemenubutton]Hide Menu Button

Hide menu Button

Sample Code

[hidemenubutton]

Parameter Required? Description Default
There are no parameters

[skipstart]Skip Start

Start “skip mode” where the characters move faster

Parameter Required? Description Default
There are no parameters

[skipstop]Skip Stop

Stop “skip mode” where the characters move faster

Parameter Required? Description Default
There are no parameters

Characters

[chara_move]Change the Position of a Character

Change the position of a character on the screen.

Parameter Required? Description Default
name Yes Use the name parameter set in [chara_new].
time No Enter a number of milliseconds greater than 0, and movement will occur over the set duration. The default is 600 ms.
anim No Set to ‘true’ or ‘false’. The default is ‘false’. When set to ‘true’, the movement will be animated. The animation effect is set in the [chara_config] effect parameter.
left No Set the horizontal position of the destination point from the left of the screen.
top No Set the vertical position of the destination point from the top of the screen.
width No Set the width at the destination point.
height No Set the height at the destination point.
wait No Set to ‘true’ or ‘false’ to set whether to wait for the movement to complete or not. The default is ‘true’.
effect No Set the transition effect. The following effects are: jswing|def|easeInQuad|easeOutQuad|easeInOutQuad|easeInCubic|easeOutCubic|easeInOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeOutQuint|easeInOutQuint|easeInSine|easeOutSine|easeInOutSine|easeInExpo|easeOutExpo|easeInOutExpo|easeInCirc|easeOutCirc|easeInOutCirc|easeInElastic|easeOutElastic|easeInOutElastic|easeInBack|easeOutBack|easeInOutBack|easeInBounce|easeOutBounce|easeInOutBounce
[chara_move name="yuko" time=100 left=20 top=100 ]

[chara_config]Character Settings

Change Character Settings

Parameter Required? Description Default
pos_mode No set as true or false. default is true. when true the [chara_show] tag (etc) will automatically place the character
ptext No set the name text to show when the character is speaking. for example when defined like this [ptext name
The way that a character moves in or out.jswing |def |easeInQuad |easeOutQuad |easeInOutQuad |easeInCubic |easeOutCubic |easeInOutCubic |easeInQuart |easeOutQuart
effect No |easeInOutQuart |easeInQuint |easeOutQuint |easeInOutQuint |easeInSine |easeOutSine |easeInOutSine |easeInExpo |easeOutExpo |easeInOutExpo |easeInCirc |easeOutCirc |easeInOutCirc |easeInElastic |easeOutElastic |easeInOutElastic |easeInBack |easeOutBack |easeInOutBack |easeInBounce |easeOutBounce |easeInOutBounce

[chara_new]New Character

Set the info for a new character. after that, it can be further manipulated with the [chara_show] tag and others.
Also you can set the name here which is referenced by the [anim] tag later.
In other words, after you add a character, you can freely animate it.

Parameter Required? Description Default
name Yes The name that this character will be referenced by (written in ASCII characters). This name must be unique.
storage Yes set the character picture. this should be in the project’s fgimage directory
width No Set the width of the picture
height No Set the height of the picture
jname No when this character’s name is shown this is the display version. For example when Yuko is used “???” can appear in the message area
[chara_new name="yuko" storage="yuko.png" jname="???"]

[chara_show]Show Character

Show a previously defined character

Parameter Required? Description Default
name Yes reference the character to show with the name previously defined by [chara_new]
time No Set the time it takes for the character to appear?The default is 1000 milliseconds
layer No The layer to place the character in. The default is the foreground (layer
page No set fore or back. The default is fore.
wait No if true is set the character’s appearance will be delayed. The default is true
left No sets the horizontal position. If this is set automatic movement will not be affected
top No sets the vertical position. If this is set automatic movement will not be affected
[chara_show name="yuko" ]

undefined

[chara_hide]Hide Character

hide a character that has been displayed with [chara_show]

Parameter Required? Description Default
name Yes the name defined by [chara_new]’s name attribute
wait No if this is set to true the character will wait to disappear. Default is true
time No set in milliseconds. this is the length of time for a character to disappear. The default is 1000 milliseconds
layer No remove the character from the layer set by [chara_show] if it is set. the default is 0
overwrite No if set to true and the ptext of the name already exists on the screen you can change just the text. the default is false
[chara_hide name="yuko" ]

Characters

[chara_delete]Delete Character

Delete character and character info.
If you want to just remove the character from the screen, use [chara_hide] instead.

Parameter Required? Description Default
name Yes the name set by [chara_new]
[chara_delete name="yuko" ]

[chara_mod]Change Character Appearance

Change the sprite of a character on the screen. Likely useful for changing facial expressions.

Parameter Required? Description Default
name Yes set the name defined with [chara_new]
face No set the face defined with [chara_face]
time No specify the duration in milliseconds over which to crossfade expressions using the [chara_mod] tag. The default is 600 milliseconds. Set to 0 for the change to happen instantly
reflect No set to true to horizontally flip the image
storage No new character sprite file. Should be located in the fgimage folder of the project
wait No sets whether the project should wait for the expression change to complete before proceeding. Set to true or false. The default is true
cross No Set to true to crossfade 2 images. Set to false to fade a new expression onto an old expression. The default is true
[chara_mod name="yuko" storage=""chara/1/newface.png"]

Messages

[l]Wait for Click

This tag allows waiting for a click.

Sample Code

show some text...[l]
show some more text...[l][r]

Parameter Required? Description Default
There are no parameters

[p]Clear Text after Click

This tag waits for a click (like [l]), but clears the text afterwards.

Sample Code

Show text[p] Show text[p][r]

Parameter Required? Description Default
There are no parameters

[graph]Show Image Inline

Show arbitrary images inside of a message.
You can use pictographs or special characters, etc.
Put images you want to show in the image folder.
Also, for frequently used symbols, it’s easy to set up a macro.

Parameter Required? Description Default
storage Yes The filename where the picture is stored
; put a heart picture in
[macro name="heart"][graph storage="heart.png"][endmacro]

; below, with the [heart] tag, a heart symbol can be used
I love you![heart]

Links

[jump]Jump to Scenario

Goes to the specified label in the specified file.
It is a mistake to use call if there is no jump on the call stack.
In other words, it can only be used one way. Setting a label is required.

Parameter Required? Description Default
storage No scenario file to move to. If this is left out the current scenario file will be used
target No label name to jump to. If this is left out it will go to the beginning.
; Go to the scenario file second.ks in the place with the label: *start
[jump storage=second.ks target=*start]

Messages

[r]New Line

Puts a new line

Sample Code

Show text[l]
Put text on a new line[l][r]
Put text on a new line[l][r]

Parameter Required? Description Default
There are no parameters

[er]Erase

Erase the characters of the current layer

Sample Code

Show some text[l]
Clear the message[l][er]
Put a new line[l][r]

Parameter Required? Description Default
There are no parameters

[cm]Clear All Messages

Clear all messages.
Also, font styles will return to defaults.
Position and/or layout settings will be applied.
Similar to the [ct] tag, nothing is set in the target message layer.
Even after executing this tag, the included target layer is the same.

Sample Code

Show some text[l]
Clear screen[l][cm]
Clear screen again[l][cm]

Parameter Required? Description Default
There are no parameters

[ct]Reset the Message Layers

Resets the message layers
Clears all of the characters from the message layers. Current message layer is set to message0.
Also, font styles will return to defaults.
Position and/or layout settings will be applied.

Sample Code

Show text[l]
Clear screen[l][ct]
Clear screen again[l][ct]

Parameter Required? Description Default
There are no parameters

[current]Set Current Message Layer

Set the current message layer. After setting this, statements, setting attributes via font tags, using the l tag for click events, etc. will take place in this layer.
For message0 the default is visible, but for message1, if you don’t set the [layopt] tag’s visible attribute to true it will not be shown.

Parameter Required? Description Default
layer No sets the message layer to be affected. It will affect the current message layer.
page No it will be set to the foreground or background. If omitted it will set to the foreground.
[current layer="message0"]
Show message0 layer[l]
[current layer="message1"]
Show message1 layer[l]

Layers

[position]Set Position of Message Layer

Set various options for the message layer.
Any parameters that are omitted will not change their attributes.

Parameter Required? Description Default
layer No set target message layer. If this is omitted the current layer will be used.
page No set target page. set”fore” or “back”. If this is omitted the current page will be used
left No message layer’s position from the left in pixels
top No message layer’s position from the top in pixels
width No message layer’s width in pixels
height No message layer’s height in pixels
frame No set image for the message layer’s frame image. use this to customize the message area. adjust image size is according to the width and height attributes. futhermore you should use this to regulate the places where the message will be displayed by margin attributes. if you set this to “none” it will return to the standard margin. You can also change it to designate a different frame image.
color No sets the color of the message layer with a 0xRRGGBB format
opacity No this sets the opacity for the message layer. This does not affect the opacity of the text itself or the layer.0 is completely transparent.
marginl No message layer’s left margin
margint No message layer’s top margin
marginr No message layer’s left margin
marginb No message layer’s bottom margin
vertical No set message layer’s vertical mode with “true”. Use “false” for horizontal mode.
visible No if set to “true” message layer is visible false hides the message layer.
;message layer position and size
[position width=400 height=300 top=100 left=20]
;message layer color and opacity
[position color=blue opacity=100]

[image]Display an Image

Show an image for the layer. you can use this to change the image of the background or character. visible must be set to true in order to show the foreground layer

Parameter Required? Description Default
storage No sets the image file name. If it is a background image it should be in the bgimage folder. Foreground images should be in the fgimage folder
layer No sets the target layer. if you set it as “base” it will be the background layer. if you set it as an integer above zero it will put that layer in front of lower numbers
page No sets the target page. Set as “fore” or “back”. if omitted “fore” will be set
left No sets pixels from the left
top No sets pixels from the top
x No sets pixels from the left. the same as left but overrides it
y No sets pixels from the top. the same as top but overrides it
width No sets the width of the picture in pixels
height No sets the height of the picture in pixels
folder No you can chose an image from this folder. By default fgimage is set for the foreground image and bgimage is set for the background image. Any image under the folder name that you write here will be available for use
name No TyranoScript only (not KAG3). This name is used later to reference this image by tags like [anim] tag. Basically by setting this name you can set this as a JS class. If you divide them with commas you can designate multiple names.
pos No set the layer position automatically. This is used for the foreground layer. This attribute can be set as left left_center center right_center right. You can change how far it is from the center in the Config.tjs file. You can also abbreviations l lc c rc and r. Setting these will override the top and left attributes. Don’t set this attribute for the layer that you intend to use as base. Set these positions beforehand in Config.tjs
[image storage="default/rouka.jpg" layer=1 page=fore visible=true width="128" height="128"
x="730" y="40" ]

[freeimage]Free Image

Frees the images of a particular layer that were added with tag. The layer attribute is required.

Parameter Required? Description Default
layer Yes set message layer. If it is not set the current message layer is used
page No set page. If it is not set the surface page is used
[backlay]
;Show character
[image layer=0 page=back visible=true top=100 left=300
storage = chara.png] [trans time=2000]
@wt
@backlay
;Hide character
[freeimage layer=0 page=back]
@trans time=2000
[wt]

[ptext]Add Text to the Layer

This displays text in the layer. Only performed in the foreground layer.
This will inherit all of the attributes of the foreground layer. when text is deleted, it applies to the [freeimage] tag in the layer.
Keep in mind that if the foreground layer is not set to visible=true this text will also not display.
[layopt layer=0 visible=true] is required

Parameter Required? Description Default
layer Yes this sets the target layer. you can reference it by number.
page No sets the target page. can be set as set as “fore” or “back”. defaults to “fore”
x Yes horizontal position from left border in pixels
y Yes vertical position from top border in pixels
vertical No set to true or false (this is the default). If set to true the text reads vertically. If false the text is horizontal.
size No set the font size in pixels
face No set the font type. This is not KAG compatible but you can use web fonts
color No set the font color
name No TyranoScript only (not KAG3). This name is used later to reference this by tags like [anim] tag. Basically by setting this name you can set this as a JS class. If you divide them with commas you can designate multiple names.
[backlay]
[ptext page=back text="texttext" size=30 x=200 y=300 color=red vertical=true]
[trans time=2000]
[wt]
[l]
Clear the displayed text
[freeimage layer = 0]

[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]

[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

Links

[link]Hyperlink (Choice)

the text inside the [link] and [endlink] tags can be selected with the mouse or keyboard. on a click or key event a jump event can be fired.
This tag cannot be used to visit a different page.

Parameter Required? Description Default
storage No set the scenario file to jump to. if omitted the current scenario file
target No set the label to jump to. If omitted the script will be executed from the beginning of the file
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

[endlink]Hyperlink(Choice)Ending

closing tag for hyperlinks (choices)

Sample Code

[link target=*select1]1- first choice[endlink][r]
[link target=*select2]2- second choice[endlink][r]

Parameter Required? Description Default
There are no parameters

System Functions

[s]End Game

stop executing the script in the scenario file
choices shown in [link] tags etc. will have no way to execute them.

Sample Code

[link target=*select1] This won't work after the [s] tag executes [endlink][r]
[link target=*select2] This won't work after the [s] tag executes [endlink][r]
[s]

Parameter Required? Description Default
There are no parameters

[wait]Begin Wait

For the time specified by the time attribute, the script will not execute.

Parameter Required? Description Default
time Yes set the time to wait in milliseconds
;pause execution for 2000 milliseconds (2seconds)
[wait time=2000]

Layers

[hidemessage]Hide Message

temporarily hides the message layer. This will perform the same action as if you were to chose clear message from the menu.
after waiting for a click, the message layer is shown, and the script execution continues.

Parameter Required? Description Default
There are no parameters

System Functions

[quake]Shake the Screen

For a set number of milliseconds?the screen will shake. (KAG3 does not support setting the number of characters)
if you set the vmax attribute to 0 it will only shake horizontally. if you set the hmax attribute to 0 it will only shake vertically.

Parameter Required? Description Default
count No Set the number of times to shake the screen
wait No Set as true or false. if set to true the game will pause during the shaking. true is the default
time Yes Set the number of milliseconds to shake the screen per count. default is 300ms
hmax No The maximum number of pixels to shake the screen horizontally. The default is 10(px).
vmax No The maximum number of pixels to shake the screen vertically. The default is 10(px).
[quake count=5 time=300 hmax=20]

[font]Set Font Attributes

Set various attributes of text.
These attributes are set for each message layer.
If any of the attributes are omitted, the default set in Config.tjs is used.
When these tags are used: [resetfont] [ct] [cm] [er]?the defaults set in Config.tjs or in the [deffont] are used.

Parameter Required? Description Default
size No set the character size
color No set a color with the 0xRRGGBB form with ????. If you’re using HTML5 you should be able to set this in other ways
bold No sets characters to be bold. can be true or false
face No set the font type. This is not compatible with KAG. Put them in the project’s “other” folder. Then designate this with tyrano.css’s @font- face
[font size=40 bold=true]
This message is big and bold.
[resetfont]
This message goes back to normal.

[deffont]Default Font Attributes

Sets the default font attributes for the current message layer.
If the [resetfont] tag is used, these attributes will be applied.
In other words, by only using this tag, the font attribute will not be reflected.

Parameter Required? Description Default
size No set the character size
color No set a color with the 0xRRGGBB form with ????. If you’re using HTML5 you should be able to set this in other ways
bold No sets characters to be bold. can be true or false
face No set the font type. This is not compatible with KAG. Put them in the project’s “other” folder. Then designate this with tyrano.css’s @font-face

[delay]Message Speed

Set the message speed for text
If you want the characters to appear instantly, you can use the [nowait] tag.

Parameter Required? Description Default
speed No how fast the characters appear

[nowait]Instant Text

Without waiting, text will appear on the screen. (contrast with [delay])

Parameter Required? Description Default
There are no parameters

[endnowait]End Instant Text

Text between this and the [nowait] tag will appear instantly.

Parameter Required? Description Default
There are no parameters

[resetfont]Reset Font

Return to the default font attributes set by the [font] tag
Each message layer can have different font settings.

Parameter Required? Description Default
There are no parameters

Layers

[layopt]Layer Options

set layer options.

Parameter Required? Description Default
layer Yes This sets the target layer or message layer. if you only set the message it will be set with the [current] tag and the current layer that you’re working with will become the message layer
page No sets as “fore” (default) or “back”. But if layer
visible No sets whether or not the layer is visible. The visibility will not change if this attribute is omitted
left No sets the layer position from the left. If this omitted there is no position change. If you want to change the position of message0 or message1 use the [position] tag instead
top No sets the layer position from the top. If this omitted there is no position change. If you want to change the position of message0 or message1 use the [position] tag instead
opacity No sets the opacity of the layer from 0-255. 255 is totally transparent.
;delete message layer
@layopt layer=message0 visible=false
[backlay]
[image layer=0 page=back visible=true top=100 left=50 storage = miku1.png]
[trans time=2000]
@wt
;then show the layer
@layopt layer=message0 visible=true

Messages

[ruby]Add Helper Text (furigana)

Set the helper characters of the following characters.
Set them anytime you want to show ruby characters (furigana).
When you want to apply ruby characters to a multi-character string, you need to set ruby characters for every character in the string.

Parameter Required? Description Default
text Yes sets ruby characters to show for kanji (“?” gets “??” and “?” gets “?”).
[ruby text="??"]?[ruby text="?"]?

System Functions

[cancelskip]Cancel Skip

Cancel option to skip through dialog.
Able to override player initiated skips.

Parameter Required? Description Default
There are no parameters

[locate]Display Location Settings

Set placement of graphical buttons.
There is no support for writing text.

Parameter Required? Description Default
x No Set horizontal position
y No Set vertical position
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]

[locate x=300 y=100]
[button graphic="toyo.png" target=*toyo]

Links

[button]Display a Graphical Button

Show a graphical button.
This is the image version of a [link] tag.
By implementing this button, it forces the scenario to stop, so you need to include a jump target.
The location of the graphical button is determined by most recent [locate] tag.
However, if x and y are set, it will use those attributes to determine the location.
If it is moved from here, it will not remain on the call stack. In other words, you cannot return to here.
After the jump you have to use the [cm] tag to stop displaying the button.

Parameter Required? Description Default
graphic No sets the image for the button. Put this file in the image folder
storage No set the scenario file to jump to. If this is omitted the current scenario file is used.
target No sets the label to jump to. If this is omitted the beginning of the file is used
name No TyranoScript only (not KAG3). This name is used later to reference this by tags like [anim] tag. Basically by setting this name you can set this as a JS class. If you divide them with commas you can designate multiple names.
x No sets the button’s horizontal position
y No sets the button’s vertical position
width No sets the button’s horizontal position
width No sets the button’s width
height No sets the button’s height
fix No set to true or false. The default is false. If set to true it moves the button to a fixed layer and this scenario file can be continued even though the button is being shown. For example if you always wanted to show a save button you would use this. And if you wanted to remove a component from a fixed layer you would user the [fixclear] tag
savesnap No set as true or false. default is false. When the button is pressed a save state (savesnap) is created.
folder No set the folder. The foreground image defaults to fgimage and the background image defaults to bgimage but folder can be set and used.
exp No Set JavaScript to be performed when you set this button
preexp No this can put the value of something into memory. When the button is clicked any variables can declared in this can be used.
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]

[locate x=300 y=100]
[button graphic="toyo.png" target=*toyo]

[clickable]Set Clickable Area

Defines a clickable area.
Because showing clickable areas pause the execution of the scenario script, a jump target must be set. Also as with graphical button’s [locate] tag must be set for reference.
Keep in mind that this movement does not exist on the call stack so a return is not possible.
Important:if an [s]tag is reached, the clickable area will not be valid. Only use the [s] tag to stop the game.

Parameter Required? Description Default
width Yes set width of area
height Yes set height of area
borderstyle No You can show a border of the area with a line. The style of the line looks like this: “thickness:style:color”. Possible line types are solid double groove dashed dotted etc
color No specify the box like this: 0xRRGGBB
opacity No this sets the opacity from 0-255. 0 is completely transparent.
mouseopacity No when the mouse is over the clickable area you can change the transparency. Values can range from 0-255. 0 is completely transparent
storage No set the scenario file to jump to. If this is omitted the current file will be used.
target No when the clickable area is clicked jump to that location. If omitted it will jump to the top.
[locate x=20 y=100]
[clickable width=200 height=300 target=*oda]

[locate x=300 y=100]
[clickable width=100 height=100 border="solid:1px:gray" target=*oda]

System Functions

[glyph]‘Waiting for Click’ Indicator

The image that is used when waiting for a click.
This goes in same directory as tyrano/images/kag/nextpage.gif

Parameter Required? Description Default
line No specify the image to use. It goes somewhere in the same directory as tyrano/kag/nextpage.gif.
fix No if set to true you can place this with the top and left params
left No if the fix property is true set the left margin to this number
top No if the fix property is true set the top margin to this number
[glyph fix=true left=200 top=100 ]

Layers

[trans]Transition Layer

transition to the set layer.
transition is a way to move the back layer to the front.
after transition, the surface page’s status of the target layer image’s placement, size, visibility, invisibility are made to be the same as the back page.
Also, during a transition do not change the properties of the layers

Parameter Required? Description Default
set the target layer if “base” is set it will become the scene layer if a number greater than 0 is used it will become a foreground layer 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 pageNormally the background changes are used.
method No set the transition type. The default is “crossfade”. Other possibilities are?crossfade?? explode??slide??blind??bounce??clip??drop??fold??puff? ?scale??shake??size?
time Yes the time for the transition is set in milliseconds
[backlay]
[image storage=fg0 layer=0 page=back]
[trans time=1500 ] [wt]

Live2D

[live2d_color]Adjust the Color of a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
red No Value from 0.0 to 1.0
green No Value from 0.0 to 1.0
blue No Value from 0.0 to 1.0
[live2d_color name="nasuka"]

[live2d_expression]Play a Live2D Expression

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
filenm No Expression motion file name (set in model.json)
[live2d_expression name="nasuka"]

[live2d_new]Generate a Live2D Model

Parameter Required? Description Default
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)
[live2d_new name="nasuka"]

[live2d_show]Display a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
time No Transition time (1000=1 second)
[live2d_show name="nasuka"]

[live2d_hide]Hide a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
time No Transition time (1000=1 second)
[live2d_hide name="nasuka"]

[live2d_opacity]Adjust the Opacity of a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
opacity No Transparency (0 ~ 1.0)
time No Transition time (1000=1 second)
[live2d_delete name="nasuka"]

[live2d_delete]Remove a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
[live2d_motion name="nasuka"]

[live2d_motion]Play a Live2D Model Motion

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
filenm No Transparency (0 ~ 1.0)
idle No Toggle idling (‘on’ or ‘off’)
[live2d_motion name="nasuka"]

[live2d_trans]Move a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
left Yes x position
top Yes y position
time No transition time (1000=1 second)
[live2d_trans name="nasuka"]

[live2d_rotate]Rotate a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
rotate Yes Angle of rotation
time No transition time (1000=1 second)
[live2d_scale name="nasuka"]

[live2d_scale]Enlarge or reduce Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
scaleX Yes x scale
scaleY Yes y scale
time No transition time (1000=1 second)
[live2d_shake name="nasuka"]

[live2d_shake]Shake a Live2D Model

Parameter Required? Description Default
name Yes Live2D Model’s ID (name applied to model.json)
[live2d_shake name="nasuka"]

Audio

[voconfig]VO (voice-over) Playback Settings

Use this to add voiceover to your games.
VO audio files can be played when the character name is displayed by connecting character names and with VO filenames.
After setting this tag, the [vostart] tag must be used to begin playback.

Parameter Required? Description Default
sebuf No Use this to set the playse buf used by the VO.
name No Set the name of the character that will use the VO. This is the name set in the chara_new ] tag.
vostorage No Set 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 No The default is 0. The number stored in vostorage can be reset by specifying a value here.
[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]

[vostart]Start automatic VO playback

Begins the auto playback of the VO set in [voconfig].
Following this tag, when a name is specified using the # mark, the related VO will be played.

Parameter Required? Description Default
There are no parameters

[vostop]Stop Automatic Voice Playback

Stops the auto playback of the VO set in [voconfig].
Following this tag, when a name is specified using the # mark, the related VO will be not be played.

Parameter Required? Description Default
There are no parameters

[bgmopt]Set Background Music Options

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.

Parameter Required? Description Default
volume No Sets the volume of the BGM (0-100)
effect No Set to true or false. (Defaults to true.) If true the change to the BGM will take place for the song current playing.
[bgmopt volume=50 ]

[seopt]Set Sound Effect Options

Changes the sound effect options. Note that when the user is playing from a smartphone browser, the smartphone itself will not allow you to change the volume.

Parameter Required? Description Default
volume No Sets the volume of the BGM (0-100)
effect No Set to true or false. (Defaults to true.) If true the change to the BGM will take place for the song current playing.
[seopt volume=50 ]

[wbgm]Wait for BGM to Complete

Waits for the background music to finish playing. Note that if the playbgm tag is causing the music to loop, the game will get stuck. This tag can be used for PC and browser games, but will not work for smartphone apps.

Parameter Required? Description Default
There are no parameters

[wse]Wait for Sound Effect to Complete

Waits for a sound effect to finish playing. This tag can be used for PC and browser games, but will not work for smartphone apps.

Parameter Required? Description Default
There are no parameters

Macros, Variables, JavaScript Interface

[clearstack]Clear the Stack

Clears the system-managed stack.
The stack is a memory area used to store the return locations for calls, macro functions, and if statements. In a normal novel game, this won’t cause any issues, but if the game makes repeated jump statements during an if or call area, the stack will begin to fill up with unused return locations. This can cause problems such as large save files, so when there’s nothing in the stack for the game to return to, we recommend using this tag.

Parameter Required? Description Default
stack No You can specific “call”, “if”, or “macro” to only delete a certain stack. If nothing is specified then all stacks will be deleted.

System Functions

[autosave]Autosave Function

When this tag is reached, the play state will automatically be saved. Use this for games with an autosave system. If autosaved data exists, sf.system.autosave will be set to true. By using control logic like in the sample below, you can restore the player’s game state before the title screen is reached, which is useful on smartphones.

Parameter Required? Description Default
title No Sets the title of the saved data.
[autosave]

;if autosaved data exists, sf.system.autosave will be set to true.
[if exp="sf.system.autosave ==true"]
You have autosaved data. Would you like to load it?[l][r]

[link target=*select1][1]Yes[endlink][r]
[link target=*select2][2]No[endlink][r]

[s]

*select1
;Execute load
[autoload]
*select2
[cm]
Load canceled.[l]
@jump target=*noload
[else]
There is no automatically saved data.[l][r]
[endif]

[autoload]Autoload Function

Loads data saved with the [autosave] tag.

Parameter Required? Description Default
There are no parameters

[plugin]Load a Plugin

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.

Parameter Required? Description Default
name Yes Select a folder (plugin) name from within /data/others/plugin.
storage No Use this to change the scenario file that will be read first. The default is init.ks .
; Change the theme
[plugin name="original1" ]

; Parameters can be freely passed
[plugin name="original1" font_color="black" arg2="aaaaaa" ]

[sysview]Change System Screen Files

Change the HTML files used for system functions.

Parameter Required? Description Default
type Yes Set to ‘save’, ‘load’, ‘backlog’, or ‘menu’.
storage Yes Set the path of the HTML file.
[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"]

[loadcss]Load a CSS File

Load CSS while a game is in progress.

Parameter Required? Description Default
file Yes Specify the CSS file to be loaded.
[loadcss file="./data/others/css/mystyle.css"]

[save_img]Change the Save Data Thumbnail Image

Change the thumbnail or capture used for the save data.
The image set by this tag will be used when the game is saved.
The save image is obtained from the /bgimage folder.
Set storage to ‘default’ to use the default captured screen image.

Parameter Required? Description Default
storage No Set the save image that you would like to use. Place the image in the folder /bgimage. Set to ‘default’ to use the auto capture.
folder No Set a folder here to use a folder other than /bgimage. E.g. /others or /fgimage or /image.
; Change the thumbnail image
[save_img storage="my_capture.png" ]

[nolog]Disable Writing to the Backlog

Writing to backlog will stop when this tag is met.
Writing to backlog will be enabled again when the [endnolog] tag is met.

Parameter Required? Description Default
There are no parameters
Backlog writing is enabled.[p]
[nolog]
Backlog writing is disenabled.[p]
Backlog writing is still disenabled.[p]
[endnolog]
Backlog re-enabled from here.[p]

[endnolog]Re-enable Writing to the Backlog

When writing to the log is disabled with the [nolog] tag,
this tag must be used to re-enable writing to the log.

Parameter Required? Description Default
There are no parameters
Backlog writing is enabled.[p]
[nolog]
Backlog writing is disenabled.[p]
Backlog writing is still disenabled.[p]
[endnolog]
Backlog re-enabled from here.[p]

[start_keyconfig]Enable Key Config

If key config is disabled, this will re-enable it.

Parameter Required? Description Default
There are no parameters
[start_keyconfig]

[pushlog]Insert Text into the Backlog

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.

Parameter Required? Description Default
text Yes Add this text to the backlog.
join No 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’.
[pushlog text="This text has been inserted into the backlog."]

[stop_keyconfig]Disable Key Config

Use to temporarily disable key config.
Use the [start_keyconfig] tag to re-enable.
This will disable:
·Mouse control
·Keyboard control
·Mouse swipe control

Parameter Required? Description Default
There are no parameters
[stop_keyconfig]
Config is disabled. Config is still disabled.
[start_keyconfig]
Key config is enabled from here.

[showlog]Display the Backlog

Shows the message backlog.

Parameter Required? Description Default
There are no parameters

[configdelay]Set the Default Text Display Speed

Sets the default text display speed.
The speed set here will be referenced by the [resetdelay] tag.
Use this tag to set the text speed in the config screens, etc.

Parameter Required? Description Default
speed No Set the text display speed.

Other

[web]Open a Webpage

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.

Parameter Required? Description Default
url Yes Enter the URL of the webpage to be opened.
; Should be preceded by an await click
Open the TyranoBuilder Website[p]
[web url="http://tyranobuilder.com"]

System Functions

[apply_local_patch]Apply a Local Patch File

Available from TyranoScript v470 and later.
Only used when packaging and distributing.
When this tag is reached, the user can apply a patch to the game.
When updating any folder other than the /data folder, apply the update at startup rather than using this tag.
The game may temporarily stop if the patch file is large. In these cases, it is best to notify the user via a loading notification, etc.

Parameter Required? Description Default
file Yes Specify the path of the patch file, starting from the folder that contains the .exe file.
reload No Set to true or false. If true, the game will be reloaded after applying the patch. The default is false.
[apply_local_patch file="test.tpatch" ]

[autoconfig]Set Auto Mode Options

Sets the auto mode options.

Parameter Required? Description Default
speed No Sets the speed of the auto mode in milliseconds.
Clickstop No Sets whether to cancel auto mode when the screen is clicked. Can be true (Stop when screen is clicked. Default mode.) or false (Do not stop.)

[autostart]Initiate Auto Mode

Automatically advances the text display at a set rate.
Use the autoSpeed option in config.tjs to change the rate.

Parameter Required? Description Default
There are no parameters

[autostop]End Auto Mode

Cancels the auto mode.

Parameter Required? Description Default
There are no parameters

[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.

Parameter Required? Description Default
variable_over No 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 No 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.

[breakgame]Delete Game Pause Data

This deletes the data saved when the [gamesleep] tag was used. If you’re not using [gameawake] to restore the state, please use this tag to delete the data.

Parameter Required? Description Default
There are no parameters

[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.

Parameter Required? Description Default
url Yes Specify the URL of json file on the server, starting with http://
[check_web_patch url="http://tyrano.jp/patch/mygame.json" ]

[config_record_label]Set Options for Text History

Sets the options for text that’s already been read.

Parameter Required? Description Default
color No Please set the color of previously-read text using 0x000000 format.
skip No Set whether to skip unread text to true or false. If set to false, the skip will stop when it hits unread text.

[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”.

Parameter Required? Description Default
storage Yes Sets the image file used for the cursor. Please put the file in data/image.
[cursor storage="my_cursor.gif"]

[dialog]Display a Dialogue Box

Displays a dialogue box with various capabilities. There are three types of available dialogue boxes: alert, confirm, and input.

Parameter Required? Description Default
name No Sets the name of a variable to store when the confirm parameter is used.
text No Sets the text to be displayed in the dialog box.
storage No If this parameter is used , this specifies the scenario file to jump to after the OK button is pressed. If this is missing, it will be interpreted as the current scenario file.
target No If this parameter is used, this specifies the label to jump to after the OK button is pressed.
storage_cancel No If this parameter is used, this specifies the scenario file to jump to after the cancel button is pressed.
target_cancel No If this parameter is used, this specifies the label to jump to after the cancel button is pressed.
label_ok No You can change the name of the OK button to anything you like. The default is OK.
label_cancel No You can change the name of the cancel button to anything you like. The default is Cancel.
;Display an alert window.
[dialog type="alert" text="Message Contents" ]

;Displays a confirm window.
[dialog type="confirm" text="Message Contents" storage="scene2" target="ok_label"
storage_cancel="" target_cancel="" ]

;Displays a text input window.
[dialog type="input" text="Please input your name." storage="scene2" target="ok_label" ]

[resetdelay]Restore Default Text Display Speed

Resets the text display speed back to the default.

Parameter Required? Description Default
There are no parameters

[screen_full]Full Screen

Sets the game window to full screen mode. Only available for PC games. Use this tag once more to return the game screen to a window.

Sample Code

[screen_full]

Parameter Required? Description Default
There are no parameters

[sleepgame]Pauses the Game

When this tag is reached, the game state is saved, and then processing is moved to another scenario file. When the [awakegame] tag is executed in the other scenario file, you can return to the original game.
This tag is extremely powerful when you want to temporarily move to a different screen. For example, when you want to adjust configuration options during play, you can use the [sleepgame] tag to save the play state and then move to the configuration screen. Use the [awakegame] tag to return to the original game.
It is not possible to execute multiple [sleepgame] commands. Make sure to use the [awakegame] command. If you do not, the [breakgame] tag will be used to discard the saved play state.
When using a [ button ] to call this tag, you can set the role to sleepgame so that the sleepgame command will be executed when the button is pressed.

Parameter Required? Description Default
storage No Specifies the name of the scenario to start when the current one is temporarily paused. If this is missing it will use the current file name.
Target No Specifies the label name to jump to. If this is missing, processing will begin with the first line of the file.
[gamesleep storage="scene3.ks" target="*start" ]

;To associate this function with a button.
[button name="button" role="sleepgame" fix="true" graphic="button/skip.gif" x=450 y=400
storage="scene3.ks" ]

Layers

[mask]Apply a Mask Layer to the Game Screen

This can be used to apply rich effects to game screen and also hide the screen.
One application would be to hide the game screen while changes are made, then show the updated screen with [mask_off].

Parameter Required? Description Default
time No Set the duration over which the mask will be applied.
effect No The following effects may be applied to masks: fadeIn (default), fadeIn, fadeInDownBig, fadeInLeftBig, fadeInRightBig, fadeInUpBig, flipInX, flipInY, lightSpeedIn, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, zoomIn, zoomInDown, zoomInLeft, zoomInRight, zoomInUp, slideInDown, slideInLeft, slideInRight, slideInUp, bounceIn , bounceInDown, bounceInLeft, bounceInRight, bounceInUp, rollIn
color No Set a font color in the format 0xFFFFFF. The default is black.
graphic No Set a custom image to use to hide the screen. Place the image in the /image folder.
folder No Set a folder other than /the image folder to contain the graphic. E.g. /bgimage or /fgimage.
; Apply the mask
[mask effect="fadeInDownBig" time=2000]

; Change the image while the screen is obscured
[bg storage="umi.jpg" time=500]

; Remove the mask
[mask_off]

[mask_off]Remove a Screen Mask

Remove a screen mask and resume the game.

Parameter Required? Description Default
time No Set the duration over which the mask will be removed.
effect No The following effects may be applied when removing masks: ‘fadeOut’ (default), f fadeOut, fadeOutDownBig, fadeOutLeftBig, fadeOutRightBig, fadeOutUpBig, flipOutX, flipOutY, lightSpeedOut, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight, zoomOut, zoomOutDown, zoomOutLeft, zoomOutRight, zoomOutUp, slideOutDown, slideOutLeft, slideOutRight, slideOutUp, bounceOut , bounceOutDown, bounceOutLeft, bounceOutRight, bounceOutUp
; Apply the mask
[mask effect="fadeInDownBig" time=2000]

; Change the image while the screen is obscured
[bg storage="umi.jpg" time=500]

; Remove the mask
[mask_off]

[filter]Apply a Filter Effect

This tag can be used to apply various filter effects to a selected layer or object.

Parameter Required? Description Default
layer Yes Select the target message layer. If no layer is specified, it will be applied only to the current message layer.
name No Set the name of the object to be deleted. Can be applied to any object layer.
grayscale No Set a value from 0 (default) to 100 to change the image to grayscale.
sepia No Set a value from 0 (default) to 100 to apply a sepia effect.
saturate No Sets the initial x coordinate.
hue No Sets the initial y coordinate.
brightness No Sets whether to wait for the camera to finish moving. If this is set to false, the game can continue during the camera movement. Defaults to true.
contrast No Sets the layer. Use “base” for background and any positive number for the foreground layer. Allows you to set the camera effect to only take place on a certain layer.
blur No Sets the camera effect type. Options are ease (Move smoothly between the start and finish times), linear (Move at a constant speed) ease-in (Move slowly at first), ease-out (Move slowly at the end) and ease-in-out (Move slowly at the start and end.) The default is ease.
; Specify an object and filter effect
[filter layer="0" name="chara_a" grayscale=50 ]

; Select a layer and filter effect
[filter layer="0" grayscale=50 ]

[free_filter]Remove a Filter Effect

Disable any applied filter effects to a selected layer or object.
If no object is specified, all filter effects will be disabled.

Parameter Required? Description Default
layer No Select the target layer from which to remove the filters. If not specified, all effects will be removed.
name No Set the name of the object from which to remove filters. Can be applied to any layer object.
; Specify an object and remove the filters
[free_filter layer="0" name="chara_a"]

; Remove all filters
[free_filter ]

[layermode]Layer Mode

This tag is used to blend images. It is recommended for use in PC games and may not be compatible with certain browsers.

Parameter Required? Description Default
name No Apply a name to a blend of layers. Use this name to undo a specific blend using [free_layermode].
graphic No Select a file to be blended. The file should be placed in the /image folder.
color No Set a color to blend in the format 0xFFFFFF.
mode No Select a blend method. The default is ‘multiply’; other available methods are: screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity
folder No Change the image folder referred by the graphic parameter. E.g. /bgimage will use the folder for background images.
opacity No Set an opacity value from 0 to 255. 0 is completely opaque. The default value is 255.
time No The duration over which blending will be carried out in milliseconds.
wait No Set whether or not to wait for the blend to complete. Use the parameters ‘true’ or ‘false’. The default value is ‘true’.
[layermode storage=fg0.png time=1500 mode=overlay]

[layermode_movie]Layer Mode Movie

Use this to blend a movie with the game screen.
Please note: This function is recommended for use in PC games and may not be compatible with certain browsers.
Use the [free_layermode] tag to remove the effect.
Movie file formats that can be used are: ogv, webm, and mp4, although compatibility may differ depending upon the game.
For PC, please use webm. mp4 cannot be used.

Parameter Required? Description Default
name No Assign a name to the blended layers. This name can be used to undo a specific blend using [free_layermode].
video No Set a movie file to blend. Place the file in the /video folder.
volume No Set the volume of the movie to be blended, using a value from 0 to 100. The default is 0 (silent).
loop No Set whether the movie should loop using ‘true’ or ‘false’. The default is ‘true’. If looping is enabled, the movie will loop until a [free_layermode] t tag is met.
speed No Set the playback speed of the movie. The default is 1; 2 plays at x2 speed, 0.5 at x0.5 speed.
mode No Select a blend method. The available methods are multiply (default), screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft- light, difference, exclusion, hue, saturation, color, luminosity
opacity No Set an opacity value from 0 to 255. 0 is completely opaque. The default value is 255.
time No The duration over which blending will be carried out in milliseconds.
wait No Set whether or not to wait for the blend to complete. Use the parameters ‘true’ or ‘false’. The default value is ‘true’.
[layermode_movie video=test.webm time=1500 wait=true]

[free_layermode]Undo Layer Mode

Undo (free) a blend of layers.

Parameter Required? Description Default
name No If a name is set for the blend, only the blend that is specified here will be undone. If no name is specified, all blends will be undone.
time No Blends are undone with a fade out effect. Set the duration of the fade out in milliseconds. The default is 500ms.
wait No Set whether or not to wait for the undo to complete. Use the parameters ‘true’ or ‘false’. The default value is ‘true’.
[free_layermode name="test"]

[bg]Change the Background Images

An easy way to change the background image.
Changes are always done to the fore layer.

Parameter Required? Description Default
storage Yes Specifies the new image file. Please put the file in bgimage.
method No Specifies the method used to swap in the new background image. Default is “crossfade”. Available options are “crossfade”, “explode”, “slide”, “blind”, “bounce”, “clip”, “drop”, “fold”, “puff”, “scale”, “shake”, and “size”.
time No Specifies the time in milliseconds.
wait No Specifies whether or not to stop processing until the swap is complete.
[bg storage=fg0.png time=1500 wait=true]

[image]Display an Image

Displays an image on a layer. You can use this for displaying characters and changing backgrounds. The foreground layer is invisible by default, so set visible=true to display it.

Parameter Required? Description Default
storage No Specifies the image file. If the image is going to background layer, please put it in bgimage, if it’s for the foreground layer put it in fgimage.
layer No Specifies the target layer. Set “base” for the background layer, and any positive number for the foreground layer.
page No Specifies the target page. Please set this to “fore” or “back”. If this parameter is missing it will default to “fore”.
Left No Sets the left edge location of the image. (In pixels.)
top No Sets the top edge location of the image. (In pixels.)
x No Sets the left edge location of the image. Same as left. If both are specified this will be given priority. (In pixels.)
y No Sets the top edge location of the image. Same as top. If both are specified this will be given priority. (In pixels.)
width No Sets the width of the image. (In pixels.)
height No Sets the height of the image. (In pixels.)
folder No Allows you to pick an image from any folder you like. Normally the foreground layer is fgimage and the background layer is bgimage, but you can select anything from the folder you specify here.
name No Tyranoscript Only. You can use the anim tag to create an animation using this name. By specifying a name, you can also control it from JavaScript as a class attribu te. It’s possible to specify multiple names by separating them with a comma.
time No By setting the time in milliseconds, you can gradually display an image.
pos No Automatically decides the layer position. Used for the foreground layer. The horizontal position can be either left, left_center, center, right_center, or right, as specified by this parameter. The exact coordinates for each position can be set in the config.tjs file. Instead of typing left, left_center, center, right_center, or right, you can use l, lc, c, rc, or r, respectively. (It works the same way.) If you use this parameter, the left and top parameters will be ignored. If you set the layer to base, please do not use this parameter. All individual settings can be specified beforehand in config.tjs
;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

[mtext]Animate Text

Displays text on the screen with various animation effects. Visit http://tyrano.jp/mtext/ to test the types of animation available.
[layeropt layer=0 visible=true] is required.

Parameter Required? Description Default
layer No Specifies the target layer. Set “base” for the background layer, and any positive number for the foreground layer.
page No Specifies the target page. Please set this to “fore” or “back”. If this parameter is missing it will default to “fore”.
text No Specifies the text to be displayed.
x Yes Sets the left edge location of the text. (In pixels.)
y Yes Sets the top edge location of the text. (In pixels.)
vertical No Please set to true or false. True will display the text vertically. Defaults to false.
size No Sets the font size in pixels.
face No Sets the font type. This is not KAG compatible, but you can use web fonts.
color No Sets the font color.
name No Tyranoscript Only. You can use the anim tag to create an animation using this name. By specifying a name, you can also control it from JavaScript as a class attribute. It’s possible to specify multiple names by separating them with a comma.
bold No Sets whether to use bold text or not. If it’s HTML-5 compatible you can change it to specify the font-style.
fadeout No Set to true or false to determine whether or not to fade out the text after it’s displayed. The default is true. To delete the remaining characters use the freeimage tag to delete the layer.
time No Sets the time the text remains still in milliseconds.
wait No Set to true or false. If set to true, processing will wait until the text effect is finished. Defaults to true.
in_effect No Sets the animation to used when the text is displayed.
in_delay No Sets the speed at which the text is displayed. Specifies the time for each character to appear in milliseconds. Default is 50 milliseconds.
in_delay_scale No Sets the ratio of the animation for each character. Default is 1.5.
in_sync No If this is set to true, all characters will begin their animation at the same time. Defaults to false.
in_shuffle No If set to true, the timing of each character animation will be randomized. Defaults to false.
in_reverse No If set to true, the characters will appear in reverse order. Defaults to false.
out_effect No Sets the animation to used when the text disappears.
out_delay No Sets the speed at which the text disappears. Specifies the time for each character to disappear in milliseconds. Default is 50 milliseconds.
out_sync No If this is set to true, all characters will begin their animation at the same time. Defaults to false.
out_shuffle No If set to true, the timing of each character animation will be randomized. Defaults to false.
out_reverse No If set to true, the characters will disappear in reverse order. Defaults to false.
;Since it defaults to displaying in the foreground layer, we'll make it visible.
[layopt layer=0 visible=true]
[mtext text="Text to Display" x=100 y=100 in_effect="fadeIn" out_effect="fadeOut"]

Other

[bgmovie]Play a Movie Backdrop

Supports ogv, webm, and mp4 formats.
The format used will differ depending on the game. Please use webm for PC games. mp4 is not supported. For a browser game, use mp4. But to allow for compatibility across all browsers including FireFox and Opera, please include a webm file of the same name.
Use the stop_bgmovie tag to stop the movie.
By playing a bgmovie when another bgmovie is looping, you can move to the next movie when the current one has finished its loop.
(Important Note) This tag is PC only. It does not work on smartphones.

Parameter Required? Description Default
storage Yes Specifies the ogv, webm, or mp4 file that you want to play.
time No Used to set the time for a fade out effect when using a movie backdrop. Defaults t to 1,000 milliseconds.
volume No Sets the volume of the video. Please set to a value between 0 and 100. Default is 100.
loop No Sets whether or not to loop the background video. By setting false, it will pause in its final state.
[bgmovie storage="" skip=false ]

[stop_bgmovie]Stop the Movie Backdrop

Stop the currently playing movie backdrop.

Parameter Required? Description Default
time No By setting this parameter in milliseconds, you can specify a fade out for the video. Defaults to 1,000.
wait No Please set to true or false. Determines whether to wait for the fade out or not. Defaults to true.
[stop_bgmovie storage="" skip=false ]

[wait_bgmovie]Wait for the Movie Backdrop to Complete

Wait for the movie backdrop to complete.

Parameter Required? Description Default
There are no parameters

Characters

[chara_face]Register Character Facial Expressions

Allows you to register a name and image for a character facial expression

Parameter Required? Description Default
name Yes Please specify the name defined by the [chara_new] tag.
face Yes Specify the name of the character’s facial expression.
storage Yes Specify the image file for the expression. Put the image in the fgimage folder.
;Register Expression
[chara_face name="yuko" face="angry" storage="newface.png"]
;Apply Expression
[chara_mod name="yuko" face="angry"]
;When you want to change the speaker's name as well.
[chara_ptext name="yuko" face="angry"]
;These can be shortened, as per below.
#yuko:angry
;The image registered when chara_new was used can be accessed using the word default.
#yuko:default

[chara_hide_all]Remove All Characters from the Screen

Removes all characters displayed with the [chara_show] tag from the screen.

Parameter Required? Description Default
wait No If set to true, the game processing will wait for the characters to disappear. Defaults to true.
time No Sets the time in milliseconds. The characters will disappear from the screen in the specified amount of time. Defaults to 1,000 milliseconds.
layer No The layer to be deleted. Use this if you specified a layer when using the chara_show tag. Defaults to 0.
[chara_hide_all time=1,000 wait=true]

[chara_ptext]Display Speaking Character’s Name or Change Expression

You can set the message box of a speaker defined using the format [chara_config ptext=”hogehoge”] to the name defined by the name parameter. And by using the face parameter, you can also change their expression.
This tag can be written in an abbreviated manner.

#chara_name:face_name and [ptext name=”chara_name” face=”face_name”] will behave in the same manner.
The image file registered when the [chara_new] tag was used can be referred to by face=”default”.
[chara_new name=”yuko” storage=”yuko.png” jname=”Yuko”]

Parameter Required? Description Default
name No Specifies the name defined by [chara_new]. The associated jname will be displayed in the ptext field.
face No Please specify the face defined by [chara_face]

Animation

[stopanim]Force Animation to Stop

Forces a playing animation to stop.

Parameter Required? Description Default
Name Yes The animation of the value specified here will stop.

Links

[button]Display a Graphical Button

This displays a graphical button.
This is a graphical version of the link tag. However, when a graphical button is displayed, the scenario is forced to come to a halt, so please be sure to specify a jump location.
Also, the graphical button’s display position will use the coordinates referred to by the locate tag directly in front of it. However, if an x and y value are specified, they will be given precedence. Note that movements from this button will not be stored in the call stack, which means that it is impossible to return from them.
Note: If you set fix to true, the location will be stored in the call stack. Note that if you do this, buttons will be disabled until you return from the call.
After jumping, make sure to use the [cm] tag to hide the button.

Parameter Required? Description Default
graphic No Specifies the graphic for the button image. Please put the file in the image folder.
storage No Specifies the scenario file to jump to. If this is omitted, the current scenario file will be used.
target No Specifies the label to jump to. If this is omitted, the file will be executed from the first line.
name No Tyranoscript Only. You can use the anim tag to create an animation using this name. By specifying a name, you can also control it from JavaScript as a class attribute. It’s possible to specify multiple names by separating them with a comma.
x No Specifies the horizontal position of the button.
y No Specifies the vertical position of the button.
width No Specifies the width of the button in pixels.
height No Specifies the height of the button in pixels.
fix No Set to true or false. Defaults to false. If true, is set, the button will be displayed on the fix layer. This allows the scenario to proceed even while the button is displayed. For example, you can use this to display buttons that should remain onscreen at all times, such as a save button. Also, to clear out any additions to the fix layer, you can use the clearfix tag. When setting fix to true, make sure you specify a target in a different storage, and put the processing logic for the button there. When fix is set to true, the current location will remain in the call stack. Note that no buttons will be usable until the location is removed from the call stack.
savesnap No Set to true or false. Defaults to false. A save snapshot is created when this button is pressed. When moving to the save screen, set this to true to allow for saving.
folder No Allows you to pick an image from any folder you like. Normally the foreground layer is fgimage and the background layer is bgimage, but you can select anything from the folder you specify here.
exp No Allows you to specify JavaScript to be executed when the button is clicked.
preexp No A value can be placed in the variable preexp when the tag is evaluated. In other w words, when the button is clicked, you can use the variable preexp in the exp JavaScript.
hint No Specifies tool tip text that will appear when the mouse cursor hovers over the button.
clickse No Specifies the sound effect to play when the button is clicked. Please put the file in the sound folder.
enterse No Specifies the sound effect that plays when the mouse cursor enters the button region. Please put the file in the sound folder.
leavese No Specifies the sound effect that plays when the mouse cursor leaves the button region. Please put the file in the sound folder.
clickimg No Specifies the image file that will be swapped in when the button is clicked. Please put the file in the image folder.
enterimg No Specifies the image file that will be swapped in when the mouse cursor enters the button region. Please put the file in the image folder.
visible No Determines whether the button is visible by default. True is visible and false is invisible.
auto_next No Specify true or false. If false is specified, when the fix parameter is use, the game will not automatically proceed to the next tag after the [return] tag.
role No Assigns a special function to the button. If this parameter is used, the storage and target parameters will be ignored. The fix parameter will automatically be set to true. Available options are save (displays the save screen), load (displays the load screen), title (returns to the title screen), menu (returns to the menu screen), window (hides the message window), skip (executes a skip), backlog (displays the backlog), fullscreen (switches fullscreen mode), quicksave (executes a quicksave), quickload (executes a quickload), and sleepgame (Saves game state and jumps).
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]

[locate x=300 y=100]
[button graphic="toyo.png" target=*toyo]

[glink]Graphical Link

Displays a graphical button. No image file is needed. When a graphical link is being displayed, the scenario is forced to come to a halt, so please be sure to specify a jump location.
Also, the graphical button’s display position will use the coordinates referred to by the locate tag directly in front of it. However, if an x and y value are specified, they will be given precedence. Note that movements from this button will not be stored in the call stack, which means that it is impossible to return from them.
After the jump, the [cm] tag is automatically executed, and the button will disappear.

Parameter Required? Description Default
color No Specifies the color of the button. Defaults to black. (black gray white orange red blue rosy green pink)
font_color No Specifies the color of the font. Please specify in 0xRRGGBB format.
storage No Specifies the scenario file to jump to. If this is omitted, the current scenario file will be used.
target No Specifies the label to jump to. If this is omitted, the file will be executed from the first line.
name No Tyranoscript Only. You can use the anim tag to create an animation using this name. By specifying a name, you can also control it from JavaScript as a class attribute. It’s possible to specify multiple names by separating them with a comma.
text No The text of the button.
x No Specifies the horizontal position of the button.
y No Specifies the vertical position of the button.
height No Specifies the height of the button in pixels.
exp No Allows you to specify JavaScript to be executed when the button is clicked.
size No Specifies the font size. Default is 30.
face No Specifies the font. If you wish to use a web font, please define it in font.css.
graphic No Specifies the background image of the button. Please put the file in the image folder. if an image is used, the color parameter will be ignored.
enterimg No Specifies the image file that will be swapped in when the mouse cursor enters the button region. Please put the file in the image folder.
clickse No Specifies the sound effect to play when the button is clicked. Please put the file in the sound folder.
enterse No Specifies the sound effect that plays when the mouse cursor enters the button region. Please put the file in the sound folder.
leavese No Specifies the sound effect that plays when the mouse cursor leaves the button region. Please put the file in the sound folder.
[glink target="j1" text="Choice #1" size=20 width="500" y=300]
[glink target="j2" text="Choice #2" size=30 width="500" y=400]
[glink target="j3" text="Choice #3" size=30 width="500" y=400]
[s]

Audio

[speak_on]Enable text reading (lip sync)

Reads text that appears in the message window using the browser text-to-speech functionality.
* Works only in projects running on browsers.

Parameter Required? Description Default
volume No Sets the reading volume.
[speak_on]

[speak_off]Disable text reading (lip sync)

Disables reading of text that appears in the message window.
* Works only in projects running on browsers.

Parameter Required? Description Default
volume No Sets the reading volume.
[speak_off]

Layers

[free]Release an object

Deletes all the elements specified by the name parameter from the layer. The name parameter must be provided.

Parameter Required? Description Default
layer Yes The target layer.
name Yes The name of the object to be removed. Can apply to any object in the layer.
wait No Whether to wait for the deletion to complete before proceeding. The default value is true.
time No The time in milliseconds over which the object will disappear.
[backlay]
; Displays a character
[image name = "myimage" layer = 0 page = back visible = true top = 100 left = 300 storage =
chara.png]
[trans time = 2000]
@wt

; Removes the charactercharacter
[free name = "myimage" layer = 0]

Augmented Reality

[bgcamera]Stream camera output to the background

Use the output of the device camera as the background.
Can be used to easily create an app that takes a commemorative photo with your character.
Browser games must be deployed in a location accessible via https for this tag to work.

★ Note on QR codes
For the game to identify a QR code, the [s] tag must be reached or it will not respond.
Create a QR code as follows:

Set the storage and target of the jump tag as below and a QR code generating site.
tyrano: //storage=scene1.ks&target=test2

Alternatively, you can issue a QR code as-is using the below tag:
[jump storage = “scene1.ks” target = “test2”]

Then print the QR code and scan with the camera for it to be processed.

Also, once a QR code has been identified, it will no longer be active.
To reactivate a QR code, use the following tag at the jump destination:

[qr_config qrcode = “all”]

Parameter Required? Description Default
name No Use in conjunction with an anim tag to start an animation, etc. Specify a name in advance for use in JS as a class attribute. You can specify more than one name by separating them with commas.
wait No Set to true to display the camera input. The default value is true.
time No Specifies the fade-in time in milliseconds over which the camera input area will be displayed. The default is 1,000.
fit No Set to true to place the image over full screen even if the ratio is distorted. Set to false to place the image while maintaining the ratio it. Depending on the resolution of the camera, black bars may appear. The default value is true.
left No Sets the position in pixels from the left of the screen to place the camera image.
top No Sets the position in pixels from the top of the screen to place the camera image.
width No Sets the width of the camera image. (pixel)
height No Sets the height of the camera image. (pixel)
mode No Set to “front” (front camera) or “back” (rear camera). If nothing is specified, a standard camera will be selected.
qrcode No 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”.
debug No Sets whether to display the URL when a QR code is read. The default is false. Set to true to display the URL as an alert.
audio No Sets whether to process audio input. Set to true to use audio input in the game. Default is false.
; Display camera input in the background
[bgcamera time = 2000]

; Return the background to normal
[stop_bgcamera]

; Set coordinates at which to display camera input
[bgcamera width = 300 height = 200 left = 100 top = 100]

; When reacting to a QR code. Specify rear camera
[bgcamera mode = "back" fit = true qrcode = "all"]

[qr_config]QR code settings

Use this tag to set various parameters for QR code operations.

Parameter Required? Description Default
qrcode No 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”.
; Enable only in-project jumps for QR codes
[qr_config qrcode = "jump"]

[stop_bgcamera]Stop the camera stream

Use this tag to set various parameters for QR code operations.

Parameter Required? Description Default
time No Sets the time in milliseconds for the video to fade out. The default is 1,000.
wait No Sets to true to wait until the video has faded out before proceeding. The default value is true.
[stop_bgcamera time = 1000]

[qr_define]Replace QR code

Replaces a QR code URL with an in-project jump.
E.g. Use to replace the QR code on an object or product with an in-game event.

Parameter Required? Description Default
url Yes Sets the URL that will trigger a reaction when detected by the camera.
storage No Sets the jump destination scenario file to be activated when the URL is read.
target No Sets the target label for the jump.
clear No Sets to true to clear the setting. Default is false.
[qr_define url = "https://tyrano.jp" storage = "scene1.ks" target = "test"]

Other

[web]Open a website

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
url Yes Sets the URL of the webpage to be opened.
; First, await click Open the official website
[p]
[web url = "https://www.nyu-media.com/"]

Animation

[stop_kanim]Stop keyframe animation

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
name No Sets the name of the image or text to be animated.
layer No Set a layer without setting a name parameter to apply to all the elements on the layer.
; First, await click Open the official website
[p]
[web url = "https://www.nyu-media.com/"]