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.
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | 〇 | Specifies the filename of the image to display. |
; 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]
Clears the text from the currently active message layer.
To switch the active message layer, use the [current] tag.
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters available. |
Click to clear the message[l][er]
Message cleared[l]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters available. |
Display text[l]
Clear screen[l][cm]
Clear screen again[l][cm]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters available. |
Display text[l]
Reset the screen[l][ct]
Reset the screen again[l][ct]
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.
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 |
[current layer="message0"]
Displayed on message0 layer[l]
[current layer="message1"]
Displayed on message1 layer[l]
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 |
; 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]
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. |
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. |
; 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 ]
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.
Parameter | Required | Description | Default |
---|---|---|---|
layer | 〇 | Specify the foreground layer as an integer value of 0 or greater. | 0 |
page | Specify whether to target the front or back page of the layer.fore or back. Defaults to the front page. | fore | |
text | The displayed text content. | ||
x | 〇 | Specify the left position of the text (in pixels). | |
y | 〇 | Specify the top position of the text (in pixels). | |
vertical | Whether to display text vertically.true or false. | false | |
size | Specify the font size in pixels. | ||
face | Specify the font type. Web fonts can also be used. | ||
color | Specify the font color in 0xRRGGBB format. | ||
bold | Enable bold text by specifying bold (CSS font-style will be applied). V515 and later: true can also enable bold. | ||
edge | Enable 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. | ||
shadow | Add 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. | ||
width | Specify the text display width in pixels. | ||
align | Specify text alignment. Requires the width parameter.left (left), center (center), right (right). | left | |
time | Specify fade-in time in milliseconds. If omitted, text appears instantly. | ||
overwrite | Whether to overwrite existing text with the same name.true or false. If true, replaces existing text instead of adding new text. | false | |
gradient | V515 and later: Apply a gradient to the text. Specify a CSS gradient function such as linear-gradient(45deg, red 0%, yellow 100%). |
[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]
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.
Parameter | Required | Description | Default |
---|---|---|---|
layer | Specify the foreground layer as an integer value of 0 or greater. | 0 | |
page | Specify whether to target the front or back page of the layer.fore or back. Defaults to the front page. | fore | |
text | The content of the displayed text. | ||
x | 〇 | Specify the left position of the text (in pixels). | |
y | 〇 | Specify the top position of the text (in pixels). | |
vertical | Whether to display text vertically.true or false. | false | |
size | Specify the font size in pixels. | ||
face | Specify the font type. If using web fonts, define them in tyrano/css/font.css. | ||
color | Specify the font color in 0xRRGGBB format. | ||
width | Specify the text display width in pixels. | ||
align | Specify 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. | ||
bold | Set text to bold by specifying bold. | ||
edge | Enable text edging. Specify the edge color in 0xRRGGBB format. | ||
shadow | Add a shadow to the text. Specify the shadow color in 0xRRGGBB format. Disabled if an edge is applied. | ||
fadeout | Whether to execute fade-out after displaying the text. true or false. | true | |
time | Specify the duration for which the text remains still, in milliseconds. | 2000 | |
wait | Whether to wait for animation completion before continuing. true or false. | true | |
in_effect | Specify the animation effect when the text appears. | fadeIn | |
out_effect | Specify the animation effect when the text disappears. | fadeOut |
; 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"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
text | 〇 | Specify the text to be displayed as ruby (furigana). |
[ruby text="kan"]漢[ruby text="ji"]字
Applies a highlighter-like effect to text.
Color and size can also be specified.
Parameter | Required | Description | Default |
---|---|---|---|
color | Specify the marker color in 0xRRGGBB format. The default is yellow. | 0xFFFF00 | |
font_color | Specify the font color when the marker is applied in 0xRRGGBB format. If omitted, it inherits the in-game font color. | ||
size | Specify 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. |
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]
[mark] Ends a text marker started with the [mark] tag.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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]
Allows changing the read status settings.
Parameter | Required | Description | Default |
---|---|---|---|
color | Specify the read text color in 0xRRGGBB format. | ||
skip | Whether the player can skip unread text. true or false. If false, skipping will be disabled when the player reaches unread text. |
Specifies various attributes for the message window.
If omitted, the setting remains unchanged.
Parameter | Required | Description | Default |
---|---|---|---|
layer | Specify the target message layer. | message0 | |
page | Specify whether to target the front or back page of the layer.fore or back. Defaults to the front page. | fore | |
left | Specify the left position of the message window (in pixels). | ||
top | Specify the top position of the message window (in pixels). | ||
width | Specify the width of the message window (in pixels). | ||
height | Specify 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. | ||
color | Specify the background color of the message window in 0xRRGGBB format. | ||
border_color | Specify the border color in 0xRRGGBB format. Requires border_size to be specified. | ||
border_size | Specify the border thickness. Set to 0 to hide the border. Default is 0. | ||
opacity | Specify the opacity of the message window (0-255).0 makes it fully transparent. (This does not affect text opacity or the layer opacity.) | ||
marginl | Specify the left margin of the message window. | ||
margint | Specify the top margin of the message window. | ||
marginr | Specify the right margin of the message window. | ||
marginb | Specify the bottom margin of the message window. | ||
margin | Specify 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. | ||
radius | Specify the roundness of the message window corners. Example:10 (slight round), 30 (moderate round), 100 (highly rounded). | ||
vertical | Whether to use vertical writing mode. true or false. true for vertical text, false for horizontal text. | ||
visible | Whether to display the message layer. true or false. Setting this also controls the visibility of the message layer. | ||
gradient | Apply 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." |
; 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]
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. |
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.
Parameter | Required | Description | Default |
---|---|---|---|
size | Specify the font size. | ||
color | Specify the text color in 0xRRGGBB format. | ||
bold | Enable bold text. true or false. | ||
italic | Enable italic text. true or false. | ||
face | Specify the font type. If using web fonts, define them in tyrano/css/font.css. | ||
edge | Enable 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_method | Choose the edge rendering method. Options: shadow or filter. | ||
shadow | Enable text shadow. Specify the shadow color in 0xRRGGBB format. To remove the shadow, specify none. | ||
effect | Apply text animation effects. Specify none to disable. Available options: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, rotateIn, zoomIn, slideIn, bounceIn, vanishIn, puffIn, rollIn. | ||
effect_speed | Specify the duration of the effect if effect is not none. Default: 0.2s (seconds). | ||
gradient | V515 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." |
[font size=40 bold=true]
This text is large and bold.
[resetfont]
The text has returned to its original size.
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.
Parameter | Required | Description | Default |
---|---|---|---|
size | Specify the font size. | ||
color | Specify the text color in 0xRRGGBB format. | ||
bold | Enable bold text. true or false. | ||
italic | Enable italic text. true or false. | ||
face | Specify 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. | ||
edge | Enable 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_method | Choose the edge rendering method. Options: shadow or filter. | ||
shadow | Enable text shadow. Specify the shadow color in 0xRRGGBB format. To remove the shadow, specify none. | ||
effect | Apply text animation effects. Specify none to disable. Available options: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, rotateIn, zoomIn, slideIn, bounceIn, vanishIn, puffIn, rollIn. | ||
effect_speed | Specify the duration of the effect if effect is not none. Default: 0.2s (seconds). | ||
gradient | V515 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." |
Available from TyranoScript V515.
Allows detailed configuration of message-related settings.
Omitted attributes remain unchanged.
Parameter | Required | Description | Default |
---|---|---|---|
ch_speed_in_click | Character 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_click | Text 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_text | Whether 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_float | Adjusts 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_left | When 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. | ||
kerning | Enable 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_nobreak | Adds words that should not be broken by word wrapping. Specify multiple words separated by commas. | ||
remove_word_nobreak | Removes previously added words from the no-break list. Specify multiple words separated by commas. | ||
line_spacing | Specify line spacing in pixels. | ||
letter_spacing | Specify letter spacing in pixels. | ||
control_line_break | Enable 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_chars | Specifies characters for manual line-break prevention. The default list includes 、。)」』】,.)]. |
; 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]
Specifies the text display speed.
To display text without waiting, you can also use the [nowait] tag.
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. |
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. |
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. |
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. |
[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]
Disables skip mode. Functions the same as [cancelskip].
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
Disables skip mode. Functions the same as [skipstop].
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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. |
Configures settings related to auto mode.
Parameter | Required | Description | Default |
---|---|---|---|
speed | Specify the speed of auto mode in milliseconds. | ||
clickstop | Determines 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. |
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 |
---|---|---|---|
layer | Specifies the target message layer. | message0 | |
page | Specifies whether to apply the effect to the front or back page of the layer. Use fore or back. Defaults to the front page. | fore | |
remove | Specify true or false. When set to true, removes the applied filter. | false | |
grayscale | Converts the display to grayscale by specifying a value between 0 (default) and 100. | ||
sepia | Applies a sepia tone effect by specifying a value between 0 (default) and 100. | ||
saturate | Adjusts color saturation (vividness) by specifying a value between 0 and 100 (default). | ||
hue | Adjusts hue by specifying a value between 0 (default) and 360. | ||
invert | Inverts color tones by specifying a value between 0 (default) and 100. | ||
opacity | Adjusts transparency by specifying a value between 0 and 100 (default). | ||
brightness | Adjusts brightness based on a default value of 100. Setting 0 makes it completely dark, while values above 100 increase brightness. | ||
contrast | Adjusts contrast by specifying a value between 0 and 100 (default). | ||
blur | Blurs the display by specifying a value between 0 (default) and any desired value. |
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]
When this tag is reached, text will no longer be recorded in the backlog.
Backlog recording resumes when the [endnolog] tag is reached.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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]
Resumes backlog recording that was temporarily paused by the [nolog] tag.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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]
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.
Parameter | Required | Description | Default |
---|---|---|---|
text | ✓ | Specifies the text to be added to the backlog. | |
join | Determines whether to concatenate the new entry with the previous backlog text. Specify true or false. | false |
[pushlog text="You can insert any log text here."]
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].
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specifies the name of the scenario file to jump to. If omitted, it is assumed to be the current scenario file. | ||
target | Specifies the name of the label to jump to. If omitted, the jump will go to the beginning of the scenario file. |
; Moves to the *start label in the scenario file "second.ks"
[jump storage=second.ks target=*start]
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.
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specifies the scenario file to jump to. If omitted, the current scenario file is assumed. | ||
target | Specifies the label name to jump to. If omitted, jumps to the beginning of the scenario file. | ||
keyfocus | If 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. |
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.
Used in combination with the [link] tag. Ends hyperlink formatting.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
[link target=*select1]【1】Choice One[endlink][r]
[link target=*select2]【2】Choice Two[endlink][r]
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.
Parameter | Required | Description | Default |
---|---|---|---|
graphic | Specifies the image to be used as a button. Place the file in the data/image folder. | ||
folder | Specifies 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 | |
storage | Specifies the scenario file to jump to. If omitted, the current scenario file is assumed. | ||
target | Specifies 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. | ||
x | Specifies the button's horizontal position. | ||
y | Specifies the button's vertical position. | ||
width | Specifies the button's width in pixels. | ||
height | Specifies 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). | false | |
role | Assigns 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) |
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]
[locate x=300 y=100]
[button graphic="toyo.png" target=*toyo]
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_force | If set to true, [glink] with x and y specified will also be forcibly auto-placed. | ||
margin_x | Horizontal margin (px) outside the button. | ||
margin_y | Vertical margin (px) outside the button. | ||
padding_x | Horizontal padding (px) inside the button. If set to default, no adjustment is made. | ||
padding_y | Vertical padding (px) inside the button. If set to default, no adjustment is made. | ||
width | If 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. | ||
height | If 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. | ||
vertical | Vertical alignment of buttons: top (align to top), center (align to center), bottom (align to bottom). | ||
horizontal | Horizontal alignment of buttons: left (align to left), center (align to center), right (align to right). | ||
wrap | When set to wrap, buttons will wrap when they do not fit within the designated area. | ||
place_area | Defines 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_time | Time (ms) for display animation. Setting 0 disables animation. Note: Buttons cannot be clicked during animation. | ||
show_effect | Animation effect for showing buttons. Available effects: fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, lightSpeedIn, rotateIn, zoomIn, bounceIn, vanishIn, puffIn. | ||
show_delay | Delay (ms) before each button appears. Setting 0 displays all buttons simultaneously. Example: 100 delays each button's appearance by 100ms. | ||
show_easing | Easing 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). |
[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]
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
Parameter | Required | Description | Default 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_color | Specifies the font color in0xRRGGBB format. | ||
storage | Specifies the scenario file name for the jump destination. If omitted, the current scenario file is assumed. | ||
target | Specifies 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.) | ||
text | Specifies the button text. | ||
x | Specifies the horizontal position of the button. | auto | |
y | Specifies the vertical position of the button. | ||
width | Specifies the button width in pixels. | ||
height | Specifies the button height in pixels. | ||
size | Specifies the font size. | 30 | |
face | Specifies the font. To use web fonts, define them intyrano/css/font.css. | ||
graphic | Specifies a background image for the button. Place the file in thedata/image folder. If an image is specified, thecolor setting is ignored. | ||
enterimg | Used whengraphic is specified. Sets an image to display when the cursor hovers over the button. | ||
clickse | Specifies a sound effect played when the button is clicked. Sound files should be placed in thedata/sound folder. | ||
autopos | Specifytrue 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 |
[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]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
width | 〇 | Specifies the width of the clickable area. | 0 |
height | 〇 | Specifies the height of the clickable area. | 0 |
x | Specifies the X coordinate of the left edge of the clickable area. | ||
y | Specifies the Y coordinate of the top edge of the clickable area. | ||
borderstyle | Specifies 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. | ||
color | Specifies the display color in0xRRGGBB format. | ||
opacity | Specifies the opacity of the area using a value between 0 and 255. A value of 0 makes the area completely transparent. | 140 | |
mouseopacity | Specifies the opacity of the area when the mouse hovers over it. | ||
storage | Specifies the scenario file name for the jump destination. If omitted, the current scenario file is assumed. | ||
target | Specifies the label name of the jump destination. If omitted, it jumps to the beginning of the scenario file. |
[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]
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.
Parameter | Required | Description | Default 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. |
; 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]
Allows you to change the basic settings for character operation tags.
Parameter | Required | Description | Default Value |
---|---|---|---|
pos_mode | true 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. | ||
memory | Specifies 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. | ||
anim | Specifies 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_time | Specifies the animation time in milliseconds for adjusting the character's position automatically. | ||
talk_focus | Enables 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_value | Specifies 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_value | Specifies the degree of blur for characters not talking when talk_focus=blur. The default is 2. A higher number results in more blur. | ||
talk_anim | Automatically 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_time | Specifies the animation time in milliseconds when talk_anim is enabled. | ||
talk_anim_value | Specifies the movement distance of the character when talk_anim is enabled. (in pixels) | ||
talk_anim_zoom_rate | Specifies the zoom rate when using zoom in talk_anim. The default is 1.2 | ||
effect | Specifies 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 |
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | ✔ | Specify 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. | |
storage | ✔ | Specifies the character image. Place the image file in the data/fgimage folder. | |
width | Specifies the image's width. | ||
height | Specifies the image's height. | ||
reflect | Specifies whether to flip the image horizontally. Use true or false. If set to true, the image will be flipped horizontally. | false | |
color | Specifies the color of the character's name when displayed. Use 0xRRGGBB format. | ||
jname | Specifies 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. |
[chara_new name=yuko storage=yuko.png jname=ゆうこ]
Displays a defined character on the screen.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | ✔ | Specifies the name attribute defined in [chara_new]. | |
time | Specifies the time in milliseconds. The character will appear over the specified time. | 1000 | |
layer | Specifies the layer where the character will be placed, using an integer of 0 or greater. | 0 | |
zindex | Specifies 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 | |
depth | If the zindex is the same, specify the stacking order as front (frontmost) or back (backmost). | front | |
page | Specifies fore or back. | fore | |
wait | If set to true, the system will wait for the character to finish appearing. | true | |
face | [chara_face] tag's face attribute is specified here. | ||
storage | Specifies the image file to change. Place the image file in the data/fgimage folder. | ||
reflect | Specifies whether to flip the image horizontally. Use true or false. If set to true, the image will be flipped horizontally. | ||
width | Specifies the character's width. | ||
height | Specifies the character's height. | ||
left | Specifies the character's horizontal position. If specified, automatic positioning will be disabled. | ||
top | Specifies the character's vertical position. If specified, automatic positioning will be disabled. |
[chara_show name="yuko" ]
[chara_show] Tag will remove the character displayed by the [chara_show] tag.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | ✔ | [chara_new] Define the name attribute specified in the [chara_new] tag. | |
time | Specifies the fade-out time in milliseconds. | 1000 | |
wait | Specify whether to wait for the fade-out to complete.true or false can be specified. | true | |
layer | Layer to be removed.[chara_show] If a layer is specified with this tag, it should also be specified here. | 0 | |
pos_mode | If character's position adjustment is enabled, setting this parameter to false will prevent position adjustment after the exit. | true |
[chara_hide name="yuko"]
[chara_show] Tag removes all characters displayed by the [chara_show] tag.
Parameter | Required | Description | Default Value |
---|---|---|---|
time | Specifies the fade-out time in milliseconds. | 1000 | |
wait | Specify whether to wait for the fade-out to complete.true or false can be specified. | true | |
layer | Layer to be removed.[chara_show] If a layer is specified in the [chara_show] tag, it should also be specified here. | 0 |
[chara_hide_all time=1000 wait=true]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | Specifies the name attribute defined in [chara_new] tag. |
[chara_delete="yuko" ]
Changes the character's image. This can be used for changing expressions.
Parameter | Required | Description | Default 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. | ||
storage | Specifies the image file to change. Image files should be placed in the data/fgimage folder. | ||
reflect | Specifies whether to reflect the image horizontally. Set to true or false. If set to true, the image will be mirrored. | ||
wait | Specifies 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 |
[chara_mod name="yuko" storage="newface.png"]
Changes the character's position and size. You can also animate the change over a specified time.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | [chara_new] Specifies the name defined in the tag. | |
left | Specifies the new horizontal position.left="+=200" or left="-=200" allows relative movement, specifying how far to move from the current position. | ||
top | Specifies the new vertical position.top="+=100" or top="-=100" allows relative movement, specifying how far to move from the current position. | ||
width | Specifies the new width of the character. | ||
height | Specifies the new height of the character. | ||
anim | Specifies 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 | |
time | Specifies the animation time in milliseconds. | 600 | |
wait | Specifies whether to wait for the animation to finish before continuing. Use true or false. | true | |
effect | Specifies 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 |
[chara_move name="yuko" time=100 left=20 top=100 ]
Register character expression images.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | The name of the character for which you are registering an expression.[chara_new] Specify the name attribute defined in the tag. | |
face | 〇 | Specify the name of the expression to register.happy, angry, etc., you can name it whatever you like for easy identification. | |
storage | 〇 | Specify the image file. Image files should be placed in the data/fgimage folder. |
;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
Define the character's expression difference parts.
The default part will be the first one registered.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | The name of the character for which you are registering the parts.[chara_new] Specify the name attribute defined in the tag. | |
part | 〇 | Specify the name of the part to register. For example, register the part called eye, and you can register multiple differences within this part. | |
id | 〇 | Specify 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. | |
storage | Specify 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. | ||
zindex | Specify 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. |
[chara_layer name="yuko" part=mouse id=egao storage="image/egao.png" ]
[chara_layer] tag settings can be modified.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | The name of the character whose part definition will be modified.[chara_new] Specify the name attribute defined in the tag. | |
part | 〇 | Specify the part name you want to modify. | |
zindex | Specify 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. |
[chara_layer_mod name="yuko" part=mouse zindex=20 ]
[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]
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | [chara_new] Defined character name. | |
time | Specifies the fade-in time for the parts to appear, in milliseconds. | ||
wait | Specifies whether to wait for the fade-in to complete.true orfalse. | true | |
allow_storage | true orfalse. Whentrue, you can specify the image file directly instead of using theid for thepart. Place the image in thefgimage folder. | false |
[chara_part name=yuko mouse=happy eye=happy]
[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.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | 〇 | [chara_new] tag specified character name. | |
part | You can reset specificparts. Multiple parts can be specified separated by commas. If omitted, all parts will be reverted to default. |
[chara_part_reset name=yuko]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | Specify 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. | ||
layer | Specify 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 | |
page | Specify whether to target the front or back page of the layer. Use fore or back. If omitted, the front page is assumed. | fore | |
visible | Specify 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. | ||
left | Specify the left edge position of the image (in pixels). | ||
top | Specify the top edge position of the image (in pixels). | ||
x | Specify the left edge position of the image, with higher priority than left (in pixels). | ||
y | Specify the top edge position of the image, with higher priority than top (in pixels). | ||
width | Specify the width of the image (in pixels). | ||
height | Specify the height of the image (in pixels). | ||
folder | Specify 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.) | ||
time | Specify the fade-in time in milliseconds. The image will gradually appear from a transparent state. If omitted, it will appear instantly. | ||
wait | Specify true or false to wait for the fade-in to complete. | true | |
zindex | Specify the stacking order of images. A higher number will place the image in front. | 1 | |
depth | If zindex is the same, specify the stacking order as front (frontmost) or back (backmost). The default is front. | front | |
reflect | If 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. | ||
animimg | If true, animated images in GIF or APNG format will play from the beginning. |
; 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"]
Deletes all images and other content on the specified layer.
Parameter | Required | Description | Default Value |
---|---|---|---|
layer | ✔ | Specifies the target layer. | |
page | Specifies whether to target the front or back page of the layer. Use fore or back. If omitted, the front page is assumed. | fore | |
time | Specifies the fade-out time in milliseconds. If specified, the image will gradually become transparent. If omitted, it will disappear instantly. | ||
wait | Specify whether to wait for the fade-out to complete: true or false. | true |
; 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"]
Deletes all elements specified by the name on the layer.name specification is required.
Parameter | Required | Description | Default Value |
---|---|---|---|
layer | ✔ | Specifies the target layer. | |
name | ✔ | Specifies the name of the element to delete. It can be applied to any element within the layer. | |
time | Specifies the fade-out time in milliseconds. If specified, the image will gradually fade to transparency. If omitted, it will be deleted instantly. | ||
wait | Specifies whether to wait for the fade-out to complete. Use true or false. | true |
[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 ]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
layer | Specifies 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. |
; Perform background change with transition
@layopt layer=message0 visible=false
[backlay]
[image layer=base page=back storage=rouka.jpg]
[trans time=2000]
[wt]
Waits until the transition is complete.
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters are available to specify. |
[backlay]
[image layer=base page=back storage=rouka.jpg]
[trans time=2000]
Transitioning...
[wt]
[cm]
The transition is complete[p]
Specifies the attributes of the layer.
Parameter | Required | Description | Default Value |
---|---|---|---|
layer | 〇 | Specifies 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. | |
page | Specifies 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 | |
visible | Specifies 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. | ||
left | Specifies 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.) | ||
top | Specifies 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.) | ||
opacity | Specifies the opacity of the layer in the range from0 to255. 0 means fully transparent, and255 means fully opaque. |
;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
Specifies the display position of graphic buttons.
Text is not supported.
Parameter | Required | Description | Default Value |
---|---|---|---|
x | Specifies the horizontal position (in pixels). | ||
y | Specifies the vertical position (in pixels). |
[locate x=20 y=100]
[button graphic="oda.png" target=*oda]
[locate x=300 y=100]
[button graphic="toyo.png" target=*toyo]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
layer | ✓ | Specifies 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 |
time | ✓ | Specifies 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. |
[backlay]
[image storage=fg0 layer=0 page=back]
[trans time=1500 ]
[wt]
Allows for an easy background switch.
It always switches the layer designated asfore.
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | ✓ | Specify the image file name. The file should be placed in thedata/bgimage directory. | |
time | Specifies the time for the background switch in milliseconds. | 3000 | |
wait | Specifies 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 | |
cross | Specifytrue 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 | |
position | If 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 |
[bg storage=fg0.png time=1500 wait=true]
Allows for a simple background switch.
It always performs the switch on thefore layer.
Parameter | Required | Description | Default 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.) | ||
storage | ✓ | Specify the image file name. The file should be placed in thedata/bgimage directory. | |
left | Specify the left edge position of the image in pixels. The default value of0 will place it at the top of the game screen. | ||
top | Specify the top edge position of the image in pixels. The default value of0 will place it at the top of the game screen. | ||
width | Specify the image width in pixels. If omitted, it will stretch to fill the game screen. | ||
height | Specify the image height in pixels. If omitted, it will stretch to fill the game screen. | ||
time | Specify the transition time for the background switch in milliseconds. | 3000 | |
wait | Specifies 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 | |
cross | Specifytrue 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 |
[bg storage=fg0.png time=1500 wait=true]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | By specifying this, you can clear only the corresponding element. |
; 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"]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
count | Specifies the number of shakes. | 5 | |
wait | Whether to wait for the shake to finish.true orfalse to specify. | true | |
time | 〇 | Specifies the time in milliseconds for one shake. | 300 |
hmax | Specifies the maximum amplitude of the shake horizontally. | 0 | |
vmax | Specifies the maximum amplitude of the shake vertically. | 10 |
[quake count=5 time=300 hmax=20]
Shakes the screen for the specified number of milliseconds.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
time | Specifies the total time for the shake in milliseconds. | 1000 | |
hmax | Specifies the maximum amplitude of the shake horizontally. | 0 | |
vmax | Specifies the maximum amplitude of the shake vertically. | 200 | |
wait | Whether to wait for the shake to finish.true orfalse to specify. | true | |
copybase | Iftrue, 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 |
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]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
time | The 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 | |
power | The strength of the vibration (0 to 100). This parameter is only effective when vibrating a gamepad. | 100 | |
count | The number of times to repeat the vibration. |
[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] You can stop the vibration of the mobile device or gamepad that was started with the [vibrate] tag.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters can be specified. |
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | Specify 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. | ||
graphic | Specify the image file for the composite. The file should be placed in the image folder. | ||
color | You can also composite a solid color instead of an image. In that case, specify the composite color in 0xRRGGBB format. | ||
mode | You 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 | |
folder | You can change the folder for the image specified by graphic. For example, if you specify bgimage, it will fetch images from the bgimage folder. | ||
opacity | Specify the opacity of the image in the range of 0 to 255. 0 means completely transparent. | ||
time | Specify the fade-in time in milliseconds. If specified, the image will gradually appear from a transparent state. If omitted, it will appear instantly. | 500 | |
wait | Specify whether to wait for the fade-in to complete. You can use true or false. | true |
[layermode graphic=fg0.png time=1500 mode=overlay]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | You can assign a name to the composite layer. This name is used with the [free_layremovde] tag to remove specific composite layers. | ||
video | 〇 | Specify the video file to composite. The file should be placed in the data/video folder. | |
volume | Specify the volume of the composite video, from 0 to 100. | ||
mute | Specify 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 | |
loop | Specify 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 | |
speed | Specify the video playback speed. For example, 2 will play at 2x speed, 0.5 will play at half speed. | ||
mode | You 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 | |
opacity | Specify the opacity of the composite layer, from 0 to 255. 0 means completely transparent. | ||
time | Specify the fade-in time in milliseconds. | 500 | |
left | Specify the position of the composite layer (in pixels). | ||
top | Specify the position of the composite layer (in pixels). | ||
width | Specify the width of the composite layer (in pixels). | ||
height | Specify the height of the composite layer (in pixels). | ||
fit | Specify whether to stretch the composite layer to fit the game screen. Use true or false. | true | |
wait | Specify whether to wait for the video to finish playing before moving to the next action. Use true or false. | false |
[layermode_movie video=test.webm time=1500 wait=true]
Removes the composite layer.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | Specifies the name of the composite layer to be removed. If omitted, all composite layers are removed. | ||
time | Specifies the fade-out time in milliseconds. | 500 | |
wait | Specifies whether to wait for the fade-out to complete. Use true or false. | true |
[free_layermode name="test"]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
storage | 〇 | Specify the video file to play. | |
skip | Whether 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 | |
mute | Whether 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 | |
volume | Set the volume of the video from 0 to 100. |
; 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"]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
storage | 〇 | Specify the video file to play. | |
time | Specify the fade-in time in milliseconds. | 300 | |
mute | Whether 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 | |
volume | Set the video volume from 0 to 100. | ||
loop | Whether to loop the background video.true or false. If set to false, the video stops at the last frame. | true |
[bgmovie storage=cat.mp4]
Stops the background video played by [bgmovie].
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
time | Specifies the fade-out time in milliseconds. | 300 | |
wait | Specifies whether to wait for the fade-out to complete. You can set it to true or false. | true |
[bgmovie storage=cat.mp4]
Stopping the video[p]
[stop_bgmovie]
The video has been stopped[p]
Apply various filter effects to specified layers or objects.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
layer | Specify the layer to apply the filter. If omitted or specified as all, the effect will be applied to the entire game screen. | all | |
name | If you want to apply the filter to a specific element, specify its name. | ||
grayscale | Specify a value between 0 (default) and 100 to convert the image to grayscale. | ||
sepia | Specify a value between 0 (default) and 100 to convert the image to sepia tone. | ||
saturate | Specify a value between 0 and 100 (default) to change the saturation (vividness) of the image. | ||
hue | Specify a value between 0 (default) and 360 to change the hue (color) of the image. | ||
invert | Specify a value between 0 (default) and 100 to invert the image’s tones. | ||
opacity | Specify a value between 0 and 100 (default) to change the image’s transparency. | ||
brightness | Specify 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. | ||
contrast | Specify a value between 0 and 100 (default) to change the contrast of the image. | ||
blur | Specify a value between 0 (default) and any value to blur the image. |
;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 ]
Specify a layer or object to remove the [filter] effect.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
layer | Specify the layer to remove the filter effect. If not specified, all filters will be removed. | ||
name | If you want to remove the filter from a specific element, specify the element's name. |
;Remove filter from a specific object
[free_filter layer=0 name=chara_a]
;Remove all filters
[free_filter]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
time | The 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 | |
color | You can specify the color of the darkening in 0xRRGGBB format. The default is black. | 0x000000 | |
graphic | If specified, an image can be used for the darkened area. The image should be placed in the data/image folder. | ||
folder | If 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. |
;Start darkening
[mask effect="fadeInDownBig" time=2000]
;Background image setup during darkening
[bg storage="umi.jpg" time=500]
;Turn off darkening
[mask_off]
Removes the screen mask and resumes the game.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
time | The 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 |
;Start darkening
[mask effect="fadeInDownBig" time=2000]
;Background image setup during darkening
[bg storage="umi.jpg" time=500]
;Turn off darkening
[mask_off]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | This specifies the element to animate, using the value set for the name attribute. | ||
layer | If the name attribute is specified, this will be ignored. Specifies the foreground layer, and it is always applied to the "fore" page. | ||
left | Specifies the horizontal position to move the element to during animation. | ||
top | Specifies the vertical position to move the element to during animation. | ||
width | Specifies the width of the element during animation. | ||
height | Specifies the height of the element during animation. | ||
opacity | Specifies the opacity (from 0 to 255) to animate to. | ||
color | Specifies the color during animation. | ||
time | Specifies the time in milliseconds for the animation. The default is 2000 milliseconds. | 2000 | |
effect | Specifies the effect for the animation. The following keywords can be used:jswingdefeaseInQuadeaseOutQuadeaseInOutQuadeaseInCubiceaseOutCubiceaseInOutCubiceaseInQuarteaseOutQuarteaseInOutQuarteaseInQuinteaseOutQuinteaseInOutQuinteaseInSineeaseOutSineeaseInOutSineeaseInExpoeaseOutExpoeaseInOutExpoeaseInCirceaseOutCirceaseInOutCirceaseInElasticeaseOutElasticeaseInOutElasticeaseInBackeaseOutBackeaseInOutBackeaseInBounceeaseOutBounceeaseInOutBounce |
[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
Start defining the keyframe animation.
The defined keyframe animation can be used with the [kanim] tag.
Parameter | Required | Description | Initial Value |
---|---|---|---|
name | 〇 | Specify the name of the keyframe animation.[kanim] tag will be used for it. |
;---- Defining keyframe
[keyframe name="fuwafuwa"]
[frame p=40% x="100" ]
[frame p=100% y="-200" opacity=0 ]
[endkeyframe]
;----- Execute the defined animation
Defines a single keyframe.[keyframe] and [endkeyframe] should be written between these tags.
Parameter | Required | Description | Default Value |
---|---|---|---|
p | 〇 | Specifies 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. | |
x | Specifies 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). | ||
y | Specifies the animation amount along the Y-axis in pixels. You can use an asterisk (*) to specify absolute positions. | ||
z | Specifies 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. | ||
rotate | Allows rotating the target. For example, to rotate by 180 degrees, specify 180deg. | ||
rotateX | Allows rotating the target around the X-axis. | ||
rotateY | Allows rotating the target around the Y-axis. | ||
rotateZ | Allows rotating the target around the Z-axis. | ||
scale | Allows scaling the target. To double the size, specify 2, and to halve the size, specify 0.5. | ||
scaleX | Allows scaling along the X-axis. | ||
scaleY | Allows scaling along the Y-axis. | ||
scaleZ | Allows scaling along the Z-axis. | ||
skew | Allows specifying the skew. | ||
skewX | Allows specifying the X skew. | ||
skewY | Allows specifying the Y skew. | ||
perspective | Allows applying perspective effects. Supported by some browsers only. | ||
opacity | Specifies the opacity as a value between 0 and 255. 0 makes it completely transparent. | ||
Other | Various CSS styles can be specified. |
Executes the keyframe animation. You need to define the keyframe animation in advance using the [keyframe] tag.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | Specifies the name of the image or text to animate. | ||
layer | If the name is not specified, you can specify the layer to animate all elements in that layer. | ||
keyframe | 〇 | Specifies the name of the keyframe animation to apply. | |
time | Specifies the duration of the animation in milliseconds. | ||
easing | Specifies 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. | ||
count | Specifies the number of times the animation should repeat. You can specify infinite for an infinite loop. | ||
delay | Specifies the delay before the animation starts. The default is 0, meaning no delay. | ||
direction | When looping the animation multiple times, specifies whether even-numbered loops should play in reverse. Specify alternate to play even loops in reverse. | ||
mode | Specifies 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. |
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | Specifies the name of the image or text to animate. | ||
layer | If no name is specified, you can specify the layer to animate all elements in that layer. | ||
keyframe | Specifies the name of the keyframe animation to apply. | ||
time | Specifies the duration of the animation in milliseconds. | ||
easing | All the keywords available for the [anim] tag and [kanim] tag can be used. | ease | |
count | Specifies the number of times to play the animation. Use infinite to loop it infinitely. | 1 | |
delay | Specifies the delay before starting the animation. The default value is 0, meaning no delay. | 0 | |
direction | When 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 | |
mode | Specifies 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 | |
svg | Specifies an SVG file. Place it in the image folder. This allows animation along the | ||
svg_x | When specifying an SVG file, you can set whether to align the X-coordinate to | true | |
svg_y | When specifying an SVG file, you can set whether to align the Y-coordinate to | true | |
svg_rotate | When specifying an SVG file, you can set whether to align the rotation angle to | false | |
wait | Specifies whether to wait for the animation to complete.true or false. | false | |
Other | Other parameters available for the [anim] tag, as well as various CSS properties, can be animated. |
; 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"]
Available from V515 onward.
Stops the animation that was started with the [xanim] tag.
Parameter | Required | Description | Default Value |
---|---|---|---|
name | Specifies the name of the image or text to stop the animation. | ||
layer | If no name is specified, you can specify the layer to stop the animation for all elements in that layer. | ||
complete | If true, it moves instantly to the position where the animation was supposed to reach.If false, it stops at the current position. | false |
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
time | Specifies the time in milliseconds for the camera to move to the coordinates. | 1000 | |
x | Specifies the X-coordinate for the camera movement. | ||
y | Specifies the Y-coordinate for the camera movement. | ||
zoom | Specifies the zoom level of the camera. For example, specifying 2 will double the zoom. | ||
rotate | Specifies the tilt of the camera. For example, specifying 20 will tilt the camera by 20 degrees. | ||
from_x | Specifies the starting X-coordinate of the camera movement. | ||
from_y | Specifies the starting Y-coordinate of the camera movement. | ||
from_zoom | Specifies the starting zoom level of the camera. | ||
from_rotate | Specifies the starting tilt of the camera. | ||
wait | Specifies 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 | |
layer | Specifies 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_type | Specifies 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 |
[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]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
time | Specifies the time in milliseconds for the camera to move. | 1000 | |
wait | Specifies 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 | |
layer | Specifies 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_type | Specifies 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 |
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."
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters can be specified. |
[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]
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.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
[link target=*select1]【1】Choice Option 1[endlink][r]
[link target=*select2]【2】Choice Option 2[endlink][r]
[s]
Inserts a wait period. During the time specified by the time attribute, the game will be unresponsive.
Parameter | Required | Description | Default |
---|---|---|---|
time | ✔ | Specifies the wait time in milliseconds. |
Waiting for 2 seconds……
; Stops processing for 2000 milliseconds (2 seconds)
[wait time=2000]
Waited for 2 seconds[p]
[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.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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.
Parameter | Required | Description | Default |
---|---|---|---|
title | Specifies the title for the saved data. |
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]
[autosave] Loads the data saved by the [autosave] tag.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
[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.
Parameter | Required | Description | Default |
---|---|---|---|
name | 〇 | Specifies the checkpoint name. |
[checkpoint name="p1"]
;Here you can change various elements on the screen
;You can return to the checkpoint location from anywhere
[rollback checkpoint="p1"]
[checkpoint] You can return to the location you passed through with the [checkpoint] tag from anywhere.
Parameter | Required | Description | Default |
---|---|---|---|
checkpoint | 〇 | Specifies the checkpoint name. | |
variable_over | true or false can be specified. If you specify true, the current game variables will be carried over after the rollback. The default is true | true | |
bgm_over | true or false can be specified. If you specify true, the BGM will be carried over after the rollback. The default is false | false |
[checkpoint name="p1"]
;Change various elements on the screen here
;You can return to the checkpoint location from anywhere
[rollback checkpoint="p1"]
[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.
Parameter | Required | Description | Default |
---|---|---|---|
name | Specify the name of the checkpoint to delete. If not specified, all checkpoints will be deleted. |
;Create a checkpoint
[checkpoint name="p1"]
[clear_checkpoint name="p1"]
Displays a confirmation dialog.
There are the following types of dialogs:
alertconfirminput
※input is deprecated. It is not recommended for use.
Parameter | Required | Description | Default |
---|---|---|---|
type | Specify the type of dialog using one of the following keywords: alert(warning) confirm(confirmation) input(input) | alert | |
name | For input dialogs, specify the variable name to store the input value.f.name etc. | tf.dialog_value | |
text | The message to be displayed in the dialog. | ||
storage | Specify the scenario file to jump to when the OK button is pressed. If omitted, the current scenario file is used. | ||
target | Specify 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_cancel | Specify the scenario file to jump to when the Cancel button is pressed. If omitted, the current scenario file is used. | ||
target_cancel | Specify the label to jump to when the Cancel button is pressed. If omitted, the start of the scenario file is used. | ||
label_ok | Change the text of the OK button. | OK | |
label_cancel | Change the text of the Cancel button. | Cancel |
;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]
[stop_keyconfig] enables the key configuration that was disabled using this tag.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
[start_keyconfig]
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
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
Key config is enabled[p]
[stop_keyconfig]
This is disabled[p]
This is also disabled[p]
[start_keyconfig]
This is enabled again[p]
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.
Parameter | Required | Description | Default |
---|---|---|---|
file | 〇 | Specify the path of the patch file. The path should start from the exe file's hierarchy. | |
reload | true or false can be specified. If true is specified, the game will automatically restart after the patch is applied. | false |
[apply_local_patch file="test.tpatch" ]
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.
Parameter | Required | Description | Default |
---|---|---|---|
url | 〇 | Specify the URL of the patch json file. |
[check_web_patch url="http://tyrano.jp/patch/mygame.json" ]
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.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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]
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].
Parameter | Required | Description | Default |
---|---|---|---|
line | Specifies 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 | |
fix | If you specify true, the glyph will be displayed at a fixed position on the screen instead of at the end of the message. | false | |
left | Specifies the horizontal position of the glyph. (Only effective if fix is set to true) | 0 | |
top | Specifies the vertical position of the glyph. (Only effective if fix is set to true) | 0 | |
folder | Specifies the folder to search for the glyph's image. | tyrano/images/system | |
width | Specifies the horizontal width of the glyph in pixels. | ||
height | Specifies the vertical height of the glyph in pixels. | ||
marginl | Specifies the left margin of the glyph in pixels. | 3 | |
marginb | Specifies the bottom margin of the glyph in pixels. | 0 | |
anim | Specifies 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) | ||
time | Specifies the duration of the animation in milliseconds. | ||
figure | Specifies 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) | ||
color | Specifies the color of the shape when using a shape for the glyph. | 0xFFFFFF | |
name | Specifies the class name to apply to the glyph. (For advanced users) | ||
html | Specifies the HTML content for the glyph. (For advanced users) | ||
keyframe | Specifies the name of the keyframe animation to apply. It cannot be used with anim. | ||
easing | Specifies 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. | ||
count | Specifies the number of times the animation will repeat. Use infinite for an infinite loop. | ||
delay | Specifies the delay before the animation starts. The default is 0, meaning no delay. | ||
direction | Specifies whether to reverse the animation on every even loop. Use alternate for reverse playback on every second loop. | ||
mode | Specifies 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_anim | Specifies the image to use for frame animation. The image must contain all frames lined up horizontally in one image file. | ||
koma_count | Specifies the number of frames in the frame animation. If specified, you can omit koma_width. | ||
koma_width | Specifies the width of one frame in the frame animation in pixels. If specified, you can omit koma_count. | ||
koma_anim_time | Specifies the duration of one cycle of the frame animation in milliseconds. | 1000 |
[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]
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.
Parameter | Required | Description | Default |
---|---|---|---|
use | You can treat elements already displayed on the screen as skip mode glyphs.[ptext] and [image] name settings can be specified here. | ||
delete | If 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. |
; 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"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
fix | If 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. | ||
use | You can treat elements already displayed on the screen as fixed auto mode glyphs.[ptext] and [image] name settings can be specified here. | ||
delete | If true is specified, it will execute the process of deleting the glyph definition. | ||
Others | [glyph] parameters can be specified. |
Displays the menu button.
Parameter | Required | Description | Default |
---|---|---|---|
keyfocus | If 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 |
[showmenubutton]
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.
Parameter | Required | Description | Default |
---|---|---|---|
bgimage | Specify the image to be set as the background outside the game screen.bgimage should be placed in the appropriate folder. | ||
bgrepeat | Specify 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) | ||
bgcolor | Specify the background color in0xRRGGBB format.bgimage will be ignored if it is set. | ||
bgcover | Specify whether to stretch the background image to cover the entire screen. Specifytrue orfalse. | false | |
scWidth | You 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. | ||
scHeight | You can change the original height of the game screen during gameplay. This tag is intended for responsive design.Config.tjs equivalent toscHeight. |
[body bgimage="back.png" bgcolor="black" ]
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
Parameter | Required | Description | Default |
---|---|---|---|
name | 〇 | Specify the title you want to display |
[title name="Updated Title"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specifies 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. | ||
x | Moves the cursor image to the left by the specified number of pixels. | 0 | |
y | Moves the cursor image upward by the specified number of pixels. | 0 | |
type | If you want to change the cursor when hovering over buttons, specify pointer for this parameter. | default | |
auto_hide | Determines 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_effect | Enables or disables a click effect. Specify true or false. | ||
e_width | Specifies the width of the click effect in pixels. | ||
e_opacity | Specifies the initial opacity of the click effect (0 to 255). | ||
e_time | Specifies the duration of the click effect in milliseconds. | ||
e_color | Specifies the color of the click effect. | ||
e_blend | Specifies 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_scale | Specifies the scaling percentage of the click effect. For example, setting 200 will make the effect grow to 200% of its original size. |
; 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"]
You can change the HTML files used for system-related features.
Parameter | Required | Description | Default |
---|---|---|---|
type | 〇 | Can specify save, load, backlog, or menu. | |
storage | 〇 | Specify the path of the HTML file. |
[sysview type="save" storage="./data/others/plugin/mytheme/html/save.html" ]
[sysview type="load" storage="./data/others/plugin/mytheme/html/load.html" ]
[sysview type="backlog" storage="./data/others/plugin/mytheme/html/backlog.html" ]
[sysview type="menu" storage="./data/others/plugin/mytheme/html/menu.html]
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).
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specify 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. | ||
folder | If you want to retrieve the image from a folder other than bgimage, specify it here. For example, others, fgimage, image, etc. |
; Change the save thumbnail image
[save_img storage="my_capture.png" ]
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
Parameter | Required | Description | Default |
---|---|---|---|
storage | 〇 | Specify the scenario file name to jump to. If omitted, the current scenario file is assumed. | |
target | Specify the label name to jump to. If omitted, it jumps to the beginning of the scenario file. |
[call storage="resize.ks"]
; Declare that resize.ks will be called when the screen aspect ratio changes
[set_resizecall storage="resize.ks" ]
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).
Parameter | Required | Description | Default |
---|---|---|---|
btntype | Specify the button type collectively. Available keywords follow the [glink] tag’s color parameter. | ||
btnwidth | Specify the button width in pixels. | ||
btnmargin | Specify 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. | ||
btnpadding | Specify 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. | ||
fontsize | Specify the text size of the message. | ||
fontbold | Set to true to make the message text bold. | ||
fontface | Specify the font of the message text. | ||
fontcolor | Specify the font color of the message text. | ||
btnfontsize | Specify the button text size. | ||
btnfontbold | Set to true to make the button text bold. | ||
btnfontface | Specify the button font. | ||
btnfontcolor | Specify the button text color. | ||
boxcolor | Specify the background color of the message box. | ||
boxopacity | Specify the opacity of the message box between 0 and 255 (255 is fully opaque). | ||
boxradius | Specify the radius of rounded corners for the message box. | ||
boxwidth | Specify the width of the message box in pixels. | ||
boxheight | Specify the height of the message box in pixels. | ||
bgcolor | Specify the background color outside the dialog box. | ||
bgopacity | Specify the opacity of the background outside the dialog between 0 and 255 (255 is fully opaque). | ||
gotitle | Modify the text displayed when confirming whether to return to the title screen. | ||
okpos | Specify the position of the "OK" button: left for left placement, right for right placement. | ||
ingame | Set to true to confine the confirmation dialog within the game screen instead of the full display. false reverts to normal. |
[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"]
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.)
Parameter | Required | Description | Default |
---|---|---|---|
text | Specify the text for the OK button. | ||
type | Specify the type of OK button. Available keywords follow the [glink] tag’s color parameter. | ||
width | Specify the width of the OK button in pixels. | ||
margin | Specify 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. | ||
padding | Specify 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. | ||
fontsize | Specify the text size of the OK button. | ||
fontbold | Set to true to make the button text bold. | ||
fontface | Specify the font for the OK button. | ||
fontcolor | Specify the text color of the OK button. | ||
img | Use an image for the OK button. Specify the file path relative to the image folder. | ||
imgwidth | Specify the width of the OK button image in pixels. | ||
enterimg | Image file for when the mouse hovers over the OK button. Searched in the image folder. | ||
activeimg | Image file for when the OK button is pressed. Searched in the image folder. | ||
clickimg | Image file for after clicking the OK button. Searched in the image folder. | ||
enterse | Sound file played when hovering over the OK button. Searched in the sound folder. | ||
leavese | Sound file played when moving the mouse away from the OK button. Searched in the sound folder. | ||
clickse | Sound file played when pressing the OK button. Searched in the sound folder. | ||
btnimgtype | If 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.) |
[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"]
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.)
Parameter | Required | Description | Default |
---|---|---|---|
text | Specify the text for the Cancel button. | ||
type | Specify the type of Cancel button. Available keywords follow the [glink] tag’s color parameter. | ||
width | Specify the width of the Cancel button in pixels. | ||
margin | Specify 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. | ||
padding | Specify 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. | ||
fontsize | Specify the text size of the Cancel button. | ||
fontbold | Set to true to make the button text bold. | ||
fontface | Specify the font for the Cancel button. | ||
fontcolor | Specify the text color of the Cancel button. | ||
img | Use an image for the Cancel button. Specify the file path relative to the image folder. | ||
imgwidth | Specify the width of the Cancel button image in pixels. | ||
enterimg | Image file for when the mouse hovers over the Cancel button. Searched in the image folder. | ||
activeimg | Image file for when the Cancel button is pressed. Searched in the image folder. | ||
clickimg | Image file for after clicking the Cancel button. Searched in the image folder. | ||
enterse | Sound file played when hovering over the Cancel button. Searched in the sound folder. | ||
leavese | Sound file played when moving the mouse away from the Cancel button. Searched in the sound folder. | ||
clickse | Sound file played when pressing the Cancel button. Searched in the sound folder. | ||
btnimgtype | If 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.) |
[dialog_config_ng text="Cancel"]
[dialog_config_ng width="200" margin="10,30" type="btn_04_white"]
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).
Parameter | Required | Description | Default |
---|---|---|---|
layer | Specify the layer to apply the filter. If omitted or if all is specified, the effect applies to the entire game screen. | ||
name | Specify the name of the specific element to apply the filter to. | ||
grayscale | Specify a value from 0 (default) to 100 to convert the image to grayscale. | ||
sepia | Specify a value from 0 (default) to 100 to convert the image to sepia tone. | ||
saturate | Specify a value from 0 to 100 (default) to change the saturation (vividness) of the image. | ||
hue | Specify a value from 0 (default) to 360 to change the hue of the image. | ||
invert | Specify a value from 0 (default) to 100 to invert the tone of the image. | ||
opacity | Specify a value from 0 to 100 (default) to change the transparency of the image. | ||
brightness | Specify 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. | ||
contrast | Specify a value from 0 to 100 (default) to change the contrast of the image. | ||
blur | Specify a value from 0 (default) to any value to blur the image. |
[dialog_config_filter blur="15"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
skip | The 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. | ||
auto | The effect displayed when auto mode starts. It is specified the same way as the skip parameter. | ||
stop | The effect displayed when skip mode or auto mode stops. It is specified the same way as the skip parameter. | ||
holdskip | The effect displayed when hold skip mode starts. It is specified the same way as the skip parameter. | ||
holdstop | The effect displayed when hold stop mode stops. It is specified the same way as the skip parameter. | ||
all | You can specify all five effects at once. It is specified the same way as the skip parameter. | ||
env | You 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 | |
width | If you want to specify the width of the effect, provide a value in pixels. | ||
height | If you want to specify the height of the effect, provide a value in pixels. | ||
color | If you use default for the effect, you can specify the color of the shape part. | ||
bgcolor | If you use default for the effect, you can specify the color of the circular part surrounding the shape. |
[mode_effect all="default" holdskip="none" holdstop="none"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
preload | You 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. | ||
save | You 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. | ||
all | You can specify both preload and save parameters together. For example, specifying all="default" will set the default text for all logs. | ||
dottime | You 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. | ||
icon | You 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. |
[loading_log all="default"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
name | ✓ | If you specify default, no localization will be applied. |
[lang_set name="en"]
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.
Parameter | Required | Description | Default |
---|---|---|---|
url | 〇 | Specify 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. |
; 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] 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.
Parameter | Required | Description | Default |
---|---|---|---|
left | Specifies the left position of the HTML (in pixels). | ||
top | Specifies the top position of the HTML (in pixels). | ||
name | You can specify a name for the HTML area. This name can be used to apply animations to the HTML area. |
; 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&hl=ja_JP&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&hl=ja_JP&rel=0" type="application/x-shockwave-flash" width="200" height="113" allowscriptaccess="always" allowfullscreen="true">
</embed></object>
[endhtml]
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.
Parameter | Required | Description | Default |
---|---|---|---|
stack | call, 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. |
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.
Parameter | Required | Description | Default |
---|---|---|---|
exp | ✔ | Specify the JavaScript expression to be evaluated. |
; 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]
[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.
Parameter | Required | Description | Default |
---|---|---|---|
exp | ✔ | Specify the JavaScript expression to be evaluated. |
[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.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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.
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specifies the scenario file containing the subroutine to be called. If omitted, it is assumed to be within the current scenario file. | ||
target | Specifies the label of the subroutine to call. If omitted, execution starts from the beginning of the file. |
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]
Returns to the caller from the subroutine. For details, refer to the [call] section.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters available. |
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.
Parameter | Required | Description | Default |
---|---|---|---|
name | 〇 | Specify the name of the macro. You can later call this macro by writing the name as a tag. ★Important |
;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]
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.
Parameter | Required | Description | Default |
---|---|---|---|
exp | Yes | Specify the JavaScript expression to evaluate. |
[ignore] ends the description of the [ignore] tag.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
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:
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specify the scenario file name for the jump destination. If omitted, the current scenario file is assumed. | ||
target | Specify the label name for the jump destination. If omitted, the jump will go to the beginning of the scenario file. | ||
next | Specify true or false. If false is specified, the game will not proceed to the next tag when returning via the [awakegame] tag. | true |
[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" ]
[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.
Parameter | Required | Description | Default |
---|---|---|---|
variable_over | true or false can be specified.true will carry over the game variables changed during [sleepgame] when resuming the game. | true | |
bgm_over | true or false can be specified.true will carry over the BGM playing during [sleepgame] when resuming the game. | true |
[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.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
Loads an external JavaScript file. Unlimited functionality expansion is possible.
The JavaScript file should be placed in thedata/others folder.
Parameter | Required | Description | Default |
---|---|---|---|
storage | 〇 | Specifies the JavaScript file to be loaded. | |
type | Loading method. You can specifymodule. |
;Load data/others/sample.js
[loadjs storage="sample.js"]
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).
Parameter | Required | Description | Default |
---|---|---|---|
exp | 〇 | The JavaScript statement to execute. |
[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
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.
Parameter | Required | Description | Default |
---|---|---|---|
exp | Specify the JS expression to evaluate. |
;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] and [endscript] can be used to enclose JavaScript code.
Parameter | Required | Explanation | Default |
---|---|---|---|
No parameters can be specified. |
[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]
Ends the JavaScript code section.
Parameter | Required | Explanation | Default |
---|---|---|---|
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 |
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.
Parameter | Required | Explanation | Default |
---|---|---|---|
exp | 〇 | Specifies the JavaScript expression to be evaluated. Generally, you should specify the variable's name.f.namesf.text, etc. |
; 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] 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.
Parameter | Required | Description | Default |
---|---|---|---|
storage | 〇 | Specify the full path of the file to be preloaded. You can also specify a JavaScript array. | |
wait | Specify 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_use | This 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 | |
name | This 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. |
; 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]
[preload] After using the tag with wait=false and performing some effects, this tag waits until all preloading is completed.
Parameter | Required | Description | Default |
---|---|---|---|
No parameters can be specified. |
; 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]
[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.
Parameter | Required | Description | Default |
---|---|---|---|
storage | Specify the location of the preloaded audio data to discard. This should match what was specified in [preload]. | ||
name | Use the name specified in [preload] to collectively discard preloaded audio data. | ||
all_sound | Specify true to discard all preloaded audio data. | false |
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.
Parameter | Required | Description | Default |
---|---|---|---|
name | 〇 | Specify the name of the plugin to load. Plugins should be placed in the data/others/plugin folder. | |
storage | You can change the initial scenario file that is loaded. | init.ks |
; 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" ]
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.)
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | 〇 | Specifies the music file to be played. | |
loop | Specifies whether the music should loop.true orfalse. | true | |
sprite_time | You 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:. | ||
volume | Specifies the playback volume. Values range from0 to100. | ||
html5 | Usually, you don’t need to specify this. Set totrue to use HTML5 Audio, orfalse (default) to use Web Audio API. | false | |
pause | Iftrue is specified, the BGM will not start immediately. You can resume playback later with[resumebgm]. | false | |
seek | Specifies the starting time of playback. For example, specifying 4.5 will start the BGM at 4.5 seconds. | ||
restart | If 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. |
[playbgm storage=music.mp3]
Gradually plays background music (BGM).
Not supported in some environments (Firefox, Safari, etc.). In such cases, it functions as [playbgm].
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | 〇 | Specifies the music file to be played. | |
loop | Specifies whether the music should loop.true or false. | true | |
sprite_time | Specifies 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 :. | ||
time | Specifies the fade-in duration in milliseconds. | 2000 | |
volume | Specifies playback volume within a range of 0 to 100. | ||
html5 | Usually, this does not need to be specified. Set to true to use HTML5 Audio, or false (default) to use Web Audio API. | false | |
pause | Set to true to prevent BGM from playing immediately upon execution. [resumebgm] can be used to start playback. | false | |
seek | Specifies the playback start time. For example, setting 4.5 starts playback from 4.5 seconds. |
[fadeinbgm storage=sample.mp3 loop=false time=3000]
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].
Parameter | Required | Description | Default Value |
---|---|---|---|
time | Specifies the fade-out duration in milliseconds. | 2000 |
[fadeoutbgm time=3000]
[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.
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | 〇 | Specifies the file to be played next. | |
loop | Specifies whether the music should loop. You can use true or false to specify. | true | |
time | Specifies the duration of the crossfade in milliseconds. | 2000 |
[xchgbgm storage=new.mp3 loop=true time=3000]
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.)
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | 〇 | Specifies the audio file to be played. | |
buf | Specifies the slot to play the sound effect. If the sound effect is already playing in the specified slot, it will be stopped. | 0 | |
loop | Specifies whether it should loop.true or false can be used. | false | |
sprite_time | Specifies 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 :. | ||
clear | Specifies 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 | |
volume | Specifies the volume of the sound effect. Use a value between 0 and 100. | ||
html5 | You can generally leave this unspecified. Set to true to use HTML5 Audio, or false (default) for Web Audio API. | false |
[playse storage=sound.mp3 loop=false ]
Plays the sound effect with a fade-in effect.
Parameter | Required | Description | Default Value |
---|---|---|---|
storage | ✔ | Specifies the music file to be played. | |
loop | Specifies whether it should loop. Can be set to true or false. | false | |
sprite_time | Specifies 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 (:). | ||
buf | Specifies the slot to stop the sound effect. | 0 | |
time | ✔ | Specifies the fade-in time in milliseconds. | 2000 |
html5 | You usually don’t need to specify this. Use true for HTML5 Audio, or false (default) for Web Audio API. | false |
[fadeinse storage=sound.mp3 loop=false time=2000]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
volume | Specifies the BGM configuration volume from 0 to 100. | ||
buf | Specifies the slot to change settings. If omitted, the volume is set for all slots in common. | ||
effect | Whether the volume change will be immediately reflected in the currently playing BGM. Can be set to true or false. | true | |
time | Specifies the fade time in milliseconds when reflecting volume changes immediately. | ||
tag_volume | Specifies 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_restart | Sets the behavior when the BGM to be played is already playing. If true, it restarts from the beginning, if false, it skips the playback. |
[bgmopt volume=50 ]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
volume | Specifies the SE configuration volume from 0 to 100. | ||
buf | Specifies the slot to change the settings. If omitted, the volume is set for all slots in common. | ||
effect | Whether the volume change will be immediately reflected in the currently playing SE. Can be set to true or false. | true | |
time | Specifies the fade time in milliseconds when reflecting volume changes immediately. | ||
tag_volume | Specifies 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. |
[seopt volume=50 ]
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
target | Specify "bgm" to change the volume of BGM, or "se" to change the volume of SE. | bgm | |
volume | Specify the volume from 0 to 100. | ||
buf | Specify the slot to change the settings. If omitted, the process will be executed for all slots. | ||
time | Specify the fade time in milliseconds. |
[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]
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].
Parameter | Required | Description | Default Value |
---|---|---|---|
buf | You can specify the slot. If omitted, the process will be applied to all slots. |
[pausebgm] You can resume the BGM that was paused using the above tag.
You can resume the paused audio.
Parameter | Required | Description | Default Value |
---|---|---|---|
buf | You can specify the slot. If omitted, the process will be applied to all slots. |
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.
Parameter | Required | Description | Default Value |
---|---|---|---|
No parameters can be specified. |
You can play the "popopo" electronic sound to match the text.
Parameter | Required | Description | Default Value |
---|---|---|---|
type | Specify 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. | ||
volume | The 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. | ||
time | The length of the popopo sound in milliseconds. It has no effect if the type is "file". The default value is 20. | ||
tailtime | The fade-out time for the popopo sound in milliseconds. It has no effect if the type is "file". The default value is 30. | ||
frequency | The 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#. | ||
octave | The 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". | ||
samplerate | The 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. | ||
buf | This only works if the type is "file". Specify the slot where the sound will be played. | ||
storage | This only works if the type is "file". Specify the name of the audio file to be played. | ||
mode | Specify 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. | ||
noplaychars | This only works if the mode is "everyone". Specify characters that should not play the popopo sound. The default characters are "…・、。「」()" and others. | ||
interval | This only works if the mode is "interval". Specify the interval (in milliseconds) between each popopo sound. The default value is 80. | ||
chara | Specify a character's name. The popopo sound will only be applied when this character is speaking. | default |
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
sebuf | Specify the [playse] buf to use for the voice. | ||
name | Specify the character name to play the voice. This corresponds to the name in the [chara_new] tag. | ||
vostorage | Specify the template for the audio file name. The {number} part will be replaced with the incremented number each time it is played. | ||
number | The initial value for the number to replace in {number} of vostorage. | ||
waittime | In auto mode, specify how many milliseconds to wait before moving to the next message after the voice finishes playing. |
[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]
[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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters can be specified. |
[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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters can be specified. |
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
volume | Specify the volume from0 to 100. | 100 | |
pitch | Specify the pitch of the voice as a ratio based on 100. The higher the number, the higher the pitch of the voice. | 100 | |
rate | Specify the speed of the voice as a ratio based on 100. The higher the number, the faster the speech. | 100 | |
cancel | Specify 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 |
[speak_on]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | Specify the variable name where the player's input text will be saved. | |
initial | Sets the initial value for the text box. | ||
color | Specifies the text color. | black | |
left | Specifies the horizontal position of the text box. | 0 | |
top | Specifies the vertical position of the text box. | 0 | |
autocomplete | Specifies whether to display input history.true or false can be specified. | false | |
size | Specifies the text size. | 20 | |
width | Specifies the width of the text box. | 200 | |
height | Specifies the height of the text box. | 40 | |
maxchars | Specifies the maximum number of characters that can be entered. | 1000 |
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]
[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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
No parameters can be specified. |
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].
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
layer | Specify the layer to place the 3D model. | 0 | |
camera | Specify the camera mode. "Perspective" (with perspective) or "Orthographic" (parallel projection without perspective). The default is Perspective. | Perspective | |
near | Set how close objects are drawn from the camera. The default is 1. | 10 | |
far | Set 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_type | Specify 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_light | Specify the intensity of ambient light. This light affects all surfaces equally. The default is 1. | 1 | |
directional_light | Set the strength of light emitted from a specific direction. It is like the sunlight. The default is 0. | 0 | |
antialias | Set the anti-aliasing option. Specify true or false. The default is true. | true | |
debug_option | Specify whether to display your position coordinates on the screen. |
[3d_init layer=0 ]
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.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name will be used for control such as display and hiding. | |
storage | 〇 | Specify the 3D file. Supports gltf, obj, json formats. Place the file in the others/3d/model folder. | |
pos | Specify the coordinates for placing the 3D object. Use comma-separated xyz coordinates. | 0 | |
rot | Specify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes. | 0 | |
scale | Specify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes. | 100 | |
tonemap | If tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false. | true | |
motion | If 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. | ||
folder | You can change the folder where the file is stored. |
[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 ]
Defines a 3D model of a cylinder.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name will be used for control such as display and hiding. | |
texture | You can apply a texture to the cylinder. Place the image in the "others/3d/texture" folder. Recommended sizes are 256x256 or 512x512. | ||
color | You can specify the color. Use the 0xRRGGBB format. | 0x00ff00 | |
pos | Specify the coordinates to place the 3D object. Use comma-separated xyz coordinates. | 0 | |
rot | Specify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes. | 0 | |
scale | Specify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes. | 1 | |
segment | Specify the level of detail for the circle. The higher the number, the closer it becomes to a circle. The default is 10. | 10 | |
width | Specify the width of the cylinder. The default is 10. | 5 | |
height | Specify the height of the cylinder. The default is 20. | 20 | |
side | Specify which side the texture will be applied to. Options are front (front), back (back), double (both sides). The default is front. | front | |
tonemap | If tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false. |
[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]
Defines a 3D model of a sphere.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name will be used to control display and hiding, etc. | |
texture | You can apply a texture to the sphere. Place the image in the "others/3d/texture" folder. Recommended sizes are 256x256 or 512x512. | ||
color | You can specify the color using the 0xRRGGBB format. | 0x00ff00 | |
pos | Specify the coordinates to place the 3D object. Use comma-separated xyz coordinates. | 0 | |
rot | Specify the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes. | 0 | |
scale | Specify the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes. | 1 | |
radius | Specify the radius of the sphere. The default is 300. | 300 | |
width | Specify the width of the sphere. The default is 30. | 30 | |
height | Specify the height of the sphere. The default is 30. | 30 | |
side | Specify which side the texture will be applied to. Options are front (front), back (back), double (both sides). The default is front. | front | |
tonemap | If tone mapping is enabled, you can set whether this object will be affected. The default is true. To disable it, set to false. |
[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]
Defines a 3D model of a sprite.
The difference from an image is that with a sprite, the object always faces the camera.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name will be used to control display, hide, etc. | |
storage | 〇 | Specifies the image file to display. The file should be placed in the "others/3d/sprite" folder. | |
pos | Specifies the coordinates to place the 3D object. Use comma-separated xyz coordinates. | 0 | |
rot | Specifies the tilt of the 3D object. Use comma-separated rotation values for the x, y, and z axes. | 0 | |
scale | Specifies the scaling factor for the 3D object. Use comma-separated scaling values for the x, y, and z axes. | ||
tonemap | If tone mapping is enabled, you can set whether this object will be affected. The default is false. To enable, set it to true. | false | |
folder | Can change the folder where the file is placed. |
[3d_sprite_new name="yamato" storage="doki.png"]
[3d_show name="yamato"]
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].
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. Specify the name of the 3D object that will trigger the event. | |
storage | Specifies the scenario file to move to. If omitted, the current scenario file is assumed. | ||
target | Specifies the label name to jump to. If omitted, execution starts from the beginning. | ||
type | Specify either jump or eval. The default is jump. If eval is specified, the JavaScript specified in the exp parameter will be executed. | jump | |
exp | If eval is specified in type, write the JavaScript that will be executed here. | ||
distance | Specifies the distance at which the event will trigger when clicked. Objects farther than this distance will not respond. | ||
ground | In 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. | ||
mode | Specify either click or collision. In FPS mode, you can choose whether to trigger on click or collision. The default is click. | click |
; 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
Disables the registered 3D events.
Parameter | Required | Explanation | Initial Value |
---|---|---|---|
name | 〇 | The name of the 3D object. Specify the name of the 3D object whose event you want to delete. |
; 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]
Defines a 3D model of a cube.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name is used to control the display or hiding of the object. | |
texture | Specifies 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. | ||
color | Specifies the color. Use the 0xRRGGBB format. | 0x00ff00 | |
width | Specifies the width of the 3D object. The default is 1. | 1 | |
height | Specifies the height of the 3D object. The default is 1. | 1 | |
depth | Specifies the depth of the 3D object. The default is 1. | 1 | |
pos | Specifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates. | 0 | |
rot | Specifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations. | 0 | |
scale | Specifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes. | 1 | |
tonemap | If tone mapping is enabled, this specifies whether the object is affected. The default is false. Set it to true to enable. |
;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 ]
Defines a 3D model as an image.
This is the image of a flat panel being added to the 3D scene.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object. This name is used to control the display or hiding of the object. | |
texture | Specifies the image file to be displayed. The file should be placed in the "others/3d/texture" folder. | ||
width | 〇 | Specifies the width of the 3D object. The default is 1. | |
height | Specifies the height of the 3D object. If omitted, the image will be displayed maintaining the ratio of the image size. | ||
pos | Specifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates. | 0 | |
rot | Specifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations. | 0 | |
scale | Specifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes. | 1 | |
doubleside | Specifies 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 | |
tonemap | If tone mapping is enabled, this specifies whether the object is affected. The default is false. To enable, set it to true. | false |
;3D Image
[3d_image_new name="myimg" texture="room.jpg" width=200 doubleside=true ]
[3d_show name="myimg" ]
Displays the 3D object that has been defined in the game screen.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object. Specify the name of the object you want to display. | |
time | Specify the time (in milliseconds) to wait before displaying. The default is 500. | 0 | |
wait | Whether to wait for the display to complete. The default is true. | true | |
pos | Specifies the coordinates to place the 3D object. Use commas to separate the x, y, and z coordinates. | ||
rot | Specifies the rotation of the 3D object. Use commas to separate the x, y, and z axis rotations. | ||
scale | Specifies the scale of the 3D object. Use commas to separate the scale on the x, y, and z axes. | ||
group | Assign the object to a group. Specify the group name. | default | |
group_uuid | Allows you to add the object to a group using the uuid in the scene. | ||
force_sprite | Forces the object to be placed in the sprite group. | false | |
scene_add | If true, the object is directly added to the scene. The default is false. | false | |
visible | Specify true or false. If you want the object to be added to the scene in a hidden state initially, specify false. | true |
;3D Image
[3d_image_new name="myimg" texture="room.jpg" width=200 doubleside=true ]
[3d_show name="myimg" ]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object. Specify the name of the object you want to hide. | |
time | Specify the time (in milliseconds) to wait before hiding the object. The default is 500. | 500 | |
wait | Whether to wait for the hiding to complete. The default is true. | true |
;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"]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
time | Specify the time (in milliseconds) to wait before hiding the objects. The default is 500. | 500 | |
wait | Whether to wait for the hiding to complete. The default is true. | true |
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object. Specify the name of the object you want to delete. |
;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"]
Displays the 3D canvas.
It is useful when frequently transitioning between 3D scenes and novel parts.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters can be specified. |
time= Specify the time in milliseconds for the display. The default is 1000.
Hides the 3D canvas.
The 3D scene itself is maintained.
This is useful when frequently transitioning from a 3D scene to a novel part.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters can be specified. |
time= Specify the time in milliseconds for the display. The default is 1000.
You can animate a 3D object in the scene.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | The name of the 3D object to be animated. If animating the camera, specify the name as "camera". | |
pos | The coordinates to place the 3D object after the animation. Specify the xyz coordinates separated by commas. | ||
rot | The rotation of the 3D object after the animation. Specify the xyz axis rotation separated by commas. | ||
scale | The scale of the 3D object after the animation. Specify the xyz scale separated by commas. | ||
time | The duration of the animation in milliseconds. Default is 1000. | 1000 | |
wait | Whether to wait for the animation to complete. true or false, default is true. | true | |
relative | Specify true or false. Default is false. If true, relative coordinates are used. | false | |
loop | The number of loops for the animation. If true, it loops infinitely. | 0 | |
direction | Specify "alternate", "infinite", or "reverse". Default is "alternate". It specifies how the loop should occur. | alternate | |
lookat | Only valid for the camera. Specify the name of an object or pos coordinates to make the camera look in a specific direction. | ||
effect | Specify 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 |
[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]
You can stop a 3D object that is currently animating.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | Specify the name of the 3D object whose animation will be stopped. | |
finish | Specify 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. |
You can configure settings that affect the entire 3D scene.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
tonemap | You 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_value | Sets the intensity of the tone mapping. The default is 0.8. | 0.8 | |
light_amb | Sets the strength of the ambient light. The default is 1. For example, 0.5 makes it darker, and 2 makes it much brighter. |
[3d_scene light_amb="2" tonemap=""]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
pos | Specifies the coordinates for placing the camera. The coordinates are expressed in xyz format, separated by commas. | ||
rot | Specifies the camera's orientation. The rotation is set for each axis (xyz) and separated by commas. | ||
tonemap | Sets the tone mapping for the scene. Available types are No/Linear/Reinhard/Uncharted2/Cineon/ACESFilmic. The default is No (no tone mapping). | ||
lookat | Specifies 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. |
[3d_camera pos="10,20,30" ]
You can control the camera based on the tilt of a smartphone.
For PC games, you can simulate the gyroscope using the mouse position.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
max_x | Specifies the maximum tilt angle for the X-axis direction. The default is 30. | 30 | |
max_y | Specifies the maximum tilt angle for the Y-axis direction. The default is 30. | 30 | |
mode | Specifies either "position" or "rotation". This determines whether the tilt affects the camera's rotation or coordinates. The default is "rotation". | rotation |
[3d_gyro max_x="20" max_y="20" ]
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.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
No parameters available. |
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
Parameter | Required | Explanation | Default Value |
---|---|---|---|
button_text | You can freely set the text for the button to close debugging. The default is "Close Camera Inspector." | Close Camera Inspector | |
menu | Whether to display the debugging menu. If set to false, only the close button will be shown. The default is true (shown). | true |
[3d_debug_camera ]
You can change the motion of a 3D model.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 〇 | Specify the name of the 3D object. | |
motion | 〇 | Specify the motion name. |
; 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"]
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 |
---|---|---|---|
name | 〇 | Specify the name of the 3D object to debug. | |
button_text | You can freely set the text for the button to end the debugging. The default is "Close 3D Inspector". | Close | |
menu | Whether to display the debug menu. If you specify false, only the button to end debugging will appear. Default is true (displayed). | true | |
overlap | true 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 | |
reset | true or false. If you specify true, the model will return to its original position after debugging ends. Default is false. | false |
[3d_model_new name="Robot" storage="Robot.glb" ]
[3d_show name="Robot" rot="0.28,0.67,0" pos="-129,-24,910" scale="9.68" ]
Change motion. [p]
[3d_debug name="Robot" ]
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 |
---|---|---|---|
name | 〇 | Specify the name of the 3D object to debug. | |
button_text | You can freely set the text for the button to end the debugging. The default is "Close 3D Inspector". | Close 3D Inspector | |
menu | Whether to display the debug menu. If you specify false, only the button to end debugging will appear. Default is true (displayed). | true | |
overlap | true 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 | |
reset | true or false. If you specify true, the model will return to its original position after debugging ends. Default is false. | false |
[3d_model_new name="Robot" storage="Robot.glb" ]
[3d_show name="Robot" rot="0.28,0.67,0" pos="-129,-24,910" scale="9.68" ]
Change motion. [p]
[3d_debug name="Robot" ]
Allows you to manage 3D objects in groups.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | ✔ | Specify the name of the new group to be created. |
[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" ]
Adds a 3D object to a group.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | ✔ | Specifies the 3D object to be added. | |
new_name | If specified, it copies the object named 'name' and registers it with a new name. |
[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" ]
Displays text in 3D space.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | ✔ | Specifies the name of the 3D object. This name is used to control the display and visibility. | |
text | ✔ | Specifies the text string to be displayed. | |
pos | Specifies the coordinates (xyz) where the 3D object will be placed. | 10 | |
rot | Specifies the rotation of the 3D object along the xyz axes. | 0 | |
scale | Specifies the scaling factor of the 3D object along the xyz axes. | 0 | |
size | Font size. The default is 42. | 42 | |
color | Specifies the color in the 0xRRGGBB format. | ||
face | Specifies the font type. | sans-serif | |
sprite | Specifies true or false. If true, the text always faces the front. The default is false. | false |
[3d_new_text name="text1" text="あああ" ]
[3d_show name="text1"]
Allows you to place sounds in 3D space.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | Object name. This name is used to control visibility and other actions. | ||
target_name | Specifies where the sound will play. | ||
pos | Specifies the coordinates (xyz) where the 3D object will be placed. | 0,0,0 | |
loop | If true, the sound will loop. Default is false. | false | |
volume | Specifies the volume, from 0 to 1. |
Allows drawing operation assistance lines in the 3D space.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
name | 3D object name. This name is used to control visibility and other actions. | ||
text | Specifies the text string to be displayed. |
[3d_new_text name="text1" text="あああ" ]
[3d_show name="text1"]
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. | ||
wait | Specify true to wait for camera input to display. | true | |
time | Specify the fade-in time for camera input area in milliseconds. | 1000 | |
fit | Specify 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 | |
left | Specify the camera's position (in pixels). | ||
top | Specify the camera's position (in pixels). | ||
width | Specify the width of the camera's area (in pixels). | ||
height | Specify the height of the camera's area (in pixels). | ||
mode | Specify front (front camera) or back (rear camera). If nothing is specified, the default camera is used. | ||
qrcode | Specify 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 | |
debug | Specify true to display the URL when a QR code is scanned. Default is false. | false | |
audio | Specify true if audio input should also be reflected in the game. | false |
; 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"]
You can configure various behaviors for QR code scanning.
Parameter | Required | Explanation | Default Value |
---|---|---|---|
qrcode | Specify 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) |
; Enable only Tyrano jumps for QR code
[qr_config qrcode="jump"]
[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 |
[stop_bgcamera time=1000]
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 |
[qr_define url="https://tyrano.jp" storage="scene1.ks" target="test"]