ホーム
ダウンロード
アプリ
素材
ドキュメント
ドキュメントトップ
最初のチュートリアル
GUIのチュートリアル
WMSのチュートリアル
コマンド一覧
コンフィグ一覧
よくある質問
English
Light
Dark
Auto
Light
Dark
Auto
要件定義書 をテンプレートにして作成 - Polaris Engine Wiki
Wikiトップ
編集
新規作成
複製
名称変更
アップロード
添付ファイル一覧
バックアップ
開始行:
Software Requirements Specification for Suika2
|Author|ktabata|
|Modified By||
|Organization||
|Updated|10th October 2023|
|Created|27th October 2022|
|Revision|14.6.0|
----
Table of Contents
#contents
----
* Introduction [#i6316fc8]
Suika2 is a tool for creating visual novels.
It is a cross-platform software, compatible with, but not...
This document outlines the software requirements specific...
** The Necessity of This Document [#k98e0b76]
This section explains why the SRS is needed for Suika2, a...
This project has grown with an emphasis on documentation ...
To our delight, the project has several sources of docume...
These documents may cause inconsistencies in the future, ...
Therefore, the project decided to create an SRS that woul...
and from which other documentation would be adapted and c...
If a description of a specification that exists in anothe...
----
* Files and Folders [#p6840cea]
- Game Folder
-- anime/
-- bg/
-- bgm/
-- cg/
-- ch/
-- conf/
-- cv/
-- font/
-- gui/
-- rule/
-- sav/
-- se/
-- txt/
-- wms/
-- data01.arc
-- suika.exe
-- suika.app
** anime Folder [#u45e8fb4]
This folder is for anime files.
** bg Folder [#adc1434b]
This folder is for background image files.
** bgm Folder [#b4e75154]
This folder is for background music files
** cg Folder [#y9b51830]
This folder is for the following images.
- Message box
- Namebox
- System menu
- Collapsed system menu
- Option box
- Click animation
- GUI (including save, load, history, config screens)
- Auto mode banner
- Skip mode banner
- Anime images
** ch Folder [#f8a9779d]
This folder is for character sprites.
** conf Folder [#a171c7e8]
This folder is for config files, namely, "config.txt".
** cv Folder [#id347d77]
This folder is for character voice files.
** font Folder [#r272bc74]
This folder is for font files.
** gui Folder [#z914e878]
This folder is for GUI definition files.
** rule Folder [#qc9472cd]
This folder is for rule image files which are used in rul...
background and character images.
** sav Folder [#t10fa6ed]
This folder is for save data. It is automatically generat...
When release mode is enabled,
this folder is not generated in the game folder.
See further details in the "Release Mode" section.
** se Folder [#md451325]
This folder is for sound effect files.
** txt Folder [#cedce5d4]
This folder is for scenario files.
** wms Folder [#t36bed26]
This folder is for WMS (Watermelon Script) files.
** data01.arc File [#i3a9f4f3]
This is a package file.
See further details in the "Package" section.
** suika.exe File [#ia51a2d2]
This is an application for Windows.
** suika.app Bundle [#sa614761]
This is an application for macOS.
----
* Main Screen Components [#aba8b199]
In main screen (See further details in the "Main Screen" ...
screen components are layered.
When referring to all layers, the term "stage" is used.
The stage consists of the following, in order from bottom...
Background Layer
bg2 Layer
Effect5-8 Layers
Back Center Character Layer
Left Character Layer
Right Character Layer
Center Character Layer
Effect1-4 Layers
Message Box Layer
Namebox Layer
Character Face Layer
Click Animation Layer
Options Layer
Collapsed System Menu Layer
System Menu Layer
** Background Layer [#eec8c973]
The background image is the lowest layer that makes up th...
Its size must be equal to that of the window.
** bg2 Layer [#vdc947e8]
The "bg2" layer can be used for anime.
** Effect5-8 Layers [#kc9aeb5b]
The "effect5", "effect6", "effect7" and "effect8" layers ...
** Character Layers [#ld2a0330]
center (Center Character)
right (Right Character)
left (Left Character)
back (Back Center Character)
face (Character Face)
There are four regular character types
depending on their horizontal display position
(center, right, left and back).
The center and back charater positions have the same hori...
but the layers displayed are different.
There is a position for the character's face to be displa...
the left of the message box.
All characters are vertically aligned at the bottom of th...
** Effect1-4 Layers [#c20e2c67]
The effect1, effect2, effect3 and effect4 layers can be u...
** Message Box Layer [#n127ff66]
The message box is a window for outputting text.
It is made up of a set of "bg" (background) and "fg" (for...
In simple terms, the bg image is displayed by default (of...
When a developer creates an "In-box Menu" and a game user...
the button area of the fg image is substituted in.
Given that the fg image must be specified, a developer ma...
for both the fg and bg images. This is most often the cas...
include a menu.
***In-box Menu [#r74afb48]
The message box can have menu buttons.
Acceptable button types are:
- "qsave"
- "qload"
- "save"
- "load"
- "history"
- "auto"
- "skip"
- "config"
- "hide"
The current demo game only uses the "hide" button.
If developers want to use the other buttons,
they can simply provide appropriate message box images an...
**Namebox Layer [#b3cb77eb]
The namebox is a window for outputting a character's name.
Names are usually horizontally centered, but can be left-...
The namebox can be hidden by a config
in order to realize a full-screen style novel.
**Collapsed System Menu Layer [#u16066d5]
This is a button that is visible during the display of me...
Clicking this button opens the "System Menu".
The collapsed system menu is invisible and disabled while
the "System Menu" is visible.
**System Menu Layer [#p84c0df6]
This is a menu that consists of buttons.
Acceptable button types are:
- "qsave"
- "qload"
- "save"
- "load"
- "history"
- "auto"
- "skip"
- "config"
The system menu is activated by clicking on the collapsed...
by right-clicking when a message or option(s) is displayed.
While the system menu is displayed,
right-clicking or clicking anywhere other than the button...
the system menu and return to the collapsed system menu.
----
*Command Features [#x48770dc]
An important building block of Suika2's functionality are...
Therefore, more than half of the functional requirements ...
See details regarding command implementation in the [[Com...
The following is example command syntax.
@command-name <required-parameter> (optional-parameter)
**Playing an Anime ("@anime") [#ge72e9ca]
This feature plays an anime file.
The command that accomplishes this feature is "@anime".
@anime <file> (options)
**Showing a Background ("@bg") [#e38c1fb8]
This feature shows a background image.
The command that accomplishes this feature is "@bg".
@bg <file> (duration) (effect)
The "@bg" command changes the background image.
It fades in a new background image over a specified time ...
Background image files need to be stored in the bg folder.
The hex RGB color specifier (e.g., "#0088ff") may be used...
When "@bg" is run, the originally displayed background as...
are removed from the stage.
Game developers can use @chsx instead of "@bg" when they ...
If you are looking for a way to keep your characters from...
you change the background, write the following command:
@chsx left=stay center=stay right=stay back=stay backgro...
Fade-ins are accompanied by transition effects.
The following is the list of effects types.
|Effect Type |Effect Name ...
|fade/dissolve (alpha blending) |"normal" ...
|right curtain |"curtain-righ...
|left curtain |"curtain-left...
|up curtain |"curtain-up" ...
|down curtain |"curtain-down...
|right slide |"slide-right"...
|left slide |"slide-left" ...
|up slide |"slide-up" ...
|down slide |"slide-down" ...
|right shutter |"shutter-righ...
|left shutter |"shutter-left...
|up shutter |"shutter-up" ...
|down shutter |"shutter-down...
|clockwise wipe |"clockwise" ...
|counterclockwise wipe |"counterclock...
|clockwise wipe (20 degrees stepped) |"clockwise20"...
|counterclockwise wipe (20 degrees stepped)|"counterclock...
|clockwise wipe (30 degrees stepped) |"clockwise30"...
|counterclockwise wipe (30 degrees stepped)|"counterclock...
|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...
|rule (universal transition/1-bit) |"rule:<rule-f...
|melt (universal transition/8-bit) |"melt:<rule-f...
The "mask" Effect type was removed as the "rule" effect t...
The demo includes a "rule-mask.png" file as a rule image ...
***Usage 1 [#tacb7d3e]
The following script changes the background image to "sam...
@bg sample.png
***Usage 2 [#j8412542]
The following script changes the background image to "sam...
The applicable effect type is "fade/dissolve (alpha blend...
@bg sample.png 1.5
***Usage 3 [#r4a9c9ad]
The following script changes the background image to "sam...
The applicable effect type is "right curtain", which is l...
@bg sample.png 1.5 curtain-right
***Usage 4 [#j43a6e11]
The following script changes the background to the color ...
The applicable effect type is "close eyes", which is like...
@bg #000000 1.5 eye-close
***Usage 5 [#dd30f106]
The following script changes the background image to "sam...
The applicable effect type is "rule (universal transition...
@bg sample.png 1.5 rule:rule-star.png
***Usage 6 [#oe1df9a9]
The following script changes the background image to "sam...
The applicable effect type is "melt (universal transition...
@bg sample.png 1.5 melt:rule-star.png
***Parameters [#c4fca683]
"@bg" can be written with parameter names:
@bg file=001.png duration=1.0 effect=normal
***Alias [#s157382b]
"@bg" has a Japanese alias "@背景".
@背景 ファイル=001.png 秒=1.0 エフェクト=normal
**Showing a Character ("@ch") [#ua3082d9]
This feature shows a character image.
The command that accomplishes this feature is "@ch".
@ch <position> <file> (duration) (effect) (right-offset)...
The "@ch" command changes the character.
Character image files need to be in the ch folder.
Character layers include "center" (center front), "right"...
"back" (center back) and "face" (character face).
|Display Position |Target Name|Abbrev. Name|Japanese Name|
|Front Center |"center" |"c" |"中央" |
|Right |"right" |"r" |"右" |
|Left |"left" |"l" |"左" |
|Back Center |"back" |"b" |"背面" |
|Face Icon |"face" |"f" |"顔" |
The effect types are the same as "Showing a Background ("...
All characters are vertically aligned at the bottom of th...
***Usage 1 [#v0d43526]
The following script displays "sample.png" immediately in...
Note that "center" can be abbreviated as "c".
@ch center sample.png
***Usage 2 [#z46d6b2d]
The following script displays "sample.png" in 0.5 seconds...
The applicable effect type is "fade/dissolve (alpha blend...
@ch center sample.png 0.5
***Usage 3 [#ia1bcccb]
The following script removes the front center character i...
The applicable effect type is "fade/dissolve (alpha blend...
@ch center none 0.5
***Usage 4 [#l3e4cd12]
The following script displays "sample.png" in 1.0 second ...
The applicable effect type is "clockwise wipe".
@ch center sample.png 1.0 clockwise
***Usage 5 [#i23b1baa]
The following script displays "sample.png" in 1.0 second ...
Here, "100 50" means offset, shifting the display positio...
"normal" means the effect type "fade/dissolve (alpha blen...
@ch center sample.png 1.0 normal 100 50
***Usage 6 [#gb0868d2]
The following script displays "sample.png" in 1.0 second ...
The alpha value ranges from "0" to "255".
For the alpha value specifier, game developers can write ...
@ch center sample.png 1.0 normal 0 0 127
***Parameters [#o508e772]
"@ch" can be written with parameter names.
@ch position=center file=001.png duration=1.0 effect=nor...
***Alias [#t377074e]
"@ch" has a Japanese alias "@キャラ".
@キャラ 位置=中央 ファイル=001.png 秒=1.0 エフェクト=標...
@キャラ 位置=中央 消去
**Showing a Message [#p27b0a22]
This feature shows the descriptive part of the story.
It is not an atmark command that makes this feature possi...
A message is one-line of text that does not begin with an...
asterisk ("*") or colon (":").
Messages are output to a message box.
As the descriptive part does not have the speaker's name,
the namebox is hidden while the message is showing.
A messages is displayed one character at a time.
When clicked in the middle, all characters are displayed ...
When all characters are displayed, Suika2 goes into
"Click Waiting Mode for Message" and displays a click ani...
If a click is made while a click animation is being displ...
Suika2 moves to the next command.
At any point during the display of a message,
unless if the control key is pressed and the message is u...
Suika2 moves to the next command.
The following format specifiers are available.
- "\n" ... Insert a new line.
- "$ + number" ... Print the value of the variable (e.g.,...
- "\" at the beginning of the line ... Append the message...
Append mode is useful for the creation of full-screen sty...
End users can use the return key and down arrow key inste...
***Usage [#o93e4f7c]
Hello, world!
**Showing a Line [#dfb23193]
This feature shows the dialog of the story.
It is not an atmark command that makes this feature possi...
A line is one-line text that begin with an asterisk.
This command prints text to the message box and also the ...
It consists of a character name, a message and optionally...
and they are separated by asterisks. For example:
*name*dialog message
*name*voice.ogg*dialog message
The name appears before the message.
Audio starts playing when the name is displayed.
Normally, audio playback is stopped before moving on to t...
but this behavior can be suppressed in the config.
If "@" is added to the beginning of a voice file name,
the audio playback is looped for the length of the message.
Other functions are exactly the same as "Showing a Backgr...
***Japanese Line [#a2b1d5f9]
Suika2 supports Japanese line format.
キャラ名「セリフ」
**Playing Background Music ("@bgm") [#zaf30077]
This feature plays background music.
The command that accomplishes this feature is "@bgm".
@bgm <file>
The "@bgm" command plays background music (BGM).
BGM files need to be stored in the "bgm" folder.
Unless otherwise specified, BGM is played in a loop.
Game developers can use the "once" specifier to prevent B...
The ability to crossfade multiple BGMs is not available.
Therefore, game developers may first need to fade out the...
***Usage 1 [#abc51d0e]
The following script plays "sample.ogg" as BGM. Playback ...
@bgm sample.ogg
***Usage 2 [#h41f76b1]
The following script stops BGM immediately.
@bgm stop
***Usage 3 [#j1ab5ddc]
The following script plays "sample.ogg" as BGM. Playback ...
@bgm sample.ogg once
***Usage 4 (Application) [#be926830]
The following sample script fades-out the BGM in 2 seconds.
@vol bgm 0.0 2.0
@wait 2.0
@bgm stop
@vol bgm 1.0
***Parameters [#d331e5bc]
"@bgm" can be written with parameter names:
@bgm file=001.ogg
***Alias [#v03a2b32]
"@bgm" has a Japanese alias "@音楽".
@音楽 ファイル=001.ogg
@音楽 停止
**Playing Sound Effect ("@se") [#e10be84c]
This feature plays a sound effect.
The command that accomplishes this feature is "@se".
@se <file> (loop)
The "@se" command plays sound effects.
Sound effect files need to be in the "se" folder.
***Usage 1 [#c3362258]
The following script starts the playback of a sound effec...
@se click.ogg
***Usage 2 [#geed13e4]
The following script stops the playback of a sound effect...
@se stop
***Usage 3 [#i2317f53]
The following script loops a sound effect file.
@se sample.ogg loop
***Usage 4 [#v4e4098c]
The following script plays a sound effect file in the "vo...
This feature is available for checking voice-volume witho...
@se click.ogg voice
***Parameters [#qb5fc3ae]
"@se" can be written with a parameter name:
@se file=001.ogg loop
***Alias [#bd8fc225]
"@se" has a Japanese alias "@効果音".
@効果音 ファイル=001.ogg loop
**Changing a Volume ("@vol") [#xffcf863]
This feature changes the volume.
The command that accomplishes this feature is "@vol".
@vol <track> <volume> (duration)
The "@vol" command sets the sound volume.
Suika2 has three independent sound tracks:
|Track |Name |Japanese Name|
|BGM |"bgm" or "b" |"音楽" |
|Voice |"voice" or "v" |"声" |
|Sound Effect |"se" or "s" |"効果音" |
The volume of the specified sound track will fade in/out ...
This command does not wait until the fade in/out is compl...
Combining with the "Waiting for Specified Time ("@wait")"...
"bgm", "voice" and "se" tracks are for "local" volumes an...
Local volumes are stored in each save data file.
Global volumes are common to all save data files.
The final volume will be a multiplication of the local an...
To specify the global volumes, game developers can use ca...
Since the global volume changes immediately, it is not po...
Both the value of local and global volumes range 0.0 to 1...
***Usage 1 [#d0ee3796]
The following script sets the local volume of BGM to 0.5 ...
@vol bgm 0.5 1.0
***Usage 2 [#rd34c82d]
The following script sets the global volume of BGM to 0.5...
Usually, the global volumes are set from the config screen,
so the use of this feature is not as common.
@vol BGM 0.5 0
***Parameters [#h7ef4a0c]
"@vol" can be written with parameters names.
@vol track=bgm volume=1.0 duration=1.0
***Alias [#ub0bbb87]
"@vol" has a Japanese alias "@音量".
@音量 トラック=音楽 音量=1.0 秒=1.0
**Showing Options ("@choose") [#ye7dde26]
This feature shows options and lets the user choose one o...
then jumps to the label selected.
The command that accomplishes this feature is "@choose".
@choose <destination1> <option-text1> (destination2) (op...
The "@choose" command can display up to eight options.
A minimum of one option must be displayed.
***Usage [#rcad6ea5]
The following script shows options.
@choose label1 "Good morning." label2 "Good afternoon." ...
:label1
Good morning.
@goto end
:label2
Good afternoon.
@goto end
:label3
Good evening.
:end
***Parameters [#k2805c47]
"@choose" can be written with parameter names.
@choose destination1=LABEL1 option1="I like cars." desti...
***Alias [#na974a5c]
"@choose" has a Japanese alias "@選択肢".
@選択肢 行き先1=LABEL1 選択肢1=車が好きです
**Defining a Label [#s59adf25]
This is a jump target inside a script.
It is not an atmark command, but one-line of text that be...
This command can be used as a jump target, which is typic...
***Usage [#ze74a75c]
The following script creates a loop.
:JumpTarget
Show some messages.
@goto JumpTarget
**Showing an Animation ("@cha") [#m24c753f]
This feature displays a character sprite in motion.
The command that accomplishes this feature is "@cha".
@cha <position> <duration> <acceleration> <x-offset> <y-...
The "@cha" command translates one character sprite at a t...
and can also change its alpha value.
Refer to the "Showing a Character Image (@ch)" section fo...
Constant velocity ("move"), acceleration ("accel") and de...
|Movement Mode |English Specifiers |Japanese Specifie...
|Constant Velocity|"move" |"なし" ...
|Acceleration |"accel" |"あり" ...
|Deceleration |"brake" |"減速" ...
"@cha" is an abbreviation of "character animation".
***Usage 1 [#jbe60690]
The following script moves the character in the front cen...
@cha center 1.0 move -600 0 hide
***Usage 2 [#l72c99fd]
The following script moves the character in the front cen...
This script is the same as Usage 1, but this one uses acc...
@cha center 1.0 accel -600 0 hide
***Usage 3 [#f9e04770]
The following script moves the character in the front cen...
This script is the same as Usage 1, but this one uses dec...
@cha center 1.0 brake -600 0 hide
***Usage 4 [#n57f344a]
The following script preloads the character image out of ...
@ch right sample.png 0 normal 600 0 hide
@cha right 2.0 move -600 0 show
***Parameters [#n3316d56]
"@cha" can be written with parameter names.
@cha position=center duration=1.0 acceleration=normal x=...
***Alias [#x61c6a9c]
"@cha" has a Japanese alias "@キャラ移動".
@キャラ移動 位置=中央 秒=1.0 加速=なし x=100 y=100 アル...
**Changing Characters and Background at Once ("@chs") [#m...
This feature changes character sprites and the background...
The command that accomplishes this feature is "@chs".
@chs <center-file> <right-file> <left-file> <back-file> ...
The "@chs" command has the ability to change just the cha...
The character specification order is "center", "right", "...
The effect types are the same as "Showing a Background (@...
"chs" is an abbreviation of "change stage".
***Special Usage (Change Only Background) [#de88bf83]
The following script changes background image while leavi...
@chs stay stay stay stay 1.0 background.png
***Usage 1 [#b9e9eb3d]
The following script changes front center and right chara...
Other characters will not be changed.
@chs center.png right.png stay stay 1.0
***Usage 2 [#w9e707b9]
The following script vanishes the character in the front ...
Other characters will not be changed.
@chs none stay stay stay 1.0
***Usage 3 [#z251f155]
The following script changes the background without any c...
@chs stay stay stay stay 1.0 background.png
***Usage 4 [#ae0ea679]
The following script changes the character in the front c...
The effect type is "right curtain".
@chs center.png stay stay stay 1.0 background.png curtai...
***Parameters [#p6b365f4]
"@chs" can be written with parameter names.
@chs center=001.png right=002.png left=003.png back=004....
***Alias [#z54617df]
"@chs" has a Japanese alias "@場面転換".
@場面転換 中央=001.png 右=消す 左=変更なし 背面=変更なし...
**Changing Characters and Background at Once (Extended) (...
This feature is as same as the "@chs" command, but the "@...
parameter names and the parameter order is not fixed.
**Shaking the Screen ("@shake") [#n7837450]
This feature shakes the screen.
The command that accomplishes this feature is "@shake".
@shake <direction> <duration> <times> <amplitude>
The "@shake" command allows the screen to oscillate horiz...
The oscillation is a "simple harmonic motion".
The period and the amplitude can be specified.
|Direction |English Specifiers |Japanese Specifiers|
|Horizontal |"horizontal" or "h"|"横" |
|Vertical |"vertical" or "v" |"縦" |
***Usage 1 [#i9186309]
The following script shakes the screen horizontally by 10...
"horizontal" can be abbreviated as "h".
@shake horizontal 1.0 3 100
***Usage 2 [#m9d303ab]
The following script shakes the screen vertically by 100p...
"vertical" can be abbreviated as "v".
@shake vertical 1.0 3 100
***Parameters [#me8c845c]
"@shake" can be written with parameter names.
@shake direction=horizontal duration=1.0 times=3 amplitu...
***Alias [#u2006cc9]
"@shake" has a Japanese alias "@振動".
@振動 方向=横 秒=1.0 回数=3 大きさ=100
@振動 方向=縦 秒=1.0 回数=3 大きさ=100
**Playing a Video ("@video") [#e89d3e75]
This feature plays a video file.
The command that accomplishes this feature is "@video".
@video <file-name-without-extension>
The "@video" command plays a video file.
Available video formats are currently:
- .wmv files (WMV9) on Windows
- .mp4 files (H.264/AAC) on macOS, Linux, iOS, Android an...
Note that on Linux, the end user must have a Gstreamer pl...
Video files are stored in the mov folder.
The "mov" folder is not stored in the "data01.arc" file.
For further details, see the "File Formats" section.
***Usage [#zb7946d6]
The following script plays a video file named "sample.wmv...
@video sample
***Parameters [#qec944ae]
"@video" can be written with a parameter name.
@video file=sample
***Alias [#r0088a27]
"@video" has a Japanese alias "@動画".
@動画 ファイル=sample
**Showing a GUI ("@gui") [#e3b51355]
This feature shows a graphical user interface (GUI).
The command that accomplishes this feature is "@gui".
@gui <file> (options)
A GUI is a menu consisting of three images
and can show up to 128 buttons on the screen.
Button types include "jump to label", "show if variable i...
GUI definition files are also used for the config, save, ...
Options can contain:
- cancel ... make it possible to cancel by a right click
- nofadein ... ignore fadein option in a GUI file
- nofadeout ... ignore fadeout option in a GUI file
For further details, see the "Graphical User Interface" s...
***Usage 1 [#sc1ad190]
The following script shows GUI "menu.txt".
@gui menu.txt
***Usage 2 [#jdc7999a]
The following script show GUI "menu.txt".
It allows cancellation by right click.
@gui menu.txt cancel
***Parameters [#fa10f670]
"@gui" can be written with a parameter name.
@gui file=001.txt cancel
***Alias [#scc4c1d7]
"@gui" has a Japanese alias "@メニュー".
@メニュー ファイル=001.txt
@メニュー ファイル=001.txt キャンセル許可
**Waiting for a Click ("@click") [#g184c204]
This feature waits for a user click.
The command that accomplishes this feature is "@click".
@click
During auto mode, Suika2 resumes after a 2-second pause.
Also see the "Click Waiting Mode" section.
***Usage [#l0dbe1d9]
The following script waits for a click.
@click
***Alias [#w933097f]
"@click" has a Japanese alias "@クリック".
@クリック
**Waiting for Specified Time ("@wait") [#n57282c0]
This feature waits for a specified time in seconds.
The command that accomplishes this feature is "@wait".
@wait <duration>
If a click or keystroke is made, the wait is canceled.
If the previous command is a message,
the message box is visible while waiting for input,
otherwise, the message box is hidden while waiting for in...
See also "Timed Waiting Mode".
***Usage [#nb4bd0c7]
The following script waits for 5 seconds.
@wait 5.0
***Parameters [#o7d4cdee]
"@wait" can be written with a parameter name.
@wait duration=1.0
***Alias [#d67c11a1]
"@wait" has a Japanese alias "@時間待ち".
@時間待ち 秒=1.0
**Prohibiting Skip ("@skip") [#c12a0b79]
This feature enables/disables skip by control key and ski...
The command that accomplishes this feature is "@skip".
@skip <enable/disable>
The "@skip" command enables or disables the ability to sk...
Typically, this command is used to display a brand logo o...
When "@skip disable" is issued, auto-mode and skip-mode w...
The state of non-skippable mode is not recorded to the sa...
Thus, avoid calling the save and/or load screens while no...
***Usage 1 [#t9854a11]
The following script enables skip. (default/skippable-mode)
@skip enable
***Usage 2 [#pb863cb1]
The following script disables skip. (non-skippable mode)
@skip disable
***Alias [#r8e4b4c6]
"@skip" has a Japanese alias "@スキップ".
@スキップ 許可
@スキップ 不許可
**Jumping to a Label ("@goto") [#e91c4274]
This feature moves the script execution position to the s...
The command that accomplishes this feature is "@jump".
@goto <label>
Currently, there is no way to jump directly to labels in ...
Suika2 behaves in a special way when "$LOAD" or "$SAVE" i...
***Usage 1 [#vb3c8839]
The following script jumps to the label "abc" (thus creat...
:abc
Describe the process here.
@goto abc
***Usage 2 [#p02897fb]
The following script shows the load screen.
@goto $LOAD
***Usage 3 [#j7519408]
The following script shows the save screen.
@goto $SAVE
***Parameters [#td561918]
"@goto" can be written with a parameter name.
@goto destination=LABEL
***Alias [#cf01a548]
"@goto" has a Japanese alias "@ジャンプ".
@ジャンプ 行き先=ラベル
**Setting a Variable ("@set") [#leb5753a]
This feature sets variable values.
The command that accomplishes this feature is "@set".
@set <variable> <operator> <value>
The "@set" command performs local-variable, global-variab...
manipulations.
Local and global variables has integral values.
On the other hand, name variables has string values.
For local and global variables, the "@set" command can pe...
Addition, subtraction, multiplication and remainder are p...
For name variables, the "@set" command can perform simple...
Available operators are:
- "=" (assignment)
- "+=" (addition, for local and global variables only)
- "-=" (subtraction, for local and global variables only)
- "*=" (multiplication, for local and global variables on...
- "/=" (division, for local and global variables only)
- "%=" (remainder, for local and global variables only)
When the LHS is a local or global variable, "$RAND" can b...
Local variables range from "$0" to "$9999". They are stor...
Global variables range from "$10000" to "$10999". They ar...
All local and global variables have 32-bit integer values...
Name variables range from "%a" to "%z". They are stored i...
All name variables have string values and are initialized...
See also "Variables".
***Usage 1 [#teb9ffbf]
The following script sets the value of "1" to the variabl...
@set $0 = 1
***Usage 2 [#vd1e4390]
The following script adds the value "23" to the variable ...
@set $10 += 23
***Usage 3 [#uaf2ecb9]
The following script assigns a random number (from 0 to 2...
@set $0 = $RAND
***Usage 4 [#a2c3b331]
The following script adds the value of the variable "$2" ...
@set $1 += $2
***Alias [#z5375c61]
"@set" has a Japanese alias "@フラグをセット".
@フラグをセット $1 = 1
**Branching by Variable ("@if") [#zc15cbe7]
This feature moves the script execution position to the s...
if the specified condition of a preset variable is met.
The command that accomplishes this feature is "@if".
@if <variable> <operator> <value> <label>
Available operators are:
|Operator|Meaning |
|">" |greater than |
|">=" |greater than or equal to|
|"==" |equal to |
|"<=" |less than or equal to |
|"<" |less than |
|"!=" |not equal to |
LHS must be a variable name (e.g., "$1", "%a").
When the LHS is a local or global variable such as "$1", ...
When the LHS is a name variable such as "%a", the RHS is ...
In addition, the operators are restricted to "==" and "!=...
***Usage [#a07a70f5]
The following script jumps to the label "abc" if the vari...
@if $1 == 1 abc
Story when flag is not set.
@goto END
:abc
Story when flag is set.
@goto END
:END
Stories join here.
***Alias [#u6f3f4ad]
"@if" has a Japanese alias "@フラグでジャンプ".
@フラグでジャンプ $1 == 1 ラベル
**Jumping to a Script ("@load") [#f45a971a]
This feature loads a script file.
The command that accomplishes this feature is "@load".
@load <file>
Script files need to be in the txt folder.
***Usage [#fae74218]
The following script jumps to the script file "001.txt".
@load 001.txt
***Parameters [#lfd3b49f]
"@load" can be written with a parameter name.
@load file=001.txt
***Alias [#e6a28bad]
"@load" has a Japanese alias "@シナリオ".
@シナリオ ファイル=001.txt
**Setting a Chapter Name ("@chapter") [#r436aab7]
This feature sets a chapter name.
The command that accomplishes this feature is "@chapter".
@chapter <title>
The name of the chapter is reflected in the window title ...
***Usage [#v3dd4d8b]
The following script sets the chapter name.
@chapter "Chapter 1"
***Parameters [#y59bd4ba]
"@chapter" can be written with a parameter name.
@chapter titile="Chapter 1"
***Alias [#l20f98ee]
"@chapter" has a Japanese alias "@章".
@章 タイトル="第一章"
**Call a Procedure ("@gosub") [#faa6ba2c]
This feature calls a subroutine.
The command that accomplishes this feature is "@gosub".
@gosub <label>
Note that nested calls of subroutines are not supported.
***Usage [#z49bc6d6]
The following script runs subroutine "SUB".
@gosub SUB
@goto END
:SUB
Describe the process here.
@return
:END
**Return From a Procedure ("@return") [#z77ab0d1]
This feature returns from a subroutine.
The command that accomplishes this feature is "@return".
@return
***Usage [#nd065565]
The following script runs subroutine "SUB".
@gosub SUB
@goto END
:SUB
Describe the process here.
@return
:END
**Multilingualization Prefix [#ca66974f]
This feature automatically switches the language to be di...
depending on the user's system locale.
To use this feature, a script line must be started with a...
+en+Hello.
+fr+Bonjour.
This is not exactly a command, but it is a prefix to a co...
See also "International Mode" and "Language Mapping".
**Calling an Advanced Script ("@wms") [#q7263630]
This feature executes an advanced script called "WMS".
The command that accomplishes this feature is "@wms".
@wms <file>
WMS files need to be in the wms folder.
For further details, see the "Advanced Script" section.
***Usage [#l7d7c2e5]
The following script executes an advanced script named "s...
@script sample.scr
***Parameters [#v35a85c0]
"@wms" can be written with a parameter name.
@wms file=001.txt
***Alias [#s66218f1]
"@wms" has a Japanese alias "@スクリプト".
@スクリプト ファイル=001.txt
----
*Variables [#h28d2009]
Suika2 has three kinds of variables.
- Local variables
- Global variables
- Name variables
Local and global variables have 32-bit integer values, an...
Name variables have string values, and are initialized as...
**Local Variables [#pb018304]
Variables ranging from "$0" to "$9999" are local variable...
Typically, these are used to branch scenarios.
**Global Variables [#y0f5afd8]
Variables ranging from "$10000" to "$10999" are global va...
Typically, these are used to record which pictures should...
**Name Variables [#g77a8b4b]
Variables ranging from "%a" to "%z" are name variables, t...
Typically, these are used to record the name of characters.
----
*Seen Flags [#o1c039d1]
A seen flag is stored for each message.
Unseen messages cannot be skipped.
However, game developers can set an option to modify this...
The reason why the term "seen" is used instead of "read" ...
"read" appears to be an instruction to the computer.
Seen flags are stored in the "sav" folder.
They are grouped into individual scripts.
The file names of the seen flags are a hex representation...
the script file name.
----
*Main Screen [#w3efdd0d]
Here, the screen during normal gameplay is referred to as...
See "Special Screens" for other screens.
The main screen has some modes.
**Background Changing Mode [#l9e2f44f]
This mode changes the background image.
While this mode is active, the message box is not display...
**Character Changing Mode [#a9e5488b]
This mode changes the character images and the background...
While the "@ch" command changes one character at a time,
the "@chs" command changes 0 or more characters and can o...
While this mode is active, the message box is not display...
however, game developers can optionally set a config to d...
while this mode is active.
**Text Output Mode for Message [#p32c6568]
In this mode, text is output one character at a time to t...
If the message has a character's name,
the name of the character is output to namebox prior to t...
When the text output is complete, Suika2 enters "Click Wa...
When a click or enter key is pressed during text output, ...
When the control key is pressed, Suika2 moves to the next...
**Click Waiting Mode for Message [#m5a99caf]
In this mode, a prompt animation appears and waits for th...
If not in auto mode, this mode ends when there is a click...
If in auto mode, this mode ends when the playback of the ...
or the waiting time based on the number of characters has...
This mode is not executed when in skip mode and the messa...
**Sound Fading Mode [#a4fd5b2c]
This mode proceeds simultaneously alongside other modes.
If necessary, game developers can make use of a timed wai...
**Timed Waiting Mode [#f5151e51]
This mode waits for the specified amount of time in secon...
If a click or keystroke is made, the wait is canceled.
**Click Waiting Mode [#y3d6a464]
This mode stops action until a user click or keystroke is...
During auto mode, Suika2 resumes after a 2-second pause.
**Auto Mode [#r65c50d4]
This mode proceeds simultaneously alongside other modes.
This mode effects "Click Waiting Mode for Message".
See also "Click Waiting Mode for Message".
During this mode, a banner representing auto mode is disp...
**Skip Mode [#c823884c]
This mode proceeds simultaneously alongside other modes.
This mode effects "Click Waiting Mode for Message".
See also "Click Waiting Mode for Message".
During this mode, a banner representing skip mode is disp...
----
*Special Screens [#j0445e19]
Apart from the main screen (normal layered game screen),
there are some special screens.
These special screens are realized by the graphical user ...
**Save Screen [#tf80d2ca]
The save screen is for viewing and recording saved data.
This screen is realized within the GUI file "save.txt".
The number of save slots per page can be determined in "s...
**Load Screen [#ke66745a]
The load screen is for viewing and loading saved data.
This screen is realized within the GUI file "load.txt".
The number of save slots per page can be determined in "l...
**History Screen [#j0004171]
The history screen displays a history of seen messages.
The maximum number of messages recorded is 100.
End users can click on a line with voice to play the audio.
This screen is realized within the GUI file "history.txt".
**Config Screen [#o94dfe6c]
The config screen allows end users to set volume, text sp...
auto mode speed and font.
It also provides a "back to game title logo" button.
It may also show a preview of text speed and auto mode sp...
This screen is realized within the GUI file "config.txt".
----
*Graphical User Interface [#t854c889]
Graphical user interface (GUI) interacts with the user.
It is described by a text file, and it defines various bu...
GUI is used to realize the special screen mode.
Typically, it is also used to implement the title as well...
Note that in a GUI file,
the characters after "#" in a line are ignored and treate...
**GUI File Header [#x35ad49d]
GUI files have a header.
In a header, developers have to define three images;
"idle", "hover" and "active".
global {
idle: config-idle.png;
hover: config-hover.png;
active: config-active.png;
}
The "idle" image is displayed as a base layer.
The "hover" image is displayed when the button area is po...
The "active" image is displayed when the button is active.
Slidebar buttons are always displayed.
**Jump To Label Button [#j22ee9d5]
This button is used for creating a normal menu.
QUIT {
type: goto;
label: QUIT;
x: 960;
y: 497;
width: 317;
height: 201;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Save/Load Page N Button [#ad82572b]
This button is used for creating pagenation within the sa...
PAGE1 {
type: savepage;
index: 0;
x: 1137;
y: 0;
width: 70;
height: 63;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Save Slot Button [#i4c8e8e5]
This button is used for creating a save slot.
SAVESLOT1 {
type: save;
index: 0;
x: 50;
y: 138;
width: 1106;
height: 140;
margin: 10;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When game developers create the save slot button,
they need an extra header item within the GUI file.
saveslot: 3;
**Load Slot Button [#g48081c5]
This button is used for creating a load slot.
SAVESLOT1 {
type: load;
index: 0;
x: 50;
y: 138;
width: 1106;
height: 140;
margin: 10;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When game developers create the load slot button,
they need an extra header item within the GUI file.
saveslot: 3;
**Text Speed Slider [#e2e60fc2]
This button is used for creating a text speed slidebar.
TEXTSPEED {
type: textspeed;
x: 68;
y: 250;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Auto Mode Speed Slider [#scb74448]
This button is used for creating an auto mode speed slide...
AUTOSPEED {
type: autospeed;
x: 68;
y: 339;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
** Text Speed Preview [#ma0ff59c]
This button is used for displaying a preview of text and ...
PREVIEW {
type: preview;
msg: "This message is a preview of text speed and au...
x: 442;
y: 453;
width: 590;
height: 120;
}
**BGM Volume Slider [#e9d1f74d]
This button is used for setting the BGM volume.
BGM {
type: bgmvol;
x: 420;
y: 249;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Sound Effect Volume Slider [#t92c8353]
This button is used for setting the volume of sound effec...
SE {
type: sevol;
file: click.ogg;
x: 420;
y: 339;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Voice (All-character) Volume Slider [#b31e02e9]
This button is used for setting the volume of voice (all-...
VOICE {
type: voicevol;
file: 025.ogg;
x: 68;
y: 498;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Voice (Per-character) Volume Slider [#rdda2fea]
This button is used for setting the volume of voice (per-...
See also "Per-character Voice Volume Settings" section.
MIDORI {
type: charactervol;
index: 1;
file: 025.ogg;
x: 506;
y: 506;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Font Selection Button [#r67ffe59]
This button is used for setting the font.
FONT1 {
type: font;
file: VL-PGothic-Regular.ttf;
x: 770;
y: 328;
width: 87;
height: 30;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are multiple font buttons,
the active image is displayed for the selected font.
**Full Screen Button [#e20e896e]
This button is used for setting full screen mode.
FULLSCREEN {
type: fullscreen;
x: 750;
y: 206;
width: 200;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are full screen and window buttons,
the active image is displayed for the selected one.
**Window Button [#gef99444]
This button is used for setting window mode.
WINDOW {
type: window;
x: 995;
y: 206;
width: 200;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are full screen and window buttons,
the active image is displayed for the selected one.
** Reset Button [#v74df0a4]
This button is used for resetting options.
DEFAULT {
type: default;
x: 1131;
y: 61;
width: 115;
height: 40;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Page Button [#tc4b6ceb]
This button is used for moving to another GUI.
PAGE2 {
type: gui;
file: system-page2.txt;
x: 1234;
y: 132;
width: 35;
height: 35;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Jump To Title Button [#f2b43311]
This button is for jumping to the title screen.
Before the jump, a Yes/No dialog is displayed.
TITLE {
type: title;
file: init.txt;
x: 1007;
y: 652;
width: 109;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Cancel Button [#h020ed76]
This button closes a GUI screen.
BACK {
type: cancel;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Gallery Button [#v4611647]
This button is visible when the specified variable is non...
This feature is for the gallery mode.
CG1 {
type: gallery;
label: CG1;
var: $10000;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Name Variable Button [#k6229adb]
This button shows the string content of a name variable.
This feature is for name input screens.
NAMEVAR {
type: namevar;
namevar: a;
x: 1156;
y: 653;
width: 103;
height: 21;
}
**Name Input Button [#zb00fd3d]
This button adds a string to a name variable.
This feature is for name input screens.
There are some special values for "msg" property:
- "[ok]" ... completes the name variable
- "[clear]" ... clears the name variable
CHAR_A {
type: char;
namevar: a;
msg: A;
max: 6;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
----
*Configuration Features [#x39bd838]
Suika2 has a configuration file that allows customization...
The configuration file consists of "key=value" lines.
Some keys are required and some are optional.
Note that configuration lines beginning with "#" are igno...
**Language Settings [#m25e8bcb]
Suika2 only provides game developers with Japanese and En...
However, it can offer multiple-language stories to end us...
their system locale.
***Language Mapping [#sfa51546]
This is the ability to display messages in a specific lan...
when a specific system locale is set.
For example, "language.ja=en" is an indication that the m...
to be displayed in English when the system locale is Japa...
The default language mappings are as follows (all locales...
language.en=en
language.fr=en
language.de=en
language.es=en
language.it=en
language.el=en
language.ru=en
language.zh=en
language.tw=en
language.ja=en
language.other=en
**Window Settings [#iac5a11f]
Here, a window is the drawable area of the screen.
***Window Title [#a3495a51]
This is the application title.
On a desktop operating system, a window may have a title.
In such an environment,
this application title becomes the first half of the wind...
The second half of the window title is the chapter name,
but this is omissible by a config.
window.title=Suika
***Window Width and Height [#g5fe9e7d]
This is the width and height of the window.
window.width=1280
window.height=720
***Background Color [#x77dde99]
Game developers can choose whether the window background ...
white or black.
window.white=1
***Menu Bar on Windows [#oc5f1af6]
On Windows, Suika2 can have a menu bar.
Game developers can decide whether the window has a menu ...
window.menubar=1
**Font Settings [#d0e36fb1]
***Font File Name [#n9465b60]
This is the font file name.
Font files are stored in the "font" folder.
font.file=VL-PGothic-Regular.ttf
***Font Size [#jf5485a7]
This is the font size in pixels.
The font size is applied to name, message, history and sa...
font.size=30
***Font Colors [#ea624de8]
It is possible to specify the base color of the text as w...
font.color.r=255
font.color.g=255
font.color.b=255
font.outline.color.r=128
font.outline.color.g=128
font.outline.color.b=128
***Font Outline [#g89b0f84]
Game developers can choose whether or not to display font...
font.outline.remove=0
**Namebox Settings [#y16e6f95]
***Namebox Image [#u4a75063]
This is the image file name of the namebox.
The file is stored in the "cg" folder.
namebox.file=namebox.png
***Namebox Position [#i11a8cb5]
This is the position at which to show the namebox.
namebox.x=95
namebox.y=480
***Namebox Top Margin [#k454b5dd]
This is the top margin of text in the namebox image.
namebox.margin.top=11
***Namebox Left Margin [#k311650f]
This is the left margin of text in the namebox image.
***Namebox Centring [#d91aa18d]
Game developers can choose whether or not to center the c...
namebox.centering.no=0
***Namebox Visibility [#cb5d5df9]
Game developers can choose whether or not to show the nam...
namebox.hidden=0
**Message Box Settings [#gf22b51c]
***Message Box Images [#e49546a8]
The message box is made up of a background and foreground...
The foreground image is used for utilizing an in-box menu...
msgbox.bg.file=msgbox-bg.png
msgbox.fg.file=msgbox-fg.png
***Message Box Position [#ndc54881]
This is the position at which to show the message box ima...
msgbox.x=43
msgbox.y=503
***Message Box Margins [#qff30bd9]
- Left margin of text in the message box image
- Top margin of text in the message box image
- Right margin of text in the message box image
- Line spacing
msgbox.margin.left=80
msgbox.margin.top=50
msgbox.margin.right=80
msgbox.margin.line=40
***Message Box Text Speed [#t2c5d3d4]
Game developers can set the number of characters of text ...
msgbox.speed=40.0
***Position of the Hide Button [#mf939e2b]
The message box can have a hide button.
This is optional.
msgbox.btn.hide.x=1146
msgbox.btn.hide.y=16
msgbox.btn.hide.width=29
msgbox.btn.hide.height=29
***Position of the Save Button [#cb2d9a38]
The message box can have a save button.
This is optional.
msgbox.btn.save.x=1146
msgbox.btn.save.y=16
msgbox.btn.save.width=29
msgbox.btn.save.height=29
***Position of the Load Button [#j04570ce]
The message box can have a load button.
This is optional.
msgbox.btn.load.x=1146
msgbox.btn.load.y=16
msgbox.btn.load.width=29
msgbox.btn.load.height=29
***Position of the QSave Button [#pc872391]
The message box can have a qsave button.
This is optional.
msgbox.btn.qsave.x=1146
msgbox.btn.qsave.y=16
msgbox.btn.qsave.width=29
msgbox.btn.qsave.height=29
***Position of the QLoad Button [#x3b82676]
The message box can have a qload button.
This is optional.
msgbox.btn.qload.x=1146
msgbox.btn.qload.y=16
msgbox.btn.qload.width=29
msgbox.btn.qload.height=29
***Position of the Auto Button [#z2778e69]
The message box can have an auto button.
This is optional.
msgbox.btn.auto.x=1146
msgbox.btn.auto.y=16
msgbox.btn.auto.width=29
msgbox.btn.auto.height=29
***Position of the Skip Button [#e43c344f]
The message box can have a skip button.
This is optional.
msgbox.btn.skip.x=1146
msgbox.btn.skip.y=16
msgbox.btn.skip.width=29
msgbox.btn.skip.height=29
***Position of the History Button [#x753597b]
The message box can have a history button.
This is optional.
msgbox.btn.history.x=1146
msgbox.btn.history.y=16
msgbox.btn.history.width=29
msgbox.btn.history.height=29
***Position of the Config Button [#l79586c0]
The message box can have a config button.
This is optional.
msgbox.btn.config.x=1146
msgbox.btn.config.y=16
msgbox.btn.config.width=29
msgbox.btn.config.height=29
***Message Box Sound Effects [#ffb45146]
The message box has sound effects.
msgbox.btn.change.se=btn-change.ogg
msgbox.history.se=click.ogg
msgbox.config.se=click.ogg
msgbox.hide.se=click.ogg
msgbox.show.se=click.ogg
msgbox.auto.cancel.se=click.ogg
msgbox.skip.cancel.se=click.ogg
***Skipping Unseen Messages [#t5ffab12]
The game developer can decide whether unseen text can be ...
Skipping includes skip mode and control key skip.
msgbox.skip.unseen=1
***Dimming Seen Messages [#mec41ec9]
Game developers can dim the seen messages.
This is useful for the full-screen novel mode (NVL).
msgbox.dim=1
msgbox.dim.color.r=80
msgbox.dim.color.g=80
msgbox.dim.color.b=80
msgbox.dim.color.outline.r=40
msgbox.dim.color.outline.g=40
msgbox.dim.color.outline.b=40
**Click Animation Settings [#k3a0ed04]
The click-waiting prompt that appears above the message b...
***Click Animation Position [#s007983f]
This is the position at which to show the click animation...
click.x=1170
click.y=660
***Following The Text [#s79fc488]
The click animation is usually displayed at a fixed posit...
but it can also be displayed at the end of the text.
This is useful when making a full screen style novel.
click.move=1
***Click Animation Images [#vbcf99b5]
The first one is required, and others are optional.
click.file1=click1.png
click.file2=click2.png
click.file3=click3.png
click.file4=click4.png
click.file5=click5.png
click.file6=click5.png
***Click Animation Interval [#x7af3f84]
This is the click animation interval in second.
click.interval=1.0
***Click Animation Visibility [#odf5f13c]
Developers can hide the click animation.
This is mainly for the visually impaired.
click.interval=1.0
**Options Settings [#w88a2987]
***Option Box Images [#j7a97019]
There are background and foreground images for an option ...
The background image is displayed by default,
but when the option box is pointed by the mouse, the fore...
switch.bg.file=switch-bg.png
switch.fg.file=switch-fg.png
***First Option Position [#m035135c]
This is the position of the first option box.
switch.x=406
switch.y=129
***Vertical Space Between Options [#obfda335]
This is the vertical space between the option box images.
switch.margin.y=20
***Option Top Margin [#b16ecf9c]
This is the top margin of text in the option box image.
switch.text.margin.y=18
***Pointed Option Color [#n7e2ce46]
This is the color of pointed option's text.
switch.color.active=0
switch.color.active.body.r=255
switch.color.active.body.g=0
switch.color.active.body.b=0
switch.color.active.outline.r=128
switch.color.active.outline.g=128
switch.color.active.outline.b=128"
***Options Sound Effects [#sa88ab07]
Options can have sound effects.
switch.parent.click.se.file=click.ogg
switch.child.click.se.file=click.ogg
switch.change.se=btn-change.ogg
**Save/Load Screen Settings [#tf105f92]
Most of the settings for save/load screens are defined wi...
Here, we have just one configuration.
***Save Item Thumbnail Size [#rde8bef2]
This is the thumbnail size of the save data.
save.data.thumb.width=213
save.data.thumb.height=120
**System Menu Settings [#u5834bba]
***System Menu Position [#s1eb42a8]
This is the position to show the system menu image.
sysmenu.x=731
sysmenu.y=29
***System Menu Images [#zdd25836]
The system menu has three images; "idle", "hover", "disab...
"idle" is the base image.
"hover" is displayed when the button area is pointed.
"disable" is displayed when the button is disabled.
sysmenu.idle.file=sysmenu-idle.png
sysmenu.hover.file=sysmenu-hover.png
sysmenu.disable.file=sysmenu-disable.png
***System Menu Button Positions [#nae9dfc6]
The following buttons are available:
- "qsave" (quick save)
- "qload" (quick load)
- "save" (save mode)
- "load" (save mode)
- "auto" (auto mode)
- "skip" (skip mode)
- "history" (history mode)
- "config" (config mode)
The following is the example for "qsave".
sysmenu.qsave.x=62
sysmenu.qsave.y=7
sysmenu.qsave.width=60
sysmenu.qsave.height=58
***System Menu Sound Effects [#b0e98e8a]
The system menu can have sound effects.
sysmenu.enter.se=click.ogg
sysmenu.leave.se=click.ogg
sysmenu.change.se=btn-change.ogg
sysmenu.qsave.se=click.ogg
sysmenu.qload.se=click.ogg
sysmenu.save.se=click.ogg
sysmenu.load.se=click.ogg
sysmenu.auto.se=click.ogg
sysmenu.skip.se=click.ogg
sysmenu.history.se=click.ogg
sysmenu.config.se=click.ogg
***Collapsed Position [#ea440b3f]
This is the position at which to show the collapsed syste...
The collapsed system menu is usually displayed, and when ...
sysmenu.collapsed.x=1219
sysmenu.collapsed.y=29
***Collapsed Images [#ef204044]
THe collapsed system menu has two images; "idle" and "hov...
sysmenu.collapsed.idle.file=sysmenu-collapsed-idle.png
sysmenu.collapsed.hover.file=sysmenu-collapsed-hover.png
***Collapsed Sound Effect [#z5c10c62]
The collapsed system menu can have a sound effect.
sysmenu.collapsed.se=btn-change.ogg
***System Menu Visibility [#y546f25f]
Game developers can decide whether the collapsed system m...
sysmenu.hidden=0
Note: This will take effect when displaying messages.
When displaying options, the collapsed system menu or sys...
this is because of a lack of a way to save without the sy...
**Auto Mode Settings [#l1299b81]
Suika2 shows the auto mode banner when auto mode is enabl...
***Auto Mode Banner Image [#rdbc41ca]
This is the banner image.
automode.banner.file=auto.png
***Auto Mode Banner Position [#oc3f3158]
This is the banner position.
automode.banner.x=0
automode.banner.y=126
***Auto Mode Speed [#o8c802e2]
This is the speed of auto mode.
The wait time for the message is "automode.speed" seconds...
automode.speed=0.15
**Skip Mode Settings [#ga8d582d]
Suika2 shows skip the mode banner when skip mode is enabl...
***Skip Mode Banner Image [#n2f2f98e]
This is the banner image.
skipmode.banner.file=skip.png
***Skip Mode Banner Position [#eca20aa3]
This is the banner position.
skipmode.banner.x=0
skipmode.banner.y=186
**Initial Sound Volumes [#ad4ac78b]
These are the sound volume values for initial boot time.
If a user has the save data,
then the volume settings in the save data will be used
instead of the initial sound volumes.
sound.vol.bgm=1.0
sound.vol.voice=1.0
sound.vol.se=1.0
sound.vol.character=1.0
**Per-character Voice Volume Settings [#v2765881]
If the character name of a line matches to one from the n...
then the respective per-character volume will be applied.
Per-character volumes can be set in the config screen. (#...
See also "Voice (Per-character) Volume Slider" section.
Developers can specify the names for up to 15 characters....
If the character name of the message doesn't match a name...
then the #0 per-character volume will be used.
The following is an example of name list.
sound.character.name1=Midori
**Character Message Colors [#a0c47f91]
Game developers can specify text colors for up to 64 char...
Colors are defined for each character by name.
To use character message colors, write the following.
serif.color1.name=Haruka
serif.color1.r=255
serif.color1.g=200
serif.color1.b=200
serif.color1.outline.r=0
serif.color1.outline.g=0
serif.color1.outline.b=0
**Miscellaneous [#lc280d76]
These are detailed config items according to individual u...
***Voice Continues On Click [#pb87f402]
This option enables voice continuation on click.
Normally, voice playback is stopped before moving on to t...
but this option suppresses this behaviour.
See alose "Showing a Line" section.
To enable this, write the following line in the config:
voice.stop.off=1
***Full Screen Mode [#icbe48cb]
This option disables full screen mode.
If game developers don't want to allow full screen mode,
write the following line.
window.fullscreen.disable=1
***Window Maximization [#nf86b266]
This option disables window maximization.
If game developers don't want to allow maximization of th...
write the following line.
window.maximize.disable=1
***Window Title Separator [#lc3e5b15]
The window title consists of the application title and th...
This separator is added between the application title and...
To set the separator, write the following line. Note that...
window.title.separator=
***Chapter Name [#t280be73]
Game developers can decide whether to show chapter names ...
To hide the chapter name from the window title, write the...
window.title.chapter.disable=1
***Show Message Box On Character Change [#ye9663cc]
By default, the message box disappears while characters a...
With this option, developers can decide whether to displa...
while character is changing.
To enable this option, write the following line.
msgbox.show.on.ch=1
**Release Mode [#ta753585]
This mode is used for installing games to the "Program Fi...
If this configuration is enabled,
save data will be stored in OS-specific locations such as...
To enable release mode, write the following line.
release=1
**Note [#m934afb6]
Initial values for text speed and auto mode speed cannot ...
The default value for these is "0.5".
----
*Package [#we8f1fa0]
Package is an archive file that contains all game data ex...
The package file name is "data01.arc".
**Package Generation [#qc005cfa]
To generate a package file, developers can use the "pack"...
**Package Obfuscation [#cb05103d]
The obfuscation key is stored in "key.h", and developers ...
**Package Usage [#k207fcc7]
To use a package file, put it in the folder that contains...
Game data folders (e.g., "bg", "ch", "bgm" and etc.) must...
If the game data folder exists in the app folder, Suika2 ...
----
*File Formats [#ra51a770]
**Text File Format [#i453e4cf]
Script files, GUI files and config file are plain text fi...
***Encoding [#z4baeb35]
Text files must be encoded in UTF-8.
***New Line [#c2422ec5]
CR+LF, LF and CR are accepted.
These can be mixed.
**Image File Formats [#td8c063a]
PNG and JPEG are supported.
Note that gray scaled JPEG images are not supported.
**Audio File Format [#xc6c1311]
The only accepted format is Ogg Vorbis 44.1kHz stereo or ...
**Video File Formats [#g20a36ce]
On Windows, ".wmv" is the recommended format.
AVI with H.264 and AAC will work on Windows 10 or later.
On macOS, ".mp4" with H.264 and AAC is the recommended fo...
QuickTime (".mov" or ".qt") will work too.
On Linux, any format supported by Gstreamer will work.
Game developers must instruct end users to install the ne...
In the future, there are plans to move to ".mp4" with H.2...
----
*Advanced Script [#c2ba7a97]
A script stored in the "txt" folder is called "Suika2 Scr...
which is simple script for novelists,
consisting of text and commands.
On the other hand, a script stored in the "wms" folder is...
which is script for more advanced programming.
WMS stands for "Watermelon Script".
**Syntax and Usage [#v81a5a0b]
This section describes the grammar of WMS.
***Defining and Calling Functions [#vdf9ad38]
A program starts from "main()" function.
func main() {
// This is a comment.
print("Hello, world!");
}
A function can call other functions.
func main() {
foo(0, 1 2);
}
func foo(a, b, c) {
return a + b + c;
}
Indirect calling by string variable is allowed.
func main() {
myfunc = "foo";
myfunc(0, 1 2);
}
func foo(a, b, c) {
return a + b + c;
}
func myfunc(a, b, c) {
// This function will not be called because foo() wi...
}
***Types and Variables [#r2efa83d]
A program can handle integer, floating point, string and ...
func main() {
// Integer
a = 1;
if(isint(a)) {
print("a is int");
}
// Floating point
b = 1.0;
if(isfloat(b)) {
print("b is float");
}
// String
c = "string";
if(isstr(c)) {
print("c is string");
}
// Array (integer key)
d[0] = 0;
if(isarray(d)) {
print("d is array");
}
// Array (string key)
e["abc"] = 0;
if(isarray(e)) {
print("e is array");
}
// Array of array
f["key"] = e;
}
***Loops [#p81e4a49]
To repeat for a specified times:
func main() {
for(i in 0..9) {
print(i);
}
}
To repeat for each value in an array:
func main() {
a[0] = 0;
a[1] = 1;
a[2] = 2;
for(v in a) {
print(v);
}
}
To repeat for each key-value pair in an array:
func main() {
a["key1"] = 0;
a["key2"] = 1;
a["key3"] = 2;
for(k, v in a) {
print(k + "=" + v);
}
}
To create a normal "while" loop:
func main() {
a = 10;
while (a > 0) {
print(a);
a = a - 1;
}
}
To use "break" or "continue" in a "for" or "while" loop:
func main() {
for(i in 0..9) {
if(i == 2) {
continue;
}
if(i == 7) {
break;
}
print(i);
}
}
***Branches [#y7829d35]
A program can branch by "if" - "else if" - "else" syntax.
func main() {
a = foo();
if(a > 10) {
print("a > 10");
} else if(a > 5) {
print("a > 5");
} else if(a == 3) {
print("a == 3");
} else if(a != 4) {
print("a != 4");
} else {
print("else");
}
}
func foo() {
return 6;
}
***Arrays [#f2946c7b]
An array element has a key, and the key must be one of in...
Keys of integer, floating point and string can be mixed.
To create an array, assign a value with "[key]" syntax.
func main() {
a[0] = 0;
print(a);
}
To remove an array element, use "remove()".
func main() {
a[0] = 0;
remove(a, 0);
print(a);
}
To get the size of an array, use "size()".
func main() {
a[0] = 0;
print(size(a));
}
***Conversions [#o05adb00]
Integer to string:
s = "" + 123;
Floating point to string:
s = "" + 1.23;
Integer to floating point:
f = 0.0 + 123;
String to integer:
i = 0 + "123";
String to floating point:
f = 0.0 + "1.23";
**Calling Suika2 Engine [#j2a268c2]
The Suika2 engine provides predefined functions to manipu...
These functions have the prefix "s2_" for their names.
***Getting a Local and Global Variable [#jb38405e]
"s2_get_variable()" accepts an local and variable index a...
value = s2_get_variable(100);
***Setting a Local and Global Variable [#za581874]
"s2_set_variable()" accepts an local and global variable ...
It changes the value of the local or global variable.
s2_set_variable(100, 1);
***Getting a Name Variable [#lcb6dee9]
"s2_get_name_variable()" accepts a name variable index ("...
name = s2_get_name_variable(0);
***Setting a Name Variable [#u2029ecd]
"s2_set_name_variable()" accepts a name variable index ("...
It changes the value of the name variable.
s2_set_name_variable(0, "abc");
***Getting a Random Number [#r147cb74]
"s2_random()" returns a random integer
The return value ranges from "0" to "99999".
value = s2_random();
***Overwriting a Configuration [#g203c4d0]
The following function overwrites a configuration:
s2_set_config(): accepts a string key and a string value.
In some cases, overwriting configurations do not take eff...
so a WMS code should call "s2_reflect_*_config()" to refl...
// These will be reflected immediately.
s2_set_config("msgbox.x", "0");
s2_set_config("msgbox.speed", "20.0");
// These will not be reflected immediately.
s2_set_config("msgbox.bg.file", "msgbox-bg.png");
s2_set_config("msgbox.fg.file", "msgbox-fg.png");
***Updating Message Box and Namebox [#l22ad8dd]
s2_reflect_msgbox_and_namebox_config() reflects the confi...
s2_reflect_msgbox_and_namebox_config();
***Clearing Message History [#u68c9aee]
s2_clear_history() clears the message history.
s2_clear_history();
***Clearing Message Box [#oe524769]
s2_clear_msgbox() clears the message box.
s2_clear_msgbox();
***Clearing Name Box [#p0f2feab]
s2_clear_namebox() clears the name box.
s2_clear_namebox();
***Hiding Message Box [#y79c2b54]
s2_hide_msgbox() hides the message box.
s2_hide_msgbox();
***Hiding Message Box [#a8480294]
s2_hide_msgbox() hides the message box.
s2_hide_msgbox();
***Saving Global Data [#nc0c81c1]
s2_save_global() saves global data immediately.
s2_save_global();
***Preserve Stage State Before User Defined Menu [#g82752...
s2_push_stage() preserves stage state. It is used by user...
s2_push_stage();
***Restore Stage State After User Defined Menu [#a7678da9]
s2_pop_stage() restores stage state. It is used by user d...
s2_pop_stage();
*** Remove a Local Save File [#m6f3447f]
s2_remove_local_save() removes a local save file. The par...
s2_remove_local_save(0);
*** Remove a Global Save File [#zaa3e876]
s2_remove_global_save() removes a global save file.
s2_remove_global_save();
----
*Non-functional Requirements [#ha52b252]
**Performance Requirements [#r16c42fa]
***Native Application [#s9a07c3a]
Suika2 binaries are applications that run natively on the...
This is based on the idea of achieving the fastest possib...
***CPU Usage [#x7e54936]
Suika2 can only use CPU time within the range that the OS...
Suika2's CPU utilization to be "low".
The evaluation is based on the 6th generation Core i7 and...
***Fast Math [#p7f8ffb6]
Suika2 needs to speed up vector operations as much as pos...
On Intel/AMD platforms, Suika2 supports SSE, SSE2, SSE3, ...
Suika2 automatically chooses the fastest extension.
Currently, AVX512 is not supported because of the lack of...
***GPU [#l4854df6]
On a desktop OS, Suika2 uses GPU acceleration when possib...
it falls back to 2D rendering for compatibility purposes.
On other environments, Suika2 will always use GPU acceler...
the CPU may not be powerful enough.
Suika2 uses its own 2D rendering engine if GPU accelerati...
however, this fallback will be removed in the future.
Note that offscreen renderings are not GPU accelerated an...
***Frame Rate [#d6306d32]
The frame rate is set as high as 60 fps,
within the range that the OS determines Suika2's CPU util...
On Windows and Linux, if the GPU acceleration is enabled,
the target frame rate is 60fps, and if not, 30fps.
On macOS, the target frame rate is 30fps.
On iOS and Android, the frame rate is determined by OpenG...
終了行:
Software Requirements Specification for Suika2
|Author|ktabata|
|Modified By||
|Organization||
|Updated|10th October 2023|
|Created|27th October 2022|
|Revision|14.6.0|
----
Table of Contents
#contents
----
* Introduction [#i6316fc8]
Suika2 is a tool for creating visual novels.
It is a cross-platform software, compatible with, but not...
This document outlines the software requirements specific...
** The Necessity of This Document [#k98e0b76]
This section explains why the SRS is needed for Suika2, a...
This project has grown with an emphasis on documentation ...
To our delight, the project has several sources of docume...
These documents may cause inconsistencies in the future, ...
Therefore, the project decided to create an SRS that woul...
and from which other documentation would be adapted and c...
If a description of a specification that exists in anothe...
----
* Files and Folders [#p6840cea]
- Game Folder
-- anime/
-- bg/
-- bgm/
-- cg/
-- ch/
-- conf/
-- cv/
-- font/
-- gui/
-- rule/
-- sav/
-- se/
-- txt/
-- wms/
-- data01.arc
-- suika.exe
-- suika.app
** anime Folder [#u45e8fb4]
This folder is for anime files.
** bg Folder [#adc1434b]
This folder is for background image files.
** bgm Folder [#b4e75154]
This folder is for background music files
** cg Folder [#y9b51830]
This folder is for the following images.
- Message box
- Namebox
- System menu
- Collapsed system menu
- Option box
- Click animation
- GUI (including save, load, history, config screens)
- Auto mode banner
- Skip mode banner
- Anime images
** ch Folder [#f8a9779d]
This folder is for character sprites.
** conf Folder [#a171c7e8]
This folder is for config files, namely, "config.txt".
** cv Folder [#id347d77]
This folder is for character voice files.
** font Folder [#r272bc74]
This folder is for font files.
** gui Folder [#z914e878]
This folder is for GUI definition files.
** rule Folder [#qc9472cd]
This folder is for rule image files which are used in rul...
background and character images.
** sav Folder [#t10fa6ed]
This folder is for save data. It is automatically generat...
When release mode is enabled,
this folder is not generated in the game folder.
See further details in the "Release Mode" section.
** se Folder [#md451325]
This folder is for sound effect files.
** txt Folder [#cedce5d4]
This folder is for scenario files.
** wms Folder [#t36bed26]
This folder is for WMS (Watermelon Script) files.
** data01.arc File [#i3a9f4f3]
This is a package file.
See further details in the "Package" section.
** suika.exe File [#ia51a2d2]
This is an application for Windows.
** suika.app Bundle [#sa614761]
This is an application for macOS.
----
* Main Screen Components [#aba8b199]
In main screen (See further details in the "Main Screen" ...
screen components are layered.
When referring to all layers, the term "stage" is used.
The stage consists of the following, in order from bottom...
Background Layer
bg2 Layer
Effect5-8 Layers
Back Center Character Layer
Left Character Layer
Right Character Layer
Center Character Layer
Effect1-4 Layers
Message Box Layer
Namebox Layer
Character Face Layer
Click Animation Layer
Options Layer
Collapsed System Menu Layer
System Menu Layer
** Background Layer [#eec8c973]
The background image is the lowest layer that makes up th...
Its size must be equal to that of the window.
** bg2 Layer [#vdc947e8]
The "bg2" layer can be used for anime.
** Effect5-8 Layers [#kc9aeb5b]
The "effect5", "effect6", "effect7" and "effect8" layers ...
** Character Layers [#ld2a0330]
center (Center Character)
right (Right Character)
left (Left Character)
back (Back Center Character)
face (Character Face)
There are four regular character types
depending on their horizontal display position
(center, right, left and back).
The center and back charater positions have the same hori...
but the layers displayed are different.
There is a position for the character's face to be displa...
the left of the message box.
All characters are vertically aligned at the bottom of th...
** Effect1-4 Layers [#c20e2c67]
The effect1, effect2, effect3 and effect4 layers can be u...
** Message Box Layer [#n127ff66]
The message box is a window for outputting text.
It is made up of a set of "bg" (background) and "fg" (for...
In simple terms, the bg image is displayed by default (of...
When a developer creates an "In-box Menu" and a game user...
the button area of the fg image is substituted in.
Given that the fg image must be specified, a developer ma...
for both the fg and bg images. This is most often the cas...
include a menu.
***In-box Menu [#r74afb48]
The message box can have menu buttons.
Acceptable button types are:
- "qsave"
- "qload"
- "save"
- "load"
- "history"
- "auto"
- "skip"
- "config"
- "hide"
The current demo game only uses the "hide" button.
If developers want to use the other buttons,
they can simply provide appropriate message box images an...
**Namebox Layer [#b3cb77eb]
The namebox is a window for outputting a character's name.
Names are usually horizontally centered, but can be left-...
The namebox can be hidden by a config
in order to realize a full-screen style novel.
**Collapsed System Menu Layer [#u16066d5]
This is a button that is visible during the display of me...
Clicking this button opens the "System Menu".
The collapsed system menu is invisible and disabled while
the "System Menu" is visible.
**System Menu Layer [#p84c0df6]
This is a menu that consists of buttons.
Acceptable button types are:
- "qsave"
- "qload"
- "save"
- "load"
- "history"
- "auto"
- "skip"
- "config"
The system menu is activated by clicking on the collapsed...
by right-clicking when a message or option(s) is displayed.
While the system menu is displayed,
right-clicking or clicking anywhere other than the button...
the system menu and return to the collapsed system menu.
----
*Command Features [#x48770dc]
An important building block of Suika2's functionality are...
Therefore, more than half of the functional requirements ...
See details regarding command implementation in the [[Com...
The following is example command syntax.
@command-name <required-parameter> (optional-parameter)
**Playing an Anime ("@anime") [#ge72e9ca]
This feature plays an anime file.
The command that accomplishes this feature is "@anime".
@anime <file> (options)
**Showing a Background ("@bg") [#e38c1fb8]
This feature shows a background image.
The command that accomplishes this feature is "@bg".
@bg <file> (duration) (effect)
The "@bg" command changes the background image.
It fades in a new background image over a specified time ...
Background image files need to be stored in the bg folder.
The hex RGB color specifier (e.g., "#0088ff") may be used...
When "@bg" is run, the originally displayed background as...
are removed from the stage.
Game developers can use @chsx instead of "@bg" when they ...
If you are looking for a way to keep your characters from...
you change the background, write the following command:
@chsx left=stay center=stay right=stay back=stay backgro...
Fade-ins are accompanied by transition effects.
The following is the list of effects types.
|Effect Type |Effect Name ...
|fade/dissolve (alpha blending) |"normal" ...
|right curtain |"curtain-righ...
|left curtain |"curtain-left...
|up curtain |"curtain-up" ...
|down curtain |"curtain-down...
|right slide |"slide-right"...
|left slide |"slide-left" ...
|up slide |"slide-up" ...
|down slide |"slide-down" ...
|right shutter |"shutter-righ...
|left shutter |"shutter-left...
|up shutter |"shutter-up" ...
|down shutter |"shutter-down...
|clockwise wipe |"clockwise" ...
|counterclockwise wipe |"counterclock...
|clockwise wipe (20 degrees stepped) |"clockwise20"...
|counterclockwise wipe (20 degrees stepped)|"counterclock...
|clockwise wipe (30 degrees stepped) |"clockwise30"...
|counterclockwise wipe (30 degrees stepped)|"counterclock...
|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...
|rule (universal transition/1-bit) |"rule:<rule-f...
|melt (universal transition/8-bit) |"melt:<rule-f...
The "mask" Effect type was removed as the "rule" effect t...
The demo includes a "rule-mask.png" file as a rule image ...
***Usage 1 [#tacb7d3e]
The following script changes the background image to "sam...
@bg sample.png
***Usage 2 [#j8412542]
The following script changes the background image to "sam...
The applicable effect type is "fade/dissolve (alpha blend...
@bg sample.png 1.5
***Usage 3 [#r4a9c9ad]
The following script changes the background image to "sam...
The applicable effect type is "right curtain", which is l...
@bg sample.png 1.5 curtain-right
***Usage 4 [#j43a6e11]
The following script changes the background to the color ...
The applicable effect type is "close eyes", which is like...
@bg #000000 1.5 eye-close
***Usage 5 [#dd30f106]
The following script changes the background image to "sam...
The applicable effect type is "rule (universal transition...
@bg sample.png 1.5 rule:rule-star.png
***Usage 6 [#oe1df9a9]
The following script changes the background image to "sam...
The applicable effect type is "melt (universal transition...
@bg sample.png 1.5 melt:rule-star.png
***Parameters [#c4fca683]
"@bg" can be written with parameter names:
@bg file=001.png duration=1.0 effect=normal
***Alias [#s157382b]
"@bg" has a Japanese alias "@背景".
@背景 ファイル=001.png 秒=1.0 エフェクト=normal
**Showing a Character ("@ch") [#ua3082d9]
This feature shows a character image.
The command that accomplishes this feature is "@ch".
@ch <position> <file> (duration) (effect) (right-offset)...
The "@ch" command changes the character.
Character image files need to be in the ch folder.
Character layers include "center" (center front), "right"...
"back" (center back) and "face" (character face).
|Display Position |Target Name|Abbrev. Name|Japanese Name|
|Front Center |"center" |"c" |"中央" |
|Right |"right" |"r" |"右" |
|Left |"left" |"l" |"左" |
|Back Center |"back" |"b" |"背面" |
|Face Icon |"face" |"f" |"顔" |
The effect types are the same as "Showing a Background ("...
All characters are vertically aligned at the bottom of th...
***Usage 1 [#v0d43526]
The following script displays "sample.png" immediately in...
Note that "center" can be abbreviated as "c".
@ch center sample.png
***Usage 2 [#z46d6b2d]
The following script displays "sample.png" in 0.5 seconds...
The applicable effect type is "fade/dissolve (alpha blend...
@ch center sample.png 0.5
***Usage 3 [#ia1bcccb]
The following script removes the front center character i...
The applicable effect type is "fade/dissolve (alpha blend...
@ch center none 0.5
***Usage 4 [#l3e4cd12]
The following script displays "sample.png" in 1.0 second ...
The applicable effect type is "clockwise wipe".
@ch center sample.png 1.0 clockwise
***Usage 5 [#i23b1baa]
The following script displays "sample.png" in 1.0 second ...
Here, "100 50" means offset, shifting the display positio...
"normal" means the effect type "fade/dissolve (alpha blen...
@ch center sample.png 1.0 normal 100 50
***Usage 6 [#gb0868d2]
The following script displays "sample.png" in 1.0 second ...
The alpha value ranges from "0" to "255".
For the alpha value specifier, game developers can write ...
@ch center sample.png 1.0 normal 0 0 127
***Parameters [#o508e772]
"@ch" can be written with parameter names.
@ch position=center file=001.png duration=1.0 effect=nor...
***Alias [#t377074e]
"@ch" has a Japanese alias "@キャラ".
@キャラ 位置=中央 ファイル=001.png 秒=1.0 エフェクト=標...
@キャラ 位置=中央 消去
**Showing a Message [#p27b0a22]
This feature shows the descriptive part of the story.
It is not an atmark command that makes this feature possi...
A message is one-line of text that does not begin with an...
asterisk ("*") or colon (":").
Messages are output to a message box.
As the descriptive part does not have the speaker's name,
the namebox is hidden while the message is showing.
A messages is displayed one character at a time.
When clicked in the middle, all characters are displayed ...
When all characters are displayed, Suika2 goes into
"Click Waiting Mode for Message" and displays a click ani...
If a click is made while a click animation is being displ...
Suika2 moves to the next command.
At any point during the display of a message,
unless if the control key is pressed and the message is u...
Suika2 moves to the next command.
The following format specifiers are available.
- "\n" ... Insert a new line.
- "$ + number" ... Print the value of the variable (e.g.,...
- "\" at the beginning of the line ... Append the message...
Append mode is useful for the creation of full-screen sty...
End users can use the return key and down arrow key inste...
***Usage [#o93e4f7c]
Hello, world!
**Showing a Line [#dfb23193]
This feature shows the dialog of the story.
It is not an atmark command that makes this feature possi...
A line is one-line text that begin with an asterisk.
This command prints text to the message box and also the ...
It consists of a character name, a message and optionally...
and they are separated by asterisks. For example:
*name*dialog message
*name*voice.ogg*dialog message
The name appears before the message.
Audio starts playing when the name is displayed.
Normally, audio playback is stopped before moving on to t...
but this behavior can be suppressed in the config.
If "@" is added to the beginning of a voice file name,
the audio playback is looped for the length of the message.
Other functions are exactly the same as "Showing a Backgr...
***Japanese Line [#a2b1d5f9]
Suika2 supports Japanese line format.
キャラ名「セリフ」
**Playing Background Music ("@bgm") [#zaf30077]
This feature plays background music.
The command that accomplishes this feature is "@bgm".
@bgm <file>
The "@bgm" command plays background music (BGM).
BGM files need to be stored in the "bgm" folder.
Unless otherwise specified, BGM is played in a loop.
Game developers can use the "once" specifier to prevent B...
The ability to crossfade multiple BGMs is not available.
Therefore, game developers may first need to fade out the...
***Usage 1 [#abc51d0e]
The following script plays "sample.ogg" as BGM. Playback ...
@bgm sample.ogg
***Usage 2 [#h41f76b1]
The following script stops BGM immediately.
@bgm stop
***Usage 3 [#j1ab5ddc]
The following script plays "sample.ogg" as BGM. Playback ...
@bgm sample.ogg once
***Usage 4 (Application) [#be926830]
The following sample script fades-out the BGM in 2 seconds.
@vol bgm 0.0 2.0
@wait 2.0
@bgm stop
@vol bgm 1.0
***Parameters [#d331e5bc]
"@bgm" can be written with parameter names:
@bgm file=001.ogg
***Alias [#v03a2b32]
"@bgm" has a Japanese alias "@音楽".
@音楽 ファイル=001.ogg
@音楽 停止
**Playing Sound Effect ("@se") [#e10be84c]
This feature plays a sound effect.
The command that accomplishes this feature is "@se".
@se <file> (loop)
The "@se" command plays sound effects.
Sound effect files need to be in the "se" folder.
***Usage 1 [#c3362258]
The following script starts the playback of a sound effec...
@se click.ogg
***Usage 2 [#geed13e4]
The following script stops the playback of a sound effect...
@se stop
***Usage 3 [#i2317f53]
The following script loops a sound effect file.
@se sample.ogg loop
***Usage 4 [#v4e4098c]
The following script plays a sound effect file in the "vo...
This feature is available for checking voice-volume witho...
@se click.ogg voice
***Parameters [#qb5fc3ae]
"@se" can be written with a parameter name:
@se file=001.ogg loop
***Alias [#bd8fc225]
"@se" has a Japanese alias "@効果音".
@効果音 ファイル=001.ogg loop
**Changing a Volume ("@vol") [#xffcf863]
This feature changes the volume.
The command that accomplishes this feature is "@vol".
@vol <track> <volume> (duration)
The "@vol" command sets the sound volume.
Suika2 has three independent sound tracks:
|Track |Name |Japanese Name|
|BGM |"bgm" or "b" |"音楽" |
|Voice |"voice" or "v" |"声" |
|Sound Effect |"se" or "s" |"効果音" |
The volume of the specified sound track will fade in/out ...
This command does not wait until the fade in/out is compl...
Combining with the "Waiting for Specified Time ("@wait")"...
"bgm", "voice" and "se" tracks are for "local" volumes an...
Local volumes are stored in each save data file.
Global volumes are common to all save data files.
The final volume will be a multiplication of the local an...
To specify the global volumes, game developers can use ca...
Since the global volume changes immediately, it is not po...
Both the value of local and global volumes range 0.0 to 1...
***Usage 1 [#d0ee3796]
The following script sets the local volume of BGM to 0.5 ...
@vol bgm 0.5 1.0
***Usage 2 [#rd34c82d]
The following script sets the global volume of BGM to 0.5...
Usually, the global volumes are set from the config screen,
so the use of this feature is not as common.
@vol BGM 0.5 0
***Parameters [#h7ef4a0c]
"@vol" can be written with parameters names.
@vol track=bgm volume=1.0 duration=1.0
***Alias [#ub0bbb87]
"@vol" has a Japanese alias "@音量".
@音量 トラック=音楽 音量=1.0 秒=1.0
**Showing Options ("@choose") [#ye7dde26]
This feature shows options and lets the user choose one o...
then jumps to the label selected.
The command that accomplishes this feature is "@choose".
@choose <destination1> <option-text1> (destination2) (op...
The "@choose" command can display up to eight options.
A minimum of one option must be displayed.
***Usage [#rcad6ea5]
The following script shows options.
@choose label1 "Good morning." label2 "Good afternoon." ...
:label1
Good morning.
@goto end
:label2
Good afternoon.
@goto end
:label3
Good evening.
:end
***Parameters [#k2805c47]
"@choose" can be written with parameter names.
@choose destination1=LABEL1 option1="I like cars." desti...
***Alias [#na974a5c]
"@choose" has a Japanese alias "@選択肢".
@選択肢 行き先1=LABEL1 選択肢1=車が好きです
**Defining a Label [#s59adf25]
This is a jump target inside a script.
It is not an atmark command, but one-line of text that be...
This command can be used as a jump target, which is typic...
***Usage [#ze74a75c]
The following script creates a loop.
:JumpTarget
Show some messages.
@goto JumpTarget
**Showing an Animation ("@cha") [#m24c753f]
This feature displays a character sprite in motion.
The command that accomplishes this feature is "@cha".
@cha <position> <duration> <acceleration> <x-offset> <y-...
The "@cha" command translates one character sprite at a t...
and can also change its alpha value.
Refer to the "Showing a Character Image (@ch)" section fo...
Constant velocity ("move"), acceleration ("accel") and de...
|Movement Mode |English Specifiers |Japanese Specifie...
|Constant Velocity|"move" |"なし" ...
|Acceleration |"accel" |"あり" ...
|Deceleration |"brake" |"減速" ...
"@cha" is an abbreviation of "character animation".
***Usage 1 [#jbe60690]
The following script moves the character in the front cen...
@cha center 1.0 move -600 0 hide
***Usage 2 [#l72c99fd]
The following script moves the character in the front cen...
This script is the same as Usage 1, but this one uses acc...
@cha center 1.0 accel -600 0 hide
***Usage 3 [#f9e04770]
The following script moves the character in the front cen...
This script is the same as Usage 1, but this one uses dec...
@cha center 1.0 brake -600 0 hide
***Usage 4 [#n57f344a]
The following script preloads the character image out of ...
@ch right sample.png 0 normal 600 0 hide
@cha right 2.0 move -600 0 show
***Parameters [#n3316d56]
"@cha" can be written with parameter names.
@cha position=center duration=1.0 acceleration=normal x=...
***Alias [#x61c6a9c]
"@cha" has a Japanese alias "@キャラ移動".
@キャラ移動 位置=中央 秒=1.0 加速=なし x=100 y=100 アル...
**Changing Characters and Background at Once ("@chs") [#m...
This feature changes character sprites and the background...
The command that accomplishes this feature is "@chs".
@chs <center-file> <right-file> <left-file> <back-file> ...
The "@chs" command has the ability to change just the cha...
The character specification order is "center", "right", "...
The effect types are the same as "Showing a Background (@...
"chs" is an abbreviation of "change stage".
***Special Usage (Change Only Background) [#de88bf83]
The following script changes background image while leavi...
@chs stay stay stay stay 1.0 background.png
***Usage 1 [#b9e9eb3d]
The following script changes front center and right chara...
Other characters will not be changed.
@chs center.png right.png stay stay 1.0
***Usage 2 [#w9e707b9]
The following script vanishes the character in the front ...
Other characters will not be changed.
@chs none stay stay stay 1.0
***Usage 3 [#z251f155]
The following script changes the background without any c...
@chs stay stay stay stay 1.0 background.png
***Usage 4 [#ae0ea679]
The following script changes the character in the front c...
The effect type is "right curtain".
@chs center.png stay stay stay 1.0 background.png curtai...
***Parameters [#p6b365f4]
"@chs" can be written with parameter names.
@chs center=001.png right=002.png left=003.png back=004....
***Alias [#z54617df]
"@chs" has a Japanese alias "@場面転換".
@場面転換 中央=001.png 右=消す 左=変更なし 背面=変更なし...
**Changing Characters and Background at Once (Extended) (...
This feature is as same as the "@chs" command, but the "@...
parameter names and the parameter order is not fixed.
**Shaking the Screen ("@shake") [#n7837450]
This feature shakes the screen.
The command that accomplishes this feature is "@shake".
@shake <direction> <duration> <times> <amplitude>
The "@shake" command allows the screen to oscillate horiz...
The oscillation is a "simple harmonic motion".
The period and the amplitude can be specified.
|Direction |English Specifiers |Japanese Specifiers|
|Horizontal |"horizontal" or "h"|"横" |
|Vertical |"vertical" or "v" |"縦" |
***Usage 1 [#i9186309]
The following script shakes the screen horizontally by 10...
"horizontal" can be abbreviated as "h".
@shake horizontal 1.0 3 100
***Usage 2 [#m9d303ab]
The following script shakes the screen vertically by 100p...
"vertical" can be abbreviated as "v".
@shake vertical 1.0 3 100
***Parameters [#me8c845c]
"@shake" can be written with parameter names.
@shake direction=horizontal duration=1.0 times=3 amplitu...
***Alias [#u2006cc9]
"@shake" has a Japanese alias "@振動".
@振動 方向=横 秒=1.0 回数=3 大きさ=100
@振動 方向=縦 秒=1.0 回数=3 大きさ=100
**Playing a Video ("@video") [#e89d3e75]
This feature plays a video file.
The command that accomplishes this feature is "@video".
@video <file-name-without-extension>
The "@video" command plays a video file.
Available video formats are currently:
- .wmv files (WMV9) on Windows
- .mp4 files (H.264/AAC) on macOS, Linux, iOS, Android an...
Note that on Linux, the end user must have a Gstreamer pl...
Video files are stored in the mov folder.
The "mov" folder is not stored in the "data01.arc" file.
For further details, see the "File Formats" section.
***Usage [#zb7946d6]
The following script plays a video file named "sample.wmv...
@video sample
***Parameters [#qec944ae]
"@video" can be written with a parameter name.
@video file=sample
***Alias [#r0088a27]
"@video" has a Japanese alias "@動画".
@動画 ファイル=sample
**Showing a GUI ("@gui") [#e3b51355]
This feature shows a graphical user interface (GUI).
The command that accomplishes this feature is "@gui".
@gui <file> (options)
A GUI is a menu consisting of three images
and can show up to 128 buttons on the screen.
Button types include "jump to label", "show if variable i...
GUI definition files are also used for the config, save, ...
Options can contain:
- cancel ... make it possible to cancel by a right click
- nofadein ... ignore fadein option in a GUI file
- nofadeout ... ignore fadeout option in a GUI file
For further details, see the "Graphical User Interface" s...
***Usage 1 [#sc1ad190]
The following script shows GUI "menu.txt".
@gui menu.txt
***Usage 2 [#jdc7999a]
The following script show GUI "menu.txt".
It allows cancellation by right click.
@gui menu.txt cancel
***Parameters [#fa10f670]
"@gui" can be written with a parameter name.
@gui file=001.txt cancel
***Alias [#scc4c1d7]
"@gui" has a Japanese alias "@メニュー".
@メニュー ファイル=001.txt
@メニュー ファイル=001.txt キャンセル許可
**Waiting for a Click ("@click") [#g184c204]
This feature waits for a user click.
The command that accomplishes this feature is "@click".
@click
During auto mode, Suika2 resumes after a 2-second pause.
Also see the "Click Waiting Mode" section.
***Usage [#l0dbe1d9]
The following script waits for a click.
@click
***Alias [#w933097f]
"@click" has a Japanese alias "@クリック".
@クリック
**Waiting for Specified Time ("@wait") [#n57282c0]
This feature waits for a specified time in seconds.
The command that accomplishes this feature is "@wait".
@wait <duration>
If a click or keystroke is made, the wait is canceled.
If the previous command is a message,
the message box is visible while waiting for input,
otherwise, the message box is hidden while waiting for in...
See also "Timed Waiting Mode".
***Usage [#nb4bd0c7]
The following script waits for 5 seconds.
@wait 5.0
***Parameters [#o7d4cdee]
"@wait" can be written with a parameter name.
@wait duration=1.0
***Alias [#d67c11a1]
"@wait" has a Japanese alias "@時間待ち".
@時間待ち 秒=1.0
**Prohibiting Skip ("@skip") [#c12a0b79]
This feature enables/disables skip by control key and ski...
The command that accomplishes this feature is "@skip".
@skip <enable/disable>
The "@skip" command enables or disables the ability to sk...
Typically, this command is used to display a brand logo o...
When "@skip disable" is issued, auto-mode and skip-mode w...
The state of non-skippable mode is not recorded to the sa...
Thus, avoid calling the save and/or load screens while no...
***Usage 1 [#t9854a11]
The following script enables skip. (default/skippable-mode)
@skip enable
***Usage 2 [#pb863cb1]
The following script disables skip. (non-skippable mode)
@skip disable
***Alias [#r8e4b4c6]
"@skip" has a Japanese alias "@スキップ".
@スキップ 許可
@スキップ 不許可
**Jumping to a Label ("@goto") [#e91c4274]
This feature moves the script execution position to the s...
The command that accomplishes this feature is "@jump".
@goto <label>
Currently, there is no way to jump directly to labels in ...
Suika2 behaves in a special way when "$LOAD" or "$SAVE" i...
***Usage 1 [#vb3c8839]
The following script jumps to the label "abc" (thus creat...
:abc
Describe the process here.
@goto abc
***Usage 2 [#p02897fb]
The following script shows the load screen.
@goto $LOAD
***Usage 3 [#j7519408]
The following script shows the save screen.
@goto $SAVE
***Parameters [#td561918]
"@goto" can be written with a parameter name.
@goto destination=LABEL
***Alias [#cf01a548]
"@goto" has a Japanese alias "@ジャンプ".
@ジャンプ 行き先=ラベル
**Setting a Variable ("@set") [#leb5753a]
This feature sets variable values.
The command that accomplishes this feature is "@set".
@set <variable> <operator> <value>
The "@set" command performs local-variable, global-variab...
manipulations.
Local and global variables has integral values.
On the other hand, name variables has string values.
For local and global variables, the "@set" command can pe...
Addition, subtraction, multiplication and remainder are p...
For name variables, the "@set" command can perform simple...
Available operators are:
- "=" (assignment)
- "+=" (addition, for local and global variables only)
- "-=" (subtraction, for local and global variables only)
- "*=" (multiplication, for local and global variables on...
- "/=" (division, for local and global variables only)
- "%=" (remainder, for local and global variables only)
When the LHS is a local or global variable, "$RAND" can b...
Local variables range from "$0" to "$9999". They are stor...
Global variables range from "$10000" to "$10999". They ar...
All local and global variables have 32-bit integer values...
Name variables range from "%a" to "%z". They are stored i...
All name variables have string values and are initialized...
See also "Variables".
***Usage 1 [#teb9ffbf]
The following script sets the value of "1" to the variabl...
@set $0 = 1
***Usage 2 [#vd1e4390]
The following script adds the value "23" to the variable ...
@set $10 += 23
***Usage 3 [#uaf2ecb9]
The following script assigns a random number (from 0 to 2...
@set $0 = $RAND
***Usage 4 [#a2c3b331]
The following script adds the value of the variable "$2" ...
@set $1 += $2
***Alias [#z5375c61]
"@set" has a Japanese alias "@フラグをセット".
@フラグをセット $1 = 1
**Branching by Variable ("@if") [#zc15cbe7]
This feature moves the script execution position to the s...
if the specified condition of a preset variable is met.
The command that accomplishes this feature is "@if".
@if <variable> <operator> <value> <label>
Available operators are:
|Operator|Meaning |
|">" |greater than |
|">=" |greater than or equal to|
|"==" |equal to |
|"<=" |less than or equal to |
|"<" |less than |
|"!=" |not equal to |
LHS must be a variable name (e.g., "$1", "%a").
When the LHS is a local or global variable such as "$1", ...
When the LHS is a name variable such as "%a", the RHS is ...
In addition, the operators are restricted to "==" and "!=...
***Usage [#a07a70f5]
The following script jumps to the label "abc" if the vari...
@if $1 == 1 abc
Story when flag is not set.
@goto END
:abc
Story when flag is set.
@goto END
:END
Stories join here.
***Alias [#u6f3f4ad]
"@if" has a Japanese alias "@フラグでジャンプ".
@フラグでジャンプ $1 == 1 ラベル
**Jumping to a Script ("@load") [#f45a971a]
This feature loads a script file.
The command that accomplishes this feature is "@load".
@load <file>
Script files need to be in the txt folder.
***Usage [#fae74218]
The following script jumps to the script file "001.txt".
@load 001.txt
***Parameters [#lfd3b49f]
"@load" can be written with a parameter name.
@load file=001.txt
***Alias [#e6a28bad]
"@load" has a Japanese alias "@シナリオ".
@シナリオ ファイル=001.txt
**Setting a Chapter Name ("@chapter") [#r436aab7]
This feature sets a chapter name.
The command that accomplishes this feature is "@chapter".
@chapter <title>
The name of the chapter is reflected in the window title ...
***Usage [#v3dd4d8b]
The following script sets the chapter name.
@chapter "Chapter 1"
***Parameters [#y59bd4ba]
"@chapter" can be written with a parameter name.
@chapter titile="Chapter 1"
***Alias [#l20f98ee]
"@chapter" has a Japanese alias "@章".
@章 タイトル="第一章"
**Call a Procedure ("@gosub") [#faa6ba2c]
This feature calls a subroutine.
The command that accomplishes this feature is "@gosub".
@gosub <label>
Note that nested calls of subroutines are not supported.
***Usage [#z49bc6d6]
The following script runs subroutine "SUB".
@gosub SUB
@goto END
:SUB
Describe the process here.
@return
:END
**Return From a Procedure ("@return") [#z77ab0d1]
This feature returns from a subroutine.
The command that accomplishes this feature is "@return".
@return
***Usage [#nd065565]
The following script runs subroutine "SUB".
@gosub SUB
@goto END
:SUB
Describe the process here.
@return
:END
**Multilingualization Prefix [#ca66974f]
This feature automatically switches the language to be di...
depending on the user's system locale.
To use this feature, a script line must be started with a...
+en+Hello.
+fr+Bonjour.
This is not exactly a command, but it is a prefix to a co...
See also "International Mode" and "Language Mapping".
**Calling an Advanced Script ("@wms") [#q7263630]
This feature executes an advanced script called "WMS".
The command that accomplishes this feature is "@wms".
@wms <file>
WMS files need to be in the wms folder.
For further details, see the "Advanced Script" section.
***Usage [#l7d7c2e5]
The following script executes an advanced script named "s...
@script sample.scr
***Parameters [#v35a85c0]
"@wms" can be written with a parameter name.
@wms file=001.txt
***Alias [#s66218f1]
"@wms" has a Japanese alias "@スクリプト".
@スクリプト ファイル=001.txt
----
*Variables [#h28d2009]
Suika2 has three kinds of variables.
- Local variables
- Global variables
- Name variables
Local and global variables have 32-bit integer values, an...
Name variables have string values, and are initialized as...
**Local Variables [#pb018304]
Variables ranging from "$0" to "$9999" are local variable...
Typically, these are used to branch scenarios.
**Global Variables [#y0f5afd8]
Variables ranging from "$10000" to "$10999" are global va...
Typically, these are used to record which pictures should...
**Name Variables [#g77a8b4b]
Variables ranging from "%a" to "%z" are name variables, t...
Typically, these are used to record the name of characters.
----
*Seen Flags [#o1c039d1]
A seen flag is stored for each message.
Unseen messages cannot be skipped.
However, game developers can set an option to modify this...
The reason why the term "seen" is used instead of "read" ...
"read" appears to be an instruction to the computer.
Seen flags are stored in the "sav" folder.
They are grouped into individual scripts.
The file names of the seen flags are a hex representation...
the script file name.
----
*Main Screen [#w3efdd0d]
Here, the screen during normal gameplay is referred to as...
See "Special Screens" for other screens.
The main screen has some modes.
**Background Changing Mode [#l9e2f44f]
This mode changes the background image.
While this mode is active, the message box is not display...
**Character Changing Mode [#a9e5488b]
This mode changes the character images and the background...
While the "@ch" command changes one character at a time,
the "@chs" command changes 0 or more characters and can o...
While this mode is active, the message box is not display...
however, game developers can optionally set a config to d...
while this mode is active.
**Text Output Mode for Message [#p32c6568]
In this mode, text is output one character at a time to t...
If the message has a character's name,
the name of the character is output to namebox prior to t...
When the text output is complete, Suika2 enters "Click Wa...
When a click or enter key is pressed during text output, ...
When the control key is pressed, Suika2 moves to the next...
**Click Waiting Mode for Message [#m5a99caf]
In this mode, a prompt animation appears and waits for th...
If not in auto mode, this mode ends when there is a click...
If in auto mode, this mode ends when the playback of the ...
or the waiting time based on the number of characters has...
This mode is not executed when in skip mode and the messa...
**Sound Fading Mode [#a4fd5b2c]
This mode proceeds simultaneously alongside other modes.
If necessary, game developers can make use of a timed wai...
**Timed Waiting Mode [#f5151e51]
This mode waits for the specified amount of time in secon...
If a click or keystroke is made, the wait is canceled.
**Click Waiting Mode [#y3d6a464]
This mode stops action until a user click or keystroke is...
During auto mode, Suika2 resumes after a 2-second pause.
**Auto Mode [#r65c50d4]
This mode proceeds simultaneously alongside other modes.
This mode effects "Click Waiting Mode for Message".
See also "Click Waiting Mode for Message".
During this mode, a banner representing auto mode is disp...
**Skip Mode [#c823884c]
This mode proceeds simultaneously alongside other modes.
This mode effects "Click Waiting Mode for Message".
See also "Click Waiting Mode for Message".
During this mode, a banner representing skip mode is disp...
----
*Special Screens [#j0445e19]
Apart from the main screen (normal layered game screen),
there are some special screens.
These special screens are realized by the graphical user ...
**Save Screen [#tf80d2ca]
The save screen is for viewing and recording saved data.
This screen is realized within the GUI file "save.txt".
The number of save slots per page can be determined in "s...
**Load Screen [#ke66745a]
The load screen is for viewing and loading saved data.
This screen is realized within the GUI file "load.txt".
The number of save slots per page can be determined in "l...
**History Screen [#j0004171]
The history screen displays a history of seen messages.
The maximum number of messages recorded is 100.
End users can click on a line with voice to play the audio.
This screen is realized within the GUI file "history.txt".
**Config Screen [#o94dfe6c]
The config screen allows end users to set volume, text sp...
auto mode speed and font.
It also provides a "back to game title logo" button.
It may also show a preview of text speed and auto mode sp...
This screen is realized within the GUI file "config.txt".
----
*Graphical User Interface [#t854c889]
Graphical user interface (GUI) interacts with the user.
It is described by a text file, and it defines various bu...
GUI is used to realize the special screen mode.
Typically, it is also used to implement the title as well...
Note that in a GUI file,
the characters after "#" in a line are ignored and treate...
**GUI File Header [#x35ad49d]
GUI files have a header.
In a header, developers have to define three images;
"idle", "hover" and "active".
global {
idle: config-idle.png;
hover: config-hover.png;
active: config-active.png;
}
The "idle" image is displayed as a base layer.
The "hover" image is displayed when the button area is po...
The "active" image is displayed when the button is active.
Slidebar buttons are always displayed.
**Jump To Label Button [#j22ee9d5]
This button is used for creating a normal menu.
QUIT {
type: goto;
label: QUIT;
x: 960;
y: 497;
width: 317;
height: 201;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Save/Load Page N Button [#ad82572b]
This button is used for creating pagenation within the sa...
PAGE1 {
type: savepage;
index: 0;
x: 1137;
y: 0;
width: 70;
height: 63;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Save Slot Button [#i4c8e8e5]
This button is used for creating a save slot.
SAVESLOT1 {
type: save;
index: 0;
x: 50;
y: 138;
width: 1106;
height: 140;
margin: 10;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When game developers create the save slot button,
they need an extra header item within the GUI file.
saveslot: 3;
**Load Slot Button [#g48081c5]
This button is used for creating a load slot.
SAVESLOT1 {
type: load;
index: 0;
x: 50;
y: 138;
width: 1106;
height: 140;
margin: 10;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When game developers create the load slot button,
they need an extra header item within the GUI file.
saveslot: 3;
**Text Speed Slider [#e2e60fc2]
This button is used for creating a text speed slidebar.
TEXTSPEED {
type: textspeed;
x: 68;
y: 250;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Auto Mode Speed Slider [#scb74448]
This button is used for creating an auto mode speed slide...
AUTOSPEED {
type: autospeed;
x: 68;
y: 339;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
** Text Speed Preview [#ma0ff59c]
This button is used for displaying a preview of text and ...
PREVIEW {
type: preview;
msg: "This message is a preview of text speed and au...
x: 442;
y: 453;
width: 590;
height: 120;
}
**BGM Volume Slider [#e9d1f74d]
This button is used for setting the BGM volume.
BGM {
type: bgmvol;
x: 420;
y: 249;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Sound Effect Volume Slider [#t92c8353]
This button is used for setting the volume of sound effec...
SE {
type: sevol;
file: click.ogg;
x: 420;
y: 339;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Voice (All-character) Volume Slider [#b31e02e9]
This button is used for setting the volume of voice (all-...
VOICE {
type: voicevol;
file: 025.ogg;
x: 68;
y: 498;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Voice (Per-character) Volume Slider [#rdda2fea]
This button is used for setting the volume of voice (per-...
See also "Per-character Voice Volume Settings" section.
MIDORI {
type: charactervol;
index: 1;
file: 025.ogg;
x: 506;
y: 506;
width: 266;
height: 21;
pointse: btn-change.ogg;
}
Note that:
- The knob for the slidebar is on the far left of the act...
- The width of the slidebar knob is equal to the height o...
**Font Selection Button [#r67ffe59]
This button is used for setting the font.
FONT1 {
type: font;
file: VL-PGothic-Regular.ttf;
x: 770;
y: 328;
width: 87;
height: 30;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are multiple font buttons,
the active image is displayed for the selected font.
**Full Screen Button [#e20e896e]
This button is used for setting full screen mode.
FULLSCREEN {
type: fullscreen;
x: 750;
y: 206;
width: 200;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are full screen and window buttons,
the active image is displayed for the selected one.
**Window Button [#gef99444]
This button is used for setting window mode.
WINDOW {
type: window;
x: 995;
y: 206;
width: 200;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
When there are full screen and window buttons,
the active image is displayed for the selected one.
** Reset Button [#v74df0a4]
This button is used for resetting options.
DEFAULT {
type: default;
x: 1131;
y: 61;
width: 115;
height: 40;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Page Button [#tc4b6ceb]
This button is used for moving to another GUI.
PAGE2 {
type: gui;
file: system-page2.txt;
x: 1234;
y: 132;
width: 35;
height: 35;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Jump To Title Button [#f2b43311]
This button is for jumping to the title screen.
Before the jump, a Yes/No dialog is displayed.
TITLE {
type: title;
file: init.txt;
x: 1007;
y: 652;
width: 109;
height: 25;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Cancel Button [#h020ed76]
This button closes a GUI screen.
BACK {
type: cancel;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Gallery Button [#v4611647]
This button is visible when the specified variable is non...
This feature is for the gallery mode.
CG1 {
type: gallery;
label: CG1;
var: $10000;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
**Name Variable Button [#k6229adb]
This button shows the string content of a name variable.
This feature is for name input screens.
NAMEVAR {
type: namevar;
namevar: a;
x: 1156;
y: 653;
width: 103;
height: 21;
}
**Name Input Button [#zb00fd3d]
This button adds a string to a name variable.
This feature is for name input screens.
There are some special values for "msg" property:
- "[ok]" ... completes the name variable
- "[clear]" ... clears the name variable
CHAR_A {
type: char;
namevar: a;
msg: A;
max: 6;
x: 1156;
y: 653;
width: 103;
height: 21;
pointse: btn-change.ogg;
clickse: click.ogg;
}
----
*Configuration Features [#x39bd838]
Suika2 has a configuration file that allows customization...
The configuration file consists of "key=value" lines.
Some keys are required and some are optional.
Note that configuration lines beginning with "#" are igno...
**Language Settings [#m25e8bcb]
Suika2 only provides game developers with Japanese and En...
However, it can offer multiple-language stories to end us...
their system locale.
***Language Mapping [#sfa51546]
This is the ability to display messages in a specific lan...
when a specific system locale is set.
For example, "language.ja=en" is an indication that the m...
to be displayed in English when the system locale is Japa...
The default language mappings are as follows (all locales...
language.en=en
language.fr=en
language.de=en
language.es=en
language.it=en
language.el=en
language.ru=en
language.zh=en
language.tw=en
language.ja=en
language.other=en
**Window Settings [#iac5a11f]
Here, a window is the drawable area of the screen.
***Window Title [#a3495a51]
This is the application title.
On a desktop operating system, a window may have a title.
In such an environment,
this application title becomes the first half of the wind...
The second half of the window title is the chapter name,
but this is omissible by a config.
window.title=Suika
***Window Width and Height [#g5fe9e7d]
This is the width and height of the window.
window.width=1280
window.height=720
***Background Color [#x77dde99]
Game developers can choose whether the window background ...
white or black.
window.white=1
***Menu Bar on Windows [#oc5f1af6]
On Windows, Suika2 can have a menu bar.
Game developers can decide whether the window has a menu ...
window.menubar=1
**Font Settings [#d0e36fb1]
***Font File Name [#n9465b60]
This is the font file name.
Font files are stored in the "font" folder.
font.file=VL-PGothic-Regular.ttf
***Font Size [#jf5485a7]
This is the font size in pixels.
The font size is applied to name, message, history and sa...
font.size=30
***Font Colors [#ea624de8]
It is possible to specify the base color of the text as w...
font.color.r=255
font.color.g=255
font.color.b=255
font.outline.color.r=128
font.outline.color.g=128
font.outline.color.b=128
***Font Outline [#g89b0f84]
Game developers can choose whether or not to display font...
font.outline.remove=0
**Namebox Settings [#y16e6f95]
***Namebox Image [#u4a75063]
This is the image file name of the namebox.
The file is stored in the "cg" folder.
namebox.file=namebox.png
***Namebox Position [#i11a8cb5]
This is the position at which to show the namebox.
namebox.x=95
namebox.y=480
***Namebox Top Margin [#k454b5dd]
This is the top margin of text in the namebox image.
namebox.margin.top=11
***Namebox Left Margin [#k311650f]
This is the left margin of text in the namebox image.
***Namebox Centring [#d91aa18d]
Game developers can choose whether or not to center the c...
namebox.centering.no=0
***Namebox Visibility [#cb5d5df9]
Game developers can choose whether or not to show the nam...
namebox.hidden=0
**Message Box Settings [#gf22b51c]
***Message Box Images [#e49546a8]
The message box is made up of a background and foreground...
The foreground image is used for utilizing an in-box menu...
msgbox.bg.file=msgbox-bg.png
msgbox.fg.file=msgbox-fg.png
***Message Box Position [#ndc54881]
This is the position at which to show the message box ima...
msgbox.x=43
msgbox.y=503
***Message Box Margins [#qff30bd9]
- Left margin of text in the message box image
- Top margin of text in the message box image
- Right margin of text in the message box image
- Line spacing
msgbox.margin.left=80
msgbox.margin.top=50
msgbox.margin.right=80
msgbox.margin.line=40
***Message Box Text Speed [#t2c5d3d4]
Game developers can set the number of characters of text ...
msgbox.speed=40.0
***Position of the Hide Button [#mf939e2b]
The message box can have a hide button.
This is optional.
msgbox.btn.hide.x=1146
msgbox.btn.hide.y=16
msgbox.btn.hide.width=29
msgbox.btn.hide.height=29
***Position of the Save Button [#cb2d9a38]
The message box can have a save button.
This is optional.
msgbox.btn.save.x=1146
msgbox.btn.save.y=16
msgbox.btn.save.width=29
msgbox.btn.save.height=29
***Position of the Load Button [#j04570ce]
The message box can have a load button.
This is optional.
msgbox.btn.load.x=1146
msgbox.btn.load.y=16
msgbox.btn.load.width=29
msgbox.btn.load.height=29
***Position of the QSave Button [#pc872391]
The message box can have a qsave button.
This is optional.
msgbox.btn.qsave.x=1146
msgbox.btn.qsave.y=16
msgbox.btn.qsave.width=29
msgbox.btn.qsave.height=29
***Position of the QLoad Button [#x3b82676]
The message box can have a qload button.
This is optional.
msgbox.btn.qload.x=1146
msgbox.btn.qload.y=16
msgbox.btn.qload.width=29
msgbox.btn.qload.height=29
***Position of the Auto Button [#z2778e69]
The message box can have an auto button.
This is optional.
msgbox.btn.auto.x=1146
msgbox.btn.auto.y=16
msgbox.btn.auto.width=29
msgbox.btn.auto.height=29
***Position of the Skip Button [#e43c344f]
The message box can have a skip button.
This is optional.
msgbox.btn.skip.x=1146
msgbox.btn.skip.y=16
msgbox.btn.skip.width=29
msgbox.btn.skip.height=29
***Position of the History Button [#x753597b]
The message box can have a history button.
This is optional.
msgbox.btn.history.x=1146
msgbox.btn.history.y=16
msgbox.btn.history.width=29
msgbox.btn.history.height=29
***Position of the Config Button [#l79586c0]
The message box can have a config button.
This is optional.
msgbox.btn.config.x=1146
msgbox.btn.config.y=16
msgbox.btn.config.width=29
msgbox.btn.config.height=29
***Message Box Sound Effects [#ffb45146]
The message box has sound effects.
msgbox.btn.change.se=btn-change.ogg
msgbox.history.se=click.ogg
msgbox.config.se=click.ogg
msgbox.hide.se=click.ogg
msgbox.show.se=click.ogg
msgbox.auto.cancel.se=click.ogg
msgbox.skip.cancel.se=click.ogg
***Skipping Unseen Messages [#t5ffab12]
The game developer can decide whether unseen text can be ...
Skipping includes skip mode and control key skip.
msgbox.skip.unseen=1
***Dimming Seen Messages [#mec41ec9]
Game developers can dim the seen messages.
This is useful for the full-screen novel mode (NVL).
msgbox.dim=1
msgbox.dim.color.r=80
msgbox.dim.color.g=80
msgbox.dim.color.b=80
msgbox.dim.color.outline.r=40
msgbox.dim.color.outline.g=40
msgbox.dim.color.outline.b=40
**Click Animation Settings [#k3a0ed04]
The click-waiting prompt that appears above the message b...
***Click Animation Position [#s007983f]
This is the position at which to show the click animation...
click.x=1170
click.y=660
***Following The Text [#s79fc488]
The click animation is usually displayed at a fixed posit...
but it can also be displayed at the end of the text.
This is useful when making a full screen style novel.
click.move=1
***Click Animation Images [#vbcf99b5]
The first one is required, and others are optional.
click.file1=click1.png
click.file2=click2.png
click.file3=click3.png
click.file4=click4.png
click.file5=click5.png
click.file6=click5.png
***Click Animation Interval [#x7af3f84]
This is the click animation interval in second.
click.interval=1.0
***Click Animation Visibility [#odf5f13c]
Developers can hide the click animation.
This is mainly for the visually impaired.
click.interval=1.0
**Options Settings [#w88a2987]
***Option Box Images [#j7a97019]
There are background and foreground images for an option ...
The background image is displayed by default,
but when the option box is pointed by the mouse, the fore...
switch.bg.file=switch-bg.png
switch.fg.file=switch-fg.png
***First Option Position [#m035135c]
This is the position of the first option box.
switch.x=406
switch.y=129
***Vertical Space Between Options [#obfda335]
This is the vertical space between the option box images.
switch.margin.y=20
***Option Top Margin [#b16ecf9c]
This is the top margin of text in the option box image.
switch.text.margin.y=18
***Pointed Option Color [#n7e2ce46]
This is the color of pointed option's text.
switch.color.active=0
switch.color.active.body.r=255
switch.color.active.body.g=0
switch.color.active.body.b=0
switch.color.active.outline.r=128
switch.color.active.outline.g=128
switch.color.active.outline.b=128"
***Options Sound Effects [#sa88ab07]
Options can have sound effects.
switch.parent.click.se.file=click.ogg
switch.child.click.se.file=click.ogg
switch.change.se=btn-change.ogg
**Save/Load Screen Settings [#tf105f92]
Most of the settings for save/load screens are defined wi...
Here, we have just one configuration.
***Save Item Thumbnail Size [#rde8bef2]
This is the thumbnail size of the save data.
save.data.thumb.width=213
save.data.thumb.height=120
**System Menu Settings [#u5834bba]
***System Menu Position [#s1eb42a8]
This is the position to show the system menu image.
sysmenu.x=731
sysmenu.y=29
***System Menu Images [#zdd25836]
The system menu has three images; "idle", "hover", "disab...
"idle" is the base image.
"hover" is displayed when the button area is pointed.
"disable" is displayed when the button is disabled.
sysmenu.idle.file=sysmenu-idle.png
sysmenu.hover.file=sysmenu-hover.png
sysmenu.disable.file=sysmenu-disable.png
***System Menu Button Positions [#nae9dfc6]
The following buttons are available:
- "qsave" (quick save)
- "qload" (quick load)
- "save" (save mode)
- "load" (save mode)
- "auto" (auto mode)
- "skip" (skip mode)
- "history" (history mode)
- "config" (config mode)
The following is the example for "qsave".
sysmenu.qsave.x=62
sysmenu.qsave.y=7
sysmenu.qsave.width=60
sysmenu.qsave.height=58
***System Menu Sound Effects [#b0e98e8a]
The system menu can have sound effects.
sysmenu.enter.se=click.ogg
sysmenu.leave.se=click.ogg
sysmenu.change.se=btn-change.ogg
sysmenu.qsave.se=click.ogg
sysmenu.qload.se=click.ogg
sysmenu.save.se=click.ogg
sysmenu.load.se=click.ogg
sysmenu.auto.se=click.ogg
sysmenu.skip.se=click.ogg
sysmenu.history.se=click.ogg
sysmenu.config.se=click.ogg
***Collapsed Position [#ea440b3f]
This is the position at which to show the collapsed syste...
The collapsed system menu is usually displayed, and when ...
sysmenu.collapsed.x=1219
sysmenu.collapsed.y=29
***Collapsed Images [#ef204044]
THe collapsed system menu has two images; "idle" and "hov...
sysmenu.collapsed.idle.file=sysmenu-collapsed-idle.png
sysmenu.collapsed.hover.file=sysmenu-collapsed-hover.png
***Collapsed Sound Effect [#z5c10c62]
The collapsed system menu can have a sound effect.
sysmenu.collapsed.se=btn-change.ogg
***System Menu Visibility [#y546f25f]
Game developers can decide whether the collapsed system m...
sysmenu.hidden=0
Note: This will take effect when displaying messages.
When displaying options, the collapsed system menu or sys...
this is because of a lack of a way to save without the sy...
**Auto Mode Settings [#l1299b81]
Suika2 shows the auto mode banner when auto mode is enabl...
***Auto Mode Banner Image [#rdbc41ca]
This is the banner image.
automode.banner.file=auto.png
***Auto Mode Banner Position [#oc3f3158]
This is the banner position.
automode.banner.x=0
automode.banner.y=126
***Auto Mode Speed [#o8c802e2]
This is the speed of auto mode.
The wait time for the message is "automode.speed" seconds...
automode.speed=0.15
**Skip Mode Settings [#ga8d582d]
Suika2 shows skip the mode banner when skip mode is enabl...
***Skip Mode Banner Image [#n2f2f98e]
This is the banner image.
skipmode.banner.file=skip.png
***Skip Mode Banner Position [#eca20aa3]
This is the banner position.
skipmode.banner.x=0
skipmode.banner.y=186
**Initial Sound Volumes [#ad4ac78b]
These are the sound volume values for initial boot time.
If a user has the save data,
then the volume settings in the save data will be used
instead of the initial sound volumes.
sound.vol.bgm=1.0
sound.vol.voice=1.0
sound.vol.se=1.0
sound.vol.character=1.0
**Per-character Voice Volume Settings [#v2765881]
If the character name of a line matches to one from the n...
then the respective per-character volume will be applied.
Per-character volumes can be set in the config screen. (#...
See also "Voice (Per-character) Volume Slider" section.
Developers can specify the names for up to 15 characters....
If the character name of the message doesn't match a name...
then the #0 per-character volume will be used.
The following is an example of name list.
sound.character.name1=Midori
**Character Message Colors [#a0c47f91]
Game developers can specify text colors for up to 64 char...
Colors are defined for each character by name.
To use character message colors, write the following.
serif.color1.name=Haruka
serif.color1.r=255
serif.color1.g=200
serif.color1.b=200
serif.color1.outline.r=0
serif.color1.outline.g=0
serif.color1.outline.b=0
**Miscellaneous [#lc280d76]
These are detailed config items according to individual u...
***Voice Continues On Click [#pb87f402]
This option enables voice continuation on click.
Normally, voice playback is stopped before moving on to t...
but this option suppresses this behaviour.
See alose "Showing a Line" section.
To enable this, write the following line in the config:
voice.stop.off=1
***Full Screen Mode [#icbe48cb]
This option disables full screen mode.
If game developers don't want to allow full screen mode,
write the following line.
window.fullscreen.disable=1
***Window Maximization [#nf86b266]
This option disables window maximization.
If game developers don't want to allow maximization of th...
write the following line.
window.maximize.disable=1
***Window Title Separator [#lc3e5b15]
The window title consists of the application title and th...
This separator is added between the application title and...
To set the separator, write the following line. Note that...
window.title.separator=
***Chapter Name [#t280be73]
Game developers can decide whether to show chapter names ...
To hide the chapter name from the window title, write the...
window.title.chapter.disable=1
***Show Message Box On Character Change [#ye9663cc]
By default, the message box disappears while characters a...
With this option, developers can decide whether to displa...
while character is changing.
To enable this option, write the following line.
msgbox.show.on.ch=1
**Release Mode [#ta753585]
This mode is used for installing games to the "Program Fi...
If this configuration is enabled,
save data will be stored in OS-specific locations such as...
To enable release mode, write the following line.
release=1
**Note [#m934afb6]
Initial values for text speed and auto mode speed cannot ...
The default value for these is "0.5".
----
*Package [#we8f1fa0]
Package is an archive file that contains all game data ex...
The package file name is "data01.arc".
**Package Generation [#qc005cfa]
To generate a package file, developers can use the "pack"...
**Package Obfuscation [#cb05103d]
The obfuscation key is stored in "key.h", and developers ...
**Package Usage [#k207fcc7]
To use a package file, put it in the folder that contains...
Game data folders (e.g., "bg", "ch", "bgm" and etc.) must...
If the game data folder exists in the app folder, Suika2 ...
----
*File Formats [#ra51a770]
**Text File Format [#i453e4cf]
Script files, GUI files and config file are plain text fi...
***Encoding [#z4baeb35]
Text files must be encoded in UTF-8.
***New Line [#c2422ec5]
CR+LF, LF and CR are accepted.
These can be mixed.
**Image File Formats [#td8c063a]
PNG and JPEG are supported.
Note that gray scaled JPEG images are not supported.
**Audio File Format [#xc6c1311]
The only accepted format is Ogg Vorbis 44.1kHz stereo or ...
**Video File Formats [#g20a36ce]
On Windows, ".wmv" is the recommended format.
AVI with H.264 and AAC will work on Windows 10 or later.
On macOS, ".mp4" with H.264 and AAC is the recommended fo...
QuickTime (".mov" or ".qt") will work too.
On Linux, any format supported by Gstreamer will work.
Game developers must instruct end users to install the ne...
In the future, there are plans to move to ".mp4" with H.2...
----
*Advanced Script [#c2ba7a97]
A script stored in the "txt" folder is called "Suika2 Scr...
which is simple script for novelists,
consisting of text and commands.
On the other hand, a script stored in the "wms" folder is...
which is script for more advanced programming.
WMS stands for "Watermelon Script".
**Syntax and Usage [#v81a5a0b]
This section describes the grammar of WMS.
***Defining and Calling Functions [#vdf9ad38]
A program starts from "main()" function.
func main() {
// This is a comment.
print("Hello, world!");
}
A function can call other functions.
func main() {
foo(0, 1 2);
}
func foo(a, b, c) {
return a + b + c;
}
Indirect calling by string variable is allowed.
func main() {
myfunc = "foo";
myfunc(0, 1 2);
}
func foo(a, b, c) {
return a + b + c;
}
func myfunc(a, b, c) {
// This function will not be called because foo() wi...
}
***Types and Variables [#r2efa83d]
A program can handle integer, floating point, string and ...
func main() {
// Integer
a = 1;
if(isint(a)) {
print("a is int");
}
// Floating point
b = 1.0;
if(isfloat(b)) {
print("b is float");
}
// String
c = "string";
if(isstr(c)) {
print("c is string");
}
// Array (integer key)
d[0] = 0;
if(isarray(d)) {
print("d is array");
}
// Array (string key)
e["abc"] = 0;
if(isarray(e)) {
print("e is array");
}
// Array of array
f["key"] = e;
}
***Loops [#p81e4a49]
To repeat for a specified times:
func main() {
for(i in 0..9) {
print(i);
}
}
To repeat for each value in an array:
func main() {
a[0] = 0;
a[1] = 1;
a[2] = 2;
for(v in a) {
print(v);
}
}
To repeat for each key-value pair in an array:
func main() {
a["key1"] = 0;
a["key2"] = 1;
a["key3"] = 2;
for(k, v in a) {
print(k + "=" + v);
}
}
To create a normal "while" loop:
func main() {
a = 10;
while (a > 0) {
print(a);
a = a - 1;
}
}
To use "break" or "continue" in a "for" or "while" loop:
func main() {
for(i in 0..9) {
if(i == 2) {
continue;
}
if(i == 7) {
break;
}
print(i);
}
}
***Branches [#y7829d35]
A program can branch by "if" - "else if" - "else" syntax.
func main() {
a = foo();
if(a > 10) {
print("a > 10");
} else if(a > 5) {
print("a > 5");
} else if(a == 3) {
print("a == 3");
} else if(a != 4) {
print("a != 4");
} else {
print("else");
}
}
func foo() {
return 6;
}
***Arrays [#f2946c7b]
An array element has a key, and the key must be one of in...
Keys of integer, floating point and string can be mixed.
To create an array, assign a value with "[key]" syntax.
func main() {
a[0] = 0;
print(a);
}
To remove an array element, use "remove()".
func main() {
a[0] = 0;
remove(a, 0);
print(a);
}
To get the size of an array, use "size()".
func main() {
a[0] = 0;
print(size(a));
}
***Conversions [#o05adb00]
Integer to string:
s = "" + 123;
Floating point to string:
s = "" + 1.23;
Integer to floating point:
f = 0.0 + 123;
String to integer:
i = 0 + "123";
String to floating point:
f = 0.0 + "1.23";
**Calling Suika2 Engine [#j2a268c2]
The Suika2 engine provides predefined functions to manipu...
These functions have the prefix "s2_" for their names.
***Getting a Local and Global Variable [#jb38405e]
"s2_get_variable()" accepts an local and variable index a...
value = s2_get_variable(100);
***Setting a Local and Global Variable [#za581874]
"s2_set_variable()" accepts an local and global variable ...
It changes the value of the local or global variable.
s2_set_variable(100, 1);
***Getting a Name Variable [#lcb6dee9]
"s2_get_name_variable()" accepts a name variable index ("...
name = s2_get_name_variable(0);
***Setting a Name Variable [#u2029ecd]
"s2_set_name_variable()" accepts a name variable index ("...
It changes the value of the name variable.
s2_set_name_variable(0, "abc");
***Getting a Random Number [#r147cb74]
"s2_random()" returns a random integer
The return value ranges from "0" to "99999".
value = s2_random();
***Overwriting a Configuration [#g203c4d0]
The following function overwrites a configuration:
s2_set_config(): accepts a string key and a string value.
In some cases, overwriting configurations do not take eff...
so a WMS code should call "s2_reflect_*_config()" to refl...
// These will be reflected immediately.
s2_set_config("msgbox.x", "0");
s2_set_config("msgbox.speed", "20.0");
// These will not be reflected immediately.
s2_set_config("msgbox.bg.file", "msgbox-bg.png");
s2_set_config("msgbox.fg.file", "msgbox-fg.png");
***Updating Message Box and Namebox [#l22ad8dd]
s2_reflect_msgbox_and_namebox_config() reflects the confi...
s2_reflect_msgbox_and_namebox_config();
***Clearing Message History [#u68c9aee]
s2_clear_history() clears the message history.
s2_clear_history();
***Clearing Message Box [#oe524769]
s2_clear_msgbox() clears the message box.
s2_clear_msgbox();
***Clearing Name Box [#p0f2feab]
s2_clear_namebox() clears the name box.
s2_clear_namebox();
***Hiding Message Box [#y79c2b54]
s2_hide_msgbox() hides the message box.
s2_hide_msgbox();
***Hiding Message Box [#a8480294]
s2_hide_msgbox() hides the message box.
s2_hide_msgbox();
***Saving Global Data [#nc0c81c1]
s2_save_global() saves global data immediately.
s2_save_global();
***Preserve Stage State Before User Defined Menu [#g82752...
s2_push_stage() preserves stage state. It is used by user...
s2_push_stage();
***Restore Stage State After User Defined Menu [#a7678da9]
s2_pop_stage() restores stage state. It is used by user d...
s2_pop_stage();
*** Remove a Local Save File [#m6f3447f]
s2_remove_local_save() removes a local save file. The par...
s2_remove_local_save(0);
*** Remove a Global Save File [#zaa3e876]
s2_remove_global_save() removes a global save file.
s2_remove_global_save();
----
*Non-functional Requirements [#ha52b252]
**Performance Requirements [#r16c42fa]
***Native Application [#s9a07c3a]
Suika2 binaries are applications that run natively on the...
This is based on the idea of achieving the fastest possib...
***CPU Usage [#x7e54936]
Suika2 can only use CPU time within the range that the OS...
Suika2's CPU utilization to be "low".
The evaluation is based on the 6th generation Core i7 and...
***Fast Math [#p7f8ffb6]
Suika2 needs to speed up vector operations as much as pos...
On Intel/AMD platforms, Suika2 supports SSE, SSE2, SSE3, ...
Suika2 automatically chooses the fastest extension.
Currently, AVX512 is not supported because of the lack of...
***GPU [#l4854df6]
On a desktop OS, Suika2 uses GPU acceleration when possib...
it falls back to 2D rendering for compatibility purposes.
On other environments, Suika2 will always use GPU acceler...
the CPU may not be powerful enough.
Suika2 uses its own 2D rendering engine if GPU accelerati...
however, this fallback will be removed in the future.
Note that offscreen renderings are not GPU accelerated an...
***Frame Rate [#d6306d32]
The frame rate is set as high as 60 fps,
within the range that the OS determines Suika2's CPU util...
On Windows and Linux, if the GPU acceleration is enabled,
the target frame rate is 60fps, and if not, 30fps.
On macOS, the target frame rate is 30fps.
On iOS and Android, the frame rate is determined by OpenG...
ページ名: