Home
Downloads
Documents
Index
Tutorial
Command Reference
Search
Japanese
Light
Dark
Auto
Light
Dark
Auto
Command Reference - Polaris Engine Wiki
Wiki Top
Edit
New
Duplicate
Rename
Upload
Attached
Backup
Start:
* Suika2 Command Reference [#w6748d92]
This is a Suika2 command reference.
** Index [#j5e7f3bc]
- [[What is a Command?>#ud116d2ae]]
- Displaying Commands
-- [[Message>#ja1c52ace]]
-- [[Line>#yd0ca4dfe]]
-- [[@bg>#kca5c778e]] Showing a Background
-- [[@ch>#k2eeb4a7e]] Showing a Character
-- [[@chsx>#y4c04486e]] Changing Characters and Background
-- [[@cha>#oc32420ae]] Move a Character
-- [[@shake>#cf5122d8e]] Shake Screen
-- [[@video>#p65cc7a3e]] Video Playback
-- [[@anime>#zaa1841ae]] Animation
-- [[@layer>#k5a4fa64e]] Loading a Sprite to a Layer
-- [[@pencil>#db5f68f1e]] Drawing Text to a Text Layer
- Sound Commands
-- [[@bgm>#zc4169a9e]] Playing a Background Music
-- [[@se>#te846f73e]] Playing a Sound Effect
-- [[@vol>#a4a9233ce]] Setting a Volume
- Option Commands
-- [[@choose>#j833cb8de]] Showing Options
-- [[@ichoose>#cf919972e]] Showing Inline Options
-- [[@gui>#x5321807e]] Showing a GUI
- Wait Commands
-- [[@click>#fff6552ce]] Wait for a Click
-- [[@wait>#p24189e0e]] Wait for Seonds
-- [[@skip>#zc4a8cede]] Enable/Disable Skip
- Branch Commands
-- [[Label>#jfebae13e]]
-- [[@goto>#ufbc28a7e]] Jumping to a Label
-- [[@set>#p4badd92e]] Setting a Variable Value
-- [[@if>#g3151a59e]] Jumping by a Variable Value
-- [[@load>#h7be1f8ee]] Jumping to a Scrip
-- [[@chapter>#v65c528ce]] Setting a Chapter Title
- System Commands
-- [[@setconfig>#v5c67773e]] Setting a Config
-- [[@setsave>#dae21e96e]] Enable/Disable Save and Load
-- [[using>#r3c95140e]] Capturing a Macro File
-----
** What is a Command? [#ud116d2ae]
A command is an instruction in Suika2's language, think o...
-----
** @anime [#yd59728d]
@anime [file] (options)
Execute an animation file. Animation files must be stored...
*** Usage1 [#n0255f77]
Execute anime1.txt.
@anime anime1.txt
*** Usage2 [#v2ddce58]
Execute anime1.txt. Don't show the collapsed system menu.
@anime anime1.txt nosysmenu
*** Usage3 [#i6654b97]
Execute anime1.txt with showing the message box.
@anime anime1.txt showmsgbox
*** Sample animation file [#g5ff32af]
# Animation File
# Move center character twice.
move {
layer: chc; # CHaracter Center
clear: chc; # Clear existing animations for the lay...
start: 0.0; # Start at time 0.0s
end: 2.0; # End at time 2.0s
from-x: 0; # X coordinate to start
from-y: 0; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 100; # X coordinate to end
to-y: 100; # Y coordinate to end
to-a: 255; # Alpha value to end
}
move {
layer: chc; # CHaracter Center
start: 2.0; # Start at time 2.0s
end: 4.0; # End at time 4.0s
from-x: 100; # X coordinate to start
from-y: 100; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 0; # X coordinate to end
to-y: 0; # Y coordinate to end
to-a: 255; # Alpha value to end
}
# Simultaneously, move the right character.
move {
layer: chr; # CHaracter Right
clear: chr; # Clear existing animations for the lay...
start: 0.0; # Start at time 0.0s
end: 3.0; # End at time 3.0s
from-x: 1000;# X coordinate to start
from-y: 0; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 0; # X coordinate to end
to-y: 0; # Y coordinate to end
to-a: 255; # Alpha value to end
}
----
** @bg [#kca5c778e]
This command changes the background image, often called a...
*** Usage 1 [#mf43e346]
In this example, we use the command to change the backgro...
@bg sample.png 1.5
*** Usage 2 [#lfea371d]
In this example, we use the command to change the backgro...
@bg sample.png
*** Usage 3 [#d99e6523]
In this example, we use the command to change the backgro...
@bg sample.png 1.5 c
*** Usage 4 [#l64ffd46]
Changes the background color with a 1.5 second fade-in ti...
@bg #ff8080 1.5 curtain-left
*** Usage 5 [#j25aa3fa]
Close eyes.
@bg #000000 1.5 eye-close
*** Usage 6 [#b914637e]
Open eyes.
@bg sample.png 1.5 eye-open
*** Usage 7 [#t94cabfc]
In this example we use a rule-based transition called rul...
@bg sample.png 1.5 rule:rule-star.png
You are able to specify the following effects:
|LEFT:300|LEFT:300|LEFT:150|LEFT:150|c
|Effect Type|Effect Name|Abbrev. Name 1|Abbrev. Name 2|
|FADE/DISSOLVE (ALPHA BLENDING)|normal|n|(when not specif...
|RULE-BASED TRANSITION (1-BIT)|rule:file-name|||
|RULE-BASED TRANSITION (8-BIT)|melt:file-name|||
|RIGHT CURTAIN|curtain-right|curtainc||
|LEFT CURTAIN|curtain-left|cl||
|UP CURTAIN|curtain-up|cu||
|DOWN CURTAIN|curtain-down|cd||
|RIGHT SLIDE|slide-right|sr||
|LEFT SLIDE|slide-left|sl||
|UP SLIDE|slide-up|su||
|DOWN SLIDE|slide-down|sd||
|RIGHT SHUTTER|shutter-right|shr||
|LEFT SHUTTER|shutter-left|shl||
|UP SHUTTER|shutter-up|shu||
|DOWN SHUTTER|shutter-down|shd||
|CLOCKWISE WIPE|clockwise|cw||
|COUNTERCLOCKWISE WIPE|counterclockwise|ccw||
|CLOCKWISE WIPE (20 DEGREES STEPPED)|clockwise20|cw20||
|COUNTERCLOCKWISE WIPE (20 DEGREES STEPPED)|counterclockw...
|CLOCKWISE WIPE (30 DEGREES STEPPED)|clockwise30|cw30||
|COUNTERCLOCKWISE WIPE (30 DEGREES STEPPED)|counterclockw...
|OPEN EYES|eye-open|||
|CLOSE EYES|eye-close|||
|OPEN EYES (VERTICAL)|eye-open-v|||
|CLOSE EYES (VERTICAL)|eye-close-v|||
|OPEN SLIT|slit-open|||
|CLOSE SLIT|slit-close|||
|OPEN SLIT (VERTICAL)|slit-open-v|||
|CLOSE SLIT (VERTICAL)|slit-close-v|||
-----
** @bgm [#f75add30]
This command plays background music, often called 'BGM'. ...
*** Usage 1 [#h7aadf2b]
In this example we are playing sample.ogg.
@bgm sample.ogg
*** Usage 2 [#s2b93a12]
In this example we are stopping the BGM.
@bgm stop
*** Usage 3 [#y766d010]
Plays BGM once.
@bgm sample.ogg once
*** Application [#xf71f05d]
In this example we apply a two second fade-out to the BGM
@vol bgm 0 2
@wait 2
@bgm stop
-----
** @ch [#j23482c1]
This command changes the character.
The available character positions are:
|DISPLAY POSITION|TARGET NAME|ABBREV.|
|LEFT|left|l|
|LEFT CENTER|left-center|lc|
|FRONT CENTER|center|c|
|RIGHT|right-center|rc|
|RIGHT|right|r|
|BACK CENTER|back|b|
Effect types are the same as @bg.
*** Usage 1 [#x5cf8126]
In this example we will have sample.png fade-in for 0.5 s...
@ch center sample.png 0.5
*** Usage 2 [#y7edf6ea]
You can also abbreviate center as c.
@ch c sample.png 0.5
*** Usage 3 [#n8358cae]
By specifying none we can remove the character from the s...
@ch c none 0.5
*** Usage 4 [#v11e95bb]
If there is no fade-in (or fade-out) time specified, our ...
@ch c sample.png
*** Usage 5 [#e494fb96]
Effects can also be applied to characters. (The character...
@ch c sample.png 1.0 mask
*** Usage 6 [#ba263b78]
While having preset positions is helpful, sometimes it is...
@ch c sample.png 1.0 n 100 50
*** Usage 7 [#o9667211]
In order to set an animation origin, load the character i...
Alpha values range from 0 (invisible) to 255 (completely ...
@ch c sample.png 1.0 n 0 0 show
*** Usage 8 [#x0ae2fc2]
We can show a character face on the left side of the mess...
@ch face face-001.png
-----
** @cha [#uae0af44]
This command moves a character image. To better understan...
*** Usage 1 [#g4c5e98a]
In this example, we're going to move the center character...
@cha center 1.0 move -600 0 hide
*** Usage 2 [#pd00d65c]
This usage is similar to Usage 1, but the movement accele...
@cha center 1.0 accel -600 0 hide
*** Usage 3 [#rc34f3ae]
This usage is similar to Usage 1, but the movement decele...
@cha center 1.0 brake -600 0 hide
*** Usage 4 [#d8e43617]
This command also makes it possible to move characters on...
@ch right sample.png 0 n 600 0 hide
@cha right 2.0 move -600 0 show
-----
** @chapter [#d7dc7c23]
This command sets the chapter title.
*** Usage [#scb51dd5]
@chapter "Chapter 1"
-----
** @choose [#i1cd83de]
This command shows options and jumps to the specified lab...
*** Usage 1 [#x2fae92c]
In this example we're displaying three options.
@choose label1 "Good morning." label2 "Good afternoon." ...
:label1
Good morning.
@goto end
:label2
Good afternoon.
@goto end
:label3
Good evening.
:end
*** Usage 2 [#zcd0c2b7]
In this example we're displaying two options.
@choose label1 "Good morning." label2 "Good afternoon."
:label1
Good morning.
@goto end
:label2
Good afternoon.
:end
*** Usage 3 [#qf8181dc]
This command also supports single-options.
@choose label1 "Good morning."
:label1
Good morning.
-----
** @ichoose [#q260fea6]
This command shows inline options and jumps to the specif...
Note that you have to use transparent images for config s...
Other feature is the same for @choose.
-----
@chsx
@chsx (center=center-image) (center-x=center-x-offset) (...
This command has the ability to change multiple character...
Limited to this command, you have to specify paramter nam...
You don't have to specify a character file for characters...
You have to specify "none" for characters to vanish.
The available effects specifiers are the same as @bg.
*** Usage 1 [#mda161c8]
In this example we are changing the center and right char...
Note that other characters won't be changed (stay denotes...
@chs center.png right.png stay stay 1.0
*** Usage 2 [#t8403422]
In this example, we're vanishing the center character wit...
@chs none stay stay stay 1.0
*** Usage 3 [#w5f4b1a9]
In this example, we're changing the background (without a...
@chs stay stay stay stay 1.0 background.png
*** Usage 4 [#eaecbbf8]
In this example, we're only changing the center character...
We're also using a curtain effect.
@chs center.png stay stay stay 1.0 background.png curtain
-----
** @click [#x7e4348c]
@click
This command instructs Suika2 to wait for a click before ...
*** Usage [#l2f37789]
Waits for a click.
@click
-----
** @gosub [#x336bb21]
@gosub [label-to-jump]
This command jumps to the specified subroutine. Use @retu...
*** Usage [#f0e56994]
Runs subroutine SUB.
@gosub SUB
...
:SUB
Describe the process here.
@return
-----
** @goto [#xb5e7065]
@goto [label]
@goto [destination=label]
This command jumps to a label. You can also use @goto to ...
*** Usage 1 [#q4d9b96c]
In this example, we're telling Suika2 to jump to the abc ...
Because the @goto command is included within the abc labe...
:abc
Describe the process here.
@goto abc
*** Usage 2 [#ff128139]
Here we show the load screen.
Note that $LOAD is a special label.
@goto $LOAD
*** Usage 3 [#te4e779b]
Here we show the save screen.
Note that $SAVE is a special label.
@goto $SAVE
-----
** @gui [#n4984830]
This command displays a GUI (graphical user interface). Y...
*** Usage 1 [#na546d42]
Here we display the menu GUI stored in menu.txt.
@gui menu.txt
*** Usage 2 [#n3ea0530]
Allows right click cancel.
@gui menu.txt cancel
-----
** @if [#j14a8527]
@if [variable] [condition] [value] [label]
This command jumps to the specified label if the specifie...
Available operators are as described below; however, when...
|CONDITION TYPE|MEANING|
|>|a > b (a is greater than b)|
|>=|a ≧ b (a is greater than or equal to b)|
|==|a = b (a is equal to b)|
|<=|a ≦ b (a is less than or equal to b)|
|<|a < b (a is less than b)|
|!=|a ≒ b (a is not equal to b)|
The LHS must be one of local variable names (e.g., $1), g...
If the LHS is a local variable name or a global variable ...
If the LHS is a name of a name variable, the RHS must be ...
*** Usage [#ra63897e]
This examples branches the story by jumping to the abc la...
@if $1 == 1 abc
The value of the local variable 1 is not 1. It means, th...
Write story here.
@goto end
:abc
The value of the local variable 1 is 1. It means, the fl...
Write story here.
:end
Branched stories join here.
-----
** Label [#h8640a81]
:label-name
This command creates a label, which can be used as a jump...
You can think of labels like interactive chapter headings.
Where chapter headings change the window title, labels pr...
They are typically used with the @choose, @goto and @if c...
*** Usage 1 [#b6b093f7]
In this example we're creating a simple jump from label A...
:A
Show some messages.
@goto B
:B
These messages are skipped in this label jump!
@goto end
:C
Show some more messages.
@goto end
*** Usage 2 [#b544b829]
In this example we're creating a simple loop.
:JumpTarget
Show some messages.
@goto JumpTarget
-----
** @load [#e9ac7d18]
This command jumps to another script.
Script files need to be in the txt folder.
*** Usage [#r350cc19]
In this example, we jump to the script file 001.txt.
@load 001.txt
-----
** Messages [#wf4b0421]
This prints text to the message box.
You can put the following special strings in messages:
Putting \n inserts a line feed.
Putting $ + number prints the value of a local or global ...
Putting % + lower case alphabet prints the value of a nam...
Putting \ at the beginning of a line continues the previo...
Putting \#{RRGGBB} changes font color.
Putting \@{size} changes font size.
Putting \w{seconds} inserts a wait.
Putting \p{x,y} moves the pen.
Putting 長\^{おしゃまんべ}万部 inserts a ruby.
*** Usage [#if9de6fa]
Hello, world!
-----
** @news [#q68a53b8]
This command is a variant of @switch. It shows the first ...
-----
** @return [#z5a8788e]
@return
This command is used to return from subroutines.
*** Usage [#waaedfb8]
Run subroutine SUB.
@gosub SUB
...
:SUB
Describe the process here.
@return
-----
** @se [#s5036869]
@se [filename.ogg] (loop)
@se [file=filename.ogg] (loop)
This command plays sound effects (se).
Sound effect files need to be in the se folder. Note: Sui...
*** Usage 1 [#i3fbdf83]
we'reIn this example we're simply playing a sound effect ...
@se click.ogg
*** Usage 2 [#he022ec0]
To stop a sound effect simply specify the stop value.
@se stop
*** Usage 3 [#l9382646]
We can also play sound effects on repeat by specifying th...
@se sample.ogg loop
*** Special Usage [#c9290237]
We can use the sound effects command to test voice-volume...
@se click.ogg voice
-----
** Messages with character names [#c5f487fc]
*Name*Message
*Name*voice file*Message
This command is similar to messages in that it displays t...
However, it also prints a character name to the name box.
Suika2 can also play voice files when printing messages. ...
*** Usage 1 [#f8d28fd0]
Here, we're printing a message with the character name.
Character names should have an * (asterisk) on each side.
*Name*Hello, world!
*** Usage 2 [#c95906a2]
Here we're printing a message with the character name as ...
Note: In this case we add an * between the name and audio...
(This means we should have three *.)
*Name*001.ogg*Hello, world!
*** Usage 3 [#p9b1b591]
In this example we're printing a message with the charact...
*Name*@beep.ogg*Hello, world!
-----
** @set [#laf031d8]
@set [variable] [operator] [value]
This sets a value to a local, global, or name variable.
The local variables range $0 to $9999. They are stored in...
The global variables range $10000 to $10999. They are sto...
Note: all local and global variables have a integer value...
The name variables range %a to %z. They are stored indepe...
Note: all name variables have a string value and initiali...
Available operators are as below, but a common visual nov...
|OPERATOR TYPE|MEANING|
|=|a = b simply assigns b to a|
|+=|a += b assigns the result of a + b to a|
|-=|a -= b assigns the result of a - b to a|
|*=|a *= b assigns the result of a × b to a|
|/=|a /= b assigns the result of a ÷ b to a|
|%=|a %= b assigns the reminder of a / b to a|
If the LHS is a local or global variable name, the RHS ca...
If the LHS is a name of a name variable, the RHS must be ...
*** Usage 1 [#l268358b]
Sets the value 1 to the local variable $0.
This assignment is used for a flag setting. Because the i...
@set $0 = 1
*** Usage 2 [#aab8bff7]
Adds the value 23 to the local variable $10.
@set $10 += 23
*** Usage 3 [#v4488c0e]
Gets a random number that ranges 0 to 9 and assigns it to...
@set $0 = $RAND
@set $0 %= 10
*** Usage 4 [#b835b8ab]
Adds the value of the local variable $2 to the local vari...
Usually, you don't need to use this feature to create a c...
@set $1 += $2
*** Usage 5 [#i1f6aec0]
Sets the string value midori to the name variable %a.
This method is useful to set a default value to a name va...
@set %a = midori
-----
** @setsave [#l0bbbe64]
@setsave [disable/enable]
This command enables or disables the save and load screen...
*** Usage 1 [#wc7cbe19]
Here we enable the save and load screen. [by default]
@setsave enable
*** Usage 2 [#m53e9729]
Here we disable the save and load screen.
@setsave disable
-----
** @shake [#k11f6735]
@shake [direction] [seconds] [times] [amplitude]
@shake [direction=direction] [duration=seconds] [times=t...
This command shakes the screen.
*** Usage 1 [#a581cff5]
In this example we're shaking the screen three times hori...
@shake horizontal 1.0 3 100
*** Usage 2 [#r87b8291]
In this example we're shaking the screen three times vert...
@shake vertical 1.0 3 100
-----
** @skip [#p3c2a7cc]
@skip [enable/disable]
This command enables or disables the ability to skip time...
A good use for this command is displaying a brand or game...
You can also use this command to enable and disable a use...
*** Usage 1 [#la70cb22]
Enables skip. [by default]
@skip enable
*** Usage 2 [#v8faccf4]
Disables skip.
@skip disable
-----
** @switch [#e4c3effb]
This command shows two-level options. There are eight par...
*** Usage [#d511d720]
This example shows two levels of two options, four in tot...
@switch "Parent option 1" "Parent option 2" * * * * * * ...
:LABEL1
:LABEL2
:LABEL3
:LABEL4
-----
** @video [#w1f659ce]
@video [file-name]
@video [file=file-name]
This command plays a video file. At the moment, this func...
On Windows, please use the .wmv video file format. On Mac...
Video files are stored in the mov directory. Note: The mo...
*** Usage [#o895b9c1]
Play a video file.
@video sample.wmv
-----
** @vol [#r4600733]
@vol [track-name] [volume-value] (seconds)
@vol [track=track-name] [volume=volume-value] (duration=...
This command sets the sound volume.
Sound tracks are, in lower case, bgm for BGM, voice for v...
The sound volumes of these three tracks are stored in eac...
If you want to set "global volumes" which are common betw...
Note: Actual output volume is "volume for save data × glo...
*** Usage 1 [#vb1af8d4]
Here we're setting the BGM volume to 0.5, the volume will...
@vol bgm 0.5 1.0
@wait 1.0
*** Usage 2 [#e96b8f61]
This is an example of setting the global volume. (In this...
@vol BGM 0.5 0
-----
** @wait [#xd870606]
@wait [seconds]
@wait [duration=seconds]
This command instructs Suika2 to wait for a specified tim...
If the previous command is a message, the message box is ...
*** Usage [#i93e0377]
Here, we're telling Suika2 to wait for five seconds.
@wait 5.0
-----
** @wms [#n168ea64]
@wms [file]
Execute a WMS (Watermelon Script).
*** Usage [#q427be52]
Execute hello.txt.
@wms hello.txt
End:
* Suika2 Command Reference [#w6748d92]
This is a Suika2 command reference.
** Index [#j5e7f3bc]
- [[What is a Command?>#ud116d2ae]]
- Displaying Commands
-- [[Message>#ja1c52ace]]
-- [[Line>#yd0ca4dfe]]
-- [[@bg>#kca5c778e]] Showing a Background
-- [[@ch>#k2eeb4a7e]] Showing a Character
-- [[@chsx>#y4c04486e]] Changing Characters and Background
-- [[@cha>#oc32420ae]] Move a Character
-- [[@shake>#cf5122d8e]] Shake Screen
-- [[@video>#p65cc7a3e]] Video Playback
-- [[@anime>#zaa1841ae]] Animation
-- [[@layer>#k5a4fa64e]] Loading a Sprite to a Layer
-- [[@pencil>#db5f68f1e]] Drawing Text to a Text Layer
- Sound Commands
-- [[@bgm>#zc4169a9e]] Playing a Background Music
-- [[@se>#te846f73e]] Playing a Sound Effect
-- [[@vol>#a4a9233ce]] Setting a Volume
- Option Commands
-- [[@choose>#j833cb8de]] Showing Options
-- [[@ichoose>#cf919972e]] Showing Inline Options
-- [[@gui>#x5321807e]] Showing a GUI
- Wait Commands
-- [[@click>#fff6552ce]] Wait for a Click
-- [[@wait>#p24189e0e]] Wait for Seonds
-- [[@skip>#zc4a8cede]] Enable/Disable Skip
- Branch Commands
-- [[Label>#jfebae13e]]
-- [[@goto>#ufbc28a7e]] Jumping to a Label
-- [[@set>#p4badd92e]] Setting a Variable Value
-- [[@if>#g3151a59e]] Jumping by a Variable Value
-- [[@load>#h7be1f8ee]] Jumping to a Scrip
-- [[@chapter>#v65c528ce]] Setting a Chapter Title
- System Commands
-- [[@setconfig>#v5c67773e]] Setting a Config
-- [[@setsave>#dae21e96e]] Enable/Disable Save and Load
-- [[using>#r3c95140e]] Capturing a Macro File
-----
** What is a Command? [#ud116d2ae]
A command is an instruction in Suika2's language, think o...
-----
** @anime [#yd59728d]
@anime [file] (options)
Execute an animation file. Animation files must be stored...
*** Usage1 [#n0255f77]
Execute anime1.txt.
@anime anime1.txt
*** Usage2 [#v2ddce58]
Execute anime1.txt. Don't show the collapsed system menu.
@anime anime1.txt nosysmenu
*** Usage3 [#i6654b97]
Execute anime1.txt with showing the message box.
@anime anime1.txt showmsgbox
*** Sample animation file [#g5ff32af]
# Animation File
# Move center character twice.
move {
layer: chc; # CHaracter Center
clear: chc; # Clear existing animations for the lay...
start: 0.0; # Start at time 0.0s
end: 2.0; # End at time 2.0s
from-x: 0; # X coordinate to start
from-y: 0; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 100; # X coordinate to end
to-y: 100; # Y coordinate to end
to-a: 255; # Alpha value to end
}
move {
layer: chc; # CHaracter Center
start: 2.0; # Start at time 2.0s
end: 4.0; # End at time 4.0s
from-x: 100; # X coordinate to start
from-y: 100; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 0; # X coordinate to end
to-y: 0; # Y coordinate to end
to-a: 255; # Alpha value to end
}
# Simultaneously, move the right character.
move {
layer: chr; # CHaracter Right
clear: chr; # Clear existing animations for the lay...
start: 0.0; # Start at time 0.0s
end: 3.0; # End at time 3.0s
from-x: 1000;# X coordinate to start
from-y: 0; # Y coordinate to start
from-a: 255; # Alpha value to start
to-x: 0; # X coordinate to end
to-y: 0; # Y coordinate to end
to-a: 255; # Alpha value to end
}
----
** @bg [#kca5c778e]
This command changes the background image, often called a...
*** Usage 1 [#mf43e346]
In this example, we use the command to change the backgro...
@bg sample.png 1.5
*** Usage 2 [#lfea371d]
In this example, we use the command to change the backgro...
@bg sample.png
*** Usage 3 [#d99e6523]
In this example, we use the command to change the backgro...
@bg sample.png 1.5 c
*** Usage 4 [#l64ffd46]
Changes the background color with a 1.5 second fade-in ti...
@bg #ff8080 1.5 curtain-left
*** Usage 5 [#j25aa3fa]
Close eyes.
@bg #000000 1.5 eye-close
*** Usage 6 [#b914637e]
Open eyes.
@bg sample.png 1.5 eye-open
*** Usage 7 [#t94cabfc]
In this example we use a rule-based transition called rul...
@bg sample.png 1.5 rule:rule-star.png
You are able to specify the following effects:
|LEFT:300|LEFT:300|LEFT:150|LEFT:150|c
|Effect Type|Effect Name|Abbrev. Name 1|Abbrev. Name 2|
|FADE/DISSOLVE (ALPHA BLENDING)|normal|n|(when not specif...
|RULE-BASED TRANSITION (1-BIT)|rule:file-name|||
|RULE-BASED TRANSITION (8-BIT)|melt:file-name|||
|RIGHT CURTAIN|curtain-right|curtainc||
|LEFT CURTAIN|curtain-left|cl||
|UP CURTAIN|curtain-up|cu||
|DOWN CURTAIN|curtain-down|cd||
|RIGHT SLIDE|slide-right|sr||
|LEFT SLIDE|slide-left|sl||
|UP SLIDE|slide-up|su||
|DOWN SLIDE|slide-down|sd||
|RIGHT SHUTTER|shutter-right|shr||
|LEFT SHUTTER|shutter-left|shl||
|UP SHUTTER|shutter-up|shu||
|DOWN SHUTTER|shutter-down|shd||
|CLOCKWISE WIPE|clockwise|cw||
|COUNTERCLOCKWISE WIPE|counterclockwise|ccw||
|CLOCKWISE WIPE (20 DEGREES STEPPED)|clockwise20|cw20||
|COUNTERCLOCKWISE WIPE (20 DEGREES STEPPED)|counterclockw...
|CLOCKWISE WIPE (30 DEGREES STEPPED)|clockwise30|cw30||
|COUNTERCLOCKWISE WIPE (30 DEGREES STEPPED)|counterclockw...
|OPEN EYES|eye-open|||
|CLOSE EYES|eye-close|||
|OPEN EYES (VERTICAL)|eye-open-v|||
|CLOSE EYES (VERTICAL)|eye-close-v|||
|OPEN SLIT|slit-open|||
|CLOSE SLIT|slit-close|||
|OPEN SLIT (VERTICAL)|slit-open-v|||
|CLOSE SLIT (VERTICAL)|slit-close-v|||
-----
** @bgm [#f75add30]
This command plays background music, often called 'BGM'. ...
*** Usage 1 [#h7aadf2b]
In this example we are playing sample.ogg.
@bgm sample.ogg
*** Usage 2 [#s2b93a12]
In this example we are stopping the BGM.
@bgm stop
*** Usage 3 [#y766d010]
Plays BGM once.
@bgm sample.ogg once
*** Application [#xf71f05d]
In this example we apply a two second fade-out to the BGM
@vol bgm 0 2
@wait 2
@bgm stop
-----
** @ch [#j23482c1]
This command changes the character.
The available character positions are:
|DISPLAY POSITION|TARGET NAME|ABBREV.|
|LEFT|left|l|
|LEFT CENTER|left-center|lc|
|FRONT CENTER|center|c|
|RIGHT|right-center|rc|
|RIGHT|right|r|
|BACK CENTER|back|b|
Effect types are the same as @bg.
*** Usage 1 [#x5cf8126]
In this example we will have sample.png fade-in for 0.5 s...
@ch center sample.png 0.5
*** Usage 2 [#y7edf6ea]
You can also abbreviate center as c.
@ch c sample.png 0.5
*** Usage 3 [#n8358cae]
By specifying none we can remove the character from the s...
@ch c none 0.5
*** Usage 4 [#v11e95bb]
If there is no fade-in (or fade-out) time specified, our ...
@ch c sample.png
*** Usage 5 [#e494fb96]
Effects can also be applied to characters. (The character...
@ch c sample.png 1.0 mask
*** Usage 6 [#ba263b78]
While having preset positions is helpful, sometimes it is...
@ch c sample.png 1.0 n 100 50
*** Usage 7 [#o9667211]
In order to set an animation origin, load the character i...
Alpha values range from 0 (invisible) to 255 (completely ...
@ch c sample.png 1.0 n 0 0 show
*** Usage 8 [#x0ae2fc2]
We can show a character face on the left side of the mess...
@ch face face-001.png
-----
** @cha [#uae0af44]
This command moves a character image. To better understan...
*** Usage 1 [#g4c5e98a]
In this example, we're going to move the center character...
@cha center 1.0 move -600 0 hide
*** Usage 2 [#pd00d65c]
This usage is similar to Usage 1, but the movement accele...
@cha center 1.0 accel -600 0 hide
*** Usage 3 [#rc34f3ae]
This usage is similar to Usage 1, but the movement decele...
@cha center 1.0 brake -600 0 hide
*** Usage 4 [#d8e43617]
This command also makes it possible to move characters on...
@ch right sample.png 0 n 600 0 hide
@cha right 2.0 move -600 0 show
-----
** @chapter [#d7dc7c23]
This command sets the chapter title.
*** Usage [#scb51dd5]
@chapter "Chapter 1"
-----
** @choose [#i1cd83de]
This command shows options and jumps to the specified lab...
*** Usage 1 [#x2fae92c]
In this example we're displaying three options.
@choose label1 "Good morning." label2 "Good afternoon." ...
:label1
Good morning.
@goto end
:label2
Good afternoon.
@goto end
:label3
Good evening.
:end
*** Usage 2 [#zcd0c2b7]
In this example we're displaying two options.
@choose label1 "Good morning." label2 "Good afternoon."
:label1
Good morning.
@goto end
:label2
Good afternoon.
:end
*** Usage 3 [#qf8181dc]
This command also supports single-options.
@choose label1 "Good morning."
:label1
Good morning.
-----
** @ichoose [#q260fea6]
This command shows inline options and jumps to the specif...
Note that you have to use transparent images for config s...
Other feature is the same for @choose.
-----
@chsx
@chsx (center=center-image) (center-x=center-x-offset) (...
This command has the ability to change multiple character...
Limited to this command, you have to specify paramter nam...
You don't have to specify a character file for characters...
You have to specify "none" for characters to vanish.
The available effects specifiers are the same as @bg.
*** Usage 1 [#mda161c8]
In this example we are changing the center and right char...
Note that other characters won't be changed (stay denotes...
@chs center.png right.png stay stay 1.0
*** Usage 2 [#t8403422]
In this example, we're vanishing the center character wit...
@chs none stay stay stay 1.0
*** Usage 3 [#w5f4b1a9]
In this example, we're changing the background (without a...
@chs stay stay stay stay 1.0 background.png
*** Usage 4 [#eaecbbf8]
In this example, we're only changing the center character...
We're also using a curtain effect.
@chs center.png stay stay stay 1.0 background.png curtain
-----
** @click [#x7e4348c]
@click
This command instructs Suika2 to wait for a click before ...
*** Usage [#l2f37789]
Waits for a click.
@click
-----
** @gosub [#x336bb21]
@gosub [label-to-jump]
This command jumps to the specified subroutine. Use @retu...
*** Usage [#f0e56994]
Runs subroutine SUB.
@gosub SUB
...
:SUB
Describe the process here.
@return
-----
** @goto [#xb5e7065]
@goto [label]
@goto [destination=label]
This command jumps to a label. You can also use @goto to ...
*** Usage 1 [#q4d9b96c]
In this example, we're telling Suika2 to jump to the abc ...
Because the @goto command is included within the abc labe...
:abc
Describe the process here.
@goto abc
*** Usage 2 [#ff128139]
Here we show the load screen.
Note that $LOAD is a special label.
@goto $LOAD
*** Usage 3 [#te4e779b]
Here we show the save screen.
Note that $SAVE is a special label.
@goto $SAVE
-----
** @gui [#n4984830]
This command displays a GUI (graphical user interface). Y...
*** Usage 1 [#na546d42]
Here we display the menu GUI stored in menu.txt.
@gui menu.txt
*** Usage 2 [#n3ea0530]
Allows right click cancel.
@gui menu.txt cancel
-----
** @if [#j14a8527]
@if [variable] [condition] [value] [label]
This command jumps to the specified label if the specifie...
Available operators are as described below; however, when...
|CONDITION TYPE|MEANING|
|>|a > b (a is greater than b)|
|>=|a ≧ b (a is greater than or equal to b)|
|==|a = b (a is equal to b)|
|<=|a ≦ b (a is less than or equal to b)|
|<|a < b (a is less than b)|
|!=|a ≒ b (a is not equal to b)|
The LHS must be one of local variable names (e.g., $1), g...
If the LHS is a local variable name or a global variable ...
If the LHS is a name of a name variable, the RHS must be ...
*** Usage [#ra63897e]
This examples branches the story by jumping to the abc la...
@if $1 == 1 abc
The value of the local variable 1 is not 1. It means, th...
Write story here.
@goto end
:abc
The value of the local variable 1 is 1. It means, the fl...
Write story here.
:end
Branched stories join here.
-----
** Label [#h8640a81]
:label-name
This command creates a label, which can be used as a jump...
You can think of labels like interactive chapter headings.
Where chapter headings change the window title, labels pr...
They are typically used with the @choose, @goto and @if c...
*** Usage 1 [#b6b093f7]
In this example we're creating a simple jump from label A...
:A
Show some messages.
@goto B
:B
These messages are skipped in this label jump!
@goto end
:C
Show some more messages.
@goto end
*** Usage 2 [#b544b829]
In this example we're creating a simple loop.
:JumpTarget
Show some messages.
@goto JumpTarget
-----
** @load [#e9ac7d18]
This command jumps to another script.
Script files need to be in the txt folder.
*** Usage [#r350cc19]
In this example, we jump to the script file 001.txt.
@load 001.txt
-----
** Messages [#wf4b0421]
This prints text to the message box.
You can put the following special strings in messages:
Putting \n inserts a line feed.
Putting $ + number prints the value of a local or global ...
Putting % + lower case alphabet prints the value of a nam...
Putting \ at the beginning of a line continues the previo...
Putting \#{RRGGBB} changes font color.
Putting \@{size} changes font size.
Putting \w{seconds} inserts a wait.
Putting \p{x,y} moves the pen.
Putting 長\^{おしゃまんべ}万部 inserts a ruby.
*** Usage [#if9de6fa]
Hello, world!
-----
** @news [#q68a53b8]
This command is a variant of @switch. It shows the first ...
-----
** @return [#z5a8788e]
@return
This command is used to return from subroutines.
*** Usage [#waaedfb8]
Run subroutine SUB.
@gosub SUB
...
:SUB
Describe the process here.
@return
-----
** @se [#s5036869]
@se [filename.ogg] (loop)
@se [file=filename.ogg] (loop)
This command plays sound effects (se).
Sound effect files need to be in the se folder. Note: Sui...
*** Usage 1 [#i3fbdf83]
we'reIn this example we're simply playing a sound effect ...
@se click.ogg
*** Usage 2 [#he022ec0]
To stop a sound effect simply specify the stop value.
@se stop
*** Usage 3 [#l9382646]
We can also play sound effects on repeat by specifying th...
@se sample.ogg loop
*** Special Usage [#c9290237]
We can use the sound effects command to test voice-volume...
@se click.ogg voice
-----
** Messages with character names [#c5f487fc]
*Name*Message
*Name*voice file*Message
This command is similar to messages in that it displays t...
However, it also prints a character name to the name box.
Suika2 can also play voice files when printing messages. ...
*** Usage 1 [#f8d28fd0]
Here, we're printing a message with the character name.
Character names should have an * (asterisk) on each side.
*Name*Hello, world!
*** Usage 2 [#c95906a2]
Here we're printing a message with the character name as ...
Note: In this case we add an * between the name and audio...
(This means we should have three *.)
*Name*001.ogg*Hello, world!
*** Usage 3 [#p9b1b591]
In this example we're printing a message with the charact...
*Name*@beep.ogg*Hello, world!
-----
** @set [#laf031d8]
@set [variable] [operator] [value]
This sets a value to a local, global, or name variable.
The local variables range $0 to $9999. They are stored in...
The global variables range $10000 to $10999. They are sto...
Note: all local and global variables have a integer value...
The name variables range %a to %z. They are stored indepe...
Note: all name variables have a string value and initiali...
Available operators are as below, but a common visual nov...
|OPERATOR TYPE|MEANING|
|=|a = b simply assigns b to a|
|+=|a += b assigns the result of a + b to a|
|-=|a -= b assigns the result of a - b to a|
|*=|a *= b assigns the result of a × b to a|
|/=|a /= b assigns the result of a ÷ b to a|
|%=|a %= b assigns the reminder of a / b to a|
If the LHS is a local or global variable name, the RHS ca...
If the LHS is a name of a name variable, the RHS must be ...
*** Usage 1 [#l268358b]
Sets the value 1 to the local variable $0.
This assignment is used for a flag setting. Because the i...
@set $0 = 1
*** Usage 2 [#aab8bff7]
Adds the value 23 to the local variable $10.
@set $10 += 23
*** Usage 3 [#v4488c0e]
Gets a random number that ranges 0 to 9 and assigns it to...
@set $0 = $RAND
@set $0 %= 10
*** Usage 4 [#b835b8ab]
Adds the value of the local variable $2 to the local vari...
Usually, you don't need to use this feature to create a c...
@set $1 += $2
*** Usage 5 [#i1f6aec0]
Sets the string value midori to the name variable %a.
This method is useful to set a default value to a name va...
@set %a = midori
-----
** @setsave [#l0bbbe64]
@setsave [disable/enable]
This command enables or disables the save and load screen...
*** Usage 1 [#wc7cbe19]
Here we enable the save and load screen. [by default]
@setsave enable
*** Usage 2 [#m53e9729]
Here we disable the save and load screen.
@setsave disable
-----
** @shake [#k11f6735]
@shake [direction] [seconds] [times] [amplitude]
@shake [direction=direction] [duration=seconds] [times=t...
This command shakes the screen.
*** Usage 1 [#a581cff5]
In this example we're shaking the screen three times hori...
@shake horizontal 1.0 3 100
*** Usage 2 [#r87b8291]
In this example we're shaking the screen three times vert...
@shake vertical 1.0 3 100
-----
** @skip [#p3c2a7cc]
@skip [enable/disable]
This command enables or disables the ability to skip time...
A good use for this command is displaying a brand or game...
You can also use this command to enable and disable a use...
*** Usage 1 [#la70cb22]
Enables skip. [by default]
@skip enable
*** Usage 2 [#v8faccf4]
Disables skip.
@skip disable
-----
** @switch [#e4c3effb]
This command shows two-level options. There are eight par...
*** Usage [#d511d720]
This example shows two levels of two options, four in tot...
@switch "Parent option 1" "Parent option 2" * * * * * * ...
:LABEL1
:LABEL2
:LABEL3
:LABEL4
-----
** @video [#w1f659ce]
@video [file-name]
@video [file=file-name]
This command plays a video file. At the moment, this func...
On Windows, please use the .wmv video file format. On Mac...
Video files are stored in the mov directory. Note: The mo...
*** Usage [#o895b9c1]
Play a video file.
@video sample.wmv
-----
** @vol [#r4600733]
@vol [track-name] [volume-value] (seconds)
@vol [track=track-name] [volume=volume-value] (duration=...
This command sets the sound volume.
Sound tracks are, in lower case, bgm for BGM, voice for v...
The sound volumes of these three tracks are stored in eac...
If you want to set "global volumes" which are common betw...
Note: Actual output volume is "volume for save data × glo...
*** Usage 1 [#vb1af8d4]
Here we're setting the BGM volume to 0.5, the volume will...
@vol bgm 0.5 1.0
@wait 1.0
*** Usage 2 [#e96b8f61]
This is an example of setting the global volume. (In this...
@vol BGM 0.5 0
-----
** @wait [#xd870606]
@wait [seconds]
@wait [duration=seconds]
This command instructs Suika2 to wait for a specified tim...
If the previous command is a message, the message box is ...
*** Usage [#i93e0377]
Here, we're telling Suika2 to wait for five seconds.
@wait 5.0
-----
** @wms [#n168ea64]
@wms [file]
Execute a WMS (Watermelon Script).
*** Usage [#q427be52]
Execute hello.txt.
@wms hello.txt
Page: