Suika2 Command Reference

@bg

This command changes the background image.
After changing the background image,
character images vanish from the stage.

@bg sample.png 1.5
@bg sample.png
@bg sample.png 1.5 c
  • Usage 3: Changes the background color with a 1.5 second fade-in time. Fading type is left curtain.
  • @bg #ff8080 1.5 curtain-left
    

    @bgm

    This command plays BGM.
    BGM files need to be stored in the bgm folder.
    Suika2 can only play Ogg Vorbis 44.1kHz stereo and monaural format.

    @bgm sample.ogg
    
    @bgm stop
    
    @vol bgm 0 2
    @wait 2
    @bgm stop
    

    @ch

    This command changes the character.

    @ch center sample.png 0.5
    
    @ch c sample.png 0.5
    
    @ch c none 0.5
    
    @ch c sample.png
    
    @ch c sample.png 1.0 mask
    
    @ch c sample.png 1.0 n 100 50
    
    @ch c sample.png 1.0 n 0 0 show
    

    @cha

    This command moves a character image. Refer to @ch section for details of the specifier of character position and alpha value.

    @cha center 1.0 move -600 0 hide
    
    @cha center 1.0 accel -600 0 hide
    
    @cha center 1.0 brake -600 0 hide
    
    @ch right sample.png 0 n 600 0 hide
    @cha right 2.0 move -600 0 show
    

    @click

    This command instructs Suika2 to wait for a click before continuing.
    While waiting for a click, the message box is hidden.

    @click
    

    @gosub

    This command jumps to the specified subroutine. Use @return to return.

    @gosub SUB
    
    :SUB
    Describe the process here.
    @return
    

    @goto

    This command jumps to a label.
    Use @goto to make or break a loop.

    :abc
    Describe the process here.
    @goto abc
    
    @goto $LOAD
    

    @if

    This command jumps to the specified label if the specified condition is true.

    @if $1 >= 10 abc
    Variable 1 is less than 10.
    :abc
    

    Label

    This creates a label to be used as a jump target.
    Use with @goto, @gosub, @if, @menu, @retrospect and @switch.

    :JumpTarget
    Show some messages.
    @goto JumpTarget
    

    @load

    This command jumps to another script.
    Script files need to be in the txt folder.

    @load 001.txt
    

    @menu

    This command displays a menu using two images.
    @menu can create up to 16 buttons.

    Basically the first image is displayed,
    but while a button is pointed at by the mouse,
    the area of the button is changed to the second image.

    Menus can't be canceled using right click.

    @menu menu.png menu-selected.png START 640 480 240 120
    :START
    

    Message

    Prints text to the message box.

    Hello, world!
    

    @news

    This command is a variant of @switch. It shows first four options on
    north, east, west and south of screen.

    Parent options are hidden when * is specified.

    @retrospect

    This command executes event image catalog mode.
    Similarly to @menu, @retrospect uses two images.

    @retrospect menu.png menu-selected.png 0 0 0 320 240 PICTURE1 $1 320 240
    Canceled.
    @goto END
    :PICTURE1
    @bg picture1.png 1.0
    @click
    :END
    

    @return

    This is used to return from subroutines.

    @gosub SUB
    
    :SUB
    Describe the process here.
    @return
    

    @se

    This command plays sound effects.
    Sound effect files need to be in the se folder.
    Suika2 can only play Ogg Vorbis 44.1kHz stereo and monaural format.

    @se click.ogg
    
    @se click.ogg voice
    

    @select

    This command shows options and jumps to the specified label.
    The number of options is fixed to three.

    @select label1 label2 label3 "Good morning." "Good afternoon." "Good evening."
    :label1
    Good morning.
    @goto end
    :label2
    Good afternoon.
    @goto end
    :label3
    Good evening.
    :end
    

    Message with character name

    This prints text to the message box, and the character name to the name box.

    Suika2 can play voice files when printing messages.
    Voice files need to be in the voice folder.
    Suika2 can only play Ogg Vorbis 44.1kHz stereo and monaural format.

    *Name*Hello, world!
    
    *Name*001.ogg*Hello, world!
    
    *Name*@beep.ogg*Hello, world!
    

    @set

    This sets a value to a variable.

    Local variables are $0 to $9999.
    Local variables are stored in all save data.

    Global variables are $10000 to $10999.
    Global variables are stored commonly across all save data.

    The initial value of a variable is 0.

    @set $0 = 1
    
    @set $10 += 23
    
    @set $0 = $RAND
    
    @set $1 += $2
    

    @setsave

    This command enables or disables the save and load screen which is invoked by right click while waiting for message click or option click.

    @setsave enable
    
    @setsave disable
    

    @shake

    This command shakes screen.

    @shake horizontal 1.0 3 100
    
    @shake vertical 1.0 3 100
    

    @switch

    Shows up to two levels of options.
    The number of parent options are eight,
    and each parent option has eight child options.

    @switch "Parent option 1" "Parent option 2" * * * * * * LABEL1 * * * * * * * * * * * * * * * LABEL2 * * * * * * * * * * * * * * *
    
    @switch "Parent option 1" "Parent option 2" * * * * * * LABEL1 "Child option 1" LABEL2 "Child option 2" * * * * * * * * * * * * LABEL3 "Child option 3" LABEL4 "Child option 4" * * * * * * * * * * * *
    

    @vol

    This command sets the sound volume.

    Sound channels are:

    Sound volumes of these three channels are stored in each local save file. You can change the volumes frequently for sound production purpose.

    If you want to set global master volumes which are common between save files, you can use CAPITAL name of channels. When you set global master volumes, set fading time to 0.

    @vol bgm 0.5 1.0
    
    @vol b 0.5 1.0
    
    @vol BGM 0.5 0
    

    @wait

    This command instructs Suika2 to wait for input from the keyboard or mouse before continuing.
    Input from the keyboard or mouse will interrupt @wait (thus allowing Suika2 to continue).
    While waiting for input, the message box is hidden.

    @wait 5.0