• With over 20,000 games created, The most widely used novel game engine.
Tag Search

Basics

Parts enclosed in [ ] are considered tags.
Lines that begin with @ are also recognized as tags, but you cannot write multiple tags on a single line.

Lines that begin with a semicolon (;) are treated as comments.
If you want to comment out multiple lines at once, enclose the lines with /* and */. Both /* and */ must be placed on separate lines.

All tags can have a common parameter called the cond attribute. The cond attribute specifies the condition under which the tag is executed, written as a JavaScript expression.

By default, leading whitespace at the beginning of a script line is ignored. If you want to insert whitespace before text, you must place an underscore (_) at the beginning of the line.

[l] Click Wait

  • Message & Text

The game will wait for the player to click at this tag's position.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Display text[l]
Display text[l][r]

[p] Click Wait + Page Break

  • Message & Text

The game will wait for the player to click.
When the player clicks, the page will be refreshed.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Display text[p]
Display text[p][r]

[graph] Inline Image Display

  • Message & Text

Displays any image within the message. This can be useful for emojis or special characters.
The image to be displayed should be placed in the data/image folder.
For frequently used symbols, setting up a macro can be convenient.

Explanation Tutorial

Parameter Required Description Default Value
storage Specifies the filename of the image to display.
  • Sample Code
; heart.png is an image of a heart symbol
[macro name="heart"]
[graph storage="heart.png"]
[endmacro]

; From now on, you can use the [heart] tag to display the heart symbol
I love you [heart][p]

[r] Line Break

  • Message & Text

Inserts a line break.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Text display[l]
Line break here[l][r]
Another line break[l][r]

[er] Clear Message Layer Text

  • Message & Text

Clears the text from the currently active message layer.

To switch the active message layer, use the [current] tag.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Click to clear the message[l][er]
Message cleared[l]

[cm] Clear All Message Layers

  • Message & Text

Clears text from all message layers. [button] [glink] [html] tags and other displayed elements will also be removed.

The font style will revert to its default settings.

[ct] Unlike the [ct] tag, this tag does not switch the active message layer to message0. The active message layer remains the same after execution.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Display text[l]
Clear screen[l][cm]
Clear screen again[l][cm]

[ct] Reset Message Layer

  • Message & Text

Clears text from all message layers.

Font styles will revert to their default settings, and the active message layer will switch to the front page of message0.

Explanation Tutorial

Parameter Required Description Default Value
No parameters available.
  • Sample Code
Display text[l]
Reset the screen[l][ct]
Reset the screen again[l][ct]

[current] Specify the Target Message Layer

  • Message & Text

Specifies the message layer to be targeted. After this, text attributes specified using the [font] tag, waiting for a click using the [l] tag, and other interactions will apply to this layer.

The message0 layer is visible by default, but message1 will not be displayed unless the [layopt] tag is used, so be aware of this.

Explanation Tutorial

Parameter Required Description Default Value
layer Specifies the target message layer. If omitted, the current message layer is assumed.
page Specifies whether to target the front or back page of the layer. fore or back can be used. If omitted, the front page is assumed. fore
  • Sample Code
[current layer="message0"]
Displayed on message0 layer[l]
[current layer="message1"]
Displayed on message1 layer[l]

[fuki_start] Convert Message Layer into Speech Bubble

  • Message & Text

The message layer can be displayed in a comic-style speech bubble format.

Before enabling speech bubble display with this tag, you must configure settings using the [fuki_chara] tag.

The design of the speech bubble inherits settings from the [position] tag, but you can customize it individually using the [fuki_chara] tag.

Parameter Required Description Default Value
layer Specifies the target message layer. message0
  • Sample Code
; Set the design for a regular message layer to be used as a speech bubble
[font color="black"]
[position layer="message0" page=fore radius=15 visible=true color="white" opacity=255 border_size="3" border_color="black" ]

; Set the speech bubble display position for each character
[fuki_chara name="akane" left=200 top=270 sippo_left=30 sippo_top=30 sippo="top" max_width=300 radius=15]
[fuki_chara name="yamato" left=350 top=280 sippo_left=30 sippo_top=30 sippo="top" ]

; Speech bubble settings when there are no characters on screen (name=others)
[fuki_chara name="others" left=250 top=500 max_width=700 fix_width=700 radius=0 ]

; Start speech bubble display
[fuki_start]

#akane
Display speech bubble at Akane's position[p]

#yamato
Display speech bubble at Yamato's position[p]

#
Display speech bubble at the position set for "others"[p]

[fuki_stop] Disable Speech Bubble Mode for Message Layer

  • Message & Text

Stops the speech bubble display.

The message layer's style will revert to its state before the [fuki_start] tag was applied.

Parameter Required Description Default Value
No parameters can be specified.

[fuki_chara] Register Character Speech Bubble

  • Message & Text

You can set speech bubble designs for each character.

If you specify others as the name attribute, you can set the design for when no characters are on the screen.

Parameter Required Description Default Value
name Specifies the character name. To set a design for when no character is present, use others.
left Specifies where to display the speech bubble (relative to the character's left edge).
top Specifies where to display the speech bubble (relative to the character's top edge).
sippo Specifies the direction of the speech bubble tail. top (Up), bottom (Down), left (Left), right (Right) top
sippo_left For top or bottom bubbles, specifies the left position of the tail. 40
sippo_top For left or right bubbles, specifies the top position of the tail. 40
sippo_width Specifies the width of the speech bubble tail. 12
sippo_height Specifies the height of the speech bubble tail. 20
max_width Specifies the maximum width of the speech bubble when auto-adjusted. 300
fix_width Stops auto-adjustment and fixes the speech bubble width to the specified value.
color Specifies the speech bubble color in 0xRRGGBB format.
border_color Specifies the border color in 0xRRGGBB format. Requires border_size to be set.
border_size Specifies the border thickness. If set to 0, no border is displayed. 0
opacity Specifies the opacity of the speech bubble from 0 to 255. 0 makes it fully transparent. (This does not affect text or layer opacity.)
radius Specifies the speech bubble's corner roundness. Example: 10 (Slightly rounded), 30 (Moderately rounded), 100 (Highly rounded)
font_color Specifies the font color in 0xRRGGBB format.
font_size Specifies the font size.
  • Sample Code

; Set speech bubble positions for each character
[fuki_chara name="akane" left=200 top=270 sippo_left=30 sippo_top=30 sippo="top" max_width=300 radius=15]
[fuki_chara name="yamato" left=350 top=280 sippo_left=30 sippo_top=30 sippo="top"]

; Set speech bubble settings for when no character is on the screen (name=others)
[fuki_chara name="others" left=250 top=500 max_width=700 fix_width=700 radius=0 ]

[ptext] Display Text on a Layer

  • Message & Text

Displays text on the foreground layer. This can be used to display text separately from the message window.

To remove the text, use the [freeimage] tag, or use the name attribute specified in this tag with the [free] tag.

By default, the layer itself is hidden, so adding text using the [ptext] tag will not display it. First, use the [layopt] tag to make the layer visible.

Tutorial Explanation

ParameterRequiredDescriptionDefault
layerSpecify the foreground layer as an integer value of 0 or greater.0
pageSpecify whether to target the front or back page of the layer.fore or back. Defaults to the front page.fore
textThe displayed text content.
xSpecify the left position of the text (in pixels).
ySpecify the top position of the text (in pixels).
verticalWhether to display text vertically.true or false.false
sizeSpecify the font size in pixels.
faceSpecify the font type. Web fonts can also be used.
colorSpecify the font color in 0xRRGGBB format.
boldEnable bold text by specifying bold (CSS font-style will be applied).
V515 and later: true can also enable bold.
edgeEnable text edging. Specify the edge color in 0xRRGGBB format.
V515 and later: Edge thickness can also be specified as 4px 0xFF0000. Separate thickness and color with a space, and multiple edges can be specified using a comma, e.g., 4px 0xFF0000, 2px 0xFFFFFF.
shadowAdd a shadow to the text. Specify the shadow color in 0xRRGGBB format. Disabled if an edge is applied.
name[anim] tag can animate this text using the specified name. Multiple names can be assigned using commas.
widthSpecify the text display width in pixels.
alignSpecify text alignment. Requires the width parameter.left (left), center (center), right (right).left
timeSpecify fade-in time in milliseconds. If omitted, text appears instantly.
overwriteWhether to overwrite existing text with the same name.true or false. If true, replaces existing text instead of adding new text.false
gradientV515 and later: Apply a gradient to the text. Specify a CSS gradient function such as linear-gradient(45deg, red 0%, yellow 100%).
  • Sample Code
[backlay]
[ptext page=back text="Sample Text" size=30 x=200 y=300 color=red vertical=true]
[trans time=2000]
[wt]
[l]
Removing the displayed text
[freeimage layer=0]

[mtext] Effect Text

  • Message & Text

Displays text with various animation effects on the screen.

Refer to http://tyrano.jp/mtext/ for available animation effects.

By default, the layer itself is hidden, so adding text with the [mtext] tag will not display it. First, use the [layopt] tag to make the layer visible.

Tutorial Explanation

Parameter Required Description Default
layerSpecify the foreground layer as an integer value of 0 or greater.0
pageSpecify whether to target the front or back page of the layer.fore or back. Defaults to the front page.fore
textThe content of the displayed text.
xSpecify the left position of the text (in pixels).
ySpecify the top position of the text (in pixels).
verticalWhether to display text vertically.true or false.false
sizeSpecify the font size in pixels.
faceSpecify the font type. If using web fonts, define them in tyrano/css/font.css.
colorSpecify the font color in 0xRRGGBB format.
widthSpecify the text display width in pixels.
alignSpecify text alignment. Requires the width parameter.left (left), center (center), right (right).left
name[anim] tag can animate this text using the specified name. Multiple names can be assigned using commas.
boldSet text to bold by specifying bold.
edgeEnable text edging. Specify the edge color in 0xRRGGBB format.
shadowAdd a shadow to the text. Specify the shadow color in 0xRRGGBB format. Disabled if an edge is applied.
fadeoutWhether to execute fade-out after displaying the text. true or false.true
timeSpecify the duration for which the text remains still, in milliseconds.2000
waitWhether to wait for animation completion before continuing. true or false.true
in_effectSpecify the animation effect when the text appears.fadeIn
out_effectSpecify the animation effect when the text disappears.fadeOut
  • Sample Code

; Make layer 0 visible
[layopt layer=0 visible=true]
; Display effect text
[mtext text="Effect Text" x=100 y=100 in_effect="fadeIn" out_effect="fadeOut"]


[ruby] Add Ruby (Furigana)

  • Message & Text

Specifies ruby (furigana) for the next character.
If you want to display ruby, you must specify it each time.
For multiple characters, ruby must be specified for each character individually.

Tutorial Explanation

Parameter Required Description Default
textSpecify the text to be displayed as ruby (furigana).
  • Sample Code

[ruby text="kan"]漢[ruby text="ji"]字


[mark] Text Marker

  • Message & Text

Applies a highlighter-like effect to text.
Color and size can also be specified.

Tutorial Explanation

Parameter Required Description Default
colorSpecify the marker color in 0xRRGGBB format. The default is yellow.0xFFFF00
font_colorSpecify the font color when the marker is applied in 0xRRGGBB format. If omitted, it inherits the in-game font color.
sizeSpecify the marker size from 0 to 100. For example, 50 highlights the lower half of the text, while 10 makes it similar to an underline.
  • Sample Code

This part is not highlighted. [mark]This part is highlighted.[endmark] This part is not highlighted.

[mark color="0xff7f50" size=70]You can also specify the color and size of the marker.[endmark]


[endmark] End Text Marker

  • Message & Text

[mark] Ends a text marker started with the [mark] tag.

Tutorial Explanation

Parameter Required Description Default
No parameters can be specified.
  • Sample Code

This part is normal. [mark]This part is highlighted.[endmark] This part is not.

[mark color="0xff7f50" size=70]You can specify the marker color and size as well.[endmark]


[config_record_label] Read Status Settings

  • Message-related Settings

Allows changing the read status settings.

Parameter Required Description Default
colorSpecify the read text color in 0xRRGGBB format.
skipWhether the player can skip unread text. true or false.
If false, skipping will be disabled when the player reaches unread text.

[position] Modify Message Window Attributes

  • Message-related Settings

Specifies various attributes for the message window.
If omitted, the setting remains unchanged.

Tutorial Explanation

Parameter Required Description Default
layerSpecify the target message layer.message0
pageSpecify whether to target the front or back page of the layer.fore or back. Defaults to the front page.fore
leftSpecify the left position of the message window (in pixels).
topSpecify the top position of the message window (in pixels).
widthSpecify the width of the message window (in pixels).
heightSpecify the height of the message window (in pixels).
frame

Specify an image to be displayed as the frame for the message window.

The image size should match the width and height attributes.

Use the margin attribute to adjust the actual message display area.

Specify none to reset to the default frame.

colorSpecify the background color of the message window in 0xRRGGBB format.
border_colorSpecify the border color in 0xRRGGBB format. Requires border_size to be specified.
border_sizeSpecify the border thickness. Set to 0 to hide the border. Default is 0.
opacitySpecify the opacity of the message window (0-255).0 makes it fully transparent. (This does not affect text opacity or the layer opacity.)
marginlSpecify the left margin of the message window.
margintSpecify the top margin of the message window.
marginrSpecify the right margin of the message window.
marginbSpecify the bottom margin of the message window.
marginSpecify margins collectively. Example: 30 sets a 30px margin on all sides.
Can also be set using comma-separated values: top,bottom, top,left,right,bottom.
radiusSpecify the roundness of the message window corners. Example:10 (slight round), 30 (moderate round), 100 (highly rounded).
verticalWhether to use vertical writing mode. true or false. true for vertical text, false for horizontal text.
visibleWhether to display the message layer. true or false. Setting this also controls the visibility of the message layer.
gradientApply a gradient background. Specify in CSS gradient format, e.g., linear-gradient(45deg, red 0%, yellow 100%).
You can generate CSS gradients using online tools by searching for "CSS Gradient Generator."
  • Sample Code

; Change the position and size of the message window
[position width=400 height=300 top=100 left=20]
; Change the color and opacity of the message window
[position color=blue opacity=100]


[hidemessage] Temporarily Hide Message Layer

  • Message-related Settings

Temporarily hides the message layer and waits for a click. The text is not erased. This behaves the same as selecting "Hide Message" from the menu.

The message layer will be displayed again when clicked.

Parameter Required Description Default
No parameters can be specified.

[font] Change Text Style

  • Message-related Settings

Changes the text style. Styles can be set individually for each message layer.

If a parameter is omitted, the setting remains unchanged. Specifying default resets the value to the default (as set in Config.tjs or with the [deffont] tag).

Styles changed with this tag are reset to default when tags such as [resetfont], [ct], [cm], and [er] are executed. To change the default values permanently, edit Config.tjs or use the [deffont] tag.

Tutorial Explanation

Parameter Required Description Default
sizeSpecify the font size.
colorSpecify the text color in 0xRRGGBB format.
boldEnable bold text. true or false.
italicEnable italic text. true or false.
faceSpecify the font type. If using web fonts, define them in tyrano/css/font.css.
edgeEnable text edging. Specify the edge color in 0xRRGGBB format.
To remove edging, specify none.
V515 and later: Edge thickness can also be specified. 4px 0xFF0000 (4px red edge).
Multiple edges can be specified using commas, e.g., 4px 0xFF0000, 2px 0xFFFFFF.
edge_methodChoose the edge rendering method. Options: shadow or filter.
shadowEnable text shadow. Specify the shadow color in 0xRRGGBB format.
To remove the shadow, specify none.
effectApply text animation effects. Specify none to disable.
Available options: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, rotateIn, zoomIn, slideIn, bounceIn, vanishIn, puffIn, rollIn.
effect_speedSpecify the duration of the effect if effect is not none.
Default: 0.2s (seconds).
gradientV515 and later: Apply a gradient effect to the text. Specify in CSS gradient format.
Example:
linear-gradient(45deg, red 0%, yellow 100%).
You can generate gradients using online tools by searching for "CSS Gradient Generator."
  • Sample Code

[font size=40 bold=true]
This text is large and bold.
[resetfont]
The text has returned to its original size.


[deffont] Default Text Style Settings

  • Message-related Settings

Specifies the default text style for the currently active message layer.

The style set here is applied when passing through the [resetfont] tag. Simply using the [deffont] tag does not immediately change the actual style.

Tutorial Explanation

Parameter Required Description Default
sizeSpecify the font size.
colorSpecify the text color in 0xRRGGBB format.
boldEnable bold text. true or false.
italicEnable italic text. true or false.
faceSpecify the font type. Web fonts are also available.
If using a web font, place the font file in the
data/others folder and set it up using @font-face in tyrano.css.
edgeEnable text edging. Specify the edge color in 0xRRGGBB format.
To remove edging, specify none.
V515 and later: Edge thickness can also be specified. 4px 0xFF0000 (4px red edge).
Multiple edges can be specified using commas, e.g., 4px 0xFF0000, 2px 0xFFFFFF.
edge_methodChoose the edge rendering method. Options: shadow or filter.
shadowEnable text shadow. Specify the shadow color in 0xRRGGBB format.
To remove the shadow, specify none.
effectApply text animation effects. Specify none to disable.
Available options: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, rotateIn, zoomIn, slideIn, bounceIn, vanishIn, puffIn, rollIn.
effect_speedSpecify the duration of the effect if effect is not none.
Default: 0.2s (seconds).
gradientV515 and later: Apply a gradient effect to the text. Specify in CSS gradient format.
Example:
linear-gradient(45deg, red 0%, yellow 100%).
You can generate gradients using online tools by searching for "CSS Gradient Generator."

[message_config] Message Configuration

  • Message-related Settings

Available from TyranoScript V515.
Allows detailed configuration of message-related settings.
Omitted attributes remain unchanged.

Parameter Required Description Default
ch_speed_in_clickCharacter display speed after a click during text display. Specify in milliseconds per character.
If set to default, it retains the pre-click character display speed.
effect_speed_in_clickText effect speed after a click during text display. Specify using formats like 0.2s, 200ms, or simply 200 (all equivalent to 200 milliseconds).
If set to default, it retains the pre-click effect speed.
edge_overlap_textWhether to overlap the outline of outlined text with the previous character. Specify true or false. Currently effective only when edge_method is set to stroke.
speech_bracket_floatAdjusts the position of the opening speech bracket so that text does not wrap underneath it. When set to true, the opening bracket shifts to the left. Set to false to disable.
Specify a numerical value like 20 to manually adjust the shift distance.
speech_margin_leftWhen speech_bracket_float is enabled, this further shifts the entire text to the right.
Set to true to enable, false to disable.
Specify a numerical value like 20 to manually adjust the shift distance.
kerningEnable kerning. Specify true or false.
Effects may not be visible depending on the font, default letter spacing, or the player's browser.
(Advanced: This setting modifies the CSS font-feature-settings property.)
add_word_nobreakAdds words that should not be broken by word wrapping. Specify multiple words separated by commas.
remove_word_nobreakRemoves previously added words from the no-break list. Specify multiple words separated by commas.
line_spacingSpecify line spacing in pixels.
letter_spacingSpecify letter spacing in pixels.
control_line_breakEnable manual line-break control. Specify true or false.
If enabled, it prevents certain punctuation marks (e.g., ., ,, ), ]) from appearing at the beginning of a line by breaking before them.
Normally, line-break rules are handled automatically, but if font effects or outlines interfere, set this to true.
control_line_break_charsSpecifies characters for manual line-break prevention. The default list includes 、。)」』】,.)].
  • Sample Code

; Do not change text display speed upon click
[message_config ch_speed_in_click="default" effect_speed_in_click="default"]

; Instantly display remaining text upon click
[message_config ch_speed_in_click="0" effect_speed_in_click="0ms"]

; Shift the opening speech bracket left to prevent text wrapping underneath
[message_config speech_bracket_float="true"]

; Prevent word breaking for "――"
[message_config add_word_nobreak="――"]

; Increase line and letter spacing significantly
[message_config line_spacing="50" letter_spacing="30"]

; Adjust kerning for dashes
@macro name="――"
  [message_config letter_spacing="-4"]―[message_config letter_spacing="0"]―
@endmacro
――Do you seek power?[l][r]
[――]Do you seek power?[l][r]


[delay] Set Text Display Speed

  • Message-related Settings

Specifies the text display speed.
To display text without waiting, you can also use the [nowait] tag.

Tutorial Explanation

Parameter Required Description Default
speed

Specifies the text display speed. A smaller value results in faster text display.

The specified value is interpreted as the time (in milliseconds) before the next character appears.
For example, setting 1000 will make each character appear every second.


[resetdelay] Reset Text Display Speed to Default

  • Message-related Settings

Resets the text display speed to the default speed.

Parameter Required Description Default
No parameters can be specified.

[configdelay] Set Default Text Display Speed

  • Message-related Settings

Specifies the default text display speed.
This determines the speed to which text display reverts when using the [resetdelay] tag.
Use this tag if you want to change the text speed for the entire game, such as from a configuration screen.

★Note
If you only want to temporarily change the text speed for effect purposes, use the [delay] tag instead of [configdelay].

Parameter Required Description Default
speed

Specifies the text display speed. A smaller value results in faster text display.

The specified value is interpreted as the time (in milliseconds) before the next character appears.
For example, setting 1000 will make each character appear every second.


[nowait] Enable Instant Text Display Mode

  • Message-related Settings

Enables instant text display mode. In this mode, all text is displayed instantly, without the normal per-character rendering process.

To return to normal mode, use the [endnowait] tag.

Parameter Required Description Default
No parameters can be specified.

[endnowait] Disable Instant Text Display Mode

  • Message-related Settings

Stops the instant text display mode enabled by [nowait].
The text display speed returns to the state it was in before using the [nowait] tag.

Parameter Required Description Default
No parameters can be specified.

[resetfont] Reset Text Style

  • Message-related Settings

Resets the text style to the default as specified by [deffont].

It can be used to temporarily change the text style with [font] and then restore it with [resetfont].

Text styles can be set individually for each message layer.

Parameter Required Description Default
No parameters can be specified.
  • Sample Code

[deffont size=30]
Default text size[p]

[font size=55 bold=true]
Uooooooo!!![p]

[resetfont]
W-What was that all of a sudden!?
[font size=20] (That scared me...)[p]

[resetfont]


[skipstart] Enable Skip Mode

  • Message-related Settings

Enables skip mode, causing text to be displayed instantly.

Parameter Required Description Default
No parameters can be specified.

[skipstop] Disable Skip Mode

  • Message-related Settings

Disables skip mode. Functions the same as [cancelskip].

Parameter Required Description Default
No parameters can be specified.

[cancelskip] Cancel Skip Mode

  • Message-related Settings

Disables skip mode. Functions the same as [skipstop].

Parameter Required Description Default
No parameters can be specified.

[autostart] Enable Auto Mode

  • Message-related Settings

Enables auto mode. The system will automatically proceed past click-wait points based on the elapsed time, which is determined by the number of characters displayed.

The speed of auto mode is defined in Config.tjs under autoSpeed or can be configured using the [autoconfig] tag.

Parameter Required Description Default
No parameters can be specified.

[autostop] Disable Auto Mode

  • Message-related Settings

Disables auto mode.

Parameter Required Description Default
No parameters can be specified.

[autoconfig] Auto Mode Configuration

  • Message-related Settings

Configures settings related to auto mode.

Parameter Required Description Default
speedSpecify the speed of auto mode in milliseconds.
clickstopDetermines whether auto mode stops when the screen is clicked.
Specify true or false.
If set to false, auto mode will continue even when the screen is clicked.

[position_filter] Apply Filter Effect Behind the Message Window

  • Message-related Settings

Applies a filter effect behind the message window.
This can be used to create a frosted glass effect for the message window.

Parameter Required Description Default
layerSpecifies the target message layer.message0
pageSpecifies whether to apply the effect to the front or back page of the layer.
Use fore or back. Defaults to the front page.
fore
removeSpecify true or false.
When set to true, removes the applied filter.
false
grayscaleConverts the display to grayscale by specifying a value between 0 (default) and 100.
sepiaApplies a sepia tone effect by specifying a value between 0 (default) and 100.
saturateAdjusts color saturation (vividness) by specifying a value between 0 and 100 (default).
hueAdjusts hue by specifying a value between 0 (default) and 360.
invertInverts color tones by specifying a value between 0 (default) and 100.
opacityAdjusts transparency by specifying a value between 0 and 100 (default).
brightnessAdjusts brightness based on a default value of 100.
Setting 0 makes it completely dark, while values above 100 increase brightness.
contrastAdjusts contrast by specifying a value between 0 and 100 (default).
blurBlurs the display by specifying a value between 0 (default) and any desired value.
  • Sample Code

Applying a filter[p]
[position_filter blur="5"]
Frosted glass effect[p]
[position_filter invert="100"]
Inverted colors[p]
[position_filter grayscale="100"]
Grayscale mode[p]


[nolog] Temporarily Pause Backlog Recording

  • Message-related Settings

When this tag is reached, text will no longer be recorded in the backlog.

Backlog recording resumes when the [endnolog] tag is reached.

Tutorial Explanation

Parameter Required Description Default
No parameters can be specified.
  • Sample Code

This will be recorded in the log[p]
[nolog]
This will NOT be recorded in the log[p]
This will also NOT be recorded in the log[p]
[endnolog]
Backlog recording resumes from here[p]


[endnolog] Resume Backlog Recording

  • Message-related Settings

Resumes backlog recording that was temporarily paused by the [nolog] tag.

Tutorial Explanation

Parameter Required Description Default
No parameters can be specified.
  • Sample Code

This will be recorded in the log[p]
[nolog]
This will NOT be recorded in the log[p]
This will also NOT be recorded in the log[p]
[endnolog]
Backlog recording resumes from here[p]


[pushlog] Add Text to Backlog

  • Message-related Settings

Allows you to add custom text to the backlog.

For example, text displayed using [mtext] is not recorded in the backlog by default.
However, by using [pushlog] together with [mtext], you can record animated text content in the backlog.

Tutorial Explanation

Parameter Required Description Default
textSpecifies the text to be added to the backlog.
joinDetermines whether to concatenate the new entry with the previous backlog text.
Specify true or false.
false
  • Sample Code

[pushlog text="You can insert any log text here."]


[jump] Scenario Jump

  • Label & Jump Operations

Moves to a specified label in a designated scenario file.

Unlike the [call] tag, the movement using [jump] is not stored in the call stack. This means it is a one-way transition, and you cannot return using [return].

Tutorial Explanation

Parameter Required Description Default
storageSpecifies the name of the scenario file to jump to. If omitted, it is assumed to be the current scenario file.
targetSpecifies the name of the label to jump to. If omitted, the jump will go to the beginning of the scenario file.
  • Sample Code

; Moves to the *start label in the scenario file "second.ks"
[jump storage=second.ks target=*start]


[link] Hyperlink (Choice) Start

  • Label & Jump Operations

Encloses text within [link] and [endlink] to make it a clickable link. This can be used for displaying choices.

Linked text can be selected using the mouse or keyboard. When clicked or selected via key input, it will jump to a specific scenario file or label.

Links cannot span across multiple pages (but they can span across lines).

After displaying choices, you must place an [s] tag to pause the flow.

Tutorial Explanation

Parameter Required Description Default
storageSpecifies the scenario file to jump to. If omitted, the current scenario file is assumed.
targetSpecifies the label name to jump to. If omitted, jumps to the beginning of the scenario file.
keyfocusIf set to false, the choice cannot be selected via keyboard or gamepad.
If set to values like 1 or 2, it determines the order of selection when using the focus_next action in key configuration.
  • Sample Code

Displaying choices[l][r][r]

[link target=*select1]【1】Choice One[endlink][r]
[link target=*select2]【2】Choice Two[endlink][r]

[s]

*select1
[cm]
"Choice One" was selected[l]
@jump target=*common

*select2
[cm]
"Choice Two" was selected[l]
@jump target=*common

*common
[cm]

This is the common route.


[endlink] Hyperlink (Choice) End

  • Label & Jump Operations

Used in combination with the [link] tag. Ends hyperlink formatting.

Tutorial Explanation

Parameter Required Description Default
No parameters can be specified.
  • Sample Code

[link target=*select1]【1】Choice One[endlink][r]
[link target=*select2]【2】Choice Two[endlink][r]


[button] Display Graphical Button

  • Label & Jump Operations

Displays a graphical button. [link] is the text-based version of this tag.

While a graphical button is displayed, scenario progression is forcibly halted. Be sure to specify a jump destination. After the jump, you must use the [cm] tag to remove the button.

The position of the graphical button follows the location set by the previous [locate] tag. However, if x or y attributes are specified, they take precedence.

【For standard choice buttons (fix=false)】 When jumping with this button, it does not leave a call stack, similar to using [jump]. That means you cannot return using the [return] tag.

【For fixed buttons (fix=true)】 Similar to using [call], it leaves a call stack. This means you must use [return] to return from the call.

Tutorial Explanation

Parameter Required Description Default
graphicSpecifies the image to be used as a button. Place the file in the data/image folder.
folderSpecifies the folder where the image is located. By default, images for the foreground layer are in the fgimage folder, and images for the background layer are in the bgimage folder. This can be changed.image
storageSpecifies the scenario file to jump to. If omitted, the current scenario file is assumed.
targetSpecifies the label name to jump to. If omitted, jumps to the beginning of the scenario file.
name[anim] tag can animate this button using the specified name. Multiple names can be assigned using commas.
xSpecifies the button's horizontal position.
ySpecifies the button's vertical position.
widthSpecifies the button's width in pixels.
heightSpecifies the button's height in pixels.
fix

Determines whether the button should be a fixed button (e.g., always displayed buttons like a save button).
Specify true or false. Normal choice buttons default to false. Fixed buttons remain visible even while the player progresses through the scenario.

false
roleAssigns a special function to the button, ignoring storage and target. Also forces fix=true. Available options:
save (Open Save Screen)
load (Open Load Screen)
title (Return to Title Screen)
menu (Open Menu)
window (Hide Message Window)
skip (Start Skip Mode)
backlog (Open Backlog)
fullscreen (Toggle Fullscreen)
quicksave (Execute Quick Save)
quickload (Execute Quick Load)
auto (Start Auto Mode)
sleepgame (Save game state and jump)
  • Sample Code

[locate x=20 y=100]
[button graphic="oda.png" target=*oda]

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


[glink_config] Graphical Link Configuration

  • Label & Jump Operations

Available from V515 onwards.

[glink] (Graphical Link) automatic placement settings can be configured. When auto-placement is enabled (enabled by default), any [glink] without x and y specified will be subject to automatic placement. These auto-placed [glink] will not appear immediately but will be displayed when reaching the [s] tag.

If parameters are omitted, their settings will not be changed.

Parameter Required Description Default
auto_place[glink] automatic placement toggle. true enables automatic placement for [glink] without x and y specified. false disables it.
auto_place_forceIf set to true, [glink] with x and y specified will also be forcibly auto-placed.
margin_xHorizontal margin (px) outside the button.
margin_yVertical margin (px) outside the button.
padding_xHorizontal padding (px) inside the button. If set to default, no adjustment is made.
padding_yVertical padding (px) inside the button. If set to default, no adjustment is made.
widthIf set to max, button width is adjusted to the largest button width. Direct numerical input also allows setting a common width. If set to default, no adjustment is made.
heightIf set to max, button height is adjusted to the tallest button height. Direct numerical input also allows setting a common height. If set to default, no adjustment is made.
verticalVertical alignment of buttons: top (align to top), center (align to center), bottom (align to bottom).
horizontalHorizontal alignment of buttons: left (align to left), center (align to center), right (align to right).
wrapWhen set to wrap, buttons will wrap when they do not fit within the designated area.
place_areaDefines the reference area for button alignment. If set to auto (default), the system automatically adjusts the area considering the message window. cover makes the entire screen the reference area. If specific values are desired, input four comma-separated numbers like 100,100,1000,1000 (left, top, width, height).
show_timeTime (ms) for display animation. Setting 0 disables animation. Note: Buttons cannot be clicked during animation.
show_effectAnimation effect for showing buttons. Available effects:
fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, lightSpeedIn, rotateIn, zoomIn, bounceIn, vanishIn, puffIn.
show_delayDelay (ms) before each button appears. Setting 0 displays all buttons simultaneously. Example: 100 delays each button's appearance by 100ms.
show_easingEasing function for button appearance animation:
ease (smooth at start and end), linear (constant speed), ease-in (slow start), ease-out (slow end), ease-in-out (slow start and end).
  • Sample Code

[glink_config auto_place="true" show_time="300"]
[position left="160" top="500" width="1000" height="200" visible="true"]
[position margint="45" marginl="50" marginr="70" marginb="60"]
Are you interested in TyranoScript? [l]
[glink color="btn_13_red" text="Yes, I'm interested" target="*selectinterest"]
[glink color="btn_13_red" text="I'm very interested!" target="*selectinterest"]
[glink color="btn_13_red" text="I'm somewhat interested" target="*selectinterest"]
[s]

*selectinterest
Really!? That's great! [p]


[glink] Graphical Link

  • Label & Jump Operations

You can display a graphical link (text button). No image is required.

When a graphical link is displayed, scenario progression is forcibly paused, so you must specify a jump destination.

The display position of the graphical link follows the position specified by the preceding[locate] tag. However, if thex and y attributes are specified, they take precedence.

When using this button to navigate the scenario, it functions similarly to the[jump] tag, meaning it does not remain in the call stack. In other words, you cannot return using the[return] tag.

After jumping, the[cm] tag is automatically executed, and the button is removed.

Starting from version V501c, a significant number of design variations have been added to glink. Please check out the samples at the following URL.
https://tyrano.jp/sample2/code/siryou/1

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
color

You can specify the button color using keywords. The default isblack.blackgraywhiteorangeredbluerosygreenpink are available as keywords.

Starting from version V501c, over 200 design patterns have been added. For details, visit https://tyrano.jp/sample2/code/siryou/1

black
font_colorSpecifies the font color in0xRRGGBB format.
storageSpecifies the scenario file name for the jump destination. If omitted, the current scenario file is assumed.
targetSpecifies the label name of the jump destination. If omitted, it jumps to the beginning of the scenario file.
name[anim] tag can use this name for animation. Multiple names can be specified by separating them with commas. (Advanced: Thename attribute value will be assigned as an HTML class attribute.)
textSpecifies the button text.
xSpecifies the horizontal position of the button.auto
ySpecifies the vertical position of the button.
widthSpecifies the button width in pixels.
heightSpecifies the button height in pixels.
sizeSpecifies the font size.30
faceSpecifies the font. To use web fonts, define them intyrano/css/font.css.
graphicSpecifies a background image for the button. Place the file in thedata/image folder. If an image is specified, thecolor setting is ignored.
enterimgUsed whengraphic is specified. Sets an image to display when the cursor hovers over the button.
clickseSpecifies a sound effect played when the button is clicked. Sound files should be placed in thedata/sound folder.
autoposSpecifytrue orfalse. The default isfalse. If set to true, the button's position will be automatically adjusted, behaving as if x and y were not specified.false
  • Sample Code
[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]

[clickable] Setting Clickable Areas

  • Label & Jump Operations

You can define a transparent clickable area.

When a clickable area is displayed, scenario progression is forcibly paused, so you must specify a jump destination.

When using this button to navigate the scenario, it functions similarly to the[jump] tag, meaning it does not remain in the call stack. In other words, you cannot return using the[return] tag.

[s] The clickable area will not be active until the [s] tag is reached. Make sure to pause the game with the [s] tag.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
widthSpecifies the width of the clickable area.0
heightSpecifies the height of the clickable area.0
xSpecifies the X coordinate of the left edge of the clickable area.
ySpecifies the Y coordinate of the top edge of the clickable area.
borderstyleSpecifies the style of the border displayed around the area. Use the format thickness:type:color. Each item should be written usingCSS notation. Border types include solid double groove dashed dotted, and more.
colorSpecifies the display color in0xRRGGBB format.
opacitySpecifies the opacity of the area using a value between 0 and 255. A value of 0 makes the area completely transparent.140
mouseopacitySpecifies the opacity of the area when the mouse hovers over it.
storageSpecifies the scenario file name for the jump destination. If omitted, the current scenario file is assumed.
targetSpecifies the label name of the jump destination. If omitted, it jumps to the beginning of the scenario file.
  • Sample Code
[locate x=20 y=100]
[clickable width=200 height=300 target=*oda]

[locate x=300 y=100]
[clickable width=100 height=100 border="10px:dotted:red" target=*oda]

[s]

[chara_ptext] Displaying Character Names and Changing Expressions

  • Character Operations

This tag is used to display a character's name. The main purpose is to show the name of the speaking character at the top of the message window.face attribute can be specified to change the character's expression while displaying their name.

It overwrites the character's name in a text area that was previously created using [ptext]. Before using [chara_ptext], prior setup with [ptext] and [chara_config] is required. Refer to the sample code for detailed steps.

This tag can be written in a shorthand format. In shorthand notation, place # at the beginning of the line, followed by the value to be assigned to the name attribute. To change the expression, append : followed by the value for the face attribute.

For example, #akane:gekioko and [chara_ptext name=akane face=gekioko] perform the same function.

ParameterRequiredDescriptionDefault Value
name[chara_new] Specifies the name defined in the [chara_new] tag. The linked jname will be displayed in the text area. If no character definition exists for the given name, the name itself will be displayed in the text area.
face[chara_face] Specifies the face defined in the [chara_face] tag.
  • Sample Code
; Show layer 0
[layopt layer="0" visible="true"]

; Create a text area in layer 0
[ptext layer="0" name="name_space" x="100" y="200" text="Character name appears here"]

; Declare the created text area (name_space) as the character name display area
[chara_config ptext="name_space"]

; Define characters
[chara_new name="akane" storage="chara/akane/normal.png" jname="Akane"]
[chara_new name="yamato" storage="chara/yamato/normal.png" jname="Yamato"]

; Display character name!
[chara_ptext name="akane"]
This is Akane[p]

; There is also a shorthand notation (start a line with # and write the character's name)
; In practice, this shorthand notation is mostly used
#yamato
This is Yamato[p]

; Name can also be cleared
#
Narration text here[p]

; Works even if the character is not registered
#???
Hello[p]

[chara_config] Basic Settings for Character Operation Tags

  • Character Operations

Allows you to change the basic settings for character operation tags.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
pos_modetrue or false can be specified. The default value is true. When set to true, the [chara_show] tag automatically calculates and places the character's standing position when the character is displayed.
ptext[ptext] Creates a text area to display the character's name. Refer to the [chara_ptext] section for more details.
time[chara_mod] Specifies the crossfade time in milliseconds when changing expressions. Setting it to 0 results in an instantaneous change.
memorySpecifies whether to remember the character's expression when the character exits. true or false can be specified. When true is set, the character will reappear with the same expression as when they exited.
animSpecifies whether to animate the character's position change when automatic positioning is enabled by pos_mode=true. Use true or false to specify.
pos_change_timeSpecifies the animation time in milliseconds for adjusting the character's position automatically.
talk_focusEnables effects to highlight the character's standing image when they are talking. The following keywords can be used: brightness (brightness), blur (blur), none (disabled)
The character currently talking is designated using [chara_ptext] or its shorthand notation like #akane.
brightness_valueSpecifies the brightness for characters not talking when talk_focus=brightness. The value is specified from 0 to 100. The default is 60, which slightly darkens the characters not talking.
blur_valueSpecifies the degree of blur for characters not talking when talk_focus=blur. The default is 2. A higher number results in more blur.
talk_animAutomatically adds an animation effect that makes the character's standing image jump when they start talking. The following keywords can be specified: up (jump up), down (sink down), zoom (zoom in), none (disabled)
talk_anim_timeSpecifies the animation time in milliseconds when talk_anim is enabled.
talk_anim_valueSpecifies the movement distance of the character when talk_anim is enabled. (in pixels)
talk_anim_zoom_rateSpecifies the zoom rate when using zoom in talk_anim. The default is 1.2
effectSpecifies the effect (motion) for the character's position change. The following keywords are available: 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_new] Character Definition

  • Character Operations

Defines the information for the characters that appear.

By defining a character with this tag, you can use the [chara_show] tag to display that character, or the [chara_mod] tag to change the character's expression.

The name parameter specified here is used in character operation tags like [chara_show]. You can also use this name in tags like [anim] or [kanim], enabling you to freely animate the character.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
nameSpecify a unique name for managing the character in half-width alphanumeric characters. This name must be unique (i.e., it cannot be the same as any other character's name). Additionally, it cannot overlap with the [ptext][image] tag's name either.
storageSpecifies the character image. Place the image file in the data/fgimage folder.
widthSpecifies the image's width.
heightSpecifies the image's height.
reflectSpecifies whether to flip the image horizontally. Use true or false. If set to true, the image will be flipped horizontally.false
colorSpecifies the color of the character's name when displayed. Use 0xRRGGBB format.
jnameSpecifies the name to display in the message area when showing the character in the name space. For example, specifying #yuko would display ゆうこ in the message area.
  • Sample Code
[chara_new name=yuko storage=yuko.png jname=ゆうこ]

[chara_show] Character Appearance

  • Character Operations

Displays a defined character on the screen.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
nameSpecifies the name attribute defined in [chara_new].
timeSpecifies the time in milliseconds. The character will appear over the specified time.1000
layerSpecifies the layer where the character will be placed, using an integer of 0 or greater.0
zindexSpecifies the stacking order of the character. The larger the value, the more it will appear in the foreground. If not specified, characters that appear later will be displayed in the front.1
depthIf the zindex is the same, specify the stacking order as front (frontmost) or back (backmost).front
pageSpecifies fore or back.fore
waitIf set to true, the system will wait for the character to finish appearing.true
face[chara_face] tag's face attribute is specified here.
storageSpecifies the image file to change. Place the image file in the data/fgimage folder.
reflectSpecifies whether to flip the image horizontally. Use true or false. If set to true, the image will be flipped horizontally.
widthSpecifies the character's width.
heightSpecifies the character's height.
leftSpecifies the character's horizontal position. If specified, automatic positioning will be disabled.
topSpecifies the character's vertical position. If specified, automatic positioning will be disabled.
  • Sample Code
[chara_show name="yuko" ]

[chara_hide] Character Exit

  • Character Operations

[chara_show] Tag will remove the character displayed by the [chara_show] tag.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
name[chara_new] Define the name attribute specified in the [chara_new] tag.
timeSpecifies the fade-out time in milliseconds.1000
waitSpecify whether to wait for the fade-out to complete.true or false can be specified.true
layerLayer to be removed.[chara_show] If a layer is specified with this tag, it should also be specified here.0
pos_modeIf character's position adjustment is enabled, setting this parameter to false will prevent position adjustment after the exit.true
  • Sample Code
[chara_hide name="yuko"]

[chara_hide_all] Remove All Characters

  • Character Operations

[chara_show] Tag removes all characters displayed by the [chara_show] tag.

ParameterRequiredDescriptionDefault Value
timeSpecifies the fade-out time in milliseconds.1000
waitSpecify whether to wait for the fade-out to complete.true or false can be specified.true
layerLayer to be removed.[chara_show] If a layer is specified in the [chara_show] tag, it should also be specified here.0
  • Sample Code
[chara_hide_all time=1000 wait=true]

[chara_delete] Delete Character Information

  • Character Operations

Deletes the character definition information.

If you want to remove the character's standing image from the screen, please use [chara_hide] instead of this tag.

ParameterRequiredDescriptionDefault Value
nameSpecifies the name attribute defined in [chara_new] tag.
  • Sample Code
[chara_delete="yuko" ]

[chara_mod] Change Character Image

  • Character Operations

Changes the character's image. This can be used for changing expressions.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
name[chara_new] Specifies the name defined in the name attribute.
face[chara_face] Specifies the face defined in the face attribute.
time[chara_mod] Specifies the crossfade time (in milliseconds) when changing expressions.0 indicates an instantaneous switch.
storageSpecifies the image file to change. Image files should be placed in the data/fgimage folder.
reflectSpecifies whether to reflect the image horizontally. Set to true or false. If set to true, the image will be mirrored.
waitSpecifies whether to wait for the crossfade to finish before proceeding. Set to true or false.true
cross

Specifies the crossfade method with true or false.true fades out the old image while fading in the new one.false fades in the new image on top of the old one without fading out the old image.

If set to true, there might be a moment where the character becomes semi-transparent, allowing the background to be visible. In such cases, setting it to false will avoid transparency during expression changes. However, if the expression change alters the silhouette, it may look unnatural.

true
  • Sample Code
[chara_mod name="yuko" storage="newface.png"]

[chara_move] Change Character Position

  • Character Operations

Changes the character's position and size. You can also animate the change over a specified time.

ParameterRequiredDescriptionDefault Value
name[chara_new] Specifies the name defined in the tag.
leftSpecifies the new horizontal position.left="+=200" or left="-=200" allows relative movement, specifying how far to move from the current position.
topSpecifies the new vertical position.top="+=100" or top="-=100" allows relative movement, specifying how far to move from the current position.
widthSpecifies the new width of the character.
heightSpecifies the new height of the character.
animSpecifies whether to animate the change. Use true or false. If set to true, the position change will be animated. In this case, the animation effect is defined by the [chara_config] effect parameter.false
timeSpecifies the animation time in milliseconds.600
waitSpecifies whether to wait for the animation to finish before continuing. Use true or false.true
effectSpecifies the animation effect for the change. The following keywords can be specified:jswing, 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
  • Sample Code
[chara_move name="yuko" time=100 left=20 top=100 ]

[chara_face] Character Expression Registration

  • Character Operations

Register character expression images.

ParameterRequiredDescriptionDefault Value
nameThe name of the character for which you are registering an expression.[chara_new] Specify the name attribute defined in the tag.
faceSpecify the name of the expression to register.happy, angry, etc., you can name it whatever you like for easy identification.
storageSpecify the image file. Image files should be placed in the data/fgimage folder.
  • Sample Code
;Register expression
[chara_face name="yuko" face="angry" storage="newface.png"]

;Apply expression
[chara_mod name="yuko" face="angry"]

;Also change the speaker's name simultaneously
[chara_ptext name="yuko" face="angry"]

;Can be written in shorthand. This also has the same meaning
#yuko:angry

;The image registered with chara_new can be referred to as "default"
#yuko:default

[chara_layer] Character Parts Difference Definition

  • Character Operations

Define the character's expression difference parts.
The default part will be the first one registered.

ParameterRequiredDescriptionDefault Value
nameThe name of the character for which you are registering the parts.[chara_new] Specify the name attribute defined in the tag.
partSpecify the name of the part to register. For example, register the part called eye, and you can register multiple differences within this part.
idSpecify the name to identify the difference within the part. For example, in the eye part, you can register smiling eyes or crying eyes by using different id for each.
storageSpecify the image to register as a difference. Images should be placed in the data/fgimage folder. If you specify none, it represents the default state where the part is not present.
zindexSpecify the priority for this part when it overlaps with other parts to determine which one appears in the front. The larger the number, the more it will appear in the front. Once registered, this will apply to other differences within the same part.
  • Sample Code
[chara_layer name="yuko" part=mouse id=egao storage="image/egao.png" ]

[chara_layer_mod] Modify Character's Difference Definition

  • Character Operations

[chara_layer] tag settings can be modified.

ParameterRequiredDescriptionDefault Value
nameThe name of the character whose part definition will be modified.[chara_new] Specify the name attribute defined in the tag.
partSpecify the part name you want to modify.
zindexSpecify the priority as a number to determine which part will be displayed in the front when overlapping with other parts. The larger the number, the more it will appear in the front. This setting will not be applied immediately but will take effect the next time it is displayed.
  • Sample Code
[chara_layer_mod name="yuko" part=mouse zindex=20 ]

[chara_part] Change Character's Difference Parts

  • Character Operations

[chara_layer] tag switches the actual display of the defined parts difference.

The parameter specification method for this tag is special.[chara_layer] tag'spart andid combinations can be freely specified as parameters.

[chara_part name=yuko eye=happy]

You can also change multipleparts at the same time.
Without registering theid, you can directly specify the difference image file. In this case, specifyallow_storage=true.
You can also change thezindex of a specific part by specifying a numeric value for a parameter namedpart_name_zindex.

[chara_part name=yuko eye=happy eye_zindex=10]

ParameterRequiredDescriptionDefault Value
name[chara_new] Defined character name.
timeSpecifies the fade-in time for the parts to appear, in milliseconds.
waitSpecifies whether to wait for the fade-in to complete.true orfalse.true
allow_storagetrue orfalse. Whentrue, you can specify the image file directly instead of using theid for thepart. Place the image in thefgimage folder.false
  • Sample Code
[chara_part name=yuko mouse=happy eye=happy]

[chara_part_reset] Reset Character's Difference Parts to Default

  • Character Operations

[chara_part] tag allows you to revert the changed difference parts back to the default expression.
If the character is displayed, it will immediately revert to the default.

ParameterRequiredDescriptionDefault Value
name[chara_new] tag specified character name.
partYou can reset specificparts. Multiple parts can be specified separated by commas. If omitted, all parts will be reverted to default.
  • Sample Code
[chara_part_reset name=yuko]

[image] Display Image

  • Image, Background, and Layer Operations

Displays an image on the specified layer. This can be used for character displays, background changes, and more.

Initially, the layer is set to invisible, so even if you add an image using the [image] tag, it won't appear on the screen. First, you need to make the layer visible using the [layopt] tag.

Tutorial

ParameterRequiredDescriptionDefault Value
storageSpecify the image file name. Files for background layers should be placed in the data/bgimage folder, and for foreground layers, in the data/fgimage folder.
layerSpecify the layer to add the image to.
Use base for background layers, or any integer greater than or equal to 0 for corresponding foreground layers.
base
pageSpecify whether to target the front or back page of the layer. Use fore or back. If omitted, the front page is assumed.fore
visibleSpecify true or false. If true is specified, the image will be displayed along with the layer being made visible. This means you can omit the [layopt visible="true"] tag.
leftSpecify the left edge position of the image (in pixels).
topSpecify the top edge position of the image (in pixels).
xSpecify the left edge position of the image, with higher priority than left (in pixels).
ySpecify the top edge position of the image, with higher priority than top (in pixels).
widthSpecify the width of the image (in pixels).
heightSpecify the height of the image (in pixels).
folderSpecify the folder containing the image. By default, foreground layer images go into the fgimage folder, and background layer images into the bgimage folder, but this can be changed.
name[anim] tag can animate the image using this name. Multiple names can be specified by separating them with commas. (Advanced knowledge: The value specified in the name attribute is treated as an HTML class attribute.)
timeSpecify the fade-in time in milliseconds. The image will gradually appear from a transparent state. If omitted, it will appear instantly.
waitSpecify true or false to wait for the fade-in to complete.true
zindexSpecify the stacking order of images. A higher number will place the image in front.1
depthIf zindex is the same, specify the stacking order as front (frontmost) or back (backmost). The default is front.front
reflectIf true, the image will be flipped horizontally.
pos

Determine the image's position using keywords.

Available keywords are left (left edge), left_center (left-aligned), center (center), right_center (right-aligned), and right (right edge). The actual coordinates for each keyword are defined in Config.tjs and can be edited freely.

Each keyword also has shorthand forms, such as l, lc, c, rc, and r, which function the same way.

If you specify this attribute, the left parameter will be ignored.

If the layer is base, do not specify this attribute.

animimgIf true, animated images in GIF or APNG format will play from the beginning.
  • Sample Code
; Make layer 1 visible
[layopt layer="1" visible="true"]
; Add cat.png to layer 1
[image layer="1" x="150" y="150" storage="cat.png"]
[l]

; Delete image
[freeimage layer="1"]

[freeimage] Clear Layer

  • Image, Background, and Layer Operations

Deletes all images and other content on the specified layer.

Tutorial

ParameterRequiredDescriptionDefault Value
layerSpecifies the target layer.
pageSpecifies whether to target the front or back page of the layer. Use fore or back. If omitted, the front page is assumed.fore
timeSpecifies the fade-out time in milliseconds. If specified, the image will gradually become transparent. If omitted, it will disappear instantly.
waitSpecify whether to wait for the fade-out to complete: true or false.true
  • Sample Code
; Place an image
[image layer="0" page="fore" visible="true" top="100" left="300"  storage="chara.png"]

; Clear the layer
[freeimage layer="0"]

; Place an image with a name
[image name="myimg" layer="0" visible="true" top="100" left="300"  storage="myimg.png"]

; Delete one specific image by its name
[free name="myimg" layer="0"]

[free] Release Object

  • Image, Background, and Layer Operations

Deletes all elements specified by the name on the layer.name specification is required.

Tutorial

ParameterRequiredDescriptionDefault Value
layerSpecifies the target layer.
nameSpecifies the name of the element to delete. It can be applied to any element within the layer.
timeSpecifies the fade-out time in milliseconds. If specified, the image will gradually fade to transparency. If omitted, it will be deleted instantly.
waitSpecifies whether to wait for the fade-out to complete. Use true or false.true
  • Sample Code
[backlay]
; Display character
[image name="myimage" layer=0 page=back visible=true top=100 left=300  storage = chara.png]
[trans time=2000]
@wt

; Hide character
[free name="myimage" layer=0 ]

[backlay] Copy Layer Information from Front Page to Back Page

  • Image, Background, and Layer Operations

Copies the information from the specified layer (or all layers) from the front page to the back page.

This tag is used in combination with the [trans] tag. First, use the [backlay] tag to copy the image from the front page to the back page, make changes to the image on the back page, and then bring the back page's image to the front using the [trans] tag. This way, there is no concern about showing the image change process on the game screen.

Tutorial

ParameterRequiredDescriptionDefault Value
layerSpecifies the target layer. Use base for the background layer, 0 or higher integers for foreground layers, and message0 or message1 for message layers. If only message is specified, the current message layer specified by the [current] tag will be the target. If omitted, information from all layers will be copied to the back page.
  • Sample Code
; Perform background change with transition
@layopt layer=message0 visible=false
[backlay]
[image layer=base page=back storage=rouka.jpg]
[trans time=2000]
[wt]

[wt] Wait for Transition to End

  • Image, Background, and Layer Operations

Waits until the transition is complete.

Tutorial

ParameterRequiredDescriptionDefault Value
No parameters are available to specify.
  • Sample Code
[backlay]
[image layer=base page=back storage=rouka.jpg]
[trans time=2000]
Transitioning...
[wt]

[cm]
The transition is complete[p]

[layopt] Layer Attribute Settings

  • Image, Background, and Layer Operations

Specifies the attributes of the layer.

Tutorial

ParameterRequiredDescriptionDefault Value
layerSpecifies the foreground layer or message layer to be targeted. If onlymessage is specified, the current message layer, as specified by the[current] tag, will be the target.
pageSpecifies whether to target the front or back page of the layer. Usefore orback to specify. However, if onlymessage is specified for thelayer attribute, and this attribute is omitted, the currently targeted page will be selected.fore
visibleSpecifies whether to display the layer specified by thelayer attribute. Iftrue is specified, the layer will be visible; iffalse is specified, it will be hidden. If omitted, the visibility state will not be changed.
leftSpecifies the left position of the layer specified by thelayer attribute. If omitted, the position will not be changed. (If you want to adjust the position or design of the message window, use the[position] tag instead of this one.)
topSpecifies the top position of the layer specified by thelayer attribute. If omitted, the position will not be changed. (If you want to adjust the position or design of the message window, use the[position] tag instead of this one.)
opacitySpecifies the opacity of the layer in the range from0 to255. 0 means fully transparent, and255 means fully opaque.
  • Sample Code
;Clear the 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

[locate] Specify Display Position

  • Image, Background, and Layer Operations

Specifies the display position of graphic buttons.
Text is not supported.

ParameterRequiredDescriptionDefault Value
xSpecifies the horizontal position (in pixels).
ySpecifies the vertical position (in pixels).
  • Sample Code
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]

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

[trans] Layer Transition

  • Image, Background, and Layer Operations

Performs a transition on the specified layer.

It moves the contents of the back page to the front page for the specified layer. After the transition, the content (images, position, size, visibility, etc.) on the front page will be the same as that on the back page.

Do not change the layer attributes during the transition.

Tutorial

ParameterRequiredDescriptionDefault Value
layerSpecifies the target layer.base specifies the background layer,0 or greater specifies a foreground layer,message0 ormessage1 specifies a message layer. If onlymessage is specified, the currently targeted message layer specified by the[current] tag will be used (usually used for background changes).base
timeSpecifies the transition time in milliseconds.1500
method

Specifies the type of transition. The default isfadeIn. Available transition effects are as follows:

[V450 or later]fadeInfadeInDownfadeInLeftfadeInRightfadeInUplightSpeedInrotateInrotateInDownLeftrotateInDownRightrotateInUpLeftrotateInUpRightzoomInzoomInDownzoomInLeftzoomInRightzoomInUpslideInDownslideInLeftslideInRightslideInUpbounceIn bounceInDownbounceInLeftbounceInRightbounceInUprollInvanishInpuffIn

[Before V450]crossfadeexplodeslideblindbounceclipdropfoldpuffscaleshakesize

fadeIn
children[Deprecated]false Iffalse, only the specified layer transitions. The default isfalse.
  • Sample Code
[backlay]
[image storage=fg0 layer=0 page=back]
[trans time=1500 ]
[wt]

[bg] Background Switch

  • Image, Background, and Layer Operations

Allows for an easy background switch.
It always switches the layer designated asfore.

Tutorial

ParameterRequiredDescriptionDefault Value
storageSpecify the image file name. The file should be placed in thedata/bgimage directory.
timeSpecifies the time for the background switch in milliseconds.3000
waitSpecifies whether to wait for the background switch to finish.true orfalse. Iffalse, the next tag will be executed without waiting for the switch to complete.true
crossSpecifytrue orfalse. The default isfalse. Iftrue, the two images will transition simultaneously by becoming transparent while swapping.Iffalse, the new background will be displayed over the old one without removing it. This is useful for CG variations.false
positionIf omitted, the image will be stretched to fill the entire game screen (aspect ratio may be distorted). By specifying this value, the background can be positioned without distorting the aspect ratio when the image's size differs from the screen. Choose from the following keywords:left (left-aligned),center (centered),right (right-aligned),top (top-aligned),bottom (bottom-aligned)
method

Specifies the transition type. The default isfadeIn. Available effects are as follows:

[V450 or later]fadeInfadeInDownfadeInLeftfadeInRightfadeInUplightSpeedInrotateInrotateInDownLeftrotateInDownRightrotateInUpLeftrotateInUpRightzoomInzoomInDownzoomInLeftzoomInRightzoomInUpslideInDownslideInLeftslideInRightslideInUpbounceIn bounceInDownbounceInLeftbounceInRightbounceInUprollInvanishInpuffIn

[Before V450]crossfadeexplodeslideblindbounceclipdropfoldpuffscaleshakesize

crossfade
  • Sample Code
[bg storage=fg0.png time=1500 wait=true]

[bg2] Background Switch

  • Image, Background, and Layer Operations

Allows for a simple background switch.
It always performs the switch on thefore layer.

ParameterRequiredDescriptionDefault Value
name[anim] tag can animate this name. You can specify multiple by separating them with commas. (Advanced knowledge: thename value you specify will become the HTML class attribute.)
storageSpecify the image file name. The file should be placed in thedata/bgimage directory.
leftSpecify the left edge position of the image in pixels. The default value of0 will place it at the top of the game screen.
topSpecify the top edge position of the image in pixels. The default value of0 will place it at the top of the game screen.
widthSpecify the image width in pixels. If omitted, it will stretch to fill the game screen.
heightSpecify the image height in pixels. If omitted, it will stretch to fill the game screen.
timeSpecify the transition time for the background switch in milliseconds.3000
waitSpecifies whether to wait for the background switch to finish. Set totrue orfalse. Iffalse, it will move to the next tag without waiting for the switch to complete.true
crossSpecifytrue orfalse. The default isfalse. Iftrue, both images will become transparent at the same time while swapping.Iffalse, the new background will be displayed on top of the old one without removing it. For CG variations, it is recommended to usefalse.false
method

Specifies the transition type. The default isfadeIn. The available effects are as follows:

[V450 or later]fadeInfadeInDownfadeInLeftfadeInRightfadeInUplightSpeedInrotateInrotateInDownLeftrotateInDownRightrotateInUpLeftrotateInUpRightzoomInzoomInDownzoomInLeftzoomInRightzoomInUpslideInDownslideInLeftslideInRightslideInUpbounceIn bounceInDownbounceInLeftbounceInRightbounceInUprollInvanishInpuffIn

[Before V450]crossfadeexplodeslideblindbounceclipdropfoldpuffscaleshakesize

crossfade
  • Sample Code
[bg storage=fg0.png time=1500 wait=true]

[clearfix] Clear the fix layer

  • Image, Background, and Layer Operations

Clears the elements in the fix layer. You can also specify thename attribute to clear only specific elements.

The fix layer is a special layer at the front of the game screen, typically used to place fixed buttons like save and load buttons.

ParameterRequiredDescriptionDefault Value
nameBy specifying this, you can clear only the corresponding element.
  • Sample Code
; Add to fix layer
[ptext name="sample" layer=fix page=fore text="Text Text" size=30 x=200 y=100 color=red ]

; Clear fix layer
[clearfix name="sample"]

[quake] Shake the screen

  • Effects, Effects, and Video

Shakes the screen for the specified number of milliseconds.
By setting thevmax attribute to0, it will shake horizontally, and by setting thehmax attribute to0, it will shake vertically.

Explanation tutorial

ParameterRequiredExplanationDefault Value
countSpecifies the number of shakes.5
waitWhether to wait for the shake to finish.true orfalse to specify.true
timeSpecifies the time in milliseconds for one shake.300
hmaxSpecifies the maximum amplitude of the shake horizontally.0
vmaxSpecifies the maximum amplitude of the shake vertically.10
  • Sample Code
[quake count=5 time=300 hmax=20]

[quake2] Shake the screen

  • Effects, Effects, and Video

Shakes the screen for the specified number of milliseconds.

ParameterRequiredExplanationDefault Value
timeSpecifies the total time for the shake in milliseconds.1000
hmaxSpecifies the maximum amplitude of the shake horizontally.0
vmaxSpecifies the maximum amplitude of the shake vertically.200
waitWhether to wait for the shake to finish.true orfalse to specify.true
copybaseIftrue, while the screen is shaking, a copy of the base layer background will be fixed at the backmost. This prevents black gaps from appearing at the bottom when the screen shakes upward.true
  • Sample Code
Shaking the screen.[l][s]

[quake2 time="1000"]

[cm]It shook.[p]

[quake2 time="1000" wait="false"]

Continuing to the next tag while shaking.[p]

[quake2 time="3000" wait="false"]

Continuing to the next tag while shaking, and waiting for the shake to finish... [wa]Done.[p]

[vibrate] Mobile/Pad vibration

  • Effects, Effects, and Video

You can make the player's mobile device or gamepad vibrate.

If the specified vibration time is too long, it may stop vibrating, so be cautious. Depending on the environment, it's recommended to keep the vibration time below 5000 milliseconds as a general rule.

ParameterRequiredExplanationDefault Value
timeThe time (in milliseconds) to vibrate.600,200,1000,200,600 specifies a pattern like vibrating for 600 milliseconds → static for 200 milliseconds → static for 1000 milliseconds → ...500
powerThe strength of the vibration (0 to 100). This parameter is only effective when vibrating a gamepad.100
countThe number of times to repeat the vibration.
  • Sample Code
[vibrate time=1000 power=100]
Vibrate for 1 second[p]

[vibrate time="800,200" power="50" count="3"]
Repeat pattern vibration 3 times[p]

[vibrate time="5000" power="50" count="3"]
Vibration stops midway...
[wait time="1000"]
[vibrate_stop]
Stopped the vibration.[p]

[vibrate_stop] Stop Mobile/Pad Vibration

  • Effects, Effects, and Video

[vibrate] You can stop the vibration of the mobile device or gamepad that was started with the [vibrate] tag.

ParameterRequiredExplanationDefault Value
No parameters can be specified.

[layermode] Layer Mode

  • Effects, Effects, and Video

You can composite images on the game screen. You can choose from composite methods like multiplication, screen, overlay, etc.

It may not work on some older browsers like IE, so be cautious if you are releasing it as a browser game. It is recommended to use it in games output as PC applications.

Tutorial Explanation

ParameterRequiredExplanationInitial Value
nameSpecify the name for the composite image. This name can be used in the [free_layremovde] tag when you want to remove a specific composite image.
graphicSpecify the image file for the composite. The file should be placed in the image folder.
colorYou can also composite a solid color instead of an image. In that case, specify the composite color in 0xRRGGBB format.
modeYou can specify the composite method. The following keywords are available:
multiply (Multiplication)
screen (Screen)
overlay (Overlay)
darken (Darken)
lighten (Lighten)
color-dodge (Color Dodge)
color-burn (Color Burn)
hard-light (Hard Light)
soft-light (Soft Light)
difference (Difference)
exclusion (Exclusion)
hue (Hue)
saturation (Saturation)
color (Color)
luminosity (Luminosity)
multiply
folderYou can change the folder for the image specified by graphic. For example, if you specify bgimage, it will fetch images from the bgimage folder.
opacitySpecify the opacity of the image in the range of 0 to 255. 0 means completely transparent.
timeSpecify the fade-in time in milliseconds. If specified, the image will gradually appear from a transparent state. If omitted, it will appear instantly.500
waitSpecify whether to wait for the fade-in to complete. You can use true or false.true
  • Sample Code
[layermode graphic=fg0.png time=1500 mode=overlay]

[layermode_movie] Layer Mode (Video)

  • Effects, Effects, and Video

You can composite a video layer on the game screen. Please note that it may not work in older browsers like IE, so be cautious if you are releasing it as a browser game.

To remove a composited video, use the [free_layermode] tag.

mp4 format is recommended. ogv and webm formats are also supported.

When exporting as a browser game, be aware that some video formats may not be supported by certain browsers. Specifically, webm format does not work on Safari.

Also, mp4 format does not work on Firefox and Opera. In this case, if a webm file with the same name exists in the same location as the mp4 file, it will automatically choose the webm file.

Tutorial Explanation

ParameterRequiredExplanationInitial Value
nameYou can assign a name to the composite layer. This name is used with the [free_layremovde] tag to remove specific composite layers.
videoSpecify the video file to composite. The file should be placed in the data/video folder.
volumeSpecify the volume of the composite video, from 0 to 100.
muteSpecify whether to mute the video sound. Use true or false. On browsers, a user action (like tap) is required before playing the video, but specifying true bypasses this limitation.false
loopSpecify whether to loop the video. Use true or false. The default is true. If set to loop, the video will remain in effect until the [free_layermode] tag is called.true
speedSpecify the video playback speed. For example, 2 will play at 2x speed, 0.5 will play at half speed.
modeYou can specify the composite method. The default is multiply. The following effects are available: multiply (Multiplication), screen (Screen), overlay (Overlay), darken (Darken), lighten (Lighten), color-dodge (Color Dodge), color-burn (Color Burn), hard-light (Hard Light), soft-light (Soft Light), difference (Difference), exclusion (Exclusion), hue (Hue), saturation (Saturation), color (Color), luminosity (Luminosity).multiply
opacitySpecify the opacity of the composite layer, from 0 to 255. 0 means completely transparent.
timeSpecify the fade-in time in milliseconds.500
leftSpecify the position of the composite layer (in pixels).
topSpecify the position of the composite layer (in pixels).
widthSpecify the width of the composite layer (in pixels).
heightSpecify the height of the composite layer (in pixels).
fitSpecify whether to stretch the composite layer to fit the game screen. Use true or false.true
waitSpecify whether to wait for the video to finish playing before moving to the next action. Use true or false.false
  • Sample Code
[layermode_movie video=test.webm time=1500 wait=true]

[free_layermode] Remove Composite Layer

  • Effects, Effects, and Video

Removes the composite layer.

Tutorial Explanation

ParameterRequiredExplanationInitial Value
nameSpecifies the name of the composite layer to be removed. If omitted, all composite layers are removed.
timeSpecifies the fade-out time in milliseconds.500
waitSpecifies whether to wait for the fade-out to complete. Use true or false.true
  • Sample Code
[free_layermode name="test"]

[movie] Play Video

  • Effects, Effects, and Video

Play a video on the game screen. The video file should be placed in the data/video folder.

mp4 format recommended.ogv and webm formats are also supported.

If you publish the game as a browser game, be aware that some browsers may not support certain video formats. In particular, webm does not work in Safari.

Also, mp4 format does not work in FireFox or Opera. In this case, if there is a webm file with the same name in the same location as the mp4 file, it will automatically select that one.

ParameterRequiredExplanationInitial Value
storageSpecify the video file to play.
skipWhether to allow the video to be skipped midway.true or false. If true, the player can skip the video by clicking on the screen.false
muteWhether to mute the video sound.true or false. On browsers, user action (such as tapping) is required before the video can be played, but setting this to true bypasses this restriction.false
volumeSet the volume of the video from 0 to 100.
  • Sample Code
; Count the number of times the video has been played using the game variable f.watch_count
[eval exp="f.watch_count = 0"]

*loop
Play the video[p]

; If the video has not been played yet, skipping is not allowed
; If the video has been played at least once, skipping is allowed
; Set this in the temporary variable tf.skip
[iscript]
if (f.watch_count === 0) {
  tf.skip = "false";
} else {
  tf.skip = "true";
}
[endscript]

; Play data/video/cat.mp4
[movie storage="cat.mp4" skip=&tf.skip]

The video has finished playing[p]

; Increase the count of videos played
[eval exp="f.watch_count += 1"]
[jump target="loop"]

[bgmovie] Play Background Movie

  • Effects, Effects, and Video

You can use a video as the background in the game screen. The video file should be placed in the data/video folder.

[stop_bgmovie] Tag will stop the video once it finishes playing.
[bgmovie] can be layered by using another [bgmovie] during a loop, allowing the next video to play after the current one finishes.

mp4 format recommended.ogv and webm formats are also supported.

If you publish the game as a browser game, be aware that some browsers may not support certain video formats. In particular, webm does not work in Safari.

Also, mp4 format does not work in FireFox or Opera. In this case, if there is a webm file with the same name in the same location as the mp4 file, it will automatically select that one.

★Note
This tag is PC-only. It cannot be used on mobile devices.

ParameterRequiredExplanationInitial Value
storageSpecify the video file to play.
timeSpecify the fade-in time in milliseconds.300
muteWhether to mute the video sound.true or false. If set to true, the video will play without sound. On browsers, user action (such as tapping) is required before playing the video, but setting it to true will bypass this restriction.false
volumeSet the video volume from 0 to 100.
loopWhether to loop the background video.true or false. If set to false, the video stops at the last frame.true
  • Sample Code
[bgmovie storage=cat.mp4]

[wait_bgmovie] Wait for Background Movie to Finish

  • Effects, Effects, and Video

Waits for the currently playing background movie to finish.

ParameterRequiredExplanationInitial Value
No parameters can be specified.

[stop_bgmovie] Stop Background Movie

  • Effects, Effects, and Video

Stops the background video played by [bgmovie].

ParameterRequiredExplanationInitial Value
timeSpecifies the fade-out time in milliseconds.300
waitSpecifies whether to wait for the fade-out to complete. You can set it to true or false.true
  • Sample Code
[bgmovie storage=cat.mp4]
Stopping the video[p]

[stop_bgmovie]
The video has been stopped[p]

[filter] Filter Effect Production

  • Effects, Effects, and Video

Apply various filter effects to specified layers or objects.

Tutorial

ParameterRequiredExplanationInitial Value
layerSpecify the layer to apply the filter. If omitted or specified as all, the effect will be applied to the entire game screen.all
nameIf you want to apply the filter to a specific element, specify its name.
grayscaleSpecify a value between 0 (default) and 100 to convert the image to grayscale.
sepiaSpecify a value between 0 (default) and 100 to convert the image to sepia tone.
saturateSpecify a value between 0 and 100 (default) to change the saturation (vividness) of the image.
hueSpecify a value between 0 (default) and 360 to change the hue (color) of the image.
invertSpecify a value between 0 (default) and 100 to invert the image’s tones.
opacitySpecify a value between 0 and 100 (default) to change the image’s transparency.
brightnessSpecify a value relative to 100 (default) to change the brightness of the image. 0 makes it completely dark, and 100 or above makes it brighter.
contrastSpecify a value between 0 and 100 (default) to change the contrast of the image.
blurSpecify a value between 0 (default) and any value to blur the image.
  • Sample Code
;Apply filter effects to a specific object
[filter layer=0 name=chara_a grayscale=50 ]

;Apply filter effects to a layer
[filter layer=0 brightness=50 ]

[free_filter] Remove Filter Effect

  • Effects, Effects, and Video

Specify a layer or object to remove the [filter] effect.

Tutorial

ParameterRequiredExplanationInitial Value
layerSpecify the layer to remove the filter effect. If not specified, all filters will be removed.
nameIf you want to remove the filter from a specific element, specify the element's name.
  • Sample Code
;Remove filter from a specific object
[free_filter layer=0 name=chara_a]

;Remove all filters
[free_filter]

[mask] Screen Mask Display

  • Effects, Effects, and Video

You can darken the entire game screen with various effects.
During the darkening, you can reconstruct the game screen and resume the game using the [mask_off] tag.

Tutorial

ParameterRequiredExplanationInitial Value
timeThe time in milliseconds until the darkening is completed.1000
effect

You can specify the effect for the darkening. The following keywords can be specified:

fadeInfadeInDownBigfadeInLeftBigfadeInRightBigfadeInUpBigflipInXflipInYlightSpeedInrotateInrotateInDownLeftrotateInDownRightrotateInUpLeftrotateInUpRightzoomInzoomInDownzoomInLeftzoomInRightzoomInUpslideInDownslideInLeftslideInRightslideInUpbounceIn bounceInDownbounceInLeftbounceInRightbounceInUprollIn

fadeIn
colorYou can specify the color of the darkening in 0xRRGGBB format. The default is black.0x000000
graphicIf specified, an image can be used for the darkened area. The image should be placed in the data/image folder.
folderIf you want to change the folder for the image specified in graphic, you can specify it here. For example, you can specify bgimage or fgimage.
  • Sample Code
;Start darkening
[mask effect="fadeInDownBig" time=2000]

;Background image setup during darkening
[bg storage="umi.jpg" time=500]

;Turn off darkening
[mask_off]

[mask_off] Screen Mask Removal

  • Effects, Effects, and Video

Removes the screen mask and resumes the game.

Tutorial

Parameter Required Explanation Initial Value
timeThe time in milliseconds until the darkening is completed.1000
effect

You can specify the effect for the darkening. The following keywords can be used:

fadeOutfadeOutDownBigfadeOutLeftBigfadeOutRightBigfadeOutUpBigflipOutXflipOutYlightSpeedOutrotateOutrotateOutDownLeftrotateOutDownRightrotateOutUpLeftrotateOutUpRightzoomOutzoomOutDownzoomOutLeftzoomOutRightzoomOutUpslideOutDownslideOutLeftslideOutRightslideOutUpbounceOutbounceOutDownbounceOutLeftbounceOutRightbounceOutUp

fadeOut
  • Sample Code
;Start darkening
[mask effect="fadeInDownBig" time=2000]

;Background image setup during darkening
[bg storage="umi.jpg" time=500]

;Turn off darkening
[mask_off]

[anim] Animation

  • Animation

You can animate images, buttons, layers, and other elements.

The elements to be animated are specified using the [image][ptext][button] tags, where the name attribute is used. Alternatively, you can specify a layer to animate all elements within it.

This tag does not wait for the animation to complete. To wait for the animation to finish, use the [wa] tag.

For specifying animation coordinates, use +=100 or -=100relative positioning (for example, moving 100px to the right from the current position).

Opacity can be specified to create fade-in or fade-out effects.

Tutorial

ParameterRequiredExplanationInitial Value
nameThis specifies the element to animate, using the value set for the name attribute.
layerIf the name attribute is specified, this will be ignored. Specifies the foreground layer, and it is always applied to the "fore" page.
leftSpecifies the horizontal position to move the element to during animation.
topSpecifies the vertical position to move the element to during animation.
widthSpecifies the width of the element during animation.
heightSpecifies the height of the element during animation.
opacitySpecifies the opacity (from 0 to 255) to animate to.
colorSpecifies the color during animation.
timeSpecifies the time in milliseconds for the animation. The default is 2000 milliseconds.2000
effectSpecifies the effect for the animation. The following keywords can be used:jswingdefeaseInQuadeaseOutQuadeaseInOutQuadeaseInCubiceaseOutCubiceaseInOutCubiceaseInQuarteaseOutQuarteaseInOutQuarteaseInQuinteaseOutQuinteaseInOutQuinteaseInSineeaseOutSineeaseInOutSineeaseInExpoeaseOutExpoeaseInOutExpoeaseInCirceaseOutCirceaseInOutCirceaseInElasticeaseOutElasticeaseInOutElasticeaseInBackeaseOutBackeaseInOutBackeaseInBounceeaseOutBounceeaseInOutBounce
  • Sample Code
[ptext layer=1 page=fore text="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]

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

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

;Wait for all animations to complete
[wa]

Animation complete

[wa] Wait for Animation Completion

  • Animation

Waits for all currently running animations to finish before proceeding with the next action.

Parameter Required Explanation Initial Value
No parameters are available.

[stopanim] Force Stop Animation

  • Animation

Forcibly stops the currently running animation.

Parameter Required Explanation Initial Value
name Specifies the name of the element for which the animation will be forcibly stopped.

[keyframe] Start defining keyframe animation

  • Animation

Start defining the keyframe animation.

The defined keyframe animation can be used with the [kanim] tag.

Explanation Tutorial

ParameterRequiredDescriptionInitial Value
nameSpecify the name of the keyframe animation.[kanim] tag will be used for it.
  • Sample Code
;---- Defining keyframe
[keyframe name="fuwafuwa"]

[frame p=40%  x="100" ]
[frame p=100% y="-200" opacity=0 ]

[endkeyframe]

;----- Execute the defined animation

[endkeyframe] End of keyframe animation definition

  • Animation

End the keyframe animation definition.

ParameterRequiredDescriptionInitial Value
No parameters can be specified.

[frame] Keyframe animation definition

  • Animation

Defines a single keyframe.[keyframe] and [endkeyframe] should be written between these tags.

Tutorial

ParameterRequiredDescriptionDefault Value
pSpecifies the position of the keyframe as a percentage (0%100%). For example, if specified as 50%, it will be the 2nd second in an animation with a total duration of 4 seconds. By omitting the 0% keyframe, you can inherit the previous animation state.
xSpecifies the animation amount along the X-axis in pixels. You can use an asterisk (*) to specify absolute positions.
Example) x="100" (move 100px to the right), x="*100" (move to a position 100px from the left edge of the screen).
ySpecifies the animation amount along the Y-axis in pixels. You can use an asterisk (*) to specify absolute positions.
zSpecifies the animation amount along the Z-axis in pixels. You can use an asterisk (*) to specify absolute positions.

Using this parameter allows for 3D representation, but it is only supported by certain browsers.
rotateAllows rotating the target. For example, to rotate by 180 degrees, specify 180deg.
rotateXAllows rotating the target around the X-axis.
rotateYAllows rotating the target around the Y-axis.
rotateZAllows rotating the target around the Z-axis.
scaleAllows scaling the target. To double the size, specify 2, and to halve the size, specify 0.5.
scaleXAllows scaling along the X-axis.
scaleYAllows scaling along the Y-axis.
scaleZAllows scaling along the Z-axis.
skewAllows specifying the skew.
skewXAllows specifying the X skew.
skewYAllows specifying the Y skew.
perspectiveAllows applying perspective effects. Supported by some browsers only.
opacitySpecifies the opacity as a value between 0 and 255. 0 makes it completely transparent.
OtherVarious CSS styles can be specified.

[kanim] Execute keyframe animation

  • Animation

Executes the keyframe animation. You need to define the keyframe animation in advance using the [keyframe] tag.

Tutorial

ParameterRequiredDescriptionDefault Value
nameSpecifies the name of the image or text to animate.
layerIf the name is not specified, you can specify the layer to animate all elements in that layer.
keyframeSpecifies the name of the keyframe animation to apply.
timeSpecifies the duration of the animation in milliseconds.
easingSpecifies the animation change pattern. The following keywords can be used:
ease (smooth transition from start to end),
linear (constant speed),
ease-in (starts slowly),
ease-out (ends slowly),
ease-in-out (starts and ends slowly),
Additionally, you can use the cubic-bezier function for custom easing.
countSpecifies the number of times the animation should repeat. You can specify infinite for an infinite loop.
delaySpecifies the delay before the animation starts. The default is 0, meaning no delay.
directionWhen looping the animation multiple times, specifies whether even-numbered loops should play in reverse. Specify alternate to play even loops in reverse.
modeSpecifies whether to maintain the final frame state (position, rotation, etc.) after the animation ends.forwards (default) keeps the final state. none resets to the initial state before the animation.

[stop_kanim] Stop keyframe animation

  • Animation

Stops the keyframe animation.

ParameterRequiredDescriptionDefault Value
nameSpecifies the name of the image or text to stop the animation.
layerIf no name is specified, you can specify the layer to stop the animation of all elements in that layer.

[xanim] Execute generic animation

  • Animation

Available from V515 onward.

This is a generic animation execution tag that combines the functions of the [anim] and [kanim] tags.

You can execute keyframe animations defined earlier with the [keyframe] tag by specifying its keyframe parameter, or you can directly specify the parameters of the elements to be changed like the [anim] tag.

ParameterRequiredDescriptionDefault Value
nameSpecifies the name of the image or text to animate.
layerIf no name is specified, you can specify the layer to animate all elements in that layer.
keyframeSpecifies the name of the keyframe animation to apply.
timeSpecifies the duration of the animation in milliseconds.
easingAll the keywords available for the [anim] tag and [kanim] tag can be used.ease
countSpecifies the number of times to play the animation. Use infinite to loop it infinitely.1
delaySpecifies the delay before starting the animation. The default value is 0, meaning no delay.0
directionWhen looping the animation multiple times, you can set whether to reverse the animation for even-numbered repetitions. Use alternate for reverse playback on even repetitions.normal
modeSpecifies whether to maintain the final frame's state (position, rotation, etc.) after the animation ends. Use forwards (default) to maintain it, or none to revert to the state before animation.forwards
svgSpecifies an SVG file. Place it in the image folder. This allows animation along the defined inside the SVG file.
svg_xWhen specifying an SVG file, you can set whether to align the X-coordinate to . Specify true or false.true
svg_yWhen specifying an SVG file, you can set whether to align the Y-coordinate to . Specify true or false.true
svg_rotateWhen specifying an SVG file, you can set whether to align the rotation angle to . Specify true or false.false
waitSpecifies whether to wait for the animation to complete.true or false.false
OtherOther parameters available for the [anim] tag, as well as various CSS properties, can be animated.
  • Sample Code
; Apply the keyframe animation infinitely
[keyframe name="yoko"]
[frame p="0%" x="0"]
[frame p="100%" x="100"]
[endkeyframe]
[xanim name="akane" keyframe="yoko" count="infinite" time="1000" direction="alternate" easing="linear"]

; Move 500px to the right over 2 seconds, without waiting for the animation to finish before moving to the next
[xanim name="akane" x="500" time="2000"]

[stop_xanim] Stop [xanim]

  • Animation

Available from V515 onward.
Stops the animation that was started with the [xanim] tag.

ParameterRequiredDescriptionDefault Value
nameSpecifies the name of the image or text to stop the animation.
layerIf no name is specified, you can specify the layer to stop the animation for all elements in that layer.
completeIf true, it moves instantly to the position where the animation was supposed to reach.If false, it stops at the current position.false

[camera] Move the Camera

  • Camera Operations

You can create effects such as zooming and panning with the camera.
By using the camera feature, you can focus on a character's expression or zoom into different parts of an illustration for various effects.

To use the camera feature, you must set useCamera to true in Config.tjs.
Also, when the camera function is enabled, screen centering ScreenCentering will be disabled.

The camera coordinates are set with the screen center at (x=0 y=0). For example, the top-right of the screen is at x=200 y=200, and the bottom-left is at x=-200 y=-200.

To reset 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
After the camera effect is finished, make sure to reset the camera position using [reset_camera]. If the camera is not reset, you cannot use background change [bg] tags, etc.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
timeSpecifies the time in milliseconds for the camera to move to the coordinates.1000
xSpecifies the X-coordinate for the camera movement.
ySpecifies the Y-coordinate for the camera movement.
zoomSpecifies the zoom level of the camera. For example, specifying 2 will double the zoom.
rotateSpecifies the tilt of the camera. For example, specifying 20 will tilt the camera by 20 degrees.
from_xSpecifies the starting X-coordinate of the camera movement.
from_ySpecifies the starting Y-coordinate of the camera movement.
from_zoomSpecifies the starting zoom level of the camera.
from_rotateSpecifies the starting tilt of the camera.
waitSpecifies whether to wait for the camera movement to complete. Use true or false. If false, the game will continue while the camera is moving.true
layerSpecifies the layer to apply the camera effect. For the background, use base, for foreground layers use numbers 0 and above. By specifying this, you can limit the camera's effect to specific layers. Normally, it affects all layers.layer_camera
ease_typeSpecifies the type of camera movement effect.
ease(Smooth transition from start to end)
linear(Constant speed transition)
ease-in(Start slowly)
ease-out(End slowly)
ease-in-out(Start and end slowly)
ease
  • Sample Code
[camera zoom=2 x=180 y=100 time=1000]
[camera x=-180 y=100 time=2000]
[camera zoom=2 from_zoom=3 x=180 y=100 time=1000]

; Reset the camera position to the original
[reset_camera]

[reset_camera] Reset the Camera

  • Camera Operations

Resets the camera position to its default value.

★Important
[camera] After finishing the camera effect using the [camera] tag, make sure to reset the camera position using this tag.
If you don't, there might be issues when changing the background or other effects.

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
timeSpecifies the time in milliseconds for the camera to move.1000
waitSpecifies whether to wait for the camera movement to complete. Use true or false. If false, the game will proceed while the camera is moving.true
layerSpecifies the layer to apply the camera effect. Use base for background, and 0 or higher numbers for foreground layers. This limits the camera effect to specific layers. By default, the effect applies to all layers.layer_camera
ease_typeSpecifies the camera movement effect.
ease (Smooth transition from start to end)
linear (Constant speed transition)
ease-in (Starts slowly)
ease-out (Ends slowly)
ease-in-out (Starts and ends slowly)
ease

[wait_camera] Wait for the Camera Effect

  • Camera Operations

If the camera is performing an effect, you can wait for it to finish.wait=false can be used in combination with the [camera] tag.

For example, you can use this for a scene where "the camera moves in the background while the text is being shown. However, wait for the camera to finish moving when progressing to the next message."

Explanation Tutorial

ParameterRequiredDescriptionDefault Value
No parameters can be specified.
  • Sample Code
[camera zoom=2 x=180 y=100 time=10000 wait=false]
Camera effect in progress[p]
Still waiting for camera effect[p]
Wait for the camera effect to finish[wait_camera]
Camera effect finished, proceeding[p]

[s] Stop the Game

  • System Operations

Stops the execution of the scenario file.

Used in scenes where you are waiting for the player's selection, such as after showing choice options with [link][glink][button] tags, followed by [s].

In other words, when you reach [s], the player can no longer click or tap to progress the scenario, so you must provide a way for the player to jump the scenario.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[link target=*select1]【1】Choice Option 1[endlink][r]
[link target=*select2]【2】Choice Option 2[endlink][r]
[s]

[wait] Wait

  • System Operations

Inserts a wait period. During the time specified by the time attribute, the game will be unresponsive.

ParameterRequiredDescriptionDefault
timeSpecifies the wait time in milliseconds.
  • Sample Code
Waiting for 2 seconds……

; Stops processing for 2000 milliseconds (2 seconds)
[wait time=2000]

Waited for 2 seconds[p]

[wait_cancel] Cancel Wait

  • System Operations

[wait] tag allows you to cancel the wait state.

This is used when you forcefully jump the scenario by a button click or other means during a [wait], and then cancel the wait at the jump destination.

Tutorial Explanation

ParameterRequiredDescriptionDefault
No parameters can be specified.

[close] Close the Window

  • System Operations

For PC applications, this will close the window.
For browser games, this will close the tab.

ParameterRequiredDescriptionDefault
askWhether to confirm before closing.true or false can be specified. The default is true.true

[savesnap] Create a Save Snapshot

  • System Operations

Saves the current gameplay status temporarily. After that, by using the [setsave] tag, the saved data recorded here will be stored.

ParameterRequiredDescriptionDefault
titleSpecifies the title for the saved data.

[autosave] Execute Auto Save

  • System Operations

When this tag is reached, the gameplay status is automatically saved.

[autosave] If there is data saved, sf.system.autosave will be set to true.

By preparing a judgment logic like the sample code before the title screen, you can create a mechanism to resume the game from the last saved status.

ParameterRequiredDescriptionDefault
titleSpecifies the title for the saved data.
  • Sample Code
Checking for auto save data[l][r]

[if exp="sf.system.autosave === true"]

  Auto-saved data exists. Do you want to load it?[r]
  [link target=select1]【1】Yes[endlink][r]
  [link target=select2]【2】No[endlink][r]
  [s]

  *select1
  Executing load[l]
  [autoload]

  *select2
  [cm]
  Not loading[l][r]

[else]

  No auto-saved data exists[l][r]

[endif]

Auto-save executed[autosave][l][r]
Please restart the game[s]

[autoload] Execute Auto Load

  • System Operations

[autosave] Loads the data saved by the [autosave] tag.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[checkpoint] Register Checkpoint

  • System Operations

[rollback] You can return to the checkpoint location using the [rollback] tag.
Creating too many checkpoints may cause the game to slow down.
Keep the number of checkpoints to a minimum, and delete unnecessary ones using the [clear_checkpoint] tag.

ParameterRequiredDescriptionDefault
nameSpecifies the checkpoint name.
  • Sample Code
[checkpoint name="p1"]

;Here you can change various elements on the screen

;You can return to the checkpoint location from anywhere
[rollback checkpoint="p1"]

[rollback] Rollback

  • System Operations

[checkpoint] You can return to the location you passed through with the [checkpoint] tag from anywhere.

ParameterRequiredDescriptionDefault
checkpointSpecifies the checkpoint name.
variable_overtrue or false can be specified. If you specify true, the current game variables will be carried over after the rollback. The default is truetrue
bgm_overtrue or false can be specified. If you specify true, the BGM will be carried over after the rollback. The default is falsefalse
  • Sample Code
[checkpoint name="p1"]

;Change various elements on the screen here

;You can return to the checkpoint location from anywhere
[rollback checkpoint="p1"]

[clear_checkpoint] Delete Checkpoint

  • System Operations

[checkpoint] You can clear the checkpoint tag.
Checkpoints are useful, but if you add too many unnecessarily, it may affect the game's performance.
Be sure to delete unnecessary checkpoints regularly.

ParameterRequiredDescriptionDefault
nameSpecify the name of the checkpoint to delete. If not specified, all checkpoints will be deleted.
  • Sample Code
;Create a checkpoint
[checkpoint name="p1"]

[clear_checkpoint name="p1"]

[screen_full] Full Screen

  • System Operations

This will make the game screen full screen. Calling it again will return the game from full screen to windowed mode.

Works only in PC games.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[screen_full]

[dialog] Display Dialog

  • System Operations

Displays a confirmation dialog.

There are the following types of dialogs:
alertconfirminput

input is deprecated. It is not recommended for use.

ParameterRequiredDescriptionDefault
typeSpecify the type of dialog using one of the following keywords:
alert(warning)
confirm(confirmation)
input(input)
alert
nameFor input dialogs, specify the variable name to store the input value.f.name etc.tf.dialog_value
textThe message to be displayed in the dialog.
storageSpecify the scenario file to jump to when the OK button is pressed. If omitted, the current scenario file is used.
targetSpecify the label to jump to when the OK button is pressed. If omitted, the start of the scenario file is used.

If both storage and target are omitted, the script will just move to the next tag.
storage_cancelSpecify the scenario file to jump to when the Cancel button is pressed. If omitted, the current scenario file is used.
target_cancelSpecify the label to jump to when the Cancel button is pressed. If omitted, the start of the scenario file is used.
label_okChange the text of the OK button.OK
label_cancelChange the text of the Cancel button.Cancel
  • Sample Code
;Warning
[dialog type="alert" text="This area ahead is dangerous."]

;Confirm and jump to the scenario if OK
[dialog type="confirm" text="Do you really want to proceed?" target="ok" target_cancel="cancel"]

*ok
Proceed[p]
[jump target=input]

*cancel
I decided not to proceed[p]
[jump target=input]

*input
;input is deprecated!!
;Input dialog
[dialog type="input" name="f.name" text="Please tell me your name" target="next"]

*next
Your name is [emb exp="f.name"] right?[s]

[start_keyconfig] Enable Key Configuration Operations

  • System Operations

[stop_keyconfig] enables the key configuration that was disabled using this tag.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[start_keyconfig]

[stop_keyconfig] Disable Key Configuration Operations

  • System Operations

Temporarily disables the key configuration.[start_keyconfig] can be used to re-enable it.

The following operations will be disabled:
・Mouse operations
・Keyboard operations
・Mouse swipe operations

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
Key config is enabled[p]
[stop_keyconfig]
This is disabled[p]
This is also disabled[p]
[start_keyconfig]
This is enabled again[p]

[apply_local_patch] Apply Patch File

  • System Operations

Available from V470 onward.Only valid when distributed as a PC application.

This tag applies the patch file to the game when reached.

When updating files outside the data folder (tyrano main files), use the update process at startup, not this tag.

If the patch file is large, the game may temporarily stop. It would be kind to show a text such as "Loading..." to inform the player.

ParameterRequiredDescriptionDefault
fileSpecify the path of the patch file. The path should start from the exe file's hierarchy.
reloadtrue or false can be specified. If true is specified, the game will automatically restart after the patch is applied.false
  • Sample Code
[apply_local_patch file="test.tpatch" ]

[check_web_patch] Check for Updates

  • System Operations

Available from V470 onward.Only valid when distributed as a PC application.

If an update patch is available on the server, a message will automatically appear prompting the user to apply the patch (the game must be restarted for the patch to take effect).

You will need to rent a server and place the json file and tpatch file on it.

ParameterRequiredDescriptionDefault
urlSpecify the URL of the patch json file.
  • Sample Code
[check_web_patch url="http://tyrano.jp/patch/mygame.json" ]

[closeconfirm_on] Enable Exit Confirmation

  • System Operations

After passing this tag, each time the tag progresses, the game will be in an "unsaved" state. When the game is in the "unsaved" state" and the player tries to close the game, a confirmation dialog will appear.

The game becomes "saved" when the player saves or loads the game.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
Even if you try to close here, there will be no exit confirmation[p]
Even if you try to close here, there will be no exit confirmation[p]
[closeconfirm_on]
From here, if you try to close while unsaved, an exit confirmation will appear[p]
From here, if you try to close while unsaved, an exit confirmation will appear[p]
[closeconfirm_off]
Even if you try to close here, there will be no exit confirmation[p]
Even if you try to close here, there will be no exit confirmation[p]

[closeconfirm_off] Disable Exit Confirmation

  • System Operations

After passing this tag, when the game is in the "unsaved" state, the player will not receive the confirmation dialog if they try to close the game.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[glyph] Click-Wait Glyph Settings

  • System Design Changes

The click-wait glyph (the image displayed at the end of the message when waiting for a click using tags like [l] or [p]) can be customized. You can change the image used, or display it at a fixed position on the screen rather than at the end of the message.

The following types of content are available for the click-wait glyph:

① Image file (use the line parameter) – GIF and WebP are also acceptable
② Shape (use the figure parameter)
③ Frame Animation (use the koma_anim parameter)
④ Directly specified HTML (use the html parameter) – for advanced users

Instead of an image, you can choose from preset shapes for the click-wait glyph. You can freely specify the color of the shapes.

You can choose and apply preset animations, or define custom keyframe animations using the [keyframe] tag.

Note that the settings for the click-wait glyph are reset each time the [glyph] tag is processed (including parameters that were not specified). Be aware that you cannot define settings across multiple tags like [position] or [font].

Explanation Tutorial

ParameterRequiredDescriptionDefault
lineSpecifies the image to be used for the glyph. By default, images are searched in the tyrano/images/system folder (where nextpage.gif is located). You can change the folder using the folder parameter.nextpage.gif
fixIf you specify true, the glyph will be displayed at a fixed position on the screen instead of at the end of the message.false
leftSpecifies the horizontal position of the glyph. (Only effective if fix is set to true)0
topSpecifies the vertical position of the glyph. (Only effective if fix is set to true)0
folderSpecifies the folder to search for the glyph's image.tyrano/images/system
widthSpecifies the horizontal width of the glyph in pixels.
heightSpecifies the vertical height of the glyph in pixels.
marginlSpecifies the left margin of the glyph in pixels.3
marginbSpecifies the bottom margin of the glyph in pixels.0
animSpecifies the animation to apply to the glyph. The following keywords can be used:
flash_momentary (Instant flash)
flash (Smooth flash)
spin_x (Rotate around X-axis)
spin_y (Rotate around Y-axis)
spin_z (Rotate around Z-axis)
bounce (Bounce)
rotate_bounce (Bounce while rotating)
soft_bounce (Soft bounce)
zoom (Zoom)
timeSpecifies the duration of the animation in milliseconds.
figureSpecifies the shape to use for the glyph from the following keywords:
circle (Circle)
triangle (Triangle)
v_triangle (Downward triangle)
rectangle (Rectangle)
diamond (Diamond)
start (Star)
colorSpecifies the color of the shape when using a shape for the glyph.0xFFFFFF
nameSpecifies the class name to apply to the glyph. (For advanced users)
htmlSpecifies the HTML content for the glyph. (For advanced users)
keyframeSpecifies the name of the keyframe animation to apply. It cannot be used with anim.
easingSpecifies the easing pattern for the animation. The following keywords can be used:
ease (Smooth playback at the start and end)
linear (Constant speed playback)
ease-in (Slow start)
ease-out (Slow end)
ease-in-out (Slow start and end)
You can also specify a custom easing function using cubic-bezier.
countSpecifies the number of times the animation will repeat. Use infinite for an infinite loop.
delaySpecifies the delay before the animation starts. The default is 0, meaning no delay.
directionSpecifies whether to reverse the animation on every even loop. Use alternate for reverse playback on every second loop.
modeSpecifies whether to retain the state (position, rotation, etc.) of the last frame after the animation ends. Use forwards (default) to retain it, or none to revert to the pre-animation state.
koma_animSpecifies the image to use for frame animation. The image must contain all frames lined up horizontally in one image file.
koma_countSpecifies the number of frames in the frame animation. If specified, you can omit koma_width.
koma_widthSpecifies the width of one frame in the frame animation in pixels. If specified, you can omit koma_count.
koma_anim_timeSpecifies the duration of one cycle of the frame animation in milliseconds.1000
  • Sample Code
[glyph]
Default click-wait glyph (GIF animation)[p]

[glyph fix="true" left="640" top="600"]
Fixed position at the bottom center of the screen[p]

[glyph figure="rectangle" anim="bounce" width="5" color="0xCEE7F5" marginl="15"]
Recreate the default click-wait glyph using a shape and animation[p]

[glyph figure="v_triangle" anim="flash_momentary" delay="200"]
A downward triangle that flashes momentarily[p]

[glyph figure="diamond" anim="flash"]
A diamond that flashes smoothly[p]

[glyph figure="circle" anim="soft_bounce" marginl="10"]
A circle that bounces softly[p]

[glyph figure="rectangle" anim="rotate_bounce"]
A rectangle that bounces while rotating[p]

[glyph figure="star" anim="spin_y" color="yellow"]
A star spinning around the Y-axis[p]

[glyph figure="star" anim="spin_x" color="yellow"]
A star spinning around the X-axis[p]

[glyph figure="star" anim="spin_z" color="yellow"]
A star spinning around the Z-axis[p]

[glyph figure="star" anim="zoom" color="yellow"]
A star that zooms[p]

[glyph koma_anim="stepanim.jpg" koma_count="4" width="28"]
Frame animation[p]

[glyph html='<span style="color: white; font-size: 20px;">🥺</span>']
Directly specified HTML[p]

[keyframe name="yoko"]
[frame p="0%" x="0"]
[frame p="50%" x="10"]
[frame p="100%" x="0"]
[endkeyframe]
[glyph line="nextpage.gif" easing="linear" keyframe="yoko"]
Apply the custom keyframe animation I defined[p]

[glyph_skip] Skip Mode Glyph Settings

  • System Design Changes

You can set the glyph displayed during skip mode.

use parameter is specified
delete parameter is specified
・Neither is specified

The behavior differs in three patterns.

If the use parameter is specified, you can treat elements already displayed on the screen, such as [ptext], as skip mode glyphs.

If the delete parameter is specified, you can delete the definitions set by the [glyph_skip] tag.

If neither is specified, it behaves the same as the [glyph] tag.

ParameterRequiredDescriptionDefault
useYou can treat elements already displayed on the screen as skip mode glyphs.[ptext] and [image] name settings can be specified here.
deleteIf true is specified, it will execute the process of deleting the glyph definition.
Others[glyph] parameters can be specified, but the fix parameter will be fixed as true.
  • Sample Code
; Set fixed skip mode glyph, set fixed auto mode glyph
[glyph_skip fix="true" left="10" top="10" figure="diamond" anim="flash"  color="orange" time="400" width="80"]
[glyph_auto fix="true" left="10" top="10" figure="star"    anim="spin_y" color="green" time="5000" width="80"]

; Regarding auto mode glyphs,
; You can set auto mode glyphs at the end of messages along with fixed glyphs
[glyph_auto html="⌛" anim="flash"]

; Treating text displayed with [ptext] as skip glyph and auto glyph
[ptext     name="glyph_skip" layer="message0" x="20" y="10" text="SKIP!" edge="4px orange" size="30"]
[ptext     name="glyph_auto" layer="message0" x="20" y="10" text="AUTO" edge="4px green" size="30"]
[glyph_skip use="glyph_skip"]
[glyph_auto use="glyph_auto"]

; Erase all of the above settings
[glyph_auto delete="true" fix="true"]
[glyph_auto delete="true" fix="false"]
[glyph_skip delete="true"]

[glyph_auto] Auto Mode Glyph Settings

  • System Design Changes

You can set the glyph displayed during auto mode.

use parameter specified
delete parameter specified
・Neither specified

The behavior differs in three patterns.

If the use parameter is specified, you can treat elements already displayed on the screen, such as [ptext], as fixed auto mode glyphs on the screen.

If the delete parameter is specified, you can delete the definitions set by the [glyph_auto] tag.

If neither is specified, it behaves the same as the [glyph] tag.

ParameterRequiredDescriptionDefault
fixIf you want to set a fixed glyph on the screen, specify true, and if you want to set a glyph at the end of the message, specify false. Only for auto mode glyphs, both fixed and non-fixed glyphs can be set.
useYou can treat elements already displayed on the screen as fixed auto mode glyphs.[ptext] and [image] name settings can be specified here.
deleteIf true is specified, it will execute the process of deleting the glyph definition.
Others[glyph] parameters can be specified.

[showmenubutton] Display Menu Button

  • System Design Changes

Displays the menu button.

ParameterRequiredDescriptionDefault
keyfocusIf true is specified, the button can be selected using the keyboard or gamepad. Additionally, specifying values like 1 or 2 allows you to specify the order of selection when using the focus_next action in key configuration.false
  • Sample Code
[showmenubutton]

[hidemenubutton] Hide Menu Button

  • System Design Changes

Hides the menu button.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[hidemenubutton]

[body] Game Screen and Outside Area Settings

  • System Design Changes

You can customize the game screen size and the black borders outside the game screen. You can change the color of the black border, set an image for the black border, and change the game screen size during gameplay.

★Note
The changes made with this tag are not restored when loading save data.

ParameterRequiredDescriptionDefault
bgimageSpecify the image to be set as the background outside the game screen.bgimage should be placed in the appropriate folder.
bgrepeatSpecify the display pattern for the background image. By default, it repeats both horizontally and vertically.
repeat-x (repeat only horizontally)
repeat-y (repeat only vertically)
round (stretch to cover the entire screen while maintaining aspect ratio)
no-repeat (no repetition)
bgcolorSpecify the background color in0xRRGGBB format.bgimage will be ignored if it is set.
bgcoverSpecify whether to stretch the background image to cover the entire screen. Specifytrue orfalse.false
scWidthYou can change the original width of the game screen during gameplay. This tag is intended for responsive design.Config.tjs equivalent toscWidth.
Note: "Original" here refers to the state before scaling the game screen to fit the window size.
scHeightYou can change the original height of the game screen during gameplay. This tag is intended for responsive design.Config.tjs equivalent toscHeight.
  • Sample Code
[body bgimage="back.png" bgcolor="black" ]

[title] Title Specification

  • System Design Changes

Specifies the game title. For example, changing the title for each chapter can make it easier for players to follow the story.

On PC applications, it changes the window title, while in browser-based games, it changes the tab title.

Until this tag is processed, the title is as follows:
Immediately after launching the game … Loading TyranoScript
After loading … The text set inSystem.title in Config.tjs

ParameterRequiredDescriptionDefault
nameSpecify the title you want to display
  • Sample Code
[title name="Updated Title"]

[cursor] Set an Image for the Mouse Cursor

  • System Design Changes

You can set an image for the mouse cursor. Place the image in the data/image folder. Supported image formats are gif, png, and jpg.

The cursor image can be changed at any time during the game. If you want to specify the default cursor before passing through the [cursor] tag, modify cursorDefault in data/system/Config.tjs.

To revert to the system’s default cursor, specify default.

★ Hint
The recommended size for a mouse cursor image is 32x32 pixels or smaller.

The maximum image size that can be used as a mouse cursor varies by browser, but generally, it is up to 128x128 pixels. Larger images cannot be set as a mouse cursor.

Additionally, if you set an image larger than 32x32 pixels, the cursor may revert to the default when moving to the edge of the screen.

★ Note
When developer tools are open, automatic hiding of the mouse cursor may not work properly.

ParameterRequiredDescriptionDefault
storageSpecifies the image file for the mouse cursor. Place the image in the data/image folder. Setting it to default will revert to the default cursor.
xMoves the cursor image to the left by the specified number of pixels.0
yMoves the cursor image upward by the specified number of pixels.0
typeIf you want to change the cursor when hovering over buttons, specify pointer for this parameter.default
auto_hideDetermines whether the cursor is automatically hidden after a period of inactivity. true enables auto-hide, false keeps the cursor always visible. You can also specify a time in milliseconds (e.g., 2000) to set how long before it is hidden.
click_effectEnables or disables a click effect. Specify true or false.
e_widthSpecifies the width of the click effect in pixels.
e_opacitySpecifies the initial opacity of the click effect (0 to 255).
e_timeSpecifies the duration of the click effect in milliseconds.
e_colorSpecifies the color of the click effect.
e_blendSpecifies the blending mode of the click effect. It supports the same keywords as the [layermode] tag’s mode parameter, such as normal or overlay.
e_scaleSpecifies the scaling percentage of the click effect. For example, setting 200 will make the effect grow to 200% of its original size.
  • Sample Code
; Change the default mouse cursor image
[cursor storage="my_cursor_32x32.png"]

; Change the cursor image when hovering over buttons
[cursor storage="my_cursor_pointer_32x32.png" type="pointer"]

; Hide the cursor after a period of inactivity
[cursor auto_hide="true"]

; Enable click effects
[cursor click_effect="true"]

; Customize click effect settings
[cursor e_width="200" e_color="0xff0000" e_time="600" e_scale="200" e_blend="normal" e_opacity="100"]

; Reset click effect to default settings
[cursor e_width="100" e_color="0xffffff" e_time="300" e_scale="120" e_blend="overlay" e_opacity="204"]

[sysview] System Screen Modification

  • System Design Changes

You can change the HTML files used for system-related features.

ParameterRequiredDescriptionDefault
typeCan specify save, load, backlog, or menu.
storageSpecify the path of the HTML file.
  • Sample Code
[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]

[save_img] Change Save Data Thumbnail

  • System Design Changes

You can specify any image for the save data thumbnail.

Normally, the save data thumbnail captures the game screen at the moment of saving. However, by using the [save_img] tag, you can set a specific image as the thumbnail.

Image files should be placed in the data/bgimage folder.

If you specify default in the storage parameter, it will revert to the standard thumbnail (captured game screen).

Tutorial Guide

ParameterRequiredDescriptionDefault
storageSpecify the image file to use as the thumbnail. Place it in the bgimage folder. If you specify default, it will revert to a screen capture.
folderIf you want to retrieve the image from a folder other than bgimage, specify it here. For example, others, fgimage, image, etc.
  • Sample Code
; Change the save thumbnail image
[save_img storage="my_capture.png" ]

[set_resizecall] Responsive Design Support

  • System Design Changes

You can call a scenario when the aspect ratio of the player's device screen changes.

For example, when switching from portrait to landscape mode, you can execute a script to adjust coordinates for landscape mode.

Conversely, when switching from landscape to portrait mode, you can execute a script to adjust coordinates for portrait mode.

By implementing this, you can create games that support various layouts.

Note that the called scenario must execute [return] at the end.

Check the official practical technique guide for more details.
https://tyrano.jp/usage/advance/responsive

Tutorial Guide

ParameterRequiredDescriptionDefault
storageSpecify the scenario file name to jump to. If omitted, the current scenario file is assumed.
targetSpecify the label name to jump to. If omitted, it jumps to the beginning of the scenario file.
  • Sample Code
[call storage="resize.ks"]

; Declare that resize.ks will be called when the screen aspect ratio changes
[set_resizecall storage="resize.ks" ]

[dialog_config] Change Confirmation Dialog Design

  • System Design Changes

You can change the design of confirmation dialogs that appear when confirming actions such as returning to the title screen. There are four types of tags for changing the dialog design:

[dialog_config]
[dialog_config_ok]
[dialog_config_ng]
[dialog_config_filter]

★ Important
The changes made with this tag are not restored when loading a saved game. Therefore, temporarily modifying dialog design mid-game after loading a save may be risky. It is recommended to specify this tag in the startup phase before transitioning to the title screen (e.g., in first.ks).

ParameterRequiredDescriptionDefault
btntypeSpecify the button type collectively. Available keywords follow the [glink] tag’s color parameter.
btnwidthSpecify the button width in pixels.
btnmarginSpecify the outer margin of buttons in pixels. Supports comma-separated values, e.g., 10,20 means a vertical margin of 10 and a horizontal margin of 20.
btnpaddingSpecify the inner padding of buttons in pixels. Supports comma-separated values, e.g., 10,20 means a vertical padding of 10 and a horizontal padding of 20.
fontsizeSpecify the text size of the message.
fontboldSet to true to make the message text bold.
fontfaceSpecify the font of the message text.
fontcolorSpecify the font color of the message text.
btnfontsizeSpecify the button text size.
btnfontboldSet to true to make the button text bold.
btnfontfaceSpecify the button font.
btnfontcolorSpecify the button text color.
boxcolorSpecify the background color of the message box.
boxopacitySpecify the opacity of the message box between 0 and 255 (255 is fully opaque).
boxradiusSpecify the radius of rounded corners for the message box.
boxwidthSpecify the width of the message box in pixels.
boxheightSpecify the height of the message box in pixels.
bgcolorSpecify the background color outside the dialog box.
bgopacitySpecify the opacity of the background outside the dialog between 0 and 255 (255 is fully opaque).
gotitleModify the text displayed when confirming whether to return to the title screen.
okposSpecify the position of the "OK" button: left for left placement, right for right placement.
ingameSet to true to confine the confirmation dialog within the game screen instead of the full display. false reverts to normal.
  • Sample Code
[dialog_config bgimg="pattern.jpg" bgimgrepeat="repeat" bgopacity="66"]
[dialog_config boxradius="20" boxcolor="#F0E3FD" boximg="../bgimage/title.jpg" boximgpos="right bottom" boximgsize="200" boxopacity="200"]
[dialog_config openeffect="rotateIn" opentime="800" closeeffect="rotateOut" closetime="800"]

[dialog_config_ok] Change Confirmation Dialog Design (OK Button)

  • System Design Changes

You can change the design of the confirmation dialog that appears when confirming actions such as returning to the title screen. There are four types of tags for modifying the dialog design:

[dialog_config]
[dialog_config_ok]
[dialog_config_ng]
[dialog_config_filter]

This tag allows you to configure the OK button settings.

★ Important
The changes made with this tag are not restored when loading a saved game. Therefore, temporarily modifying the dialog after the scenario starts or after loading a save for visual effects can be risky. It is recommended to specify this tag in the startup phase before transitioning to the title screen (e.g., in first.ks).

★ Important
When passing through [glink_config_ok] with the img parameter specified, any previous OK button settings will be discarded. In other words, when using an image for the button, all configurations must be written in a single [glink_config_ok] tag. (This does not apply to text buttons.)

ParameterRequiredDescriptionDefault
textSpecify the text for the OK button.
typeSpecify the type of OK button. Available keywords follow the [glink] tag’s color parameter.
widthSpecify the width of the OK button in pixels.
marginSpecify the outer margin of the OK button in pixels. Supports comma-separated values, e.g., 10,20 means a vertical margin of 10 and a horizontal margin of 20.
paddingSpecify the inner padding of the OK button in pixels. Supports comma-separated values, e.g., 10,20 means a vertical padding of 10 and a horizontal padding of 20.
fontsizeSpecify the text size of the OK button.
fontboldSet to true to make the button text bold.
fontfaceSpecify the font for the OK button.
fontcolorSpecify the text color of the OK button.
imgUse an image for the OK button. Specify the file path relative to the image folder.
imgwidthSpecify the width of the OK button image in pixels.
enterimgImage file for when the mouse hovers over the OK button. Searched in the image folder.
activeimgImage file for when the OK button is pressed. Searched in the image folder.
clickimgImage file for after clicking the OK button. Searched in the image folder.
enterseSound file played when hovering over the OK button. Searched in the sound folder.
leaveseSound file played when moving the mouse away from the OK button. Searched in the sound folder.
clickseSound file played when pressing the OK button. Searched in the sound folder.
btnimgtypeIf set to bg, the images specified in img, enterimg, etc., will be used as the "background" of the button. (By default, specifying an img removes the text and turns the image itself into a button, assuming the "OK" text is already part of the image design.)
  • Sample Code
[dialog_config_ok text="OK"]
[dialog_config_ok width="200" margin="10,30" type="btn_04_green"]

; Use an image button (must be defined in a single tag)
[dialog_config_ok img="dialog/ok.png" width="100" margin="20" enterimg="dialog/ok_enter.png" activeimg="dialog/ok_active.png" clickimg="dialog/ok_click.png" enterse="lab1.mp3" leavese="lab2.mp3" clickse="lab3.mp3"]

[dialog_config_ng] Change Confirmation Dialog Design (Cancel Button)

  • System Design Changes

You can change the design of the confirmation dialog that appears when confirming actions such as returning to the title screen. There are four types of tags for modifying the dialog design:

[dialog_config]
[dialog_config_ok]
[dialog_config_ng]
[dialog_config_filter]

This tag allows you to configure the Cancel button settings.

★ Important
The changes made with this tag are not restored when loading a saved game. Therefore, temporarily modifying the dialog after the scenario starts or after loading a save for visual effects can be risky. It is recommended to specify this tag in the startup phase before transitioning to the title screen (e.g., in first.ks).

★ Important
When passing through [glink_config_ng] with the img parameter specified, any previous Cancel button settings will be discarded. In other words, when using an image for the button, all configurations must be written in a single [glink_config_ng] tag. (This does not apply to text buttons.)

ParameterRequiredDescriptionDefault
textSpecify the text for the Cancel button.
typeSpecify the type of Cancel button. Available keywords follow the [glink] tag’s color parameter.
widthSpecify the width of the Cancel button in pixels.
marginSpecify the outer margin of the Cancel button in pixels. Supports comma-separated values, e.g., 10,20 means a vertical margin of 10 and a horizontal margin of 20.
paddingSpecify the inner padding of the Cancel button in pixels. Supports comma-separated values, e.g., 10,20 means a vertical padding of 10 and a horizontal padding of 20.
fontsizeSpecify the text size of the Cancel button.
fontboldSet to true to make the button text bold.
fontfaceSpecify the font for the Cancel button.
fontcolorSpecify the text color of the Cancel button.
imgUse an image for the Cancel button. Specify the file path relative to the image folder.
imgwidthSpecify the width of the Cancel button image in pixels.
enterimgImage file for when the mouse hovers over the Cancel button. Searched in the image folder.
activeimgImage file for when the Cancel button is pressed. Searched in the image folder.
clickimgImage file for after clicking the Cancel button. Searched in the image folder.
enterseSound file played when hovering over the Cancel button. Searched in the sound folder.
leaveseSound file played when moving the mouse away from the Cancel button. Searched in the sound folder.
clickseSound file played when pressing the Cancel button. Searched in the sound folder.
btnimgtypeIf set to bg, the images specified in img, enterimg, etc., will be used as the "background" of the button. (By default, specifying an img removes the text and turns the image itself into a button, assuming the "Cancel" text is already part of the image design.)
  • Sample Code
[dialog_config_ng text="Cancel"]
[dialog_config_ng width="200" margin="10,30" type="btn_04_white"]

[dialog_config_filter] Change Confirmation Dialog Design (Filter)

  • System Design Changes

You can change the design of the confirmation dialog that appears when confirming actions such as returning to the title screen. There are four types of tags for modifying the dialog design:

[dialog_config]
[dialog_config_ok]
[dialog_config_ng]
[dialog_config_filter]

This tag allows you to specify a filter that applies to the entire background when the dialog is displayed. The available parameters are the same as those in the [filter] tag.

★ Important
The changes made with this tag are not restored when loading a saved game. Therefore, it is risky to temporarily modify the dialog for visual effects after the scenario starts or after loading a save. It is recommended to write this tag during the startup phase before transitioning to the title screen (e.g., in first.ks).

ParameterRequiredDescriptionDefault
layerSpecify the layer to apply the filter. If omitted or if all is specified, the effect applies to the entire game screen.
nameSpecify the name of the specific element to apply the filter to.
grayscaleSpecify a value from 0 (default) to 100 to convert the image to grayscale.
sepiaSpecify a value from 0 (default) to 100 to convert the image to sepia tone.
saturateSpecify a value from 0 to 100 (default) to change the saturation (vividness) of the image.
hueSpecify a value from 0 (default) to 360 to change the hue of the image.
invertSpecify a value from 0 (default) to 100 to invert the tone of the image.
opacitySpecify a value from 0 to 100 (default) to change the transparency of the image.
brightnessSpecify a value based on 100 (default) to change the brightness of the image. 0 makes the image dark, and values greater than 100 make it brighter.
contrastSpecify a value from 0 to 100 (default) to change the contrast of the image.
blurSpecify a value from 0 (default) to any value to blur the image.
  • Sample Code
[dialog_config_filter blur="15"]

[mode_effect] Mode Change Effects

  • System Design Changes

You can display effects in the center of the screen at the following timings:

① When skip mode starts
② When auto mode starts
③ When skip mode or auto mode stops
④ When hold skip mode starts
⑤ When hold skip mode stops

※ Hold skip refers to the "skip function that only works while the button or key is held down." It is commonly assigned to the Ctrl key on the keyboard.

ParameterRequiredDescriptionDefault
skipThe effect displayed when skip mode starts. You can specify none, default, or the location of an image file based on the image folder. none means no effect, default means the default effect, and specifying an image file will display that image.
autoThe effect displayed when auto mode starts. It is specified the same way as the skip parameter.
stopThe effect displayed when skip mode or auto mode stops. It is specified the same way as the skip parameter.
holdskipThe effect displayed when hold skip mode starts. It is specified the same way as the skip parameter.
holdstopThe effect displayed when hold stop mode stops. It is specified the same way as the skip parameter.
allYou can specify all five effects at once. It is specified the same way as the skip parameter.
envYou can specify either all, pc, or phone. If you specify pc, you can set effects that are specific to when the player is playing on a PC. If you specify phone, you can set effects that are specific to when the player is playing on a smartphone or tablet. If you specify all (default), it applies to both environments.all
widthIf you want to specify the width of the effect, provide a value in pixels.
heightIf you want to specify the height of the effect, provide a value in pixels.
colorIf you use default for the effect, you can specify the color of the shape part.
bgcolorIf you use default for the effect, you can specify the color of the circular part surrounding the shape.
  • Sample Code
[mode_effect all="default" holdskip="none" holdstop="none"]

[loading_log] Loading Log

  • System Design Changes

You can display a "Loading..." log at the edge of the screen during times when the game is temporarily paused, such as when loading assets or during save operations.

ParameterRequiredDescriptionDefault
preloadYou can freely set the text displayed during asset loading. If you specify none, it disables the log. If you specify default, it will show the default log. If you specify notext, it will show the loading icon without text.
saveYou can freely set the text displayed during the save operation, similar to the preload parameter. Keywords like none, default, and notext can also be specified.
allYou can specify both preload and save parameters together. For example, specifying all="default" will set the default text for all logs.
dottimeYou can specify the time in milliseconds for the animation where dots ("...") increase after the text. If you specify 0, it will disable the dot animation.
iconYou can specify whether to display the loading icon with true or false. If you want to hide the loading icon and show only the text, specify false.
  • Sample Code
[loading_log all="default"]

[lang_set] Language Switch

  • System Design Changes

You can change the language used in the game.
For example, specifying [lang_set name="en"] will apply the translation settings from data/others/lang/en.json.

ParameterRequiredDescriptionDefault
nameIf you specify default, no localization will be applied.
  • Sample Code
[lang_set name="en"]

[showsave] Display Save Screen

  • Menu & HTML Display

Displays the save screen.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[showsave]

[showload] Display Load Screen

  • Menu & HTML Display

Displays the load screen.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[showload]

[showmenu] Display Menu Screen

  • Menu & HTML Display

Displays the menu screen.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[showmenu]

[showlog] Display Backlog

  • Menu & HTML Display

Displays the backlog.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
[showlog]

[web] Open a Website

  • Menu & HTML Display

You can open a specified website in a browser.

★Important
However, you need to place a click-wait action immediately before this tag.
This is because, in many environments such as mobile browsers, actions like jumping to another page without user interaction (for example, during text display) are prohibited.

Explanation Tutorial

ParameterRequiredDescriptionDefault
urlSpecify the URL of the website you want to open. If you want to open an image file from within the game, start by specifying the file location from data.
  • Sample Code
; Insert click-wait
Opens the official website[p]
[web url="http://tyrano.jp"]

; To open a local file
[web url="./data/bgimage/room.jpg"]

[html] Add HTML Layer

  • Menu & HTML Display

[html] and [endhtml] can be used to display HTML written between them. This HTML will appear on the forefront.

This feature is very powerful. You can embed JavaScript, Canvas, YouTube players, and support all next-generation web expressions.

You can use TyranoScript variables within the HTML. Use the [emb] tag as you would for regular text.

★Important
During HTML display, the game will not progress by clicking on the screen. Be sure to place a graphic button or something similar to allow progression through the game using jumps.

Explanation Tutorial

ParameterRequiredDescriptionDefault
leftSpecifies the left position of the HTML (in pixels).
topSpecifies the top position of the HTML (in pixels).
nameYou can specify a name for the HTML area. This name can be used to apply animations to the HTML area.
  • Sample Code
; Inserting a YouTube player at a specified position
; The embed tag is fetched from YouTube
[html top=100 left=300]

<object width="200" height="113">
<param name="movie" value="http://www.youtube.com/v/60TMm2sQTBU?version=3&amp;hl=ja_JP&amp;rel=0">
</param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/60TMm2sQTBU?version=3&amp;hl=ja_JP&amp;rel=0" type="application/x-shockwave-flash" width="200" height="113" allowscriptaccess="always" allowfullscreen="true">
</embed></object>

[endhtml]

[endhtml] End of HTML

  • Menu & HTML Display

Ends the HTML content.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[clearstack] Clear the Stack

  • Macro, Branching, Subroutine Related

Clears the stack managed by the system.It is recommended to place this tag in scenes where there is no stack to return to (such as at the beginning of a title or chapter, or other natural breaks)..

The stack is a memory area used to store information for returning to the calling source when passing through tags such as[call], [if], or macros. (Think of it as breadcrumbs dropped when exploring a forest, helping you find your way back.)

Typically, the stack is cleared when passing through[return][endif][endmacro]. However, if you jump to a different scenario without returning with[call] or repeatedly jump within[if] or macros, uncollected stacks will accumulate.

If too many stacks accumulate, it may cause the game to slow down or cause save files to grow too large.

ParameterRequiredDescriptionDefault
stackcall, if, macro can be specified. This allows you to clear specific stacks. If omitted, all stacks will be cleared.
V515 and later: Theanim parameter can be specified. Whenanim is specified, it forces the current number of animations to zero and ensures that the next tag is processed with[wa]. If thestack parameter is omitted, this operation will not be performed.

[if] Condition Branching

  • Macro, Branching, Subroutine Related

Performs conditional branching.

The JavaScript expression specified in theexp parameter is evaluated. If the result istrue, it will execute the statements or tags between[elsif][else][endif]. If the result isfalse, it will move to the next[elsif][else][endif].

Examples of JavaScript comparison expressions:

A === B means A and B are equal
A !== B means A and B are not equal
A > B means A is greater than B
A >= B means A is greater than or equal to B
A < B means A is less than B
A <= B means A is less than or equal to B

Advanced
Theexp can also contain other expressions besides comparisons. You can directly specify keywords liketrue orfalse, specify variables, or execute functions. JavaScript has several specialvalues treated as true, so be careful.

Tutorial

ParameterRequiredDescriptionDefault
expSpecify the JavaScript expression to be evaluated.
  • Sample Code
; Set the game variable "like" to 50
; Try changing it freely
[iscript]
f.like = 50
[endscript]

Example 1[p]

[if exp="f.like < 30"]
  The favorability is low[p]
[endif]

Example 2[p]

[if exp="f.like < 3c0"]
  The favorability is low[p]
[else]
  The favorability is not low[p]
[endif]

Example 3[p]

[if exp="f.like >= 80"]
  The best favorability[p]
[elsif exp="f.like >= 40"]
  Quite high favorability[p]
[else]
  The favorability is not high[p]
[endif]

[elsif] Condition Branching (Multiple Conditions)

  • Macro, Branching, Subroutine Related

[if] and [endif] tags are used. This allows you to add more conditions for branching and perform more complex branching.

If the condition in the[if][elsif] tag is not met, theexp is evaluated. If the result istrue, it executes the statements or tags between the next[elsif][else][endif]. If the result isfalse, it moves to the next[elsif][else][endif].

For usage examples, refer to the[if] tag section.

Tutorial

ParameterRequiredDescriptionDefault
expSpecify the JavaScript expression to be evaluated.

[else] Condition Branching (When Conditions Are Not Met)

  • Macro, Branching, Subroutine Related

[if] or [elsif] tags are used along with the [endif] tag. If the conditions in the [if][elsif] tag are not met, the content from this tag to the [endif] tag will be executed.

For usage examples, refer to the [if] tag section.

Tutorial

ParameterRequiredDescriptionDefault
No parameters can be specified.

[endif] End of Conditional Branching

  • Macro, Branching, Subroutine Related

[if] statement ends here.[if] must always be written at the end of an [if] statement.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[call] Call Subroutine

  • Macros, Branching, Subroutine Related

Jumps to the specified scenario file or label.

When reaching the [return] tag in the destination, it will return to the location of the [call] tag.[return] allows you to return, which is the key difference from the [jump] tag.

[call] tag is used to jump to a subroutine. For example, repetitive processes can be written as subroutines and called via [call] for reuse.

[call] execution will push a stack. This stack is retrieved with the [return] tag. Please also check [clearstack] for stack-related information.

Explanation Tutorial

ParameterRequiredDescriptionDefault
storageSpecifies the scenario file containing the subroutine to be called. If omitted, it is assumed to be within the current scenario file.
targetSpecifies the label of the subroutine to call. If omitted, execution starts from the beginning of the file.
  • Sample Code
Head patted.[p]
[call target=sub]
Tail patted.[p]
[call target=sub]
Belly patted.[p]
[call target=sub]
The end[s]

*sub
[font color=green]
Affection has increased!
[resetfont][p]
[return]

[return] Return from Subroutine

  • Macros, Branching, Subroutine Related

Returns to the caller from the subroutine. For details, refer to the [call] section.

Explanation Tutorial

ParameterRequiredDescriptionDefault
No parameters available.

[macro] Start of Macro Definition

  • Macros, Branching, Subroutine Related

Starts the macro definition.You can define your own new tags.

[macro] through [endmacro] tags will be registered as tags specified by the name attribute. After registration, you can freely use them.

There is a special way to specify parameter values inside the macro.

If you put a % at the beginning of the parameter value, you can reuse the value passed to the macro. You can also specify default values for attributes using | as shown in the sample code.

Additionally, if you write * inside the tag, all parameters passed to the macro will be used in that tag.

Explanation Tutorial

ParameterRequiredDescriptionDefault
name

Specify the name of the macro. You can later call this macro by writing the name as a tag.

★Important
Do not use tag names already used in TyranoScript. Also, text and label cannot be used.

  • Sample Code
;Create your own tag [my_color_1]!!
[macro name="my_color_1"]
  [font color="0xff0000"]
  This is a new tag[p]
  [resetfont]
[endmacro]

;Now let's use it
[my_color_1]

;You can specify the iro parameter, defaulting to 0xff0000 if not specified
[macro name="my_color_2"]
  [font color=%iro|0xff0000]
  This is a tag where you can specify the iro parameter[p]
  [resetfont]
[endmacro]

;Try using it
[my_color_2 iro=0x00ff00]
[my_color_2]

;Macro that uses all parameters
[macro name="my_color_3"]
  [font *]
  This is a tag that can use all parameters[p]
  [resetfont]
[endmacro]

[my_color_3 color=0x0000ff bold=true size=80]

[endmacro] End of Macro Definition

  • Macros, Branching, Subroutine Related

Ends the macro definition.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[erasemacro] Delete Macro

  • Macros, Branching, Subroutine Related

Deletes the registered macro.

ParameterRequiredDescriptionDefault
nameYesSpecify the macro name to delete.

[ignore] Ignore Scenario Based on Condition

  • Macros, Branching, Subroutine Related

The JavaScript expression specified in exp is evaluated. If the result is true (true), the text or tags enclosed by [ignore] and [endignore] will be ignored.

ParameterRequiredDescriptionDefault
expYesSpecify the JavaScript expression to evaluate.

[endignore] End of [ignore]

  • Macros, Branching, Subroutine Related

[ignore] ends the description of the [ignore] tag.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[sleepgame] Pause the game

  • Macros, Branching, Subroutine Related

When this tag is reached, the game state is saved, and you can jump to another scenario. When you reach [awakegame], the game state will be restored to the point where it was when the [sleepgame] tag was executed.

This tag is very useful when you want to temporarily transition the screen in the middle of the game. For example, if you want to make configuration settings during the game, you can use [sleepgame] to hold the progress and then jump to the configuration scenario file, and later return to the game with the [awakegame] tag.

You cannot execute the [sleepgame] tag multiple times. In other words, you cannot call the [sleepgame] tag again while it is already in a paused state. Please ensure that there is always an [awakegame] tag in the jump destination.

If you hit the [breakgame] tag while paused, the paused state will be discarded without returning.

You can also register the behavior of [sleepgame] with the [button] tag by specifying role=sleepgame in the [button] tag.

[sleepgame] function can be used with a button as follows:

Explanation Tutorial

ParameterRequiredDescriptionDefault
storageSpecify the scenario file name for the jump destination. If omitted, the current scenario file is assumed.
targetSpecify the label name for the jump destination. If omitted, the jump will go to the beginning of the scenario file.
nextSpecify true or false. If false is specified, the game will not proceed to the next tag when returning via the [awakegame] tag.true
  • Sample Code
[sleepgame storage="scene3.ks" target="*start"]

; How to bind with button
[button name="button" role="sleepgame" fix="true" graphic="button/skip.gif" x=450 y=400 storage="scene3.ks" ]

[awakegame] Resume from Game Pause

  • Macros, Branching, Subroutine Related

[sleepgame] tag restores the saved game state.

If you modify game variables in the jump destination, those changes will be reflected when you resume.

Just like when loading saved data, when the game resumes, the make.ks file is passed. If you want to perform special processing on the operations done while paused, you can use game variables in make.ks to determine whether the game is resuming from [awakegame] or not.

Explanation Tutorial

ParameterRequiredDescriptionDefault
variable_overtrue or false can be specified.true will carry over the game variables changed during [sleepgame] when resuming the game.true
bgm_overtrue or false can be specified.true will carry over the BGM playing during [sleepgame] when resuming the game.true

[breakgame] Delete Game Pause Data

  • Macros, Branching, Subroutine Related

[sleepgame] tag deletes the saved paused state.

It is recommended to use the [breakgame] when you no longer need to return to the paused state.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[loadjs] Load External JavaScript File

  • Variables, JS Operations, File Loading

Loads an external JavaScript file. Unlimited functionality expansion is possible.
The JavaScript file should be placed in thedata/others folder.

Explanation Tutorial

ParameterRequiredDescriptionDefault
storageSpecifies the JavaScript file to be loaded.
typeLoading method. You can specifymodule.
  • Sample Code
;Load data/others/sample.js
[loadjs storage="sample.js"]

[eval] Evaluate Expression

  • Variables, JS Operations, File Loading

The JavaScript statement specified inexp is executed. This is mainly used when setting values to variables.

Ensure the statement inexp is enclosed in double quotes ("), as this can help prevent unintended behavior.

You can specify any JavaScript statement inexp, allowing you to execute functions as well (advanced).

Explanation Tutorial

ParameterRequiredDescriptionDefault
expThe JavaScript statement to execute.
  • Sample Code
[eval exp="f.akane_like=50"]
;↑ Sets the game variable akane_like to 50
;It seems Akane's likability is 50

[eval exp="f.akane_nickname=''"]
;↑ Sets the game variable akane_nickname to "Ah-chan"
;It seems Akane's nickname is Ah-chan
;※Strings are enclosed in single quotes (').

[eval exp="f.yamato_like = f.akane_like * 2"]
;↑ Sets the game variable yamato_like to 2 times the value of akane_like
;It seems Yamato's likability is twice that of Akane's

[clearvar] Clear Variable

  • Variables, JS Operations, File Loading

Clears a variable. You can also clear specific variables.

ParameterRequiredDescriptionDefault
expSpecify the variable name to clear, such asf.name or sf.flag. name and flag will not work.
If omitted, all variables will be cleared.

[clearsysvar] Clear All System Variables

  • Variables, JS Operations, File Loading

Clears all system variables.

ParameterRequiredDescriptionDefault
No parameters can be specified.

[trace] Output Values to the Console

  • Variables, JS Operations, File Loading

The expression specified in the exp parameter is evaluated and the result is output to the console.

In the browser version, to check the console, please open the developer tools.

ParameterRequiredDescriptionDefault
expSpecify the JS expression to evaluate.
  • Sample Code
;Set the value 1 to the game variable test
[eval exp="f.test=1"]

;Output the contents of the game variable test to the console
[trace exp="f.test"]

[iscript] JavaScript Code

  • Variables, JS Operations, File Loading

[iscript] and [endscript] can be used to enclose JavaScript code.

Explanation Tutorial

ParameterRequiredExplanationDefault
No parameters can be specified.
  • Sample Code
[iscript]

var test = 22;
f.name = test;
// Access JavaScript functions
alert("JavaScript");
// jQuery is also available
$("body").html();

// JS-style comments can be written, but
;TyranoScript comments are still active, so be cautious
;alert("!!")

[endscript]

[endscript] End of JavaScript

  • Variables, JS Operations, File Loading

Ends the JavaScript code section.

ParameterRequiredExplanationDefault
stop【Advanced】true specifies that, when the [endscript] tag is reached, it will not proceed to the next tag. Use this when you want the scenario to jump due to the JavaScript code.false

[emb] Embed the Evaluation Result of an Expression

  • Variables, JS Operations, File Loading

The JavaScript expression specified in the exp parameter will be evaluated, and the result will be displayed as text.

This is useful for embedding the contents of variables into the scenario text.

ParameterRequiredExplanationDefault
expSpecifies the JavaScript expression to be evaluated. Generally, you should specify the variable's name.f.namesf.text, etc.
  • Sample Code
; Set the string "Pochi" to the game variable name
[eval exp="f.name='ポチ'"]
;↑ It gets long, but it would be fun to let the player input using the [edit] tag

; Embed the variable's content in the text
Today, this child's name is [emb exp="f.name"].[l][r]

; For cases like character names
; Defining them as a macro can make the scenario file easier to read
[macro name="Shiro"]
  [emb exp="f.name"]
[endmacro]

; Use the alias macro to write
Hey, [Shiro]. [Shiro]! How are you?[s]
;* In this example, since f.name is set to "Pochi", it will display "Pochi"

[preload] Preloading Material Files

  • Variables, JS Operations, File Loading

[preload] tag allows you to preload material files (such as images and music).
This ensures smoother display when the materials are actually used.

V515 and later: Preloaded audio files are discarded once they are played (to prevent memory overload).
If you are preloading audio files that will be used repeatedly, such as system sound effects or background music, consider specifying single_use="false" to keep them preloaded.

ParameterRequiredDescriptionDefault
storageSpecify the full path of the file to be preloaded. You can also specify a JavaScript array.
waitSpecify true to pause the game until all files are loaded. If you set it to true, it is recommended to display "Now Loading" or similar text on the screen to inform players that the game is loading assets.false
single_useThis parameter applies only when preloading audio files. If set to true (default), preloaded audio data is discarded once it is used in tags like [playbgm] (to save memory). If you want to keep preloaded audio even after it has been used, set it to false. Even when set to false, you can explicitly discard the preloaded data using the [unload] tag.true
nameThis parameter applies only when preloading audio files. You can specify group names such as "bgm", "se", or "section1" to later manage them as a group when using the [unload] tag to clear data. Multiple names can be specified, separated by commas.
  • Sample Code
; Specify image file with full path (relative to the project directory)
[preload storage="data/fgimage/girl.jpg"]

; Pass an array to preload multiple files at once
[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]

[wait_preload] Waiting for Preloading to Complete

  • Variables, JS Operations, File Loading

[preload] After using the tag with wait=false and performing some effects, this tag waits until all preloading is completed.

ParameterRequiredDescriptionDefault
No parameters can be specified.
  • Sample Code
; Load multiple images with preload and wait=false
[preload storage="data/fgimage/girl.jpg" wait="false"]
[preload storage="data/fgimage/haruko.jpg" wait="false"]
; Perform a different animation while loading
[quake2 time="1000" wait="true"]
; If preloading is not yet complete, wait until it finishes
[wait_preload]

[unload] Discard Preloaded Audio Data

  • Variables, JS Operations, File Loading

[preload] When preloading a large number of audio files with single_use="false", the preloaded audio data may consume too much memory, potentially affecting performance.

[unload] can be used to explicitly discard preloaded audio data. Specify one of the following parameters: storage, name, or all_sound.

ParameterRequiredDescriptionDefault
storageSpecify the location of the preloaded audio data to discard. This should match what was specified in [preload].
nameUse the name specified in [preload] to collectively discard preloaded audio data.
all_soundSpecify true to discard all preloaded audio data.false

[plugin] Load Plugin

  • Variables, JS Operations, File Loading

You can load external plugins.
Plugins should be placed in the data/others/plugin folder.

[plugin] allows you to specify any parameters freely. For example:

[plugin name="my_plugin" my_color="black" my_name="Shikemoku"]

In this case, inside the plugin’s init.ks file, you can use:

mp.my_color
mp.my_name

This allows passing arguments that can be customized within the plugin.

To use these parameters dynamically, you can refer to them using &mp.my_color.

However, unlike macros, you cannot use the format %my_color.

Detailed Tutorial

ParameterRequiredDescriptionDefault
nameSpecify the name of the plugin to load. Plugins should be placed in the data/others/plugin folder.
storageYou can change the initial scenario file that is loaded.init.ks
  • Sample Code
; Load the plugin "my_plugin"
[plugin name="my_plugin" ]
;↑ Jumps to data/others/plugin/my_plugin/init.ks

; You can also pass custom arguments
[plugin name="my_plugin" font_color="black" arg2="aaaaaa" ]

[loadcss] Apply CSS

  • Variables, JS Operations, File Loading

You can load a CSS file during the game.

Detailed Tutorial

ParameterRequiredDescriptionDefault Value
fileSpecify the path of the CSS file to load. The path should start fromdata/.
  • Sample Code
; Load a CSS file
[loadcss file="./data/others/css/mystyle.css" ]

[playbgm] Play BGM

  • Audio

Plays background music (BGM). The audio files to be played should be placed in thedata/bgm folder.

mp3 format is recommended.ogg,m4a, andwav formats are also supported.

However,ogg format does not work in some browsers (IE, Safari). If you use theogg format, you should also provide anm4a file with the same name in the same folder for IE and Safari compatibility. In such cases, these browsers will automatically select them4a file. (This is unnecessary if you are not releasing the game as a browser-based game.)

ParameterRequiredDescriptionDefault Value
storageSpecifies the music file to be played.
loopSpecifies whether the music should loop.true orfalse.true
sprite_timeYou can specify a playback section by providing start and end times in milliseconds, separated by a hyphen. For example,6000-10000 will play from 00:06 to 00:10 (4 seconds).If theloop attribute is set totrue, this section will loop.
V515 or later: You can also specify time inmm:ss format, e.g.,00:06-00:10. Be sure to include:.
volumeSpecifies the playback volume. Values range from0 to100.
html5Usually, you don’t need to specify this. Set totrue to use HTML5 Audio, orfalse (default) to use Web Audio API.false
pauseIftrue is specified, the BGM will not start immediately. You can resume playback later with[resumebgm].false
seekSpecifies the starting time of playback. For example, specifying 4.5 will start the BGM at 4.5 seconds.
restartIf the BGM specified in[playbgm] is already playing, this parameter determines what happens. Iftrue, it will restart from the beginning. Iffalse, it will be ignored.
  • Sample Code
[playbgm storage=music.mp3]

[stopbgm] Stop BGM

  • Audio

Stops the currently playing background music (BGM).

ParameterRequiredDescriptionDefault Value
No parameters can be specified.
  • Sample Code
[stopbgm]

[fadeinbgm] Fade-in BGM Playback

  • Audio

Gradually plays background music (BGM).

Not supported in some environments (Firefox, Safari, etc.). In such cases, it functions as [playbgm].

ParameterRequiredDescriptionDefault Value
storageSpecifies the music file to be played.
loopSpecifies whether the music should loop.true or false.true
sprite_timeSpecifies the playback range in milliseconds using a hyphen separator. For example, 6000-10000 plays from 00:06 to 00:10 (4 seconds). If loop is true, this range loops.
Since V515: You can also specify as 00:06-00:10. Ensure it includes :.
timeSpecifies the fade-in duration in milliseconds.2000
volumeSpecifies playback volume within a range of 0 to 100.
html5Usually, this does not need to be specified. Set to true to use HTML5 Audio, or false (default) to use Web Audio API.false
pauseSet to true to prevent BGM from playing immediately upon execution. [resumebgm] can be used to start playback.false
seekSpecifies the playback start time. For example, setting 4.5 starts playback from 4.5 seconds.
  • Sample Code
[fadeinbgm storage=sample.mp3 loop=false time=3000]

[fadeoutbgm] Fade-out BGM Playback

  • Audio

Fades out and stops the currently playing background music (BGM).

Not supported in some environments (Firefox, Safari, etc.). In those cases, it functions as [stopbgm].

ParameterRequiredDescriptionDefault Value
timeSpecifies the fade-out duration in milliseconds.2000
  • Sample Code
[fadeoutbgm time=3000]

[xchgbgm] Crossfade BGM (Swap)

  • Audio

[Not Recommended] Swaps the background music (BGM). This can be used for a crossfade effect where the music transitions smoothly.

Not supported in some environments (Firefox, Safari, etc.). In those cases, it will function as [playbgm].

From V515 onwards: Although it was previously not recommended, it is now functional again.

ParameterRequiredDescriptionDefault Value
storageSpecifies the file to be played next.
loopSpecifies whether the music should loop. You can use true or false to specify.true
timeSpecifies the duration of the crossfade in milliseconds.2000
  • Sample Code
[xchgbgm storage=new.mp3 loop=true time=3000]

[playse] Play Sound Effect

  • Audio

Plays a sound effect. The audio file to be played should be placed in the data/sound folder.

mp3 format is recommended. It also supports ogg, m4a, and wav formats.

However, ogg format may not work in some browsers (IE, Safari). If you use ogg format, make sure to prepare the same named m4a file in the same folder to make it work in IE and Safari. In those cases, IE and Safari will automatically select the m4a file. (This is not necessary if you're not publishing it as a browser game.)

ParameterRequiredDescriptionDefault Value
storageSpecifies the audio file to be played.
bufSpecifies the slot to play the sound effect. If the sound effect is already playing in the specified slot, it will be stopped.0
loopSpecifies whether it should loop.true or false can be used.false
sprite_timeSpecifies the time range to play. The start and end times are specified in milliseconds, separated by a hyphen. For example, 6000-10000 specifies playing from 00:06 to 00:10, a 4-second interval. If the loop attribute is true, this range will be looped.
From V515 onwards: you can also specify time in minutes:seconds format, such as 00:06-00:10. Be sure to include the :.
clearSpecifies true or false. If true, all other sound effects playing in other slots will also stop. This is useful for sounds like background audio.false
volumeSpecifies the volume of the sound effect. Use a value between 0 and 100.
html5You can generally leave this unspecified. Set to true to use HTML5 Audio, or false (default) for Web Audio API.false
  • Sample Code
[playse storage=sound.mp3 loop=false ]

[stopse] Stop Sound Effect

  • Audio

Stops the playback of a sound effect.

ParameterRequiredDescriptionDefault Value
bufSpecifies the slot to stop the sound effect.0
  • Sample Code
[stopse]

[fadeinse] Fade-In Sound Effect

  • Audio

Plays the sound effect with a fade-in effect.

ParameterRequiredDescriptionDefault Value
storageSpecifies the music file to be played.
loopSpecifies whether it should loop. Can be set to true or false.false
sprite_timeSpecifies the playback section. Start and end times are specified in milliseconds, connected with a hyphen. For example, 6000-10000 specifies playback from 00:06 to 00:10 (4 seconds). If loop is true, it will loop the section.
V515 and later: You can now also specify times in minutes:seconds format, such as 00:06-00:10. Be sure to include the colon (:).
bufSpecifies the slot to stop the sound effect.0
timeSpecifies the fade-in time in milliseconds.2000
html5You usually don’t need to specify this. Use true for HTML5 Audio, or false (default) for Web Audio API.false
  • Sample Code
[fadeinse storage=sound.mp3 loop=false time=2000]

[fadeoutse] Fade-Out Sound Effect

  • Audio

Fades out the sound effect.

ParameterRequiredDescriptionDefault Value
timeSpecifies the fade-out time in milliseconds.
bufSpecifies the slot to stop the sound effect.0
  • Sample Code
[fadeoutse time=2000]

[bgmopt] BGM Settings

  • Audio

You can change the BGM settings.

If the player is viewing from a smartphone browser, the volume cannot be changed due to device limitations, so please be aware of this.

The buf parameter is not specified, and when the [bgmopt] tag is passed, the volume settings for each buf will be reset to their initial value. [bgmopt] tags should be used consistently with or without specifying the buf parameter throughout the game project.

ParameterRequiredDescriptionDefault Value
volumeSpecifies the BGM configuration volume from 0 to 100.
bufSpecifies the slot to change settings. If omitted, the volume is set for all slots in common.
effectWhether the volume change will be immediately reflected in the currently playing BGM. Can be set to true or false.true
timeSpecifies the fade time in milliseconds when reflecting volume changes immediately.
tag_volumeSpecifies the tag volume for the currently playing BGM in the range from 0 to 100. The tag volume is the volume specified in the [playbgm] tag. This can be used when you want to adjust the volume of BGM that was initially played with [playbgm volume="50"] to the volume played with [playbgm volume="100"]. Just specifying this does not change the configuration volume. Specifying this will force effect to be set to true.
samebgm_restartSets the behavior when the BGM to be played is already playing. If true, it restarts from the beginning, if false, it skips the playback.
  • Sample Code
[bgmopt volume=50 ]

[seopt] SE Settings

  • Audio

You can change the SE settings.

If the player is viewing from a smartphone browser, the volume cannot be changed due to device limitations, so please be aware of this.

If the buf parameter is not specified, when passing through the [seopt] tag, the volume settings for each buf will be reset to their initial value. [seopt] should be used consistently with or without specifying the buf parameter throughout the game project.

ParameterRequiredDescriptionDefault Value
volumeSpecifies the SE configuration volume from 0 to 100.
bufSpecifies the slot to change the settings. If omitted, the volume is set for all slots in common.
effectWhether the volume change will be immediately reflected in the currently playing SE. Can be set to true or false.true
timeSpecifies the fade time in milliseconds when reflecting volume changes immediately.
tag_volumeSpecifies the tag volume for the currently playing SE in the range from 0 to 100. The tag volume is the volume specified in the [playse] tag. This can be used when you want to adjust the volume of an SE that was initially played with [playse volume="50"] to the volume played with [playse volume="100"]. Just specifying this does not change the configuration volume. Specifying this will force effect to be set to true.
  • Sample Code
[seopt volume=50 ]

[changevol] Change Volume of Playing Audio

  • Audio

You can change the volume of the currently playing audio.

[playbgm] and [playse] will determine the final volume using the following formula:

[changevol] specified volume (%) × [bgmopt] or [seopt] configured volume (%)

If the player is browsing from a smartphone browser, the volume cannot be changed due to device limitations, so please be aware of this.

ParameterRequiredDescriptionDefault Value
targetSpecify "bgm" to change the volume of BGM, or "se" to change the volume of SE.bgm
volumeSpecify the volume from 0 to 100.
bufSpecify the slot to change the settings. If omitted, the process will be executed for all slots.
timeSpecify the fade time in milliseconds.
  • Sample Code
[bgmopt volume="30"]Config: 30[l][r]
[playbgm volume="40" storage="music.ogg"]Audio: 40[l][r]
[changevol volume="100"]Audio: 40→100[l][r]
[changevol volume="15" time="1000"]Audio: 100→15[l][r]
[bgmopt volume="100" effect="true"]Config: 30→100[l][r]
[changevol volume="100"]Audio: 15→100[l][r]

[pausebgm] Pause the Currently Playing BGM

  • Audio

You can pause the currently playing BGM.
Only use this if you plan to resume the same BGM shortly. Otherwise, it is appropriate to stop it with[stopbgm].

ParameterRequiredDescriptionDefault Value
bufYou can specify the slot. If omitted, the process will be applied to all slots.

[resumebgm] Resume the Paused Audio

  • Audio

[pausebgm] You can resume the BGM that was paused using the above tag.
You can resume the paused audio.

ParameterRequiredDescriptionDefault Value
bufYou can specify the slot. If omitted, the process will be applied to all slots.

[pausese] Pause the Currently Playing SE

  • Audio

You can pause the currently playing SE (Sound Effect).

ParameterRequiredDescriptionDefault Value
bufYou can specify the slot. If omitted, the process will be applied to all slots.

[resumese] Resume the Paused SE

  • Audio

You can resume the paused SE (Sound Effect).

ParameterRequiredDescriptionDefault Value
bufYou can specify the slot. If omitted, the process will be applied to all slots.

[wbgm] Wait for the BGM to Finish Playing

  • Audio

Wait for the BGM to finish playing.

This can be used in PC applications and browser games.
It is not available in mobile apps, so please be aware.

[playbgm]If the BGM is set to loop, it will never stop. This is something to watch out for as well.

ParameterRequiredDescriptionDefault Value
No parameters can be specified.

[wse] Wait for the Sound Effect to Finish Playing

  • Audio

Wait for the sound effect to finish playing.

This can be used in PC applications and browser games.
It is not available in mobile apps, so please be aware.

ParameterRequiredDescriptionDefault Value
No parameters can be specified.

[popopo] Play Popopo Sound

  • Audio

You can play the "popopo" electronic sound to match the text.

ParameterRequiredDescriptionDefault Value
typeSpecify one of the seven keywords: sine, square, sawtooth, triangle, noise, file, none. These correspond to sine wave, square wave, sawtooth wave, triangle wave, white noise, playing an audio file, and no sound, respectively.
volumeThe volume of the sound. You can specify a value between 0 and 100 or use the keyword "default". If you use "default", it will reference the SE volume in the configuration.
timeThe length of the popopo sound in milliseconds. It has no effect if the type is "file". The default value is 20.
tailtimeThe fade-out time for the popopo sound in milliseconds. It has no effect if the type is "file". The default value is 30.
frequencyThe pitch of the popopo sound. Specify one of the following keywords: A, A+, B, B+, C, C+, D, D+, E, E+, F, F+, G, G+. These correspond to the musical notes: La, La#, Si, Si#, Do, Do#, Re, Re#, Mi, Mi#, Fa, Fa#, Sol, Sol#.
octaveThe pitch of the sound (octave). Specify an integer. The default value is 0. Increasing or decreasing by 1 moves to the adjacent octave. It has no effect if the type is "file" or "noise".
samplerateThe sample rate of the popopo sound. This only works if the type is "noise". The default value is 44000. It must be between 3000 and 192000.
bufThis only works if the type is "file". Specify the slot where the sound will be played.
storageThis only works if the type is "file". Specify the name of the audio file to be played.
modeSpecify either "everyone" or "interval". "everyone" means playing the popopo sound for each character, while "interval" means playing the sound at a fixed interval regardless of the character.
noplaycharsThis only works if the mode is "everyone". Specify characters that should not play the popopo sound. The default characters are "…・、。「」()" and others.
intervalThis only works if the mode is "interval". Specify the interval (in milliseconds) between each popopo sound. The default value is 80.
charaSpecify a character's name. The popopo sound will only be applied when this character is speaking.default

[voconfig] Voice Playback Settings

  • Voice & Text-to-Speech

You can configure the settings to efficiently play voices.

By associating character names with audio file names, you can play the audio files sequentially when the character name is displayed.

After configuring with this tag, it will not be activated unless you start the automatic playback with the [vostart] tag.

Explanation Tutorial

ParameterRequiredExplanationDefault Value
sebufSpecify the [playse] buf to use for the voice.
nameSpecify the character name to play the voice. This corresponds to the name in the [chara_new] tag.
vostorageSpecify the template for the audio file name. The {number} part will be replaced with the incremented number each time it is played.
numberThe initial value for the number to replace in {number} of vostorage.
waittimeIn auto mode, specify how many milliseconds to wait before moving to the next message after the voice finishes playing.
  • Sample Code
[voconfig sebuf=2 name="akane" vostorage="akane_{number}.ogg" number=1 ]
[voconfig sebuf=2 name="yamato" vostorage="yamato_{number}.ogg" number=1 ]

;Start automatic voice playback. This is required.
[vostart]

#akane
Play voice here (akane_1.ogg)[p]

#akane
Play the next voice (akane_2.ogg)[p]

#yamato
Play Yamato's voice (yamato_1.ogg)[p]

#akane
Play Akane's voice (akane_3.ogg)[p]

[vostart] Start Automatic Voice Playback

  • Voice & Text-to-Speech

[voconfig] starts the automatic playback of the voices specified in the tag.
From this point onward, when the character name is specified with #, the corresponding voice will be played.

Explanation Tutorial

ParameterRequiredExplanationDefault Value
No parameters can be specified.

[vostop] Stop Automatic Voice Playback

  • Voice & Text-to-Speech

[voconfig] stops the automatic playback of the voices specified in the tag.
From this point onward, even if you specify a character name with #, the voice will not be played.

ParameterRequiredExplanationDefault Value
No parameters can be specified.

[speak_on] Enable Text-to-Speech Function

  • Voice & Text-to-Speech

You can have the story's scenario read aloud using text-to-speech.

★Note
This only works in browser games. It does not function when output as a PC application.

ParameterRequiredExplanationDefault Value
volumeSpecify the volume from0 to 100.100
pitchSpecify the pitch of the voice as a ratio based on 100. The higher the number, the higher the pitch of the voice.100
rateSpecify the speed of the voice as a ratio based on 100. The higher the number, the faster the speech.100
cancelSpecify the action when the next text-to-speech is inserted during an ongoing reading. If true is set, the reading will be interrupted and the new text will be read. If false is set, the reading will continue until completion, then the next text will be read.false
  • Sample Code
[speak_on]

[speak_off] Disable Text-to-Speech Function

  • Voice & Text-to-Speech

Disables the text-to-speech function for the scenario.

ParameterRequiredExplanationDefault Value
No parameters can be specified.
  • Sample Code
[speak_off]

[edit] Textbox

  • Input Form

Displays a text box that the player can input text into.

When the text box is displayed, the progress of the scenario will be paused. Make sure to place a graphic button or similar element so that the player can proceed.

The entered text will be stored in the variable specified when the [commit] tag is executed.[commit] tag must be executed while the text box is still visible.[glink] When used in combination with [glink] tag, please specify cm=false in the [glink] tag.

★ Advanced
The design of the text box can be adjusted by editing the tyrano/tyrano.css file.

Detailed Tutorial

ParameterRequiredExplanationInitial Value
nameSpecify the variable name where the player's input text will be saved.
initialSets the initial value for the text box.
colorSpecifies the text color.black
leftSpecifies the horizontal position of the text box.0
topSpecifies the vertical position of the text box.0
autocompleteSpecifies whether to display input history.true or false can be specified.false
sizeSpecifies the text size.20
widthSpecifies the width of the text box.200
heightSpecifies the height of the text box.40
maxcharsSpecifies the maximum number of characters that can be entered.1000
  • Sample Code
We need to decide this dog's name...[l]

[edit name="f.dog_name" left=50 top=100]
[glink text="Decide" target=next x=250 y=100 cm=false]
[s]

*next
[commit name="f.dog_name"]
[cm]
This dog's name is “[emb exp=f.dog_name]”![r]
Hey, [emb exp=f.dog_name]! Let's play together![s]

[commit] Confirming the Form

  • Input Form

[edit] Confirms the input from the text box displayed by [edit] and sets the value to the variable specified by the name attribute.

★ Note
[commit] must be executed while the text box is still visible.

Detailed Tutorial

ParameterRequiredExplanationInitial Value
No parameters can be specified.

[3d_init] 3D Function Initialization

  • 3D Related

This is the declaration required to use 3D-related features.
When passing through this tag, a scene for displaying 3D in the game is added.
Also, without this tag, you cannot use tags that start with 3d_xxx.

It is recommended to declare this just before using the 3D features.
Also, once the 3D features are no longer needed, be sure to use [3d_close].

ParameterRequiredExplanationInitial Value
layerSpecify the layer to place the 3D model.0
cameraSpecify the camera mode. "Perspective" (with perspective) or "Orthographic" (parallel projection without perspective). The default is Perspective.Perspective
nearSet how close objects are drawn from the camera. The default is 1.10
farSet how far objects can be displayed from the camera. If set too high, it will unnecessarily render far away objects and increase processing load. Adjust to the smallest possible value. The default is 5000.5000
material_typeSpecify the material properties to use in the scene. The default is basic. Options: basic (lightweight but no light rendering), lambert (supports light rendering), standard (supports light, reflection, and metallic properties).basic
ambient_lightSpecify the intensity of ambient light. This light affects all surfaces equally. The default is 1.1
directional_lightSet the strength of light emitted from a specific direction. It is like the sunlight. The default is 0.0
antialiasSet the anti-aliasing option. Specify true or false. The default is true.true
debug_optionSpecify whether to display your position coordinates on the screen.
  • Sample Code
[3d_init layer=0 ]

[3d_model_new] Create 3D Model

  • 3D Related

Load and define a 3D model from an external file format.
During execution, it will not be displayed on the game screen. To display it, you need [3d_show].
Place the 3D model files in the data/others/3d/model folder.

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. This name will be used for control such as display and hiding.
storageSpecify the 3D file. Supports gltf, obj, json formats. Place the file in the others/3d/model folder.
posSpecify the coordinates for placing the 3D object. Use comma-separated xyz coordinates.0
rotSpecify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes.0
scaleSpecify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes.100
tonemapIf tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false.true
motionIf the file contains motion, you can specify the motion name. If none is specified, the first motion file is automatically applied. Set to none to disable animation.
folderYou can change the folder where the file is stored.
  • Sample Code
[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_cylinder_new] Create 3D Model (Cylinder)

  • 3D Related

Defines a 3D model of a cylinder.

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. This name will be used for control such as display and hiding.
textureYou can apply a texture to the cylinder. Place the image in the "others/3d/texture" folder. Recommended sizes are 256x256 or 512x512.
colorYou can specify the color. Use the 0xRRGGBB format.0x00ff00
posSpecify the coordinates to place the 3D object. Use comma-separated xyz coordinates.0
rotSpecify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes.0
scaleSpecify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes.1
segmentSpecify the level of detail for the circle. The higher the number, the closer it becomes to a circle. The default is 10.10
widthSpecify the width of the cylinder. The default is 10.5
heightSpecify the height of the cylinder. The default is 20.20
sideSpecify which side the texture will be applied to. Options are front (front), back (back), double (both sides). The default is front.front
tonemapIf tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false.
  • Sample Code
[3d_cylinder_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_sphere_new] Create 3D Model (Sphere)

  • 3D Related

Defines a 3D model of a sphere.

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. This name will be used to control display and hiding, etc.
textureYou can apply a texture to the sphere. Place the image in the "others/3d/texture" folder. Recommended sizes are 256x256 or 512x512.
colorYou can specify the color using the 0xRRGGBB format.0x00ff00
posSpecify the coordinates to place the 3D object. Use comma-separated xyz coordinates.0
rotSpecify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes.0
scaleSpecify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes.1
radiusSpecify the radius of the sphere. The default is 300.300
widthSpecify the width of the sphere. The default is 30.30
heightSpecify the height of the sphere. The default is 30.30
sideSpecify which side the texture will be applied to. Options are front (front), back (back), double (both sides). The default is front.front
tonemapIf tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false.
  • Sample Code
[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] Create 3D Model (Sprite)

  • 3D Related

Defines a 3D model of a sprite.
The difference from an image is that with a sprite, the object always faces the camera.

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. This name will be used to control display, hide, etc.
storageSpecifies the image file to display. The file should be placed in the "others/3d/sprite" folder.
posSpecifies the coordinates to place the 3D object. Use comma-separated xyz coordinates.0
rotSpecifies the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes.0
scaleSpecifies the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes.
tonemapIf tone mapping is enabled, you can set whether this object will be affected. The default is false. To enable, set it to true.false
folderCan change the folder where the file is placed.
  • Sample Code
[3d_sprite_new name="yamato" storage="doki.png"]
[3d_show name="yamato"]

[3d_event] 3D Event Definition

  • 3D Related

You can trigger events when objects on a 3D scene are clicked.
Events will not trigger until the [s] tag is reached.
Once an event is triggered, all events will be automatically disabled (the event definitions themselves remain).
If you want to trigger events again, you need to pass through [3d_event_start].

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. Specify the name of the 3D object that will trigger the event.
storageSpecifies the scenario file to move to. If omitted, the current scenario file is assumed.
targetSpecifies the label name to jump to. If omitted, execution starts from the beginning.
typeSpecify either jump or eval. The default is jump. If eval is specified, the JavaScript specified in the exp parameter will be executed.jump
expIf eval is specified in type, write the JavaScript that will be executed here.
distanceSpecifies the distance at which the event will trigger when clicked. Objects farther than this distance will not respond.
groundIn FPS mode, you can trigger the event only when you are on a specific object. The event will only trigger when you are on the object specified by the name here.
modeSpecify either click or collision. In FPS mode, you can choose whether to trigger on click or collision. The default is click.click
  • Sample Code
; Define and display 3D model
[3d_model_new name="miruku" storage="miruku/scene.gltf" scale=300 pos="0,-300,500" ]
[3d_event name="miruku" target="miruku"]

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

; Define events
[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

Restart events[p]
@3d_event_start

[3d_event_delete] Delete 3D Event

  • 3D Related

Disables the registered 3D events.

ParameterRequiredExplanationInitial Value
nameThe name of the 3D object. Specify the name of the 3D object whose event you want to delete.
  • Sample Code
; Displaying box
[3d_box_new name="box" width=100 height=100 depth=100 scale=2 tone=false color="0xFFFFFF"]
[3d_show name="box" time=2000 ]

; Deleting the event definition. After this, clicking will have no effect.
[3d_event_delete name="box" ]

[s]

[3d_event_start] Start 3D Event

  • 3D Related

Starts the registered 3D event.
After the event is executed, all events are automatically disabled, so you need to use this tag to restart the event reception.

ParameterRequiredExplanationInitial Value
No parameters can be specified.

[3d_event_stop] Stop 3D Event

  • 3D Related

Stops the registered 3D event.
It can be resumed using [3d_event_start].
The registered event itself will not be deleted.

ParameterRequiredExplanationInitial Value
No parameters can be specified.

[3d_box_new] 3D Model (Box)

  • 3D Related

Defines a 3D model of a cube.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object. This name is used to control the display or hiding of the object.
textureSpecifies the image file to be displayed. The file should be placed in the "others/3d/texture" folder. If you specify one texture, all sides will use the same image, but you can specify six different textures separated by commas to apply different textures to each side.
colorSpecifies the color. Use the 0xRRGGBB format.0x00ff00
widthSpecifies the width of the 3D object. The default is 1.1
heightSpecifies the height of the 3D object. The default is 1.1
depthSpecifies the depth of the 3D object. The default is 1.1
posSpecifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates.0
rotSpecifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations.0
scaleSpecifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes.1
tonemapIf tone mapping is enabled, this specifies whether the object is affected. The default is false. Set it to true to enable.
  • Sample Code
;Define and display the box
[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 using different textures on the six 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)

  • 3D Related

Defines a 3D model as an image.
This is the image of a flat panel being added to the 3D scene.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object. This name is used to control the display or hiding of the object.
textureSpecifies the image file to be displayed. The file should be placed in the "others/3d/texture" folder.
widthSpecifies the width of the 3D object. The default is 1.
heightSpecifies the height of the 3D object. If omitted, the image will be displayed maintaining the ratio of the image size.
posSpecifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates.0
rotSpecifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations.0
scaleSpecifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes.1
doublesideSpecifies whether the texture is shown on both sides of the object. The default is false. If true is specified, the texture will be displayed on the back side as well.false
tonemapIf tone mapping is enabled, this specifies whether the object is affected. The default is false. To enable, set it to true.false
  • Sample Code
;3D Image
[3d_image_new name="myimg" texture="room.jpg" width=200 doubleside=true ] 
[3d_show name="myimg" ]

[3d_show] Display 3D Object

  • 3D Related

Displays the 3D object that has been defined in the game screen.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object. Specify the name of the object you want to display.
timeSpecify the time (in milliseconds) to wait before displaying. The default is 500.0
waitWhether to wait for the display to complete. The default is true.true
posSpecifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates.
rotSpecifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations.
scaleSpecifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes.
groupAssign the object to a group. Specify the group name.default
group_uuidAllows you to add the object to a group using the uuid in the scene.
force_spriteForces the object to be placed in the sprite group.false
scene_addIf true, the object is directly added to the scene. The default is false.false
visibleSpecify true or false. If you want the object to be added to the scene in a hidden state initially, specify false.true
  • Sample Code
;3D Image
[3d_image_new name="myimg" texture="room.jpg" width=200 doubleside=true ] 
[3d_show name="myimg" ]

[3d_hide] Hide 3D Object

  • 3D Related

Hides the 3D object from the game screen.
Executing this tag does not delete the definition itself.
If you want to display it again, use the [3d_show] tag.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object. Specify the name of the object you want to hide.
timeSpecify the time (in milliseconds) to wait before hiding the object. The default is 500.500
waitWhether to wait for the hiding to complete. The default is true.true
  • Sample Code
;3D Image
[3d_image_new name="myimg" texture="room.jpg" width=200 doubleside=true ] 
[3d_show name="myimg" ]

Hiding the object. [p]
[3d_hide name="myimg"]

[3d_hide_all] Hide All 3D Objects

  • 3D Related

Hides all 3D objects from the game screen.
Executing this tag does not delete the definitions themselves.
If you want to display them again, use the [3d_show] tag.

ParameterRequiredExplanationDefault Value
timeSpecify the time (in milliseconds) to wait before hiding the objects. The default is 500.500
waitWhether to wait for the hiding to complete. The default is true.true

[3d_delete] Delete 3D Object

  • 3D Related

Deletes a 3D object.
This tag also removes the object from the definitions, so if you want to use it again, you must redefine it using the [new] tag.
Deleting unused 3D objects frequently can help improve performance.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object. Specify the name of the object you want to delete.
  • Sample Code
;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 it from the definitions. [p]
[3d_delete name="myimg"]

[3d_delete_all] Delete All 3D Objects

  • 3D Related

Deletes all 3D objects.
This is used when resetting the 3D scene.

ParameterRequiredExplanationDefault Value
No parameters can be specified.

[3d_canvas_show] Show 3D Canvas

  • 3D Related

Displays the 3D canvas.
It is useful when frequently transitioning between 3D scenes and novel parts.

ParameterRequiredExplanationDefault Value
No parameters can be specified.
  • Sample Code
time= Specify the time in milliseconds for the display. The default is 1000.

[3d_canvas_hide] Hide 3D Canvas

  • 3D Related

Hides the 3D canvas.
The 3D scene itself is maintained.
This is useful when frequently transitioning from a 3D scene to a novel part.

ParameterRequiredExplanationDefault Value
No parameters can be specified.
  • Sample Code
time= Specify the time in milliseconds for the display. The default is 1000.

[3d_close] Delete 3D Scene

  • 3D Related

Deletes the entire 3D scene.
By using this tag, all 3D-related functions will become unavailable.
If you want to use them again, please pass through the [3d_init] tag.

ParameterRequiredExplanationDefault Value
No parameters can be specified.

[3d_anim] 3D Animation

  • 3D Related

You can animate a 3D object in the scene.

ParameterRequiredExplanationDefault Value
nameThe name of the 3D object to be animated. If animating the camera, specify the name as "camera".
posThe coordinates to place the 3D object after the animation. Specify the xyz coordinates separated by commas.
rotThe rotation of the 3D object after the animation. Specify the xyz axis rotation separated by commas.
scaleThe scale of the 3D object after the animation. Specify the xyz scale separated by commas.
timeThe duration of the animation in milliseconds. Default is 1000.1000
waitWhether to wait for the animation to complete. true or false, default is true.true
relativeSpecify true or false. Default is false. If true, relative coordinates are used.false
loopThe number of loops for the animation. If true, it loops infinitely.0
directionSpecify "alternate", "infinite", or "reverse". Default is "alternate". It specifies how the loop should occur.alternate
lookatOnly valid for the camera. Specify the name of an object or pos coordinates to make the camera look in a specific direction.
effectSpecify the type of effect for the transition. The following types are available:
swing | linear | 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
linear
  • Sample Code
[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] 3D Animation Stop

  • 3D Related

You can stop a 3D object that is currently animating.

ParameterRequiredExplanationDefault Value
nameSpecify the name of the 3D object whose animation will be stopped.
finishSpecify true or false. If false, the object will stop at the position where the animation was stopped. If true, it will move to the position where the animation was supposed to reach. The default is true.

[3d_scene] 3D Scene Settings

  • 3D Related

You can configure settings that affect the entire 3D scene.

ParameterRequiredExplanationDefault Value
tonemapYou can set tone mapping for the scene. The available types are No/Linear/Reinhard/Uncharted2/Cineon/ACESFilmic. The default is No (no tone mapping).
tonemap_valueSets the intensity of the tone mapping. The default is 0.8.0.8
light_ambSets the strength of the ambient light. The default is 1. For example, 0.5 makes it darker, and 2 makes it much brighter.
  • Sample Code
[3d_scene light_amb="2" tonemap=""]

[3d_camera] 3D Camera

  • 3D Related

You can configure the camera for the 3D scene.
If you want to check the camera's coordinates, it's recommended to use [camera_debug] to test the coordinates and orientation.

ParameterRequiredExplanationDefault Value
posSpecifies the coordinates for placing the camera. The coordinates are expressed in xyz format, separated by commas.
rotSpecifies the camera's orientation. The rotation is set for each axis (xyz) and separated by commas.
tonemapSets the tone mapping for the scene. Available types are No/Linear/Reinhard/Uncharted2/Cineon/ACESFilmic. The default is No (no tone mapping).
lookatSpecifies the name of a 3D object in the scene, and the camera will face that object. Alternatively, you can directly specify the pos to point the camera to those coordinates.
  • Sample Code
[3d_camera pos="10,20,30" ]

[3d_gyro] 3D Gyroscope

  • 3D Related

You can control the camera based on the tilt of a smartphone.
For PC games, you can simulate the gyroscope using the mouse position.

ParameterRequiredExplanationDefault Value
max_xSpecifies the maximum tilt angle for the X-axis direction. The default is 30.30
max_ySpecifies the maximum tilt angle for the Y-axis direction. The default is 30.30
modeSpecifies either "position" or "rotation". This determines whether the tilt affects the camera's rotation or coordinates. The default is "rotation".rotation
  • Sample Code
[3d_gyro max_x="20" max_y="20" ]

[3d_gyro_stop] Stop 3D Gyroscope

  • 3D Related

Smartphone only
Stops the gyroscope movement.
If you also want to reset the camera's position, use the [3d_camera] tag right after this one.
If you want to enable the gyroscope again, use the [3d_gyro] tag.

ParameterRequiredExplanationDefault Value
No parameters available.

[3d_debug_camera] 3D Camera Debug

  • 3D Related

You can adjust the camera coordinates in the 3D scene by dragging and dropping with the mouse.
To end debugging, press the button at the top left of the screen.
Mouse Operations:
Left Click: Camera direction (rot)
Right Click: Camera position (pos)
Middle Click: Z-axis of the position

ParameterRequiredExplanationDefault Value
button_textYou can freely set the text for the button to close debugging. The default is "Close Camera Inspector."Close Camera Inspector
menuWhether to display the debugging menu. If set to false, only the close button will be shown. The default is true (shown).true
  • Sample Code
[3d_debug_camera ]

[3d_motion] Motion Change

  • 3D Related

You can change the motion of a 3D model.

ParameterRequiredExplanationDefault Value
nameSpecify the name of the 3D object.
motionSpecify the motion name.
  • Sample Code
; Define the model. Initially displayed with the "Running" motion. 
[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" ]

Change the motion. [p]

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

[3d_debug] 3D Debugging

  • 3D Related

You can adjust 3D scene objects by dragging and dropping with the mouse.
To end the debugging, press the button in the top left corner of the screen.
Mouse Controls
Left Click: Camera orientation (rot)
Right Click: Camera position (pos)
Middle Click: Z-axis of position
Scroll: Zoom in and out (scale)

Parameter Required Explanation Default Value
nameSpecify the name of the 3D object to debug.
button_textYou can freely set the text for the button to end the debugging. The default is "Close 3D Inspector".Close
menuWhether to display the debug menu. If you specify false, only the button to end debugging will appear. Default is true (displayed).true
overlaptrue or false. If you specify true, the model will be displayed in the frontmost layer. Use this if you don’t want the menu to hide it. Default is false.false
resettrue or false. If you specify true, the model will return to its original position after debugging ends. Default is false.false
  • Sample Code
[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" ]
Change motion. [p]
[3d_debug name="Robot" ]

[3d_debug_bk] 3D Debugging

  • 3D Related

You can adjust 3D scene objects by dragging and dropping with the mouse.
To end the debugging, press the button in the top left corner of the screen.
Mouse Controls
Left Click: Camera orientation (rot)
Right Click: Camera position (pos)
Middle Click: Z-axis of position
Scroll: Zoom in and out (scale)

Parameter Required Explanation Default Value
nameSpecify the name of the 3D object to debug.
button_textYou can freely set the text for the button to end the debugging. The default is "Close 3D Inspector".Close 3D Inspector
menuWhether to display the debug menu. If you specify false, only the button to end debugging will appear. Default is true (displayed).true
overlaptrue or false. If you specify true, the model will be displayed in the frontmost layer. Use this if you don’t want the menu to hide it. Default is false.false
resettrue or false. If you specify true, the model will return to its original position after debugging ends. Default is false.false
  • Sample Code
[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" ]
Change motion. [p]
[3d_debug name="Robot" ]

[3d_fps_control] FPS Control

  • 3D Related

Enables FPS control.
It will not execute unless you reach [s].

Parameter Required Explanation Default Value
No parameters can be specified.
  • Sample Code
[3d_fps_control]

[3d_debug_camera rotate=true move=false menu=false menu_close=false ]

[s]

[3d_new_group] Create New 3D Group

  • 3D Related

Allows you to manage 3D objects in groups.

Parameter Required Explanation Default Value
nameSpecify the name of the new group to be created.
  • Sample Code
[3d_new_group name="mygroup" ]

[3d_image_new name="model_A" texture="t.png" width=100 doubleside=true ]
[3d_add_group name="model_A" group="mygroup" pos="0,100,0" rot="-0,0,0" scale="1" ]

[3d_show name="mygroup" ]

[3d_add_group] Add to 3D Group

  • 3D Related

Adds a 3D object to a group.

Parameter Required Explanation Default Value
nameSpecifies the 3D object to be added.
new_nameIf specified, it copies the object named 'name' and registers it with a new name.
  • Sample Code
[3d_new_group name="mygroup" ]

[3d_image_new name="model_A" texture="t.png" width=100 doubleside=true ]
[3d_add_group name="model_A" group="mygroup" pos="0,100,0" rot="-0,0,0" scale="1" ]

[3d_show name="mygroup" ]

[3d_text_new] 3D Text

  • 3D Related

Displays text in 3D space.

Parameter Required Explanation Default Value
nameSpecifies the name of the 3D object. This name is used to control the display and visibility.
textSpecifies the text string to be displayed.
posSpecifies the coordinates (xyz) where the 3D object will be placed.10
rotSpecifies the rotation of the 3D object along the xyz axes.0
scaleSpecifies the scaling factor of the 3D object along the xyz axes.0
sizeFont size. The default is 42.42
colorSpecifies the color in the 0xRRGGBB format.
faceSpecifies the font type.sans-serif
spriteSpecifies true or false. If true, the text always faces the front. The default is false.false
  • Sample Code
[3d_new_text name="text1" text="あああ" ]
[3d_show name="text1"]

[3d_sound] 3D Sound

  • 3D Related

Allows you to place sounds in 3D space.

Parameter Required Explanation Default Value
nameObject name. This name is used to control visibility and other actions.
target_nameSpecifies where the sound will play.
posSpecifies the coordinates (xyz) where the 3D object will be placed.0,0,0
loopIf true, the sound will loop. Default is false.false
volumeSpecifies the volume, from 0 to 1.

[3d_helper] Add drawing for operation assistance on the screen

  • 3D Related

Allows drawing operation assistance lines in the 3D space.

Parameter Required Explanation Default Value
name3D object name. This name is used to control visibility and other actions.
textSpecifies the text string to be displayed.
  • Sample Code
[3d_new_text name="text1" text="あああ" ]
[3d_show name="text1"]

[bgcamera] Stream Camera Background

  • AR Related

You can activate the camera on the player's device from the game and display the footage captured by the camera as the game background.
This allows you to create apps that let users take photos with characters overlaid on real-world backgrounds, perfect for creating AR experiences.

When publishing as a browser game, the game must be hosted on a location accessible via https, not http.

For more details, refer to the following official practical techniques page:
Practical Techniques - Augmented Reality (AR) Features

★ QR Code Functionality Notes

This tag allows players to scan a QR code with the camera, which will trigger a scenario jump to a specified location in the scenario. However, the [s] tag must be reached beforehand. Without it, the QR code will not trigger any actions.

Here's how you can create a QR code:

1. Create a text starting with tyrano: to specify the target scenario file and label. For example, if you want to jump to the start label of scene1.ks, it would look like this:

tyrano://storage=scene1.ks&target=start

Alternatively, you can use the tag text directly, like this:

[jump storage="scene1.ks" target="test2"]

2. Convert the text created above into a QR code (there are websites where you can convert any text into a QR code).

3. Print the QR code.

Note: Once a QR code is scanned, the reading functionality is disabled until the [qr_config] tag is executed. If you need to scan the QR code multiple times for jumps, include the [qr_config qrcode="all"] tag at the jump destination.

Parameter Required Explanation Default Value
name[anim] tag can animate this name. You can specify multiple names by separating them with commas.
waitSpecify true to wait for camera input to display.true
timeSpecify the fade-in time for camera input area in milliseconds.1000
fitSpecify true to stretch and fit to full screen, or false to maintain the aspect ratio. If the camera resolution is low, black bars may appear.true
leftSpecify the camera's position (in pixels).
topSpecify the camera's position (in pixels).
widthSpecify the width of the camera's area (in pixels).
heightSpecify the height of the camera's area (in pixels).
modeSpecify front (front camera) or back (rear camera). If nothing is specified, the default camera is used.
qrcodeSpecify the behavior when a QR code is scanned:
jump (only game movement QR codes will respond)
web (only external links will respond)
define (only QR codes defined with [qr_define] will respond)
all (all QR codes will respond)
off (QR codes will not respond)
off
debugSpecify true to display the URL when a QR code is scanned. Default is false.false
audioSpecify true if audio input should also be reflected in the game.false
  • Sample Code
; Display camera input in background
[bgcamera time=2000]

; Reset background to normal
[stop_bgcamera]

; Display camera input with specific coordinates
[bgcamera width=300 height=200 left=100 top=100]

; Respond to QR code. Use rear camera
[bgcamera mode="back" fit=true qrcode="all"]

[qr_config] QR Code Behavior Settings

  • AR Related

You can configure various behaviors for QR code scanning.

Parameter Required Explanation Default Value
qrcodeSpecify the behavior when a QR code is scanned:
jump (only QR codes for in-game movement will respond)
web (only responds to external website links)
define (responds only to QR codes defined with [qr_define])
all (responds to all QR codes)
off (does not respond to QR codes)
  • Sample Code
; Enable only Tyrano jumps for QR code
[qr_config qrcode="jump"]

[stop_bgcamera] Stop Camera Stream

  • AR Related

[bgcamera] will be hidden.

Parameter Required Explanation Default Value
time Specified in milliseconds. It is possible to fade out the video and remove it. 1000
wait Specify whether to wait for the video fade-out. Can be true or false. true
  • Sample Code
[stop_bgcamera time=1000]

[qr_define] QR Code Replacement

  • AR Related

You can replace a specific URL in a QR code with a[jump].
For example, you can replace a QR code on a monument or product with an event in the game.

Parameter Required Explanation Default Value
url Yes Defines the URL to be triggered when the camera captures it.
storage Specifies the scenario file to jump to when the URL is read.
target Specifies the label to jump to.
clear true can be specified to delete the definition. false
  • Sample Code
[qr_define url="https://tyrano.jp" storage="scene1.ks" target="test"]