SakuraScript List

Translated Document

Escaping SakuraScript

SakuraScript Lifespan

Scope Commands

\0 or \h

Moves the focus to the main character.

  • Materia
  • SSP
  • CROW
\1 or \u

Moves the focus to the side character.

  • Materia
  • SSP
  • CROW
\p[(ID number)]

Displays an extra character of the specified ID number.

  • SSP
  • CROW

Usage example

\0The main character will talk.\1The side character will talk.\p[2]A third character will talk.\p[3]A fourth character will talk. The default character is the main character.

Surface Commands

\s(ID number)

Changes the surface of the character that is currently the focus to the surface with the specified ID number.
This tag can only be used with surfaces 0–9.

  • Materia
  • SSP
  • CROW

Usage example

\s1This displays surface number 1 for the main character.

\s[(ID number)]

Changes the surface of the character that is currently the focus to the surface with the specified ID number.
\s[-1] will hide the character.

  • Materia
  • SSP
  • CROW

Usage example

\s[100]This displays surface number 100 for the main character.

\i[(ID number)]

Displays the surface animation with the specified ID number for the character that is currently the focus.

  • Materia
  • SSP
  • CROW

Usage example

\s[0]This displays surface 0 for the main character.\i[1] Displays animation 1 defined for surface 0.

\i[ID,wait]

Starts the surface animation of the specified ID number, and waits for it to end to display dialogue.

  • SSP

Usage example

\1\s[10]This displays surface 10 for the side character.\i[2,wait] This sentence is displayed after surface 10's animation 2 has finished.

\![anim,clear,(ID)]

Ends the animation of the specified ID number.

  • SSP

Usage example

\s[0]\i[100]A long animation is being played.\![anim,clear,100] Even if the animation has not finished playing yet, it is ended by force.

\![anim,pause,(ID)]

Pauses the animation of the specified ID number.

Effective until the surface is changed (\s[ID] is executed).

  • SSP

Usage example

\s[0]\i[200]A long animation is being played.\![anim,pause,200] The animation will pause here.

\![anim,resume,(ID)]

Resumes an animation paused by the above command.

  • SSP

Usage example

\s[0]\i[200]A long animation is being played.\![anim,pause,200] The animation will pause here.\![anim,resume,200] The animation will resume here.

\![anim,offset,(ID),(x coordinate),(y coordinate)]

Moves the surface animation of the specified ID number the same distance as the entered coordinates.
It is also possible to move dressups.

Effective until the surface is changed (\s[ID] is executed).

  • SSP

Usage example

\s[0]\i[300]A long animation is being played.\![anim,offset,300,40,50] Here, the animation is moved 40 pixels to the right and 50 pixels down.

\![anim,add,overlay,(ID)]

Overlays the current surface with the surface of the specified ID number.

\![anim,add,overlay,(ID)]
Overlays the current surface with the surface of the specified ID number.
\![anim,add,overlayfast,(ID)]
Clips the surface of the specified ID number to the current surface, making only pixels that overlap with the base surface visible.
\![anim,add,base,(ID)]
Changes the current surface to the surface with the specified ID number.
\![anim,add,move,(x),(y)]
Moves the current surface and displays it at the entered coordinates.
\![anim,add,overlay,(ID),(x),(y)]
Moves the surface of the specified ID number to the entered coordinates and overlays it with the current surface.
\![anim,add,overlay,(ID),(x),(y),(display time),(ID),(x),(y),(display time),(ID),(x),(y),(display time),...]
Animates the surface displayed on top of the base surface. (Time is in milliseconds.)
\![anim,add,overlay,(ID),(x),(y),(display time),(ID),(x),(y),(display time),(ID),(x),(y),(display time),(animation timing)]
"Animation timing" can be set to either runonce or always.
  • CROW
\![anim,stop]

Stops the surface animation.

  • CROW
\![anim,add,text,(x),(y),(width),(height),(string),(display time),(r),(g),(b),(font size),(character identifier)]

Displays text on top of the surface.
Arguments after the string are optional.

  • CROW
\__w[animation,(ID)]

Waits for an already running animation of the specified ID number to end to display dialogue.

  • SSP

Usage example

\1\s[10]This displays surface 10 for the side character.\i[400] Animation 400 is started at the same time as this sentence is displayed.\__w[animation,400] This sentence is displayed after animation 400 ends.

\![bind,(category name),(part name),(value)]

Puts on and takes off dressup parts.
Parts are put on when the value is 1, and taken off when 0.
Whole categories can be added or removed by leaving the part name argument blank.
If the value argument is blank or is omitted, the dressup will alternate between ON and OFF, similarly to dressup options in the menu.
When the script is run, the SHIORI event OnDressupChanged will be notified, and the SHIORI event OnNotifyDressupInfo will be notified afterwards.

  • SSP

Usage example

\![bind,head,ribbon,1]The main character is now wearing its defined head category's ribbon.\1\![bind,arm,,0]All parts in the arm category defined for the side character are removed.

\![lock,repaint]

Stops drawing running animations until \![unlock,repaint] is called.
This will be automatically cancelled at the end of the script.
However, if you specify \![lock,repaint,manual], it will be effective until explicitly unlocked. [2.5.16]

  • Materia
  • SSP

Usage example

\s[0]\i[500]Start playing animation 500 on surface 0.\![lock,repaint] Stop drawing the animation here.

\![unlock,repaint]

Cancels the above command and resumes drawing the hidden animations.

  • Materia
  • SSP

Usage example

\s[0]\i[500]Start playing animation 500 on surface 0.\![lock,repaint] Stop drawing the animation here.\![unlock,repaint] Resume drawing the animation here. Since the animation was still running, the parts of the animation that were played while hidden will be skipped.

\![set,alignmentondesktop,(bottom or top)]

Attaches the character that currently has the focus to the specified edge of the desktop. bottom for the bottom of the desktop, top for the top of the desktop.

Effective until the ghost is closed.

※Refer to alignmenttodesktop for SSP.

  • Materia
  • SSP
  • CROW

Usage example

\![set,alignmentondesktop,bottom]The main character is now stuck to the bottom of the desktop (right above the taskbar).

\![set,alignmenttodesktop,free]

Allows the surface to be moved freely.

Effective until the ghost is closed.

  • SSP
  • CROW

Usage example

\![set,alignmenttodesktop,free]The main character can now be moved freely around the desktop by dragging with the mouse.

\![set,alignmenttodesktop,(direction)]

Attaches the character that currently has the focus to the specified edge of the desktop. The directions below can be specified.

top
Attaches to the top.
bottom
Attaches to the bottom.
left
Attaches to the left.
right
Attaches to the right.
free
The character will not be attached to anything.
default
The character will be returned to its default position settings.


When a character is attached to the top or bottom of the screen, it cannot be moved up or down by dragging.
When a character is attached to the left or right of the screen, it cannot be moved sideways by dragging.

Effective until the ghost is closed.

※The above also applies to alignmentondesktop.

  • SSP

Usage example

\1\![set,alignmenttodesktop,top]The side character is attached to the top of the desktop.\![set,alignmenttodesktop,default] The side character's position is returned to the default.

\![set,scaling,(scaling factor)]

Changes the size of the surface. The unit of the scaling factor is in percent.
The scaling factor calculates taking the user's set shell scaling as 100%.
Negative numbers can also be specified, and -100 will flip the ghost over the X axis.

Effective until the ghost is closed.

  • SSP
  • CROW

Usage example

\![set,scaling,50]The size of the main character's surface is reduced to 50%.

\![set,scaling,(horizontal scaling factor),(vertical scaling factor)]

Changes the relative width and length of the surface respectively. The unit of the scaling factor is in percent.
The scaling factor calculates taking the user's set shell scaling as 100%.
Negative numbers can also be specified, and -100 will flip the ghost over the respective axes.

Effective until the ghost is closed.

  • SSP

Usage example

\![set,scaling,50,100]The size of the main character's surface is set to 50% width, 100% length.

\![set,scaling,(horizontal scaling factor),(vertical scaling factor),(change time)]

Changes the size of the surface minutely.
The unit of the scaling factor is in percent, and the change time is in milliseconds.

  • CROW
\![set,alpha,(value)]

Changes the opacity of the surface that currently has the focus from 0–100. The smaller the value, the more translucent it becomes.

Effective until the ghost is closed.

  • SSP

Usage example

\0\![set,alpha,0]The main character is now completely transparent and invisible.\1\![set,alpha,50]The side character is now about halfway transparent.

\![effect,(plugin name),(speed scaling),(parameter)]

Modifies surfaces using a plugin.

  • CROW
\![effect2,(additional surface ID),(plugin name),(speed scaling),(parameter)]

Modifies additional surfaces using a plugin.

  • CROW
\![filter,(plugin name),(startup time),(parameter)]

Modifies surfaces using a plugin every time a change is made.

  • CROW
\![filter]

Cancels the above command.

  • CROW
\4

The character that is currently the focus will move a set distance away from either the main or side character.

  • Materia
  • SSP
  • CROW

Usage example

The moving function will be executed.\4 This sentence will be displayed after the main character has moved a set distance away from the other character.

\5

The character that is currently the focus will move until in contact with the other character.
The character will not move if it is not necessary to do so.

  • Materia
  • SSP
  • CROW

Usage example

\1The focus is now on the side character.\5 This sentence will be displayed after the side character has moved to a position right next to the other character.

\![move]

Moves to the specified coordinates. ※Refer to the section below

  • SSP
  • CROW

Usage example

\![move,--X=80,--Y=-400,--time=2500,--base=screen,--base-offset=left.bottom,--move-offset=left.top]The main character will move 80 pixels to the right and 400 pixels upwards, counting from the bottom left of the screen (screen,left.bottom). The movement will use the top left pixel of the surface as a base point (left.top), and will occur over the course of 2.5 seconds.

\![moveasync]

Moves asynchronously to the specified coordinates. ※Refer to the section below

\![moveasync] can be stopped in the middle of movement with \![moveasync,cancel].

  • SSP

Usage example

\1\![moveasync,--X=-175,--Y=200,--time=5000,--base=screen,--base-offset=right.top,--move-offset=right.bottom]The side character will move 175 pixels to the left and 400 pixels downwards, counting from the top right corner of the screen (screen,right.top). The movement will use the bottom right pixel of the surface as a base point (right.bottom), and will occur over the course of 5 seconds.

\1\![moveasync,--X=-175,--Y=200,--time=5000,--base=screen,--base-offset=right.top,--move-offset=right.bottom]The side character's movement has started.\![moveasync,cancel] The movement is stopped here. Movement can also be stopped in the case a separate event that includes a cancellation script occurs. This can be used to stop movement upon double clicking, for example.

\![set,position,(x),(y),(scope ID)]

Fixes the specified character to the entered x and y coordinates. (The character will no longer be movable by dragging.)

  • CROW
\![reset,position]

Cancels the above command.

  • CROW
\![set,zorder,(scope ID),(scope ID),...]

Layers the windows of the specified characters such that the leftmost character is on top.
Example: With \![set,zorder,1,0], \1's window will be displayed on top of \0's.

By running multiple tags each with different scope IDs, separate groups can be made.
Example: With \![set,zorder,1,0] \![set,zorder,3,2], \1's window will be displayed on top of \0's, and \p[3]'s window will be displayed on top of \p[2]'s.

There is no technical limit on the number of scope IDs that can be specified in the command, but large amounts may cause the ghost to slow down somewhat, so using two to three IDs is recommended.
Running the command again with a character that has already been paired with another will cause an error. When changing the pairing of the characters, \![reset] must be run first before ordering the windows again.

Effective until the ghost is closed.

  • SSP 2.3.77

Usage example

\![set,zorder,1,0]The side character will be displayed on top of the main character without fail.

\![reset,zorder]

Cancels the above command. Everything is reset, including the results of the command having been run multiple times, as well as anything specified beforehand in descript.

  • SSP 2.3.77

Usage example

\![reset,zorder]Cancels the window layering display. The surface that the user last interacted with will be displayed on top.

\![set,sticky-window,(scope ID),(scope ID),...]

The windows of the specified characters will be moved as a set when dragged or by using the move command.
For example, if 1,0 is specified, dragging a character with the mouse will move the windows of both \0 and \1 together as a set.

By running multiple tags each with different scope IDs, separate groups can be made.
Example: With \![set,sticky-window,1,0] \![set,sticky-window,3,2], \1 will be paired with \0, and \p[3] with \p[2].

There is no technical limit on the number of scope IDs that can be specified in the command, but large amounts will cause the ghost to become very slow, so using two to three IDs is recommended.
Running the command again with a character that has already been paired with another will cause an error. When changing the pairing of the characters, \![reset] must be run first before setting the pairs again.

When there is a restriction on the ghost's movement caused by commands such as \![set,alignmenttodesktop], the restriction will be prioritised, and the window will only follow along either x or y, depending on which it is free to move in.
Even if only one window in a group is moved with \![move], the others will also follow.
However, with --option=ignore-sticky-window in the move tag, the window can move alone.

Effective until the ghost is closed.

  • SSP 2.3.77

Usage example

\![set,sticky-window,1,0]The side character will move as a set with the main character.

\![set,sticky-window,0,1,2]The main character, side character, and third character will move as a set.

\1\![move,40,100,0,0,left.top,left.top]The side character's top left is matched to the main character's top left, and then it is moved 40 pixels to the right and 100 pixels downwards.\![set,sticky-window,1,0]\![set,sticky-window,1,0] While in that position, the side character and main character are set to move together.

\![reset,sticky-window]

Cancels the above command. Everything is reset, including the results of the command having been run multiple times, as well as anything specified beforehand in descript.

  • SSP 2.3.77

Usage example

\![reset,stic ky-window]The setting to move characters together is removed. After this point, dragging and other methods of moving them will result in separate movements.

Regarding \![move], \![moveasync]

New specification: (From SSP 2.3.85 onwards)

\![move(async),--X=(X coordinate),--Y=(Y coordinate),--time=(movement time),--base=(origin),--base-offset=(base point of origin character),--move-offset=(base point of moving character),--option=(options)]

Any of the arguments can be omitted. Additionally, the order may be changed. The specification names may be in either uppercase or lowercase letters (e.g. --x=10 is also acceptable).

Old specification:

\![move(async),(X coordinate),(Y coordinate),(movement time),(origin),(base point of origin character),(base point of moving character)]

Arguments after movement time can be omitted.

X coordinate, Y coordinate specify the coordinates of the goal location.
Negative values will also be accepted.
If one is either omitted or "fix" is specified, that coordinate will not be changed.
"fix" is the default value.

movement time is in milliseconds.
If omitted or 0 is specified, the movement will occur instantaneously.
0 is the default value.

origin uses characters or other positions to define where the origin for movement is.
The possible specification methods are below.
screen is the default value.

screen
The origin of the coordinates will be at the top left of the monitor that the character's window is currently on. This is the default setting.
primaryscreen
The origin of the coordinates will be at the top left of the main monitor (ID=1).
ID
The relative coordinates from the character of the specified ID number, such as 0 and 1 (equivalent to \0,\1,\p[2] and so on), will be used.
main character name/ID
By specifying another ghost's main character name (sakura name, \0 name), the relative coordinates from that ghost's character with the specified ID number will be used.
me
The relative coordinates from the character being moved itself will be used.
primaryscreen
The origin of the coordinates will be at the top left of the primary monitor.
global
The system-defined coordinates will be used. (This is the same as primaryscreen if using Windows.)

base point of origin character defines where the origin will be, in the case that screen or a character was specified in the previous argument.
The format is (x coordinate).(y coordinate), and they respectively take one of the following four
x coordinate: left,right,base,center
y coordinate: top,bottom,base,center
and are written as right.base, for example.
Furthermore, base will follow the point.basepos defined in surfaces.txt.
left.top is the default value.

When specifying screen, base cannot be used, and when specifying global, right, bottom, and center cannot be used.

base point of moving character is specified in the same way as the base point of origin character.

options can be specified multiple times. The specification method is given below. Options can only be used in the new specification.

ignore-sticky-window
\![set,sticky-window] is used to ignore joint movement settings and move the character alone.

Balloon and Text Commands

\b[(ID number)]

Changes the balloon of the character that currently has the focus to the balloon of the specified ID number.
Odd numbers are reserved for balloons that are displayed on the right side of the character, so the only usable IDs are 0 or even numbers.
\b[-1] hides the balloon.

Since SSP version 2.6.34, if written \b[ID1,--fallback=ID2,--fallback=ID3], ID2 will be used if ID1 does not exist, and ID3 will be used if neither ID1 nor ID2 exist.

  • Materia
  • SSP
  • CROW

Usage example

\b[2]The main character's dialogue will be displayed on balloon number 2. Some balloons may be implemented differently, so there may also be cases where a balloon with the ID number 2 does not exist. In "SSP Default+", the balloon bundled with SSP, the main character's balloon number 2 is a bigger balloon that displays a large number of characters. However, since different balloons can vary in which ID is what size, it is necessary to specify a recommended balloon or bundle a dedicated balloon when using this command.

\_b[(filepath),(x),(y)]

Attaches an image in the balloon at the specified XY coordinates. The image will be displayed below any text.
The top left pixel of the image will define the color that becomes transparent.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※In SSP only, instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below
※In SSP only, image URLs can also be specified.
※In SSP only, files in plugin folders are also searched.

  • Materia
  • SSP
  • CROW

Usage example

\_b[image\test.png,50,100]In the main character's balloon, test.png in the folder [(folder of the ghost executing the command)]/ghost/master/image is displayed using its top left pixel as the transparent color, at the balloon coordinates X:50,Y:100.

\_b[(filepath),(x),(y),opaque]

Attaches an image in the balloon at the specified XY coordinates. The image will be displayed below any text.
The image will be displayed without using the top left pixel as the transparency color.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※Instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below

  • SSP

Usage example

\_b[..\..\shell\master\surface0.png,0,15,opaque]In the main character's balloon, surface0.png in the folder [(folder of the ghost executing the command)]/shell/master is displayed at the balloon coordinates X:50,Y:15, without any parts becoming transparent.

\_b[(filepath),(x),(y),(option),(option),...]

Attaches an image in the balloon at the specified XY coordinates.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※Instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below

Options

--option=opaque
Displays the image without using the top left pixel as the transparency color.
--option=use_self_alpha
Displays a PNG using the alpha channel for transparency.
--clipping=(left) (up) (right) (down)
Takes part of the picture and clips it as a rectangle shape.
The area to be clipped is determined with the values specified for left, up, right, and down.
--option=fixed
Stops the image from moving when scrolled.
--option=background
Displays the image below the text. Using this option, the image can be used as a background for the text.
Priority is given to the transparency of the balloon rather than the image in the composite display.
--option=foreground
Displays the image in the foreground.
Priority is given to the transparency of the image rather than the balloon in the composite display. [SSP 2.6.54~]
  • SSP

Usage example

\_b[test.png,10,20,--option=use_self_alpha,--clipping=100 30 150 90,--option=foreground]In the main character's balloon, test.png in the folder [(folder of the ghost executing the command)]/ghost/master is displayed at the balloon coordinates X:10,Y:20, using the transparency information of the file. It will be clipped from the range of 100-150 pixels horizontally and 30-90 pixels vertically, laid over the text.

\_b[(filepath),inline]

Attaches an image in the balloon, treating it as a letter in a line of text.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※Instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below

  • SSP

Usage example

In the main character's balloon, \_b[test.png,inline] test.png in the folder [(folder of the ghost executing the command)]/ghost/master is displayed as a letter in the current balloon's text, using its top left pixel as the transparent color.

\_b[(filepath),inline,opaque]

Attaches an image in the balloon, treating it as a letter in a line of text.
The image will be displayed without using the top left pixel as the transparency color.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※Instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below

  • SSP

Usage example

In the main character's balloon, \_b["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAAl0lEQVR42oVSCQ7AIAiDl6MvZyCMQ122JQSh5agiM0P/JmL4dGQxCIEjruSd6QRBE7D86nRCibMTTvScQPTazsEBfgaECUoQHAyfzXytLbMtTutQOdZhQ2uHc4dNlssOTrBWr40q2tNsXTq186myikUCsJYuU1bV81g2TJUs7bm8WC8fmKtKXC4O/1XaCVeVYmL6eIsRfwDNfLdu1l4zPAAAAABJRU5ErkJggg==",inline,opaque] base64 encoded image data is displayed in the same way as a letter, without becoming transparent.

\_b[(filepath),inline,(option),(option),...]

Attaches an image in the balloon, treating it as a letter in a line of text.
[(folder of the ghost executing the command)]/ghost/master is the default folder.
※Instead of a file name, base64 encoding or exe/dll resources can be specified as images. ※Refer to the section below

Options

--option=opaque
Displays the image without using the top left pixel as the transparency color.
--option=use_self_alpha
Displays a PNG using the alpha channel for transparency.
--clipping=(left) (up) (right) (down)
Takes part of the picture and crops it as a rectangle shape.
The area to be cropped is determined with the values specified for left, up, right, and down.
--option=background
Priority is given to the transparency of the balloon rather than the image in the composite display. [Standard specification when not specified.]
--option=foreground
Priority is given to the transparency of the image rather than the balloon in the composite display. [SSP 2.6.54~]

Usage example

In the main character's balloon, \_b[test.png,inline,--option=use_self_alpha,--clipping=100 30 150 90] test.png in the folder [(folder of the ghost executing the command)]/ghost/master is clipped from the range of 100-150 pixels horizontally and 30-90 pixels vertically, and displayed as a letter using the alpha channel for transparency.

  • SSP
\n

Inserts a line break in the text in a balloon.

  • Materia
  • SSP
  • CROW

Usage example

This sentence\nis displayed with a line break partway through.

\n[half]

Inserts a line break of half of the normal height.

  • Materia
  • SSP
  • CROW

Usage example

This sentence is\n[half]displayed with a half height line break partway through.\n\n[half]Using one and a half height line breaks, a paragraph-like format can be achieved.

\n[(percent)]

Inserts a line break of the size specified in percentage relative to the normal height. Specifying a negative value will cause the following text to return upwards. ※From SSP 2.3.97 onwards

  • SSP
  • CROW

Usage example

This sentence is\n[150]displayed with a one and a half height line break partway through.

This sentence\n[-250]goes back up by two and a half lines.

\_n

Until the next \_n, there will be no automatic line breaks.

  • Materia
  • SSP

Usage example

\_nThe sentence written here will not have any line breaks. If it goes out of the balloon's text area, it will not be displayed.\_n

\c

Clears the text in the balloon of the character that is currently the focus.

  • Materia
  • SSP
  • CROW

Usage example

\1This sentence is displayed by the side character.\0This sentence is displayed by the main character. The text in the balloon of the character that is currently the focus will all be cleared.\cAny text that comes afterwards will start from the top left (the initial setting).

\c[char,(value)]

Deletes the specified number of characters, starting from the caret position in the balloon of the character that is currently the focus. Evaluation of characters to be deleted is based on their order in the script, rather than their position in the balloon. Images attached using \_b[(filepath),inline] will be considered one character each and deleted as such.

  • SSP

Usage example

Three characters of this dialogue will be deleted.\c[char,3] Deletion has been completed.

\c[char,(value),(starting point)]

Deletes the specified number of characters from the starting point, in the balloon of the character that is currently the focus. The starting point origin is 0 (the first character is 0, the second character is 1). Characters to be deleted are evaluated in the same way as \c[char,(value)].

  • SSP

Usage example

Three characters of this dialogue will be deleted, starting from the 5th character.\c[char,3,4] Deletion has been completed.

\c[line,(value)]

Deletes the specified number of lines, starting from the caret position in the balloon of the character that is currently the focus.
Dialogue broken with \_l[(x),(y)], \n, \n[half], or \n[(percent)] is treated as a "line." However, excluding that which is broken using \_l[(x),(y)], double breaks with no text in between, such as in \n\n, will not be considered individual lines.
Evaluation is based on the order of the script, in the same way as \c[char,(value)].

  • SSP

Usage example

One line of dialogue will be deleted.\nThis line will be deleted.\c[line,1] Deletion has been completed.\nThis line will be deleted.\n\n\n\n\n\c[line,1] Deletion has been completed.\nThis line will not be deleted.\_l[0,0]\c[line,1] Deletion has been completed.

\c[line,(value),(starting point)]

Deletes the specified number of lines from the starting point, in the balloon of the character that is currently the focus. The starting point origin is 0 (the first character is 0, the second character is 1). Lines to be deleted are evaluated in the same way as \c[line,(value)].

  • SSP

Usage example

Starting from the third line,\none line of dialogue will be deleted.\nThis part will\_l[,] be deleted.\c[line,1,2] Deletion has been completed.

\_l[(x),(y)]

Moves the caret position on the side that is currently the focus to the XY coordinates. Regarding X and Y, the definition methods below can be used.

Value
The entered values are coordinates in pixels, using the upper left corner of the balloon's text area as the origin point.
(Omitted)
The caret will not be moved. If both X and Y are omitted, there will be no effect.
XXem
When "em" is appended, coordinates will be based on letter height. 1em is equivalent to the letter height at the time the tag is written. Decimals can also be specified.
XX%
When "%" is appended, coordinates will be based on letter height. 100% is equivalent to the letter height at the time the tag is written. Decimals can also be specified.
@XX
X and Y will become relative coordinates from the current caret position. A negative value will result in leftwards movement for X, and upwards movement for Y. Can be used alongside em and %.
  • Materia
  • SSP
  • CROW

Usage example

\_l[30,5em] \_l[30,5em]Displayed at "X coordinate=30 pixels, Y coordinate=5 times the letter height".\_l[@-1650%,100]Displayed at "X coordinate=1650% of the letter height leftwards from the last letter, Y coordinate=100 pixels".\_l[,@-100]Displayed at "X coordinate=no change,Y coordinate=100 pixels above the last letter".

\C

When written at the start of a line, it will be added to the previously displayed text in the balloon. The last state of the character will also be reflected.

  • SSP

Usage example

\CThis sentence will be added to the previous dialogue. It is important to note that the last state of the character will also be reflected.

\![set,autoscroll,disable]

Stops automatic scrolling in balloons. Manual scrolling is possible.

  • Materia
  • SSP

Usage example

\![set,autoscroll,disable]Scrolling is locked.\n[5000]This text is not visible while scrolling is locked.

\![set,autoscroll,enable]

Cancels the above command.

  • Materia
  • SSP

Usage example

\![set,autoscroll,disable]Scrolling is locked.\n[5000]This text is not visible while scrolling is locked.\![set,autoscroll,enable] Scrolling is unlocked.

\![set,balloonoffset,(x),(y)]

Changes the balloon's offset value to XY coordinates. The coordinates set by the user dragging the balloon are added to this value to decide the final balloon display coordinates.
If the value is specified normally, descript.txt's default offset will be ignored, but if @ is added at the start, X and Y will become relative coordinates using the offset values in descript.txt and surfaces.txt as the origin.

  • SSP

Usage example

\![set,balloonoffset,100,-50]Moves the base point of the balloon position to X:100,Y:-50.

\![set,balloonoffset,@100,@-50]Moves the base point of the balloon position to the specifications in descript.txt or surfaces.txt, plus X:100,Y:-50 (relative coordinates).

\![set,balloonalign,(ID)]

Switches the balloon to the display direction of one of the following IDs. The definition methods below can be used for the ID.
Using the positions below as the base, the values of balloon.offsetx and balloon.offsety in the shell's descript.txt and the values of balloon.offsetx and balloon.offsety in surfaces.txt are reflected. The initial value is none.

Effective until the ghost is closed.

left
The balloon's upper right coordinates meet the shell's upper left coordinates.
center
The balloon's lower middle coordinates meet the shell's upper middle coordinates.
top
Functions in the same way as center.
right
The balloon's upper left coordinates meet the shell's upper right coordinates.
bottom
The balloon's upper middle coordinates meet the shell's lower middle coordinates.
none
Depending on the coordinates left and right will be switched. If the balloon is cut off after dragging the shell, it will switch.
Anything not specified here
Functions in the same way as none.
  • SSP

Usage example

\0\![set,balloonalign,top]The main character's balloon will be displayed above the shell.\1\![set,balloonalign,right]The side character's balloon will be displayed on the right side of the shell.

\![set,balloonnum,(file name),(current number),(total number)]

Displays the data format shown when downloading a file. The current number and total number must be written with half-width numbers. Regardless of which character the script is run from, it will only be displayed on the \0 balloon.
Each argument can be omitted. To remove it, all arguments should be omitted.

Effective until the ghost is closed.

  • SSP

Usage example

\![set,balloonnum,Test Display,1,5]Testing the file downloading display.\![set,balloonnum,,,] The display contents have been deleted.

\![set,balloontimeout,(time)]

Specifies the time for the balloon to timeout. Units are in milliseconds.
The time is counted from when the script display has finished. Specifying 0 or a negative number will stop the balloon from timing out.

When the time specification is omitted: Return to the original value
When 0 or -1 for the time specification is entered: No timeout

  • SSP

Usage example

\![set,balloontimeout,3000]The balloon of this dialogue will close 3 seconds after the ghost has stopped talking.

\![set,balloonwait,(scaling factor)]

Specifies the scaling factor of the speed at which text is shown (weight per individual letter) in the balloon.
Lone value: 1–100 can be specified. 1 is the equal scale. Decimals can also be specified. Example: Specifying 1.5 will increase the slowness by 50%.
With % appended: 0–10000 can be specified. 100 is the equal value. Only integers above 0 can be used.
With ms appended: 0–10000 can be specified. Specifies the absolute value of the waiting time for each letter in milliseconds.

When omitted or 1 is specified: Return to the original value
When 0 is specified: Always display instantly

After the script has finished running, it will be reset to the specification equivalent to 100%.

  • SSP
\![*]

Displays the marker. The marker is set depending on the balloon.

  • Materia
  • SSP

Usage example

\![*]Add a marker.

\![enter,onlinemode]

Forces the online marker to be displayed. Even in cases where the side character has content to be displayed and the main character has none, the main character's balloon will be brought up.

Effective until the ghost is closed.

  • SSP

Usage example

\0\![enter,onlinemode]The online marker is displayed in the main character's balloon.

\![leave,onlinemode]

Forces the online marker to be hidden.

  • SSP

Usage example

\0\![enter,onlinemode]While this sentence is being displayed, the online marker is shown in the main character's balloon.\![leave,onlinemode] Here, the online marker disappears.

\![enter,nouserbreakmode]

Enters a mode where interruption of scripts (the operation depends on SSP settings; usually a balloon double-click) is disabled.
Cannot be used with normal SSTP (can be used with Auth.SSTP(= Owned SSTP)).

  • SSP

Usage example

\![enter,nouserbreakmode]In this sentence, scripts cannot be broken.

\![leave,nouserbreakmode]

Cancels the above command.

  • SSP

Usage example

\![enter,nouserbreakmode]In this sentence, scripts cannot be broken.\![leave,nouserbreakmode] Script breaking is possible from here.

\![lock,balloonrepaint]

Stops drawing running balloon animations until either \![unlock,balloonrepaint] is called or the script ends.
This will be automatically cancelled at the end of the script.
However, if specified as \![lock,balloonrepaint,manual], drawing will be stopped until explicitly unlocked. [2.5.16]

  • SSP

Usage example

\![lock,balloonrepaint]This sentence won't be displayed until the script ends.

\![unlock,balloonrepaint]

Cancels the above command.

  • SSP

Usage example

\![lock,balloonrepaint]This sentence won't be drawn.\![unlock,balloonrepaint] Here, drawing is started again, and the previous sentence is also drawn.

\![lock,balloonmove]

Prevents the balloon from being dragged by the user until \![unlock,balloonmove] is called.
Can be specified permanently, as in sakura.balloon.dontmove in descript.txt.
This can hinder user operation, so overuse should be avoided.

  • SSP 2.4.96
\![unlock,balloonmove]

Cancels the above command. However, this command cannot restore balloon dragging if it has been locked in descript.txt.

  • SSP 2.4.96
\_!

[Old specification] Displays text as is without running any tags until the next \_!.

\_?

Displays text as is without running any tags until the next \_?.

  • SSP

Usage example

\_?\1This sentence is displayed as is\nwithout SakuraScript being run.\_?

\__v[(option)]

Adjusts the speech synthesis function's vocalization content in the string enclosed between \__v.
\__v[disable]: Disables speech synthesis
\__v[alternate,(string)]: Specifies a string with the correct vocalization for words with different pronunciations. Hiragana is preferred in order to avoid misrecognition.

  • SSP 2.4

Usage example

\1\__v[disable]This sentence won't be spoken using the speech synthesis function.\__v

Regarding \_b[(filepath),...]

Other than an absolute path, relative paths from SHIORI itself may also be used.

※In SSP only, environment variables can also be used for file names and such.

When using base64
Example: "data:image/png;base64,iV~II"
When using exe/dll resources
Example: D:\hogehoge.exe,20
When using exe/dll resources (resource ID specified)
Example: D:\hogehoge.exe,-10

Text Modification Commands

\f[align,(alignment side)]

Sets align right (\f[align,right]) / center (\f[align,center]) / align left (\f[align,left]) for text.
This setting is applied until the next \n, \_l, or other "intentional linebreak".
Additionally, if this command is run in the middle of adding characters and such, the string already in the same line will also be moved.
Text is returned to align left when an \_l tag is used.
Furthermore, when align center is set using the \f[align] tag after moving with the \_l tag, the text will be center aligned based on the x coordinate indent of the \_l tag.

  • SSP 2.5.31

Usage example

\f[align,center]This text is centered.\n\f[align,right]This text is aligned to the right.\n\f[align,left]This left-aligned text \w9\w9\f[align,right]is moved to the right.

\f[valign,(alignment side)]

Sets align bottom (\f[align,bottom]) / center (\f[align,center]) / align top (\f[align,top]) for text.
Additionally, if this command is run in the middle of adding characters and such, the string already in the same line will also be moved.
Unlike align, this command will not be reset with \n or \_l.

  • SSP 2.6.19
\f[name,(font name)]

Changes the text font to the specified font name.
When default is specified or the specified font candidates do not exist, the font reverts to the default balloon setting (or to the default SSP setting, in the case that it overwrites the balloon font).
When disable is specified, the font is changed to the unselectable choice indicator font.
It is also possible to specify a font from a file in [(folder of the ghost running the command)]/ghost/master, a child folder within it, or the current balloon's folder.
When multiple fonts are specified and separated by commas, the font will be automatically selected from the fonts the user has installed with the first font written being the highest priority (SSP only).

  • SSP

Usage example

\f[name,Meiryo,meiryo.ttf]This text will be displayed with Meiryo if installed, meiryo.ttf if not installed, and the default font if neither exist.

\f[height,(value)]

Changes text to the specified font size.
Relative value adjustments using + and - may be used.
Size specifications as in style sheets are also possible.
When default is specified, the font size will return to the balloon's default setting.

  • SSP

Usage example

\f[height,15]This text is displayed at 15 pixels.\f[height,+3] It has been made 3 pixels larger.\f[height,200%] This text is displayed at 200% of the default size.\f[height,default] It has been returned to the original size.

\f[color,(color specification)]

Changes the font color.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[color,red]This text is displayed in red.\f[color,100,150,200] This text is displayed in the specified color.\f[color,default] It has been returned to the balloon's default color.

\f[shadowcolor,(color specification)]

Changes the drop shadow color.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[shadowcolor,#ffff00]The drop shadow is displayed in yellow.\f[shadowcolor,default] It has been returned to the balloon's default drop shadow color.

\f[shadowcolor,none]

Disables the drop shadow.

  • SSP

Usage example

\f[shadowcolor,none]This text is displayed without a drop shadow.\f[shadowcolor,default] It has been returned to the balloon's default drop shadow color.

\f[shadowstyle,(type specification)]

Changes the type of drop shadow. Displays a drop shadow to the bottom right of the text when offset is specified, and a border surrounding the text when outline is specified.

  • SSP 2.5.27

Usage example

\f[shadowcolor,#ffff00]\f[shadowstyle,outline]This text is displayed with a yellow border.\f[shadowstyle,default]\f[shadowcolor,default] It has been returned to the balloon's default settings.

\f[outline,(parameter)]

When parameter is specified as true or 1, the text will become outline text.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.

  • SSP

Usage example

\f[height,30]\f[outline,1]This is outline text.\f[outline,default] It has been returned to the balloon's default settings.

\f[anchor.font.color,(color specification)]

Changes the color of anchor text.
※Refer to the section below for specification methods.

  • SSP

Usage example

\_a[OnTest]This is an anchor before the color has been changed.\_a\n\f[anchor.font.color,50%,90%,20%]\_a[OnTest2]This is an anchor after the color has been changed.\_a

\f[bold,(parameter)]

When parameter is specified as true or 1, the text will become bold.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.
The text wil not become bold if the font is incompatible.

  • SSP

Usage example

\f[bold,1]This text is bold.\f[bold,default] It has been returned to the balloon's default settings.

\f[italic,(parameter)]

When parameter is specified as true or 1, the text will become italicized. Sample.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.
The text wil not become italicized if the font is incompatible.

  • SSP

Usage example

\f[italic,1]This is italic.\f[italic,default] It has been returned to the balloon's default settings.

\f[strike,(parameter)]

When parameter is specified as true or 1, the text will become strikethrough text. Sample.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.

  • SSP

Usage example

\f[strike,1]This is strikethrough text.\f[strike,default] It has been returned to the balloon's default settings.

\f[underline,(parameter)]

When parameter is specified as true or 1, the text will be underlined.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.

  • SSP

Usage example

\f[underline,1]This text has been underlined.\f[underline,default] It has been returned to the balloon's default settings.

\f[sub,(parameter)]

When parameter is specified as true or 1, the text will become a subscript. Sample.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.

  • SSP

Usage example

Turns the text into\f[sub,1] subscript text.\f[sub,default] It has been returned to the balloon's default settings.

\f[sup,(parameter)]

When parameter is specified as true or 1, the text will become a superscript. Sample.
Specifying false or 0 will disable it.
Specifying default will return to the balloon's default setting.
Specifying disable will have the same result as false and 0.

  • SSP

Usage example

Turns the text into\f[sup,1] superscript text.\f[sup,default] It has been returned to the balloon's default settings.

\f[default]

Returns all balloon attributes to the default settings.

  • SSP

Usage example

\f[shadowcolor,#6699cc]Text that\f[bold,1] has been \f[underline,1]decorated in\f[height,20] many ways\f[default] has now been returned to the balloon's default settings.

\f[disable]

Disables all balloon attributes for displaying text.

  • SSP 2.5.51

Wait Commands

\w(time)

Waits for the specified time multiplied by 50ms. 1-9 can be specified. \w10 will display the character "0" in the balloon after waiting for 50ms.

  • Materia
  • SSP
  • CROW

Usage example

Waits for 0.45 seconds.\w9\nAfter that, waits for 1 second.\w9\w9\w2 Waiting has finished.

\_w[(time)]

Allows for more exact control over wait time. [time]ms.

  • SSP
  • CROW

Usage example

Waits for 1.234 seconds.\_w[1234] Waiting has finished.

\__w[(time)]

Waits until the specified amount of milliseconds pass since either the last wait command or since \x.
\__w[clear] can be used to reset the time.

  • SSP

Usage example

1\_w[1000]2\__w[2500]3. After first waiting for 1000ms, it will wait for a total of 2500ms (in this case, [2500-1000-the time it takes to display 2 letters], equalling roughly 1500ms). As the length of time it takes to display characters (adjustable with SSP user settings) is factored in, exact control over wait time since the script started is possible. The wait timer starts counting from 0 again when a clear or click-wait is run.\__w[clear]\__w[500] A 0.5 second wait is added here.

\x

Makes the balloon wait until clicked to close.
After being clicked, the character focus is reset to \0, and \f(text modification) SakuraScript effects are also cleared. SakuraScripts that end with \e remain uncleared.

  • Materia
  • SSP
  • CROW

Usage example

\1Here, the side character will\f[bold,1] speak.\xAfter being clicked, the focus returns to the main character and the SakuraScript that made modifications to the font is cleared.

\x[noclear]

Pauses the balloon until clicked.
After being clicked, the balloon's contents and the side with the focus will be kept.
Unlike \x, \f(text modification) SakuraScript effects will remain.

  • SSP

Usage example

\1Here, the side character will\f[bold,1] speak. \x[noclear]After being clicked, the SakuraScript for both the character with the focus and the text modification remains in effect.

\t

Starts a time critical section.
Until a script break (ex: clicking a choice, interruption by double-clicking a balloon) or \e, event notifications such as those for mouse-based events will not be fired.
It is important to note that the section cannot be ended by a second \t.
If the time critical section must be ended halfway through, it is possible to use \![raise,(event name)] to temporarily stop the script and call a different event.

  • Materia
  • SSP
  • CROW

Usage example

While this sentence is being displayed, mouse interactions are possible.\t From here, mouse interactions will be ignored until the script stops playing.

\_q

Starts a quick section.
Until the next \_q or \e, text will be displayed instantly.
However, general SakuraScripts with waits can be run, causing waits even during instant display.

  • Materia
  • SSP
  • CROW

Usage example

\_qThis text will be displayed instantly. It is important to note that there are some situations, such as with Satori, when wait times will be inserted automatically.\_q

\![quicksection,true]

Starts a quick section. \![quicksection,1] can also be used.
It is almost interchangeable with \_q, the difference being that it can be specified as starting, as opposed to using a switching style.

  • SSP

Usage example

\![quicksection,1]This text will be displayed instantly. Any wait tags will be run here as well.

\![quicksection,false]

Ends a quick section. \![quicksection,0] can also be used.
It is almost interchangeable with \_q, the difference being that it can be specified as ending, as opposed to using a switching style.

  • SSP

Usage example

\![quicksection,1]This text will be displayed instantly. Any wait tags will be run here as well.\![quicksection,0] Furthermore, the SakuraScript tags for quick sections\![quicksection,1] are still valid when mixed.\_q

\_s

Starts a synchronize section.
Until the next \_s or \e, text will be displayed in both balloons.

  • Materia
  • SSP
  • CROW

Usage example

\_sThe main character and side character will speak at the same time.\_s

\_s[(ID1),(ID2),(ID3),...]

Starts a synchronize section with the characters of the specified ID numbers.

  • SSP

Usage example

\_s[0,2,3]The main character, a third character, and a fourth character will speak at the same time.\_s

\![wait,syncobject,(sync object name),(timeout time)]

Waits until the sync object with the specified name (Mutex, Semaphore, Event on Windows) is in the signal state.
Mutex is released after waiting, Semaphore is released once after waiting, and Event does not perform any particular operation after the signal is sent.
If the timeout time is omitted or specified as 0, it will wait indefinitely (until a script break), and if 1 or higher is specified it will wait using the specified number as milliseconds.

  • SSP

Choice Commands

\q[(title),(ID)]

Show a menu choice.
After selecting, the SHIORI event OnChoiceSelect will be run. (In SSP only, OnChoiceSelectEx will run prior to OnChoiceSelect.)
The ID is stored in reference0.

  • Materia
  • SSP
  • CROW

Usage example

Do you like SakuraScript? \q[Yes,Like] \q[No,Hate]. 'Like' or 'Hate' is stored in reference0 depending on what you choose, then sent to the event OnChoiceSelect.

\q[(title),On(ID),(r0),(r1),...]

Show a menu choice.
If the ID starts with "On" as shown above, clicking it will start the SHIORI event On(ID) (with the name as written in the ID).
The arguments following the ID are stored in reference0, reference1, etc, in the order they are written.

  • Materia
  • SSP
  • CROW

Usage example

What is your favorite season? \q[Spring,OnLikeSeason,Rain,Budding trees] \q[Summer,OnLikeSeason,Heat,Lush green] \q[Autumn,OnLikeSeason,Breezy,Falling leaves] \q[Winter,OnLikeSeason,Cold,Snowing]. When a choice is selected, the OnLikeSeason event is triggered. reference0 and reference1 in OnLikeSeason will vary depending on which choice was selected. For example, if Spring is selected, reference0 would be 'Rain' and reference1 would be 'Budding trees'.

\q[(title),(ID1),(ID2),(ID3),...]

Show a menu choice.
After selecting, the SHIORI event OnChoiceSelect will be run.
ID* is stored in reference*.

  • CROW
\q[(title),(ID),(r2),(r3),...]

Show a menu choice.
After selecting, the SHIORI event OnChoiceSelectEx will be run.
r* is stored in reference* and sent to OnChoiceSelectEx.
OnChoiceSelect also occurs after OnChoiceSelectEx, but references after reference1 are ignored, so it is pointless to write it this way.

  • SSP

Usage example

What is your favorite season? \q[Spring,OnLikeSeason,Rain,Budding trees] \q[Summer,OnLikeSeason,Heat,Lush green] \q[Autumn,OnLikeSeason,Breezy,Falling leaves] \q[Winter,OnLikeSeason,Cold,Snowing]. When a choice is selected, the OnChoiceSelectEx event is triggered. The references in OnChoiceSelectEx will vary depending on which choice was selected. For example, if 'Autumn' was selected, reference0 would be 'Autumn', reference1 would be 'OnLikeSeason', reference2 would be 'Breezy', and reference3 would be 'Falling leaves'.

\q[(title),script:(script to execute)]

Show a menu choice.
After selecting, the contents after "script:" are executed as a SakuraScript.

  • SSP

Usage example

\q[Close balloon,script:\e]\nNesting is also possible.\n\q[No. 1,"script:\q[No. 2,script:There is no 3.]"]

\q[(ID)][(title)] or \q*[(ID)][(title)]

[Old specification] Show a menu choice. * is a serial number.
After selection, the SHIORI event for the ID number will be started.
Unlike the above, the choices will be separated by a new line.

\z

[Old specification] Acts like \e, but in scripts that contain menu choices.

\__q[(ID),...]

All of the text will be used as a menu choice, up to the next \__q.
The ID specification is the same as \q, including the special treatment of IDs that start with "On" or "script:", as well as additional arguments.
The specification for which SHIORI event should be run after selection is also the same as \q.

  • SSP

Usage example

\__q[OnTest,testreference]SakuraScript can be used in this menu choice. \nNewline, \_l[50,50]Cursor movement is also possible, and if you use an image tag, the image will be a clickable choice.\__q In this example, the ID starts with 'On', so the event 'OnTest' is triggered when the selection is made, and 'testreference' is stored in reference0.

\*

Causes menu choices to not timeout.
Valid only in the script it is written. Can be written before or after the menu choices.

  • Materia
  • SSP
  • CROW

Usage example

\q[Choice that will not timeout,NoTimeOut]\*. When selected, the OnChoiceSelectEx event (or OnChoiceSelect if there is no response from OnChoiceSelectEx) will be run as normal.

\![set,choicetimeout,(Time)]

Specifies how long it will take for menu choices to timeout in the script. The unit is milliseconds.
The timeout countdown starts after the entire dialogue has been displayed.
Valid only in the script it is written. Can be written before or after the menu choices.
When a choice times out, the OnChoiceTimeout event is started.

If the time specification is omitted: Use the default value.
If the time is specified as 0 or -1: No timeout.

  • Materia
  • SSP
  • CROW

Usage example

\q[Quick press,FastPush]\![set,choicetimeout,500]

\_a[(ID)]

All of the text will be used as an anchor, up to the next \_a. This will not timeout like a menu choice, but will timeout like normal dialogue.
Clicking the anchor will start the SHIORI event OnAnchorSelect. (In SSP only, OnAnchorSelectEx will be started first.)
The ID is stored in reference0.

  • Materia
  • SSP
  • CROW

Usage example

Clicking on an \_a[Hint]anchor\_a will trigger the OnAnchorSelectEx event (Or the OnAnchorSelect if there is no response). reference0 will contain 'Hint'.

\_a[On(ID),(r0),(r1),...]

All of the text will be used as an anchor, up to the next \_a. This will not timeout like a menu choice, but will timeout like normal dialogue.
If the ID starts with "On" as shown above, clicking it will start the SHIORI event On(ID) (with the name as written in the ID).
The arguments following the ID are stored in reference0, reference1, etc, in the order they are written.

  • SSP

Usage example

Click here if you want a \_a[OnHint,0]hint\_a. \_a[OnHint,1]Come on, come on, come on\_a. These two anchors will start the SHIORI event OnHint when clicked, but the value of reference0 will be either '0' or '1' depending on which one was clicked.

\_a[(ID),(r2),(r3),...]

All of the text will be used as an anchor, up to the next \_a. This will not timeout like a menu choice, but will timeout like normal dialogue.
Clicking on the anchor will start the event OnAnchorSelectEx.
The text that was used as the anchor will be stored as reference0, the ID will be stored in reference1, and subsequent arguments will be stored in reference2, reference3, etc, in the order they are written.
OnAnchorSelect also occurs after OnAnchorSelectEx, but nothing is entered after reference1, so it's pointless to write it this way.

  • SSP

Usage example

\_a[CharacterName,Target Teddy,Age Unknown]Teddy\_a was such a good guy. But, he ate \_a[CharacterName,Target Emily,0x10 years old]Emily's\_a special treat that she'd been saving, so... When an anchor is clicked, OnAnchorSelectEx is run. If 'Teddy' is clicked, 'Teddy' is stored in reference0, 'CharacterName' in reference1, 'Target Teddy' in reference2, and 'Age Unknown' in reference3.

Choice Display Modification Commands

\f[cursorstyle,(style)]

Changes the appearance of choice text when being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursorstyle,underline]\q[Choice,OnTest] Changes choice text to be displayed with an underline when hovered over.

\f[cursorcolor,(color specification)] or \f[cursorbrushcolor,(color specification)]

Changes the color of the rectangular indicator when choice text is being hovered over. It is important to note that the color is affected by \f[cursormethod,(drawing method)].
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursorbrushcolor,red]\q[Choice,OnTest] When the style of the choice text is set to square, the background color will become red if hovered over.

\f[cursorpencolor,(color specification)]

Changes the color of the underline or rectangular indicator's outline when choice text is being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursorpencolor,0,255,0]\q[Choice,OnTest] When the style of the choice text is set to underline or square, the lines will become green if hovered over.

\f[cursorfontcolor,(color specification)]

Changes the color of the choice text when being hovered over using RGB values (0–255).
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursorfontcolor,default.anchor]\q[Choice,OnTest] Changes the color of choice text to the same as the anchor color when hovered over.

\f[cursormethod,(drawing method)]

Changes the drawing method of the choice text when being hovered over. Only effective when the style is set to either square or square+underline.
All operators valid in Win32API's SetROP2 function can be specified.
Specifying default will return to the balloon's default setting.
Reference: SetROP2 function (external site)
※The drawing method does not include "R2_" and should be specified as the mode name in lowercase. Ex: notmaskpen

  • SSP

Usage example

\f[cursormethod,copypen]\f[cursorbrushcolor,red]\q[Choice,OnTest] Changes the drawing method inside the lines of the choice when hovered over. When copypen is specified, the color of cursorbrushcolor will be used as is.

\f[cursornotselectstyle,(style)]

Changes the appearance of choice text when not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursornotselectstyle,underline]\q[Choice,OnTest] Changes choice text to be displayed with an underline while not hovered over.

\f[cursornotselectcolor,(color specification)] or \f[cursornotselectbrushcolor,(color specification)]

Changes the color of the rectangular indicator when choice text is not being hovered over. It is important to note that the color is affected by \f[cursornotselectmethod,(drawing method)].
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursornotselectbrushcolor,red]\q[Choice,OnTest] When the style of the choice text is set to square, the background color will become red while not hovered over.

\f[cursornotselectpencolor,(color specification)]

Changes the color of the underline or rectangular indicator's outline when choice text is not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursornotselectpencolor,0,255,0]\q[Choice,OnTest] When the style of the choice text is set to underline or square, the lines will become green while not hovered over.

\f[cursornotselectfontcolor,(color specification)]

Changes the color of the choice text when not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[cursornotselectfontcolor,default.anchor]\q[Choice,OnTest] Changes the color of choice text to the same as the anchor color while not hovered over.

\f[cursornotselectmethod,(drawing method)]

Changes the drawing method of the choice text when not being hovered over. Only effective when the style is set to either square or square+underline.
All operators valid in Win32API's SetROP2 function can be specified.
Specifying default will return to the balloon's default setting.
Reference: SetROP2 function (external site)
※The drawing method does not include "R2_" and should be specified as the mode name in lowercase.

  • SSP

Usage example

\f[cursornotselectmethod,copypen]\f[cursornotselectbrushcolor,red]\q[Choice,OnTest] Changes the drawing method inside the lines of the choice while not hovered over. When copypen is specified, the color of cursornotselectbrushcolor will be used as is.

\f[anchorstyle,(style)]

Changes the appearance of anchor text when being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorstyle,square]\_a[OnTest]Anchor\_a Changes anchor text to be displayed in a rectangle when hovered over.

\f[anchorcolor,(color specification)] or \f[anchorbrushcolor,(color specification)]

Changes the color of the rectangular indicator when anchor text is being hovered over. It is important to note that the color is affected by \f[anchormethod,(drawing method)].
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorbrushcolor,red]\_a[OnTest]Anchor\_a When the style of the anchor text is set to square, the background color will become red if hovered over.

\f[anchorpencolor,(color specification)]

Changes the color of the underline or rectangular indicator's outline when anchor text is being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorpencolor,0,255,0]\_a[OnTest]Anchor\_a When the style of the anchor text is set to underline or square, the lines will become green if hovered over.

\f[anchorfontcolor,(color specification)]

Changes the color of the anchor text when being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorfontcolor,default.cursor]\_a[OnTest]Anchor\_a Changes the color of anchor text to the same as the selected choice text color when hovered over.

\f[anchormethod,(drawing method)]

Changes the drawing method of the anchor text when being hovered over. Only effective when the style is set to either square or square+underline.
All operators valid in Win32API's SetROP2 function can be specified.
Specifying default will return to the balloon's default setting.
Reference: SetROP2 function (external site)
※The drawing method does not include "R2_" and should be specified as the mode name in lowercase.

  • SSP

Usage example

\f[anchormethod,copypen]\f[anchorbrushcolor,red]\_a[OnTest]Anchor\_a Changes the drawing method inside the lines of the choice when hovered over. When copypen is specified, the color of anchorbrushcolor will be used as is.

\f[anchornotselectstyle,(style)]

Changes the appearance of anchor text when not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchornotselectstyle,square]\_a[OnTest]Anchor\_a Changes anchor text to be displayed in a square while not hovered over.

\f[anchornotselectcolor,(color specification)] or \f[anchornotselectbrushcolor,(color specification)]

Changes the color of the rectangular indicator when anchor text is not being hovered over. It is important to note that the color is affected by \f[anchornotselectmethod,(drawing method)].
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchornotselectbrushcolor,red]\_a[OnTest]Anchor\_a When the style of the anchor text is set to square, the background color will become red while not hovered over.

\f[anchornotselectpencolor,(color specification)]

Changes the color of the underline or rectangular indicator's outline when anchor text is not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchornotselectpencolor,0,255,0]\_a[OnTest]Anchor\_a When the style of the choice text is set to underline or square, the lines will become green while not hovered over.

\f[anchornotselectfontcolor,(color specification)]

Changes the color of the anchor text when not being hovered over.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchornotselectfontcolor,default.cursor]\_a[OnTest]Anchor\_a Changes the color of choice text to the same as the selected choice text color while not hovered over.

\f[anchornotselectmethod,(drawing method)]

Changes the drawing method of the anchor text when not being hovered over. Only effective when the style is set to either square or square+underline.
All operators valid in Win32API's SetROP2 function can be specified.
Specifying default will return to the balloon's default setting.
Reference: SetROP2 function (external site)
※The drawing method does not include "R2_" and should be specified as the mode name in lowercase.

  • SSP

Usage example

\f[anchornotselectmethod,copypen]\f[anchornotselectbrushcolor,red]\_a[OnTest]Anchor\_a Changes the drawing method inside the lines of the anchor while not hovered over. When copypen is specified, the color of anchornotselectbrushcolor will be used as is.

\f[anchorvisitedstyle,(style)]

Changes the appearance of anchor text that has already been clicked on.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorvisitedstyle,square]\_a[OnTest]Anchor\_a Changes already-visited anchor text to be displayed in a square.

\f[anchorvisitedcolor,(color specification)] or \f[anchorvisitedbrushcolor,(color specification)]

Changes the color of the rectangular indicator on anchor text that has already been clicked on. It is important to note that the color is affected by \f[anchorvisitedmethod,(drawing method)].
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorvisitedbrushcolor,red]\_a[OnTest]Anchor\_a When the style of already-visited anchor text is set to square, the background color will become red.

\f[anchorvisitedpencolor,(color specification)]

Changes the color of the underline or rectangular indicator's outline of anchor text that has already been clicked on.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorvisitedpencolor,0,255,0]\_a[OnTest]Anchor\_a When the style of already-visited anchor text is set to underline or square, the lines will become green if hovered over.

\f[anchorvisitedfontcolor,(color specification)]

Changes the color of anchor text that has already been clicked on.
※Refer to the section below for specification methods.

  • SSP

Usage example

\f[anchorvisitedfontcolor,default.cursor]\_a[OnTest]Anchor\_a Changes the color of already-visited anchor text to the same as the selected choice text color when hovered over.

\f[anchorvisitedmethod,(drawing method)]

Changes the drawing method of anchor text that has been clicked on. Only effective when the style is set to either square or square+underline.
All operators valid in Win32API's SetROP2 function can be specified.
Specifying default will return to the balloon's default setting.
Reference: SetROP2 function (external site)
※The drawing method does not include "R2_" and should be specified as the mode name in lowercase.

  • SSP

Usage example

\f[anchorvisitedmethod,copypen]\f[anchorvisitedbrushcolor,red]\_a[OnTest]Anchor\_a Changes the drawing method inside the lines of already-visited anchor text. When copypen is specified, the color of anchorvisitedbrushcolor will be used as is.

Style specification methods

square
Displays a square.
underline
Displays an underline.
square+underline
Displays a square and underline.
none
Displays nothing.
default
Returns to the balloon's default settings.

Text color specification methods

Fundamentally similar to HTML and CSS color expressions.

R,G,B
Specifies a color using the values of the three primary colors red, green, and blue, expressed in decimal notation from 0–255 and separated by commas.
0,0,0 is black and 255,255,255 is white.
R%,G%,B%
Specifies a color using the values of the three primary colors red, green, and blue, expressed in percentage from 0–100% and separated by commas.
0%,0%,0% is black and 100%,100%,100% is white.
Hex color codes
Specifies a color using the values of the three primary colors red, green, and blue, expressed in hexadecimal notation after a hash "#", as in #07f, and connected together.
The color can be specified using two digits for red, green, and blue respectively, adding up to six digits, or one digit each for a total of three digits.
Alphabetical characters may be in either upper or lower case for hex color codes.
#000000 or #000 are black, and #ffffff or #fff are white.
Predefined keywords
Specifies a color using a keyword such as red, white, black (all lowercase).
Follows W3C color definitions when the definition of a keyword differs between X11 color and W3C color (e.g. green, gray).
Color chart: CSS Color Module Level 3 Extended color keywords (external site)
default
Returns the color to the default color of the text.
The default color is the color defined in the balloon's descript.txt (black when undefined).
disable
Sets the text to the unselectable choice indicator color.
default.anchor
Sets the text to the default color of anchor text when being hovered over.
[2.5.76 - Can be used with regular strings]
default.anchornotselect
Sets the text to the default color of anchor text while not hovered over.
[2.5.76 - Can be used with regular strings]
default.anchorvisited
Sets the text to the default color of already-visited anchor text.
[2.5.76 - Can be used with regular strings]
default.cursor
※Only effective when specified for the text color of choices and anchors.
Sets the text to the default color of choice text when being hovered over.
default.cursornotselect
※Only effective when specified for the text color of choices and anchors.
Sets the text to the default color of choice text while not hovered over.
default.plain
※Only effective when specified for the text color of choices and anchors.
Sets the text to the default color of normal text.

Event Commands

\e

Ends events and messages.
Script written after \e will not be run or displayed.
The effects of several SakuraScript commands will end.

  • Materia
  • SSP
  • CROW

Usage example

This sentence will be displayed.\eFrom here, it will not be displayed.

\-

Closes the software.
When multiple ghosts are open in SSP, only the ghost that ran the command will be closed.

  • Materia
  • SSP
  • CROW

Usage example

After this script is played, the ghost will close.\-

\a

[Old specification] Runs a line of dialogue from randomtalk.
This command is a remnant from the time when all scripts were handled by the baseware, and currently only calls the OnAITalk event.

  • SSP
\![updatebymyself,(option),(option),...]

Starts the network update check event.
Network updates may also be started by the user from the right click menu or the ghost explorer.
Specifying options is exclusive to SSP. Refer to the update option specifications section.

  • Materia
  • SSP
  • CROW

Usage example

A network update will be started.\![updatebymyself]

\![update,platform]

Starts the baseware network update event.
If an update is found, all ghosts will be closed once (running OnBasewareUpdating, or if the ghost has no dialogue for the event OnClose) and restarting (OnBasewareUpdated, or if the ghost has no dialogue for the event OnBoot).
If no update is found, a popup will be displayed and no SHIORI event will be run.

  • SSP
  • CROW

Usage example

The baseware will be updated.\![update,platform]

\![update,(update target),(option),(option),...]

Starts the network update event for the update target.
ghost, shell, and balloon can be specified. Multiple targets may be specified by separating them with +.
If the update target is specified as all, it will have the same effect as \![updatebymyself].
When run as \![update,ghost+shell+balloon], unlike \![updatebymyself], it will ignore SSP's settings and force an update.
If an update is found for a target other than ghost, the SHIORI event OnUpdateOtherReady and other events that replace OnUpdate with OnUpdateOther will be notified, and when all updates are finished OnUpdateResult will be run as a summary of the results.
Specifying options is exclusive to SSP. Refer to the update option specifications section.

  • SSP
  • Usage example

    The shell will be updated.\![update,shell]

    \![updateother,(update target)/(options),...]

    Starts the network update event for the chosen target. Update targets that are not currently open may also be specified.
    Any number of the below options may be specified.
    --balloon=(balloon name)
    --shell=(shell name)
    --plugin=(plugin name)
    --headline=(headline name)
    --language=(language resource name)
    If an update is found the SHIORI event OnUpdateOtherReady and other events that replace OnUpdate with OnUpdateOther will be notified, and when all updates are finished OnUpdateResultEx will be run as a summary of the results.
    Specifying --option is exclusive to SSP. Refer to the update option specifications section.

    • SSP

    Usage example

    The plugins 'shared value' and 'ukaten' will be updated.\![updateother,--plugin=共有変数プラグイン,--plugin=うかてん]

    Update option specifications

    checkonly

    Instead of a normal update event, the SHIORI event OnUpdateCheckComplete, or in the case of failure OnUpdateCheckFailure will be notified, and the update process will be stopped based on whether an update is found or not.
    After all updates have been completed, when using updateother OnUpdateCheckResultEx, or when using other update commands, OnUpdateCheckResult will be run as a summary of the results.

    testonly

    Downloads files as in regular updates, but does not replace the old ones.
    Functions in the same way as the "Update Full Check" option in SSP's Dev. Palette.

    recovery [SSP 2.5.26~]
    Performs an update in recovery mode. In SSP, functions in the same way as updating while pressing the key set in Preferences - Ghost (1) - Enable modifier key of recovery mode.
    Using only files specified as update files on the network side and ignoring local specifications, downloads all files with differing hash values to the local files.
    \6

    Performs the time correction in the clock fixing function.
    Generally, the SHIORI event OnSNTPCompare, which is notified when a connection to the time server has been made, is used.

    • Materia
    • SSP
    • CROW

    Usage example

    The clock will be matched with the server time.\6

    \7

    Starts the clock fixing event.
    The SHIORI event OnSNTPBeginis notified, and once the time is retrieved from the server, the SHIORI event OnSNTPCompare is notified.

    \![executesntp]

    Performs the same function as \7.

    • Materia
    • SSP
    • CROW

    Usage example

    Sends a query to the time server.\![executesntp]

    \![execute,headline,(headline name)]

    Starts the headline sense event.
    If the headline name is specified as random, a random headline will be chosen.
    If specified as lastinstalled, the last headline to be installed will be started.

    • SSP

    Usage example

    A randomly chosen headline will be executed.\![execute,headline,random]

    \![biff,(account name)]

    Starts the mail check event.
    If written as \![biff,(account name)], a mail check for the specified account can be performed.
    Account names are notified with configuredbiffname.

    • Materia
    • SSP (Name specification from 2.5)
    • CROW

    Usage example

    The mail check event will be started.\![biff]

    \![vanishbymyself]

    Uninstalls the ghost without user input.
    It is important to keep in mind that when this command is executed, the uninstallation will happen immediately without a confirmation dialog.
    Whether the ghost will be deleted or not is determined by the user's SSP settings.

    The below options are specifiable in SSP.
    \![vanishbymyself,(ghost name)] Specify the name of the ghost to be switched to after uninstallation. (If not found, the ghost to be switched to will be decided by SSP.)
    \![vanishbymyself,--option=query] 2.5.82: Displays dialog to confirm whether the ghost should be uninstalled or not. Functions the same as when uninstalling from the menu.

    • Materia
    • SSP

    Usage example

    The ghost will delete itself. Use caution when testing the command using the Send Box.\![vanishbymyself]

    \+

    Changes to a random ghost.
    When the ghost is changed by this command, the SHIORI event OnGhostChanging is not notified.

    • Materia
    • SSP

    Usage example

    Random change.\+

    \_+

    Changes to the next ghost in the list (sequential change). The ghost below the current one in the Ghost Explorer is opened.
    If the ghost currently open is at the bottom of the list, the ghost at the top of the list will be opened.
    When the ghost is changed by this command, the SHIORI event OnGhostChanging is not notified.

    • Materia
    • SSP

    Usage example

    Change to the next ghost in the list.\_+

    \![change,ghost,(ghost name),--option=raise-event]

    Changes to the specified ghost.
    If the ghost name is specified as random, it will change to a random ghost (the same as \+).
    If specified as sequential, it will perform a sequential change (the same as \_+).
    After the command is run, if the specified ghost is not installed, it will be ignored.

    If the ghost name is specified as lastinstalled, it will change to the ghost that was installed last. However, if SSP has been closed once since installation, it will not have effect.
    If the ghost name is specified as random, it will change to a random ghost.

    From SSP 2.4.74 onwards, if --option=raise-event is specified after the ghost name, the SHIORI event OnGhostChanging will be notified, as when the ghost is changed from the menu.
    It is important to note that this can be canceled by breaking the balloon (normally with a double-click).
    If not specified, the event will not be notified.

    • Materia
    • SSP
    • CROW

    Usage example

    Changing to Emily/Phase4.5.\![change,ghost,Emily/Phase4.5]

    \![change,shell,(shell name),--option=raise-event]

    Changes to the specified shell.
    If the specified shell does not exist, the command will be ignored.
    After the shell is changed, the SHIORI event OnShellChanged is notified.

    If the shell name is specified as lastinstalled, it will change to the shell that was installed last. However, if SSP has been closed once since installation, it will not have effect.
    If the shell name is specified as random, it will change to a random shell.

    From SSP 2.4.74 onwards, if --option=raise-event is specified after the shell name, the SHIORI event OnShellChanging will be notified in the same way as when changing shells from the menu.
    It is important to note that this can be canceled by breaking the balloon (normally with a double-click).
    If not specified, the event will not be notified.

    • SSP
    • CROW

    Usage example

    Change to the master shell.\![change,shell,master]

    \![change,balloon,(balloon name)]

    Changes to the specified balloon.
    If the specified balloon does not exist, the command will be ignored.
    After changing balloon, the SHIORI event OnBalloonChange is notified.

    If the balloon name is specified as lastinstalled, it will change to the balloon that was installed last. However, if SSP has been closed once since installation, it will have no effect.
    If the balloon name is specified as random, it will change to a random balloon.

    • SSP

    Usage example

    The balloon will be changed to SSP Default+.\![change,balloon,SSPデフォルト+]

    \![call,ghost,(ghost name),--option=raise-event]

    Calls the specified ghost.
    If the ghost name is specified as lastinstalled, it will call the ghost that was installed last.
    If the ghost name is specified as random, it will call a random ghost.

    From SSP 2.4.74 onwards, if --option=raise-event is specified after the ghost name, OnGhostCalling will be notified in the same way as when calling ghosts from the menu.
    When not specified, the event will not be notified.

    • SSP

    Usage example

    The ghost Emily/Phase4.5 will be called.\![call,ghost,Emily/Phase4.5]

    \v

    Brings the window of the ghost to the front. After running this script, it will always be displayed at the frontmost layer.
    However, the layering of the characters (which of the main character and side character is on top) is controlled by the user.

    Effective until the ghost is closed.

    • Materia
    • SSP

    Usage example

    \vAfter running this script, the window of the ghost will be displayed in the frontmost layer.

    \![set,windowstate,stayontop]

    Brings the window of the ghost to the front. After running this script, it will always be displayed at the frontmost layer.

    Effective until the ghost is closed.

    • Materia
    • SSP
    • CROW

    Usage example

    \![set,windowstate,stayontop]After running this script, the window of the ghost will be displayed in the frontmost layer.

    \![set,windowstate,!stayontop]

    Stops displaying the window of the ghost in front. After running this script, overlapping will be handled in the same way as other windows.

    Effective until the ghost is closed.

    • Materia
    • SSP
    • CROW

    Usage example

    \![set,windowstate,!stayontop]After running this script, active windows will be displayed over the ghost's window.

    \![set,windowstate,minimize]

    Minimizes the window.

    • Materia
    • SSP

    Usage example

    The window will be minimized.\![set,windowstate,minimize]

    \![set,wallpaper,(file name),(option)]

    Sets the specified file as the wallpaper.
    Aside from absolute paths, relative paths from ssp.exe can also be used for the file name.
    If the file name is omitted or left blank, the wallpaper settings will be reset (reverted to the OS' default wallpaper).
    The options are as below.

    center
    Displays the image in the center (default setting when the option is omitted).
    tile
    Tiles the image.
    stretch
    Stretches the image to fill the screen, disregarding the proportions of the image.
    stretch-x
    Stretches the image horizontally to meet the edges of the screen, adjusting to keep the relative proportions of the image. Only functions on Windows 7 and later.
    stretch-y
    Stretches the image vertically to meet the edges of the screen, adjusting to keep the relative proportions of the image. Only functions on Windows 7 and later.
    span
    Stretches the image to go over all screens in a multi-screen environment. Only functions on Windows 10 and later.
    • SSP

    Usage example

    Sets Emily/Phase4.5's thumbnail as the wallpaper.\![set,wallpaper,ghost/emily4/thumbnail.png]

    \![set,tasktrayicon,(file name).ico,(text),--duration=(wait time),--runcount=(times to repeat)]

    Uses the specified icon file as the icon in the notification area (system tray).
    Relative filepaths from [(folder of the ghost executing the command)] or [(folder of the ghost executing the command)]/ghost/master can be used.
    Text is displayed when hovering the mouse cursor over the icon, and can be omitted. The default is SSP/[(name of the currently running ghost)], e.g. [SSP/Emily/Phase4.5].
    The icon can be animated by specifying --duration=(wait time) (ms). When doing so, after specifying filename.ico, multiple files will be loaded in the order of the numbers following the file name (filename00.ico, filename01.ico, and so on), displaying each frame after the specified wait time has passed. [SSP 2.5.58~]
    If --runcount is specified in addition to --duration, the number of times to repeat the animation can be set. If left unspecified, the animation will repeat indefinitely. [SSP 2.5.59~]

    • SSP

    Usage example

    \![set,tasktrayicon,normal.ico,ghost/normal mode] Sets the icon to normal.ico in [(folder of the ghost executing the command)]/ghost/master, and changes the message displayed when the mouse cursor is over it to "ghost/normal mode."

    \![set,trayballoon,(option),(option),(option),...]

    Displays a system tray notification balloon.
    OnTrayBalloonClick is run when the balloon is closed by being clicked on.
    OnTrayBalloonTimeout is run when the balloon is closed with the close button or from timing out.
    The specifiable options are as below.

    --text=(text)
    The string to be displayed in the main body of the balloon. Multiple lines can be written by specifying this option more than once.
    --title=(title)
    The balloon title.
    --icon=(icon setting name)
    The setting for the icon to be displayed on the balloon.
    info
    Information icon.
    error
    Error icon.
    warning
    Warning icon.
    none
    None.
    --timeout=(time in seconds)
    The length of time that the balloon will be displayed (units are in seconds). Only values from 10–30 are specifiable. This option is ignored in Windows 7 or later.
    • SSP

    Usage example

    \![set,trayballoon,--text=Due to an error, a process has failed.,--title=Error occurred,--icon=error]

    \![set,otherghosttalk,(true|false|before|after)]

    Sets whether OnOtherGhostTalk will be notified or not. The default value is false.
    When set to a value other than false, OnOtherGhostTalk will be notified when other ghosts that are open at the same time talk.
    Notifications happen before the other ghost talks when set to before and after talking when set to after. Specifying true is the same as specifying after.

    Effective until the ghost is closed.

    • SSP

    Usage example

    \![set,otherghosttalk,true]After this, OnOtherGhostTalk will be notified every time other currently open ghosts finish talking.

    \![set,othersurfacechange,(true|false)]

    Sets whether OnOtherSurfaceChange will be notified or not. The default value is false.
    When set to true, OnOtherSurfaceChange will be notified when other ghosts that are open at the same time change surfaces.

    • SSP

    Usage example

    \![set,othersurfacechange,true]After this, OnOtherSurfaceChange will be notified every time other currently open ghosts change surfaces.

    \![raise,(event name),(r0),(r1),(r2),...]

    Raises an event.
    Values from the third argument onwards are stored in order starting from Reference0.

    • Materia
    • SSP
    • CROW

    Usage example

    When the raise command at the end of this dialog is run, the SHIORI event OnRaiseTest will be notified by SSP. "test" will be stored in Reference0.\![raise,OnRaiseTest,test]

    \![embed,(event name),(r0),(r1),(r2),...]

    A special tag that "embeds" the results of an event into the script currently being run in real-time.
    The option arguments use the same method as \![raise], and values from the third argument onwards are stored in order starting from Reference0.

    When a script finds an \![embed] tag while running, the specified event is called, and in the case that a result is returned, the entire \![embed] tag is replaced with the resulting string, with the script continuing to run from the first letter of the string that replaced the tag.
    (※Made to offer wider and more general functioning than the Satori in-script SAORI calling mechanism "sync.")

    At first, this tag was implemented as a function to run entirely within a single execution of a script, by usage alongside the property system, with the property system call itself returning no results, and then dynamically changing the process depending on the result from an \![embed] tag placed directly afterwards. However, there are no such restrictions, and it is possible to synchronize with the script execution and process multiple things simultaneously.

    • SSP

    Usage example

    At the end of this dialog, the results of the execution of the SHIORI event OnEmbedTest will be displayed. Contrary to raise, the results are contained within the same script, so SakuraScript effects that would become ineffective with the end of a script (such as font changes) will continue to be effective.\![embed,OnEmbedTest]

    When this script is run on a Satori template, a line of randomtalk will be appended to this dialog.\![embed,OnTalk]

    \![timerraise,(time),(repetition),(event name),(r0),(r1),(r2),...]

    Raises an event with a wait time specified.
    If repetition is specified as 0, the event will be run every time the specified amount of time passes, and if any values that are 1 or higher are specified, the event will only be run once.
    Values from the fifth argument onwards are references.
    Multiple events with different names can be specified separately, but if an event of the same name is raised more than once, the first setting will be overwritten.
    Can be canceled by running SakuraScript specifying the same event with a wait time of 0.
    The timer is kept after network updates.

    Effective until the specified event runs when repetition is specified as 0. Effective until the ghost is closed when repetition is specified as 1 or higher.

    • SSP

    Usage example

    \![timerraise,5000,1,OnTimerraiseTest,test]In 5 seconds (5000 milliseconds), OnTimerraiseTest will be run. The time is counted starting from the moment the SakuraScript is run.\![timerraise,0,1,OnTimerraiseTest] The timer that was set earlier has been canceled.

    \![raiseother,(ghost name),(event name),(r0),(r1),(r2),...]

    Sends an event notification to another currently running ghost.
    Values from the fourth argument onwards are references.
    If the ghost name is specified as __SYSTEM_ALL_GHOST__, a notification will be sent to all other running ghosts.
    The ghost name can only be specified directly. Multiple can be specified by separating them using the byte value 1.

    • SSP

    Usage example

    \![raiseother,Emily/Phase4.5,OnRoastedPotato,sweet potato]If currently open, Emily/Phase4.5 will receive OnRoastedPotato as a notification. Reference0 stores the value sweet potato.

    \![timerraiseother,(time),(repetition),(ghost name),(event name),(r0),(r1),(r2),...]

    Sends an event notification to another currently running ghost with a wait time specified (milliseconds).
    If repetition is specified as 0, the event will be run every time the specified amount of time passes, and if any values that are 1 or higher are specified, the event will only be run once.
    Values from the sixth argument onwards are references.
    Multiple events with different names can be specified separately, but if an event of the same name is raised more than once, the first setting will be overwritten.
    Can be canceled by running SakuraScript specifying the same event with a wait time of 0.
    If the ghost name is specified as __SYSTEM_ALL_GHOST__, a notification will be sent to all other running ghosts.
    Multiple ghost names can be specified by separating them using the byte value 1.

    • SSP

    Usage example

    \![timerraiseother,30000,0,Emily/Phase4.5,OnRoastedPotato,sweet potato]If currently open, Emily/Phase4.5 will receive OnRoastedPotato as a notification every 30 seconds (30000 milliseconds). Reference0 stores the value sweet potato.\![timerraiseother,0,1,Emily/Phase4.5,OnRoastedPotato] The repeat notification has been canceled.

    \![raiseplugin,(plugin ID or plugin name),(event name),(r0),(r1),(r2),...]

    Sends the specified event to the plugin.
    If the plugin name is specified as random, a random plugin will be chosen.
    If specified as lastinstalled, the last installed plugin will be started.

    • SSP

    Usage example

    \![raiseplugin,StampCollection,OnStampAdd,[(folder of the ghost executing the command)]/ghost/master/stamp.png,MyStamp,I gave you my stamp.]Registers the image from (folder of the ghost executing the command) and message to the plugin StampCollection.

    \![timerraiseplugin,(time),(repetition),(plugin ID or plugin name),(event name),(r0),(r1),(r2),...]

    Sends the specified event to the plugin with a wait time specified (milliseconds).
    If repetition is specified as 0, the event will be run every time the specified amount of time passes, and if any values that are 1 or higher are specified, the event will only be run once.
    Multiple events with different names can be specified separately, but if an event of the same name is raised more than once, the first setting will be overwritten.
    Can be canceled by running SakuraScript specifying the same event with a wait time of 0.

    • SSP

    Usage example

    \![timerraiseplugin,60000,0,Jittaika,OnMenuExec]Runs the plugin Jittaika every 60 seconds (60000 milliseconds).\![timerraiseplugin,0,0,Jittaika,OnMenuExec] The repeat notification has been canceled.

    \![notify,(event name),(r0),(r1),(r2),...]

    Runs a Notify event.
    Values from the third argument onwards are references.
    Functionally almost the same as \![raise,(event name),(r0),(r1),(r2),...], differing only in that any values from this notification event will not be output by SSP.

    • SSP

    Usage example

    \![notify,OnNotifyTest,test]OnNotifyTest is notified, and test is stored in Reference0. Even if there is dialog in OnNotifyTest, it will not be output by SSP.

    \![notifyother,(ghost name),(event name),(r0),(r1),(r2),...]

    Sends a Notify event notification to another currently running ghost.
    Values from the fourth argument onwards are references.
    If the ghost name is specified as __SYSTEM_ALL_GHOST__, a notification will be sent to all other running ghosts.
    Multiple ghost names can be specified by separating them using the byte value 1.
    Functionally almost the same as \![raiseother,(ghost name),(event name),(r0),(r1),(r2),...], differing only in that any values from this notification event will not be output by SSP.

    • SSP

    Usage example

    \![notifyother,Emily/Phase4.5,OnRoastedPotato,sweet potato]If currently open, Emily/Phase4.5 will receive OnRoastedPotato as a notification. Reference0 stores the value sweet potato. Even if Emily/Phase4.5 says something in response to this notification event, nothing will be displayed in the balloon.

    \![notifyplugin,(plugin ID or plugin name),(event name),(r0),(r1),(r2),...]

    Sends the specified Notify event to the plugin.
    If the plugin name is specified as random, a random plugin will be chosen.
    If specified as lastinstalled, the last installed plugin will be started.
    Functionally almost the same as \![raiseplugin,(plugin ID or plugin name),(event name),(r0),(r1),(r2),...], differing only in that any values from this notification event will not be output by SSP.

    • SSP

    Usage example

    \![notifyplugin,StampCollection,OnStampAdd,[(folder of the ghost executing the command)]/ghost/master/stamp.png,MyStamp,I gave you my stamp.]Calls the registration event of the plugin StampCollection with notify. The plugin and subsequent processes will run, but responses to the ghost will be ignored.

    Sound Commands

    \8[(file name)]

    Plays a wave file from the folder of the ghost.

    \_v[(file name)]

    The baseware plays a wave, mp3, or wma file. Absolute paths or relative paths from [(folder of the ghost executing the command)]/ghost/master can be specified.
    The command is ignored if the folder does not exist.

    • Materia
    • SSP
    • CROW

    Usage example

    \_v[se/test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master/se is being played.

    \_V

    Waits until the playback of the file played by \_v ends.
    The command is ignored if it has already ended or the folder does not exist.

    • Materia
    • SSP
    • CROW

    Usage example

    \_v[se/test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master/se is being played.\_V This sentence will be displayed only once the playback ends.

    \![sound,play,(file name),(option),...]

    Functionally the same as \_v. However, options may be specified.

    • SSP (Options are from 2.4 onwards)

    Usage example

    \![sound,play,test.mp4,--sound-only=true,--window=true]The video file test.mp4 in the folder [(folder of the ghost executing the command)]/ghost/master is being played. However, the seek bar will be continuously displayed, and only sound will be played.

    \![sound,load,(file name),(option),...]

    Load the file in advance so that it can be played immediately when requested. The specification method is the same as play.

    • SSP 2.4
    \![sound,cdplay,(Track No.)]

    SSP plays a music CD. The command is ignored if there is no music CD.
    \_V is ignored, even while playing a track. Specifying another track with \![sound,cdplay,(track no.)] during playback will also be ignored. Instead, \![sound,stop] should be used to stop the playback once before specifying the next track.

    • SSP

    Usage example

    \![sound,cdplay,6]The sixth track on a music CD is being played.

    \![sound,loop,(file name)]

    Loops a track. \_V does not apply to this command.
    Playback can be stopped with \![sound,stop].

    • SSP

    Usage example

    \![sound,loop,test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master is being played.\![sound,stop] The playback has stopped looping.

    \![sound,wait]

    Functionally the same as \_V.

    • SSP

    Usage example

    \![sound,play,test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master is being played.\![sound,wait] This sentence will be displayed only once the playback ends.

    \![sound,pause,(file name)]

    Pauses the playback. When the file name is omitted, all sounds currently being played will be paused.

    • SSP

    Usage example

    \![sound,loop,test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master is being played.\![sound,pause] The playback is paused as this sentence is displayed.

    \![sound,resume,(file name)]

    Unpauses playback. When the file name is omitted, all paused sounds will be unpaused.

    • SSP

    Usage example

    \![sound,loop,test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master is being played.\![sound,pause] The playback is paused as this sentence is displayed.\![sound,resume] The playback is resumed from where it was stopped.

    \![sound,stop,(file name)]

    Stops playback entirely. Differs from pause in that it releases the sound data entirely and stops playback. In some cases, other sound data cannot be played without using this command to stop the original playback.
    When the file name is omitted, all sounds currently being played will be stopped.

    • SSP

    Usage example

    \![sound,loop,test.wav]The file test.wav in the folder [(folder of the ghost executing the command)]/ghost/master is being played.\![sound,stop] The playback is stopped entirely.

    \![sound,option,(file name),(option),...]

    Changes options during playback.

    • SSP 2.4

    sound play/load/option options

    --volume=0–100
    Adjusts the playback volume. The maximum value is 100. However, this option cannot control the volume of the whole OS.
    --balance=-100–0–100
    Adjusts the right and left balance when playing stereo. -100 is the full left value and 100 is the full right value.
    --rate=1–100–10000
    Adjusts the playback speed. 100 is the default speed.
    --window=false/true (=OFF/ON)
    Whether or not to display a window with the seek bar. When set as true, it will be displayed even if only sound is being played. If left unspecified, sound will not have a seek bar, whereas videos will.
    --sound-only=false/true (=OFF/ON)
    Only specifiable with load. Plays only the sound of a video file. If left unspecified, it will function the same as specifying false.

    Open Commands

    \j[ID]

    Jumps to the ID.
    Jumps to a URL with http://~.
    Executes a file with file:///~ and a file extension related to the OS. Aside from absolute paths, relative paths from [(folder of the ghost executing the command)]/ghost/master can also be used for the file name.
    ※SSP only: Creates a new email to the specified address with mailto:~.

    • Materia
    • SSP
    • CROW

    Usage example

    \j[http://ssp.shillest.net/]Opens the browser and displays the SSP BUGTRAQ Lab.

    \j[file:///descript.txt]Opens the descript.txt file in the folder [(folder of the ghost executing the command)]/ghost/master.

    \![open,browser,(parameter)]

    Opens the browser set in the baseware.
    This is set in the Applications -> Browser option in the baseware settings, accessed from the user menu.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,browser,http://ssp.shillest.net/]Displays the SSP BUGTRAQ Lab in the browser specified in SSP's Preference settings.

    \![open,mailer,(parameter)]

    Opens the mailer set in the baseware.
    This is set in the Applications -> Mailer option in the baseware settings, accessed from the user menu.

    • Materia
    • SSP

    Usage example

    \![open,mailer,test@example.com]Opens a mailer with the address test@example.com in the To: field.

    \![open,editor,(file),(display line number)]

    Edits the specified file with the editor set in the baseware.
    This is set in the Applications -> Editor option in the baseware settings, accessed from the user menu.
    The display line number moves the cursor to the specified line in advance when the file is opened.

    When an editor is not specified, this command has the same behaviour as choosing Edit after right clicking the file in a file manager. The display line number is ignored in this situation.

    • SSP 2.5.16
    \![open,explorer,(file)]

    Opens the file location of the specified file with the file manager set in the baseware.
    This is set in the Applications -> File Manager option in the baseware settings, accessed from the user menu.

    When a file manager is not specified, if the file argument is a folder it is opened, and if it is a file, its location will be opened in Explorer with the file in a selected state.

    If written as \![open,explorer,(type=ghost/shell/balloon/headline/plugin),(name)], the type and name of folder to be opened can be specified.
    Ex: \![open,explorer,ghost,Emily/Phase4]

    • SSP 2.5.12
    \__t

    [Old specification] Opens the TeachBox.

    \![open,teachbox]

    Opens the TeachBox. On execution, OnTeachStart is notified, OnTeach is notified when the TeachBox OK button is pressed, and OnTeachInputCancel is notified when the TeachBox is closed.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,teachbox]The TeachBox is opened.

    \![close,teachbox]

    Closes the TeachBox.
    It is important to keep in mind that OnTeachInputCancel will not be notified.

    • SSP

    Usage example

    \![close,teachbox]The TeachBox is closed. If not open, this command will be ignored.

    \__c

    [Old specification] Opens the CommunicateBox.

    \![open,communicatebox]

    Opens the CommunicateBox.
    After input has been confirmed, OnCommunicate will be run, and if the CommunicateBox is closed OnCommunicateInputCancel will be run.
    In SSP only, the default text may also be specified (by using \![open,communicatebox,(text)]).
    In SSP only, ※options may be specified using --option=○○. Omission is also possible.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,communicatebox,test]The CommunicateBox is opened. The word "test" is in the text box from the start.

    \![open,communicatebox,--text=test]The same happens as above (an example of writing the command with an option specification).

    \![close,communicatebox]

    Closes the CommunicateBox.
    It is important to keep in mind that OnCommunicateInputCancel will not be notified.

    • SSP

    Usage example

    \![close,communicatebox]The CommunicateBox is closed. If not open, this command will be ignored.

    \![open,inputbox,(ID),(display time),(text),(option),...]

    Opens the InputBox.
    The SHIORI event OnUserInput is run on confirmation (when the OK button is pressed).
    OnUserInputCancel is run when the display time has passed (timed out) or when the close button was pressed.
    Moreover, measures were taken to prevent any other interaction with the ghost during input, however, SSP does not have these.


    The ID is stored in OnUserInput, which runs on confirmation, but if the ID starts with On, the event beginning with On will run instead. ※Refer to ID.
    The display time is specified in milliseconds. If omitted or 0 or lower is specified, there will be no time limit.
    The text argument is the text that will be displayed as soon as the InputBox is opened (incompatible with CROW) and can be omitted.
    In SSP only, ※options may be specified using --option=○○. Omission is also possible.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,inputbox,inputtest,10000,Test Input]Opens the InputBox with the text "Test Input" already in it. It will be closed either manually when the OK button is pressed or automatically 10 seconds pass.

    \![open,inputbox,inputtest,--timeout=10000,--text=Test Input]The same happens as above (an example of writing the command with the new option specifications).

    \![open,passwordinput,(ID),(display time),(text),(option)]

    Opens an InputBox that hides the characters. Other than that, functions the same as inputbox.

    • SSP

    Usage example

    \![open,passwordinput,passwordtest,-1,--option==noclose]An InputBox with the characters hidden by ● has been opened. Neither time passing nor pressing the OK button will close it. It can be closed if the close button is pressed.

    \![open,passwordinput,passwordtest,--timeout=-1,--option==noclose]The same happens as above (an example of writing the command with the new option specifications).

    \![open,dateinput,(ID),(display time),(year),(month),(day),(option)]

    Opens a date InputBox.
    The display time is specified in milliseconds.
    Year, month, and day are the initial values.
    The SHIORI event OnUserInput is run on confirmation, and Reference1 stores the year,month,day separated by commas.
    OnUserInputCancel is run when the display time has expired (timeout), or when the close button is pressed.
    If it times out, it will contain "Timeout."
    ※Options may be specified using --option=○○.
    Other than that, functions the same as inputbox.

    • SSP

    Usage example

    \![open,dateinput,dateinputtest,30000,2012,12,23]An InputBox with the initial values of the date 2012,12,23 has been opened. It will timeout after 30 seconds.

    \![open,dateinput,dateinputtest,--timeout=30000,--text="2012,12,23"]The same happens as above (an example of writing the command with the new option specifications).

    \![open,sliderinput,(ID),(display time),(current value),(minimum),(maximum),(option)]

    Opens an InputBox with a slider.
    The SHIORI event OnUserInput is run on confirmation, and Reference1 stores the input value.
    ※Options may be specified using --option=○○.
    Other than that, functions the same as inputbox.
    The minimum possible value is -2147483648 and the maximum is 2147483647.

    • SSP

    Usage example

    \![open,sliderinput,slidertest,30000,50,0,100]A slider-type InputBox with an initial value of 50, a minimum value of 0, and a maximum value of 100 has been opened. It will timeout after 30 seconds.

    \![open,sliderinput,slidertest,--timeout=30000,--text="50,0,100"]The same happens as above (an example of writing the command with the new option specifications).

    \![open,timeinput,(ID),(display time),(hour),(minute),(second),(option)]

    Opens a time InputBox.
    Hour, minute, and second are the initial values. Uses 24 hour time.
    The input value is stored in OnUserInput's Reference1 as hour,minute,second separated by commas.
    ※Options may also be specified using --option=○○.
    Other than that, functions the same as inputbox.

    • SSP

    Usage example

    \![open,timeinput,timeinputtest,30000,23,45,12]An InputBox with the initial values of 23,45,12 has been opened. It will timeout after 30 seconds.

    \![open,timeinput,timeinputtest,--timeout=30000,--text="23,45,12"]The same happens as above (an example of writing the command with the new option specifications).

    \![open,ipinput,(ID),(display time),(IP line 1),(IP line 2),(IP line 3),(IP line 4),(option)]

    Opens an IP address InputBox.
    Due to input limitations on Windows, only IPv4 addresses will be accepted.
    ※Options may also be specified using --option=○○.
    Other than that, functions the same as inputbox.

    • SSP

    Usage example

    \![open,ipinput,ipinputtest,30000,192,168,0,1]

    \![open,ipinput,ipinputtest,--timeout=30000,--text="192,168,0,1"]

    \![close,inputbox,(ID)]

    Closes the type of InputBox specified in the ID argument (date, time, slider, password are included). Specifying __SYSTEM_ALL_INPUT__ will close all boxes.

    • SSP

    Usage example

    \![close,inputbox,timeinputtest]The InputBox with the ID timeinputtest has been closed.\![close,inputbox,__SYSTEM_ALL_INPUT__] All InputBoxes have been closed.

    \![open,configurationdialog,(dialog ID)]

    Opens the configuration dialog (baseware settings, accessed from the user menu).
    The dialog ID specifies which section to show (when omitted, it will be the last opened section).
    Refer to the SHIORI Event ※OnConfigurationDialogHelp's Reference0.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,configurationdialog,talk]The Talk/Balloon tab of the SSP baseware settings has been opened.

    \![open,ghostexplorer]

    Opens the Ghost Explorer.
    Can also be opened from the user menu.
    The below explorers can also be manually changed to from the Ghost Explorer's Type section (T).

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,ghostexplorer]The Ghost Explorer has been opened.

    \![open,shellexplorer]

    Opens the Shell Explorer. Only shells for the currently open ghosts will be displayed.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,shellexplorer]The Shell Explorer has been opened.

    \![open,balloonexplorer]

    Opens the Balloon Explorer.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,balloonexplorer]The Balloon Explorer has been opened.

    \![open,headlinesensorexplorer]

    Opens the Headline Explorer.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,headlinesensorexplorer]The Headline Explorer has been opened.

    \![open,pluginexplorer]

    Opens the Plugin Explorer.

    • SSP

    Usage example

    \![open,pluginexplorer]The Plugin Explorer has been opened

    \![open,rateofusegraph]

    Displays the ghost usage rate graph.

    • Materia
    • SSP
    • CROW

    Usage example

    \![open,rateofusegraph]The ghost usage rate graph is being displayed.

    \![open,rateofusegraphballoon]

    Opens the balloon usage rate graph. In environments that are not compatible, it will behave the same way as when rateofusegraph has been executed.

    • Materia
    • SSP 2.3.77

    Usage example

    \![open,rateofusegraphballoon]The balloon usage rate graph is being displayed.

    \![open,rateofusegraphtotal]

    Displays the ghost usage rate (totals) graph. Currently only compatible with Materia (other baseware will behave the same way as when rateofusegraph has been executed).

    • Materia
    \![open,calendar]

    Opens the calendar.

    • SSP

    Usage example

    \![open,calendar]The calendar has been opened.

    \![open,help,(dialog ID)]

    Opens the SSP help page.
    Specifying a configuration section's ID name (refer to ※OnConfigurationDialogHelp's Reference0) will open the related help page. Opens the index page if omitted.

    • SSP

    Usage example

    \![open,help,talk]Opens the Talk/Balloon section of the http://ssp.shillest.net/ukadoc/ssphelp/ page.

    \![open,messenger]

    Opens the instant messenger.
    Can also be opened from the user menu's Utilities (F) -> SSP Messenger (Ctrl+M).

    • SSP

    Usage example

    \![open,calendar]The instant messenger has been opened.

    \![open,readme]

    Opens readme.txt.
    When no further arguments have been specified, opens the file specified as the readme in the currently running ghost's [(folder of the ghost executing the command)]/ghost/master/descript.txt.
    When \![open,readme,(type=ghost/shell/balloon/headline/plugin),(name)], the specified readme file will be opened. Ex: \![open,readme,ghost,Emily/Phase4]

    • SSP

    Usage example

    \![open,readme]readme.txt has been opened.

    \![open,terms]

    Opens the terms and conditions dialog using [(folder of the ghost executing the command)]/terms.txt.
    Nothing occurs (error sound only) if terms.txt does not exist.
    This command stops user interaction by force with the dialog, so overuse should be avoided.

    • SSP 2.5.33

    Usage example

    \![open,terms]terms.txt has been opened.

    \![open,file,(file name)]

    Executes a file. Absolute paths or relative paths from [(folder of the ghost executing the command)]/ghost/master/ can be specified.
    The Windows environment variables (%SYSTEMROOT%,%SYSTEM%, %TEMP% etc.) can be used.
    When the file to be executed is specified as the file name, the path will be searched for automatically.

    • SSP

    Usage example

    \![open,file,shell/master/surface0.png]surface0.png in the shell/master has been opened.

    \![open,file,%ComSpec%]The command prompt has been opened.

    \![open,file,TortoiseProc.exe]Automatically searches for the path and executes TortoiseSVN if it is installed.

    \![open,dialog,open,(parameter)]

    Opens the file opening dialog. Selecting a file with this dialog will not open the file.
    The SHIORI event OnSystemDialog is run on confirmation, and Reference0 stores "open" and Reference2 stores the file path, so the actual process is made and executed by each ghost creator.
    The SHIORI event OnSystemDialogCancel is run when closed.
    Specifications for the parameter argument are as below, and multiple may be specified by separating them with commas.

    • SSP

    Usage example

    \![open,dialog,open,--title=Open dialog display test,--dir=C:/SSP/ghost/emily4/ghost/master,--filter=DictionaryFiles|dic*.txt;*.dic;*.aym;*.kis|AllFiles|*.*,--id=testdialog]Using the [(folder of the ghost executing the command)]/ghost/master folder of Emily/Phase4.5 as the initial position, displays only dic~.txt, ~.dic, ~.aym, ~.kis files if SSP exists in a folder named SSP in the C drive.

    \![open,dialog,save,(parameter)]

    Opens the file saving dialog. Saving a file with this dialog will not save the file.
    The SHIORI event OnSystemDialog is run on confirmation, and Reference0 stores "save" and Reference2 stores the file path, so the actual process is made and executed by each ghost creator.
    The SHIORI event OnSystemDialogCancel is run when closed.
    Specifications for the parameter argument are as below, and multiple may be specified by separating them with commas.

    • SSP

    Usage example

    \![open,dialog,save,--title=Save dialog display test,--dir=__system_mydocument__,--filter=Text files|*.txt;*.dic,--ext=txt,--name=test,--id=Test saving dialog]Using the My Documents folder as the initial position, displays only .txt and .dic files, opening the saving dialog for the initial file name test.txt.

    \![open,dialog,folder,(parameter)]

    Opens the folder selection dialog. Selecting a folder with this dialog will not lead to anything happening.
    The SHIORI event OnSystemDialog is run on confirmation, and Reference0 stores "folder" and Reference2 stores the folder path, so the actual process is made and executed by each ghost creator.
    The SHIORI event OnSystemDialogCancel is run when closed.
    Specifications for the parameter argument are as below, and multiple may be specified by separating them with commas.

    • SSP

    Usage example

    \![open,dialog,folder,--title=Folder selection dialog display test,--id=OnTestFolderDialog]Opens the folder selection dialog using the previously opened location as the initial position. The specified ID name OnTestFolderDialog starts with On, so when Save is pressed, the SHIORI event OnTestFolderDialog is notified.

    \![open,dialog,color,(parameter)]

    Opens the color palette dialog. Specifying a color with this dialog will not lead to anything happening.
    The SHIORI event OnSystemDialog is run on confirmation, and Reference0 stores "color" and Reference2 stores the selected color in the R,G,B format, so the actual process is made and executed by each ghost creator.
    The SHIORI event OnSystemDialogCancel is run when closed.
    Specifications for the parameter argument are as below, and multiple may be specified by separating them with commas.

    --color=R G B
    Specify RGB from 0 to 255 for each value.
    --id=event ID
    The ID to send to OnSystemDialog/OnSystemDialogCancel.
    When the event ID starts with On, the event of that name will be run. References contain the same information as OnSystemDialog.
    The value of Reference0 is fixed as "color."
    • SSP

    Usage example

    \![open,dialog,color,--color=255 0 0,--id=Test color dialog]Opens the color palette dialog with red as the initial display color.

    \![close,dialog,(ID)]

    Closes the dialog with the specified event ID. Specifying __SYSTEM_ALL_INPUT__ will close all dialogs.

    • SSP

    Usage example

    \![close,dialog,Test color dialog]Out of all currently displayed dialog boxes, closes those with the ID "Test color dialog" only." When a dialog is closed, OnSystemDialogCancel is notified.

    \![open,surfacetest]

    Opens the surface test dialog. If Developer Mode is not turned on in the baseware settings, the command will be ignored.

    • SSP

    Usage example

    \![open,surfacetest]The surface test dialog has been opened.

    \![open,aigraph]

    Opens the AI graph. If the ghost executing the command does not react to the SHIORI resource getaistate, nothing will happen.

    • SSP

    Usage example

    \![open,aigraph]The AI graph has been opened.

    \![open,developer]

    Opens the developer palette. If Developer Mode is not turned on in the baseware settings, the command will be ignored.

    • SSP 2.5.78
    \![open,shiorirequest]

    Opens the SHIORI Request send palette. If Developer Mode is not turned on in the baseware settings, the command will be ignored.

    • SSP 2.5.78

    InputBox Options

    Specified in the format ○○.

    --option=(noclose|noclear)
    noclose: Continues to display the InputBox even after input has been finished.
    noclear: Continues to display the input contents event after input has been finished.
    Must be specified with noclose (Ex: \![inputbox,inputcontents,,,--option=noclose,--option=noclear])
    Does not affect special InputBoxes (slider, password, time, date).
    --text=Default display
    The string to display before user input.
    Assigns the default value, minimum, and maximum for sliderinput/year, month, and day for dateinput/hour, minute, and second for timeinput.
    --timeout=Milliseconds until timeout
    The time until the InputBox closes automatically. If zero or below is specified, it will not close.
    --balloon=ID
    If an ID from the ? in balloonc?.png/txt is specified, the image of that ID will be used.
    When left unspecified, the default ID for each InputBox will be used. (SSP 2.6.23)
    --limit=Character limit
    The limit on the amount of characters that can be entered in the InputBox.
    --reference=Additional information
    Adds the specified additional information to the Reference2 onwards of a specified event starting with On, or the Reference3 onwards of OnUserInput.

    InputBox IDs

    On confirmation, OnUserInput is run, but if a string starting with On is specified for the ID, the event of the ID name will run instead.
    For OnUserInput, Reference0 stores the specified ID name and Reference1 stores the input contents, but if the ID name is an event, Reference0 will store the input contents.

    Example
    When something is input and confirmed with \![open,inputbox,inputtest,10000,Test Input]:

    • OnUserInput is run
    • Reference0 is "inputtest"
    • Reference1 is the input content
    • Reference2 is the supplementary information. (Only sliderinput's minimum and maximum; others will be left blank)
    • Reference3 onwards is additional information specified with --reference=.

    When something is input and confirmed with \![open,inputbox,OnInputTest,10000,Test Input]:

    • OnInputTest is run
    • Reference0 is the input content
    • Reference1 is the supplementary information. (Only sliderinput's minimum and maximum; others will be left blank)
    • Reference2 onwards is additional information specified with --reference=.

    Regardless of the ID, when the close button is pressed or the InputBox timed out, OnUserInputCancel will run.

    Parameters for opening files / saving files / selecting folders / selecting the color palette

    --title=Text
    The text to be displayed in the dialog title bar.
    When omitted, if the open dialog it will display Open File, if the save dialog then Save File, if the folder dialog then it will be blank, if the color dialog then Colour.
    --dir=Path

    The initial display folder. Specified with absolute paths.
    When omitted, the last folder opened with a dialog will be displayed.


    The below special folders in Windows may be specified as a part of the path.
    __system_mydocument__
    __system_mypictures__
    __system_myvideo__
    __system_mymusic__
    __system_desktop__

    --filter=Filter
    Written as BMP|*.bmp|Others|*.png;*.gif
    Only effective with the open dialog and save dialog.
    --ext=Extension
    The standard extension for saving a file.
    Only effective with the save dialog.
    --name=File name
    The standard file name for saving a file.
    Only effective with the save dialog.
    --id=Event ID
    IDs sent to OnSystemDialog/OnSystemDialogCancel
    If the event ID begins with On, the event of that ID will run. The contents of the References are the same as OnSystemDialog.
    Depending on the dialog type, Reference0 will contain one of open, save, or folder.

    Property System Manipulation Commands

    \![set,property,(property name),(value)]

    Inputs a value into the property system.
    ※Refer to the Property System page for details about the property system.

    • SSP
    • CROW

    Usage example

    \![set,property,currentghost.shelllist(master).menu,hidden]Hides the master shell in the Shell (S) section of the user menu, preventing the user from changing to it manually.\![set,property,currentghost.shelllist(master).menu,] Makes the master shell visible in the user menu again.

    \![get,property,(event name),(property name),(property name),...]

    Gets a property system value.
    The event specified is run, and each property system value is stored in references from reference0 onwards.
    ※Refer to the Property System page for details about the property system.

    • SSP
    • CROW

    Usage example

    After executing this script, the SHIORI event SSPGetBalloonInformation is notified. Reference0 stores the width of the current balloon that can be used by the main character (in pixels), and Reference1 stores the height. \![get,property,SSPGetBalloonInformation,currentghost.balloon.scope(0).validwidth.initial,currentghost.balloon.scope(0).validheight.initial]

    Miscellaneous Commands

    \![execute,http-get,(URL)]

    Executes an http get request and stores the response in a file.
    The file is stored in the [(folder of the ghost executing the command)]/ghost/master/var folder.

    • Materia
    • SSP

    Usage example

    \![execute,http-get,https://ukagakadreamteam.github.io/ukadoc/manual/list_sakura_script.html]Gets the UKADOC SakuraScript page (this page), and saves list_sakura_script.html in the var folder.

    \![execute,http-get,(URL),(parameter)]

    Executes an http get request with a parameter and stores the response in a file.
    The file is stored in the [(folder of the ghost executing the command)]/ghost/master/var folder.

    • SSP

    Usage example

    \![execute,http-get,http://search.yahoo.co.jp/search,p=SSP Ukagaka]Saves the Yahoo search result pages for "SSP Ukagaka" as is.

    \![execute,http-post,URL,(parameter)]

    Executes an http post request with a parameter and stores the response in a file.
    The file is stored in the [(folder of the ghost executing the command)]/ghost/master/var folder.

    • SSP

    Usage example

    \![execute,http-post,http://jbbs.shitaraba.net/bbs/read.cgi/computer/44300/1432574039/,BBS=44300&KEY=1432574039&DIR=computer&MESSAGE=Test message]Sends "Test message" to the test thread in the ghost messaging board ゴースト回覧板3rd. ※Currently not possible due to the messaging board host strengthening anti-spam measures.

    \![execute,http-get,(URL),(option),(option),(option),...]

    Executes an http get request with ※options and stores the response in a file.
    The file is stored in the [(folder of the ghost executing the command)]/ghost/master/var folder.

    • SSP

    Usage example

    \![execute,http-get,http://search.yahoo.co.jp/search,--async=SSP Ukagaka,--file=searchresultsfile.txt,--nodescript,--param=p=SSP Ukagaka,--timeout=5]Saves the Yahoo search result pages for "SSP Ukagaka" to [(folder of the ghost executing the command)]/ghost/master/var/searchresultsfile.txt When executing the request, the online marker and download status number will not be shown. If there is no response after 5 seconds, it will timeout.

    \![execute,http-post,URL,(option),(option),(option),...]

    Executes an http post request with ※options and stores the response in a file.
    The file is stored in the [(folder of the ghost executing the command)]/ghost/master/var folder.

    • SSP

    Usage example

    \![execute,http-post,http://jbbs.shitaraba.net/bbs/read.cgi/computer/44300/1432574039/,--async=書き込みテスト,--param=BBS=44300&KEY=1432574039&DIR=computer&MESSAGE=Test message]Sends "Test message" to the test thread in the ghost messaging board ゴースト回覧板3rd. ※Currently not possible due to the messaging board host strengthening anti-spam measures. If there is no response after 5 seconds, it will timeout.

    \![execute,http-head,URL,(option),(option),(option),...]

    Executes an http head request with ※options.

    • SSP 2.6.40
    \![execute,http-put,URL,(option),(option),(option),...]

    Executes an http put request with ※options.

    • SSP 2.6.40
    \![execute,http-delete,URL,(option),(option),(option),...]

    Executes an http delete request with ※options.

    • SSP 2.6.40
    \![execute,rss-get,URL,(option),(option),(option),...]

    Executes an http get request with ※options, parses the response as an RSS/Atom feed, and sends a notification of the parsing result in the form of an event.
    The parameter specifications are the same as http-post.

    • SSP
    \![execute,rss-post,URL,(option),(option),(option),...]

    Executes an http post request with ※options, parses the response as an RSS/Atom feed, and sends a notification of the parsing result in the form of an event.
    The parameter specifications are the same as http-post.

    • SSP
    \![execute,extractarchive,(file name),(directory name)]

    Extracts a zip file. Full paths must be specified (relative paths cannot be specified).
    Execution of other scripts is paused until the process has finished.
    For security reasons, extractions are limited to destinations within folders under the control of SSP (ghost folder, balloon folder, etc. other locations specified in the Folder Preferences).
    Furthermore, as this restriction may be tightened occasionally, it is also recommended to keep the file within the folder in which the ghost's own data is located.

    • SSP

    Usage example

    \![execute,extractarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/testfolder]If SSP is installed in the C drive, an extracted copy of test.zip called testfolder will be created.

    \![execute,compressarchive,(file name),(directory name)]

    Compresses a file into a zip file. Full paths must be specified (relative paths cannot be specified).
    Execution of other scripts is paused until the process has finished.
    For security reasons, compressions are limited to destinations within folders under the control of SSP (ghost folder, balloon folder, etc. other locations specified in the Folder Preferences).
    Furthermore, as this restriction may be tightened from time to time, it is also recommended to keep the file within the folder in which the ghost's own data is located.

    • SSP

    Usage example

    \![execute,compressarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/emily4]If SSP is installed in the C drive, a compressed copy of the Emily/Phase4.5 folder named test.zip will be created in the ghost folder.

    \![execute,dumpsurface,(directory),(scope ID),(surface list),(prefix),(event ID),(zero position cutoff)]

    Dumps a combined surface image to the specified directory.
    Unless an event ID is specified, execution of other scripts will be paused until the process has finished.
    Scope ID: specify the same ID as the \s tag. With this specification, processes that depend on the character, such as the dress-up state, are changed.
    Surface list: written using the same methods as surface ID specifications, or with the below specifications.
    __system_surface_all__: dump all surfaces that are valid as a shell.
    __system_surface_defined__: dump only surfaces specified in surfaces.txt.
    [Note] Use " " to escape a comma in SakuraScript's square bracket parameters.
    Prefix: (can be omitted) the string that will be added as a prefix to the file name. When omitted, "surface."
    Event ID: (can be omitted) If specified, SakuraScript will continue to be executed as surfaces are being dumped, and when finished the specified event will be called. Reference0 contains the number of files successfully dumped.
    Zero position cutoff: When 1 is specified, dumping will start from 0,0 regardless of animation definitions, and parts with negative coordinates will be ignored.
    For security reasons, output is limited to destinations within folders under the control of SSP (ghost folder, balloon folder, etc. other locations specified in the Folder Preferences).
    Furthermore, as this restriction may be tightened from time to time, it is also recommended to keep within the folder in which the ghost's own data is located.

    • SSP [2.5.98]
    \![execute,install,path,(file name)]

    Installs the specified nar file. Full paths must be specified (relative paths cannot be specified).

    • SSP

    Usage example

    \![execute,install,path,C:/SSP/emily4.nar]Installs the emily4.nar file in C:/SSP.

    \![execute,install,url,(URL),(feed|nar|homeurl)]

    Installs the nar file or registers the RSSFeed from the specified URL.
    feed, nar, and homeurl can be omitted.
    Automatically downloads the file to a folder for temporary files, and conducts the installation process as is appropriate.


    OnURLQuery will not occur due to downloads started by executing this tag.

    • SSP

    Usage example

    \![execute,install,url,http://ssp.shillest.net/ghost/emily4.nar,nar]The nar file for Emily/Phase4.5 will be downloaded and installed.

    \![execute,ping,(parameter 1),(parameter 2),...]

    Pings the specified host. Made for IPv6.
    The parameters are as below.

    • --host=(host name or IP)
    • --ttl=(TTL)……[packet time to live [how many times routing is possible]] standard-255
    • --count=(transmission count)……standard-3
    • --size=(transmission size)……[--size does not apply when --data is valid] standard-32
    • --timeout=(timeout in milliseconds)……standard-5000
    • --df=(true|false)……packet splitting disabled-true, packet splitting enabled-false, standard-false
    • --data=(string)……[the string to embed into the ICMP Echo data field [will be converted to UTF-8]]
    • --event=(event or identifier)……[if a string starting with On is specified, that event will happen [instead of the event written later]]

    Refer to OnPingProgress and OnPingComplete for functioning regarding events during or after the process.

    • SSP

    Usage example

    \![execute,ping,--host=ssp.shillest.net,--event=pingtest]Pings the BUGTRAQ Lab with default settings.

    \![execute,nslookup,(parameter 1),(parameter 2),...]

    Searches for the IP when the host name is entered and searches for the host name when the IP is entered. Made for IPv6.
    The parameters are as below.

    • --host=(host name or IP)
    • --event=(event or identifier)……[if a string starting with On is specified, that event will happen [instead of the event written later]]

    Refer to OnNSLookupComplete and OnNSLookupFailure for functioning regarding events during or after the process.

    • SSP

    Usage example

    \![execute,nslookup,--host=ssp.shillest.net,--event=nslookuptest]Searches for the IP of the BUGTRAQ Lab by using the host name. If the lookup succeeds, OnNSLookupComplete will be notified and the IP will be stored in Reference3.

    \![execute,createnar]

    Creates a nar file of the ghost that executed the command.

    • SSP 2.5.08
    \![execute,createupdatedata]

    Creates update definition files (updates2.dau/updates.txt) for the ghost that executed the command.

    • SSP 2.5.08
    \![execute,emptyrecyclebin]

    Empties the recycle bin. It will not be emptied immediately after execution, and OnRecycleBinEmpty will be notified only after the deletion process is complete.

    • SSP 2.6.04
    \![enter,passivemode]

    Starts ※PassiveMode.

    Effective until the ghost is closed.

    • Materia
    • SSP
    • CROW

    Usage example

    After the SakuraScript is played, passive mode will start.\![enter,passivemode] From here, minimizing and closing the ghost are no longer possible.

    \![leave,passivemode]

    Cancels the above command.

    • Materia
    • SSP
    • CROW

    Usage example

    \![leave,passivemode]Passive mode has been canceled.

    \![enter,inductionmode]

    Starts ※InductionMode.

    Effective until the ghost is closed.

    • Materia
    • SSP

    Usage example

    \![enter,inductionmode]Induction mode has started.

    \![leave,inductionmode]

    Cancels the above command.

    • Materia
    • SSP

    Usage example

    \![leave,inductionmode]Induction mode has been canceled.

    \![enter,selectmode,(mode(rect)),(left),(up),(right),(down)]\![enter,selectmode,(mode(rect)),(collision name)]\![enter,selectmode,(mode(rect))]

    Starts select mode. When executed, transparent areas are also displayed, and the area can be specified by dragging with the mouse.
    After execution, OnSelectModeBegin is run. Refer also to OnSelectModeMouseUp, OnSelectModeMouseDown, OnSelectModeCancel, OnSelectModeComplete.
    Currently, only the rectangular selection mode "rect" can be specified. Additionally, when nothing is specified, it will function the same as rect.
    The initial position of the selection can be specified in the arguments after the mode specification. Either coordinates or the name of the collision to be set to the same size can be input.
    While in this mode, surfaces will not be redrawn. The effects of SakuraScript (\s[ID]) and dress-ups will not be displayed, but are reflected internally, and will be shown when \![leave,selectmode] is run.

    Effective until the ghost is closed.

    • SSP

    Usage example

    \![enter,selectmode,rect,head]Select mode has started. The range of the collision "head" has been preselected.

    \![leave,selectmode]

    Cancels the above command. After being executed, OnSelectModeComplete is run.
    If collision areas are invalid (unselected), OnSelectModeCancel will be run instead.

    • SSP

    Usage example

    \![leave,selectmode]Select mode has been canceled.

    \![enter,collisionmode]\![enter,collisionmode,rect]

    Functions the same as the "Display Hit Rect." option in the Developer Palette. If rect is specified as the third argument, the collision areas will be shown without the names specified in surfaces.txt.

    Effective until the ghost is closed.

    • SSP

    Usage example

    \![enter,collisionmode]Collision mode has started.

    \![leave,collisionmode]

    Cancels the above command.

    • SSP

    Usage example

    \![enter,collisionmode]Collision mode has started.\![leave,collisionmode] Collision mode has been canceled.

    \![reloadsurface]

    [Old specification] Reloads the surfaces. In SSP, functions the same as \![reload,shell].

    • Materia
    • SSP

    Usage example

    \![reloadsurface]The surface has been reloaded.

    \![reload,descript]

    Reloads all descript.txts.

    • SSP

    Usage example

    \![reload,descript]All descript.txts have been reloaded.

    \![reload,descript,(parameter)]

    Reloads the specified descript.txt.
    Multiple descript.txts may be specified with a half-width space as a delimiter.
    ghost shell balloon headline plugin

    • SSP

    Usage example

    \![reload,descript,shell balloon]The descript.txt of the shell and balloon have been reloaded.

    \![reload,shiori]

    Reloads shiori.dll.

    • SSP

    Usage example

    \![reload,shiori]shiori.dll has been reloaded. As a result, all dictionary files will be read again. Used to apply changes such as rewriting contents of dictionary files while the ghost is still running.

    \![reload,makoto]

    Reloads makoto.dll.

    • SSP

    Usage example

    \![reload,makoto]makoto.dll has been reloaded.

    \![reload,shell]

    Reloads the shell.

    • SSP

    Usage example

    \![reload,shell]The shell has been reloaded.

    \![reload,ghost]

    Reloads the entire ghost.

    • SSP

    Usage example

    \![reload,ghost]The ghost has been reloaded. Almost the same as changing to the same ghost, except in that a SHIORI event is not called.

    \![unload,shiori]

    Unloads shiori.dll and remains in the unloaded state.
    load should be run after unload at an appropriate time. While in an unloaded state, nothing will respond.

    • SSP 2.5.58
    \![unload,makoto]

    Unloads makoto.dll and remains in the unloaded state.

    • SSP 2.5.58
    \![load,shiori]

    Loads shiori.dll after unload has been run.

    • SSP 2.5.58
    \![load,makoto]

    Loads makoto.dll after unload has been run.

    • SSP 2.5.58
    \![set,shioridebugmode,(true/false)]

    Turns the SHIORI debug mode from the Developer Palette on or off.

    • SSP 2.5.78
    \![create,shortcut]

    Creates a shortcut on the desktop for the currently running ghost.
    \![create,shortcut,startup] will create the shortcut in the startup folder.

    • SSP 2.5.86
    \_u[(0x0000)]

    Embeds UCS-2 code.

    • Materia
    • SSP
    • CROW

    Usage example

    \_u[0x22EE]Displays a vertical ellipsis. \_u[8942]The base 10 version of the first SakuraScript command. When expressed in base 10, the 0x should not be added.

    \_m[(0x00)]

    Embeds ASCII code.

    • Materia
    • SSP
    • CROW

    Usage example

    \_m[0x41]Displays a capital half-width letter A.

    \&[(ID)]

    Embeds a character using entity reference as an identifier (ID).

    • Materia
    • SSP
    • CROW

    Usage example

    \&[amp]Displays a half-width ampersand. The entity reference is the ID part of &ID;.

    \m[(umsg),(wparam),(lparam)]

    Specific to SSTP.
    Executes postmessage(hwnd,umsg,wparam,lparam) for the window handle preset by Wnd header.

    • Materia
    • SSP

    Usage example

    When this script is run through SSTP, the ghost that ran it will be closed.\m[WM_CLOSE,0,0]

    PassiveMode

    During Passive Mode, the below restrictions apply.
    Only the user's actions are restricted, and execution by SakuraScript is still possible.

    • The selectable options in the user menu are limited.
    • Mail cannot be checked.
    • Headline sense events will not be run.
    • Automatic changes will not happen.
    • Script breaks will not happen.
    • Choices will not timeout.
    • Balloons will not close due to time passing.
    • Files will be ignored even if drag-and-dropped.
    • nar file double-click installation will also be ignored (in SSP, the ghost will be installed but no event will happen).
    • OnSurfaceRestore will not happen.
    • cantalk will always be false (OnSecondChange and OnMinuteChange themselves will happen).
    • The ghost cannot be changed.
    • (Materia only:) The communicate box will be closed and cannot be opened again.
    • The ghost cannot be minimized.
    • The ghost cannot be closed.
    • Network updates cannot be performed.
    • The ghost cannot be uninstalled.

    InductionMode

    Similar to passive mode, but removes the below restrictions.

    • Timing out is possible.
    • Minimizing is possible.
    • Closing the ghost is possible.
    • (Materia only:) The communicate box can be used.

    http get/post options

    --async=identification ID
    Execute the rest of the SakuraScript without waiting for the process to complete, and notify the SHIORI events OnExecuteHTTPComplete or OnExecuteHTTPFailure when the process has finished.
    OnExecuteRSSComplete or OnExecuteRSSFailure are notified if the RSS commands are used.
    When an ID starting with On is specified, a SHIORI Event formatted as [Specified ID] or [Specified ID]Failure will run instead.
    Ex: When --async=OnExample succeeds, OnExample will run, and when it fails, OnExampleFailure will run.
    If you want to suspend the SakuraScript until the process is complete, write "--sync" instead.
    --authorization=(the contents of the Authorization request header) [2.6.37]
    Set in advance when Authorization headers are mandatory, such as OAuth.
    --cookie=cookie data
    When necessary, the value of Reference5 of OnExecuteHTTPComplete should be specified as is.
    --content-type=(multipart/form-data | application/x-www-form-urlencoded | other optional designations)
    Limited to http-post. Specifies what format the param argument parameters should be sent in.
    Defaults to application/x-www-form-urlencoded if nothing is specified.
    It is important to keep in mind that there may be limitations on how to write the param arguments depending on the format of content-type.
    From version [2.6.37], this information is directly reflected in the Content-Type request header.
    --file=(file name)
    Specifies the name of the file to save the acquired data to. Saved to [(folder of the ghost executing the command)]/ghost/master/var/(file name).
    --header=(SomeHeader):(contents of the request header) [2.6.40]
    Sets a request header of the name of choice. There must be a colon between the name and contents.
    Caution should be taken not to cause contradictions with the specifications, as this will overwrite the header information from SSP.
    --log=file name
    Log all communications with the server. Mainly for debugging during development.
    --nodescript
    Turns off the display of the online marker and download status.
    --nofile=(parameter)[character encoding] [2.5.77]
    Opens the acquired data on memory and stores it in Reference3 of the event without creating a temporary file.
    Specifies the character encoding to use when interpreting the acquired data. Defaults to UTF-8 when not specified.
    The upper size limit for acquisition is 128KB.
    --param=(parameter)
    Specifies the parameter for get/post. Can be specified multiple times.
    When multipart/form-data:
    The format --param=(field name)=(data) will be repeated only as many times as necessary.
    Ex: --param=message_body=(data)
    When application/x-www-form-urlencoded:
    When the format --param=(field name)=(data) is repeated only as many times as necessary, everything will be sent to the server connected with &.
    Otherwise, everything will be sent to the server connected with the line break character (CRLF) for backward compatibility processing.
    When specifying other content-type:
    If specified multiple times, everything will be sent to the server connected with the line break character (CRLF).
    --param-charset=(character encoding)
    Specifies the character encoding. Shift_JIS, EUC-JP, UTF-8 and others can be specified. The default is UTF-8.
    --param-input-file=(file name) [2.6.40]
    Specifies the file containing data to be sent when it is too large to send with the --param option.
    When not specified as an absolute path, it will be interpreted as a relative path from [(folder of the ghost executing the command)]/ghost/master/.
    Do not specify --param at the same time.
    The contents are not touched, so the character code and encoding should be the responsibility of and be processed by the side using the data.
    However, only with multipart/form-data, the first line is read and interpreted as a field separator.

    The specified file path must be under the jurisdiction of SSP (under the same location as SSP.exe or under a folder specified to list ghosts, etc.).
    --progress-notify [2.6.44]
    Notify the event OnExecuteHTTPProgress during the download process.
    When an ID starting with On is specified, a SHIORI Event formatted as [Specified ID]Progress will run instead.
    Ex: When --async=OnExample is processing, OnExampleProgress will be notified.
    During the download process, event notification processing is performed sequentially, resulting in a reduction in download speed.
    Note that when outputting to a file, the file is closed at the time of event notification and re-opened after receiving a response, which further slows down the download speed.
    --sync=identification ID [2.6.44]
    The behavior is the same as the --async specification, except that SakuraScript execution is temporarily stopped and waits for the process to complete.
    --timeout=(number of seconds)
    Specifies the length of time to wait for a response (※not the length of time needed for a download). The upper limit is 300 seconds.
    If there is no response within the specified number of seconds, the SHIORI event OnExecuteHTTPFailure will be notified, and Reference4 will contain "timeout."

    Environment Variables

    Specification method of environment variables

    When SSP writes to a balloon, it replaces the environment variables.
    Those starting with "Word-" have multiple output candidates and are chosen randomly.
    Note that the %ms, %mz, %ml, %mc, %mh, %mt, %me, %mp, %m?, and %dms variables will still return contents in Japanese.

    An example using environment variables

    Usage example

    %username, listen to this. %ms said they came up with %mt while eating %me at the %mh in %mp.

    %month

    Current month.

    • Materia
    • SSP
    • CROW
    %day

    Current day.

    • Materia
    • SSP
    • CROW
    %hour

    Current hour.

    • Materia
    • SSP
    • CROW
    %minute

    Current minute.

    • Materia
    • SSP
    • CROW
    %second

    Current second.

    • Materia
    • SSP
    • CROW
    %username

    Username.

    • Materia
    • SSP
    • CROW
    %selfname

    The main character's name.

    • Materia
    • SSP
    • CROW
    %selfname2

    The main character's alternate name.

    • SSP
    %keroname

    The side character's name.

    • Materia
    • SSP
    • CROW
    %screenwidth

    The width of the screen display.

    • Materia
    • SSP
    • CROW
    %screenheight

    The height of the screen display.

    • Materia
    • SSP
    • CROW
    %exh

    The continued uptime of the OS.

    • Materia
    • SSP
    • CROW
    %et

    The incorrect continued uptime (includes incorrect unit).

    • Materia
    • SSP
    • CROW
    %wronghour

    Incorrect current hour.

    • Materia
    • SSP
    • CROW
    %ms

    Word-A person.

    • Materia
    • SSP
    • CROW
    %mz

    Word-An inorganic item.

    • Materia
    • SSP
    • CROW
    %ml

    Word-A group.

    • Materia
    • SSP
    • CROW
    %mc

    Word-A company name.

    • Materia
    • SSP
    • CROW
    %mh

    Word-A shop name.

    • Materia
    • SSP
    • CROW
    %mt

    Word-A move name.

    • Materia
    • SSP
    • CROW
    %me

    Word-A food.

    • Materia
    • SSP
    • CROW
    %mp

    Word-A location.

    • Materia
    • SSP
    • CROW
    %m?

    Word-A random concept.

    • Materia
    • SSP
    • CROW
    %dms

    Word-A noun phrase.

    • Materia
    • SSP
    • CROW
    %lastghostname

    Returns the name of the last ghost to run an event. For when a ghost is installed.

    • Materia
    • SSP
    %lastobjectname

    Returns the name of the last object to run an event. For when a ghost is installed.

    • Materia
    • SSP
    %*

    Functions the same as \![*].

    • SSP
    %property[(property name)]

    Returns the value of the specified property system.
    ※For details on the property system, refer to the Property System page.

    • SSP
    • CROW