Ray VN API Reference

The VN API (Suika.*) is designed for Visual Novel creation.

Every Suika.* API function takes only one argument. The argument must be a dictionary, and options to a function must be stored as key-and-value pairs in the dictionary. In this document, "parameter" means a key-value-pair in that dictionary.

Index


Suika.loadPlugin()

Loads a plugin.

Only this API takes a non-dictionary argument.

Parameters (Direct)

ParameterTypeDescription
nameStringPlugin name.

Return

No return.


Suika.setConfig()

Set a config.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey of the config.
valueStringValue of the config.

Return

No return.


Suika.getConfigCount()

Get the number of the config keys.

Parameters (Dictionary)

No parameters.

Return

Integer that represents a number of config keys.


Suika.getConfigKey()

Get a config key's index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of a config.

Return

String that represents a key of the config at the specified index.


Suika.isGlobalSaveConfig()

Check if a config key is stored to global save data.

ParameterTypeDescription
keyStringKey name.

Return

Boolean that represents whether the config is global-saved or not.


Suika.isLocalSaveConfig()

Check if a config key is stored to local save data.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

Boolean that represents whether the config is local-saved or not.


Suika.getConfigType()

Get a config value type. ("s", "b", "i", "f")

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

One of the following strings.

ValueMeaning
"s"Config is string.
"b"Config is boolean.
"i"Config is integer.
"f"Config is float.

Suika.getStringConfig()

Get a string config value.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

String value of the config.


Suika.getBoolConfig()

Get a boolean config value.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

Boolean value of the config.


Suika.getIntConfig()

Get an integer config value.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

Integer value of the config.


Suika.getFloatConfig()

Get a float config value.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

Float value of the config.


Suika.getConfigAsString()

Get a config value as a string.

Parameters (Dictionary)

ParameterTypeDescription
keyStringKey name.

Return

Stringified value of the config.


Suika.compareLocale()

Check if the specified locale is same as the current locale.

Parameters (Dictionary)

ParameterTypeDescription
localeStringLocale name.

Return

Bolean that represents whether the specified locale is matched to the current one.


Suika.getMousePosX()

Get the mouse X position.

Parameters (Dictionary)

No parameters.

Return

Integer that represents the current mouse X coordinate.


Suika.getMousePosY()

Get the mouse Y position.

Parameters (Dictionary)

No parameters.

Return

Integer that represents the current mouse Y coordinate.


Suika.isMouseLeftPressed()

Check if mouse left button is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents whether the left button is currently held down.


Suika.isMouseRightPressed()

Check if mouse right button is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents whether the right button is currently held down.


Suika.isMouseLeftClicked()

Check if mouse left button is pressed then released.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents whether a left-click occurred in the current frame.


Suika.isMouseRightClicked()

Check if mouse right button is pressed then released.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents whether a right-click occurred in the current frame.


Suika.isMouseDragging()

Check if mouse is dragging.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents whether the mouse is being moved while a button is pressed.


Suika.isReturnKeyPressed()

Check if return key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isSpaceKeyPressed()

Check if space key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isEscapeKeyPressed()

Check if escape key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isUpKeyPressed()

Check if up key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isDownKeyPressed()

Check if down key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isLeftKeyPressed()

Check if left key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isRightKeyPressed()

Check if right key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isPageUpKeyPressed()

Check if pageup key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isPageDownKeyPressed()

Check if pagedown key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isControlKeyPressed()

Check if control key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isSKeyPressed()

Check if S key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isLKeyPressed()

Check if L key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isHKeyPressed()

Check if H key is pressed.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isTouchCanceled()

Check if touch is canceled.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isSwiped()

Check if swiped.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.clearInputState()

Clear input states to avoid further input processing in the current frame.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.startCommandRepetition()

Start a multiple-frame command execution.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.stopCommandRepetition()

Stop a multiple-frame command execution.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isInCommandRepetition()

Check whether we are in a multiple-frame command execution or not.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.setMessageActive()

Set the message showing state to active.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.clearMessageActive()

Reset the message showing state.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isMessageActive()

Check whether the message showing state is set or not.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.startAutoMode()

Start the auto-mode.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.stopAutoMode()

Stop the auto-mode.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isAutoMode()

Check whether we are in the auto-mode or not.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.startSkipMode()

Start the skip-mode.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.stopSkipMode()

Stop the skip-mode.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isSkipMode()

Check whether we are in the skip-mode or not.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.setSaveLoad()

Set the save/load enable setting.

Parameters (Dictionary)

ParameterTypeDescription
enableBooleanWhether to enable save and load.

Return

No return.


Suika.isSaveLoadEnabled()

Get the save/load enable setting.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.setNonInterruptible()

Set the non-interruptible mode setting.

Parameters (Dictionary)

ParameterTypeDescription
enableBooleanNon-interruptible mode.

Return

No return.


Suika.isNonInterruptible()

Get the non-interruptible mode setting.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.setPenPosition()

Set the pen position for text drawing.

Parameters (Dictionary)

ParameterTypeDescription
xIntegerX coordinate.
yIntegerY coordinate.

Return

No return.


Suika.getPenPositionX()

Get the pen X position.

Parameters (Dictionary)

No parameters.

Return

Integer value.


Suika.getPenPositionY()

Get the pen Y position.

Parameters (Dictionary)

No parameters.

Return

Integer value.


Suika.pushForCall()

Push the return point to the call stack.

Parameters (Dictionary)

ParameterTypeDescription
fileStringScript file name.
indexIntegerCommand index.

Return

Boolean that represents success or failure.


Suika.popForReturn()

Pop the return point from the call stack.

Parameters (Dictionary)

No parameters.

Return

Returns a dictionary that contains:

  • obj.file: File name
  • obj.index: Tag index

Suika.readCallStack()

Read the call stack element at the specified index.

Parameters (Dictionary)

ParameterTypeDescription
spIntegerStack element index.

Return

Returns a dictionary that contains:

  • obj.file: File name
  • obj.index: Tag index

Suika.writeCallStack()

Write the call stack element at the specified index.

Parameters (Dictionary)

ParameterTypeDescription
spIntegerStack element index.
fileStringScript file name.
indexIntegerTag index.

Return

No return.


Suika.setCallArgument()

Set a calling argument for GUI or anime.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerArgument index.
valueStringArgument value.

Return

Boolean value.


Suika.getCallArgument()

Get a calling argument.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerArgument index.

Return

String value.


Suika.isPageMode()

Check if the script page mode is enabled.

Parameters (Dictionary)

No parameters.

Return

Returns boolean.


Suika.appendBufferedMessage()

Append a string to the page mode buffer string.

Parameters (Dictionary)

ParameterTypeDescription
messageStringMessage.

Return

No return.


Suika.getBufferedMessage()

Get the page mode buffer string.

Parameters (Dictionary)

No parameters.

Return

Returns a string.


Suika.clearBufferedMessage()

Clear the page mode buffer string.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.resetPageLine()

Reset the message line count in a page.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.incPageLine()

Increment the line count in a page.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isPageTop()

Check if we are at the first line in a page.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.registerBGVoice()

Register a BGVoice.

Parameters (Dictionary)

ParameterTypeDescription
fileStringBGVoice file.

Return

No return.


Suika.getBVoice()

Get the BGVoice.

Parameters (Dictionary)

No parameters.

Return

Returns a file name string.


Suika.setBGVoicePlaying()

Set the BGVoice state playing.

Parameters (Dictionary)

ParameterTypeDescription
isPlayingBooleanState.

Return

No return.


Suika.isBGVoicePlaying()

Check if the BGVoice is playing.

Parameters (Dictionary)

No parameters.

Return

Returns boolean.


Suika.setChapterName()

Set the chapter name.

Parameters (Dictionary)

ParameterTypeDescription
nameStringChapter name.

Return

No return.


Suika.getChapterName()

Get the chapter name.

Parameters (Dictionary)

No parameters.

Return

Returns a string.


Suika.setLastMessage()

Set the last message.

Parameters (Dictionary)

ParameterTypeDescription
messageStringMessage.
isAppendBooleanAppend or replace.

Return

No return.


Suika.getLastMessage()

Get the last message.

Parameters (Dictionary)

No parameters.

Return

Returns a string.


Suika.setTextSpeed()

Set the text speed.

Parameters (Dictionary)

ParameterTypeDescription
speedFloatText speed.

Return

No return.


Suika.getTextSpeed()

Get the text speed.

Parameters (Dictionary)

No parameters.

Return

Returns a float.


Suika.setAutoSpeed()

Set the auto mode speed.

Parameters (Dictionary)

ParameterTypeDescription
speedFloatAuto speed.

Return

No return.


Suika.getAutoSpeed()

Get the auto speed.

Parameters (Dictionary)

No parameters.

Return

Returns a float.


Suika.markLastEnglishTagIndex()

Mark the last English index.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.getLastEnglishTagIndex()

Get the last English index.

Parameters (Dictionary)

No parameters.

Return

Returns an integer.


Suika.clearLastEnglishTagIndex()

Clear the last English index.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.getLastTagName()

Get the last tag name.

Parameters (Dictionary)

No parameters.

Return

Returns a string.


Suika.createImageFromFile()

Load an image from a file.

Parameters (Dictionary)

ParameterTypeDescription
fileStringPath to the image file.

Return

An image object, or null on failure.


Suika.createImage()

Create a new blank image.

Parameters (Dictionary)

ParameterTypeDescription
widthIntegerWidth of the image.
heightIntegerHeight of the image.

Return

An image object.


Suika.getImageWidth()

Get the width of an image.

Parameters (Dictionary)

ParameterTypeDescription
imgObjectImage object.

Return

Integer that represents the width.


Suika.getImageHeight()

Get the height of an image.

Parameters (Dictionary)

ParameterTypeDescription
imageObjectImage object.

Return

Integer that represents the height.


Suika.destroyImage()

Destroy an image and free its memory.

Parameters (Dictionary)

ParameterTypeDescription
imageObjectImage object to destroy.

Return

No return.


Suika.drawImage()

Copy an image to another image (no blending).

Parameters (Dictionary)

ParameterTypeDescription
dstImageObjectDestination image.
dstLeftIntegerX coordinate in destination.
dstTopIntegerY coordinate in destination.
srcImageObjectSource image.
dstWidthIntegerWidth to draw.
dstHeightIntegerHeight to draw.
srcLeftIntegerX coordinate in source.
srcTopIntegerY coordinate in source.
alphaInteger0-255
blendIntegerBlending type.

Blending Types

TypeDescription
Suika.BLEND_COPYCopy.
Suika.BLEND_ALPHAAlpha blending.
Suika.BLEND_ADDAdd blending.
Suika.BLEND_SUBSub blending.
Suika.BLEND_DIMRGB 50% alpha blending.
Suika.BLEND_GLYPHAlpha blending for normal glyphs.
Suika.BLEND_EMOJIAlpha blending for emoji glyphs.

Return

No return.


Suika.drawImage3D()

Copy an image to another image (no blending).

Parameters (Dictionary)

ParameterTypeDescription
dstImageObjectDestination image.
x1Integerx1 coordinate in destination.
y1Integery1 coordinate in destination.
x2Integerx2 coordinate in destination.
y2Integery2 coordinate in destination.
x3Integerx3 coordinate in destination.
y3Integery3 coordinate in destination.
x4Integerx4 coordinate in destination.
y5Integery4 coordinate in destination.
srcImageObjectSource image.
srcLeftIntegerX coordinate in source.
srcTopIntegerY coordinate in source.
srcWidthIntegerWidth in source.
srcHeightIntegerHeight in source.
alphaInteger0-255
blendIntegerBlending type.

Blending Types

TypeDescription
Suika.BLEND_ALPHAAlpha blending.
Suika.BLEND_ADDAdd blending.
Suika.BLEND_SUBSub blending.
Suika.BLEND_DIMRGB 50% alpha blending.

Return

No return.


Suika.drawImageAlpha()

Draw an image with alpha blending.

Parameters (Dictionary)

ParameterTypeDescription
dstImageObjectDestination image.
dstLeftIntegerX coordinate in destination.
dstTopIntegerY coordinate in destination.
dstWidthIntegerWidth to draw.
dstHeightIntegerHeight to draw.
srcImageObjectSource image.
srcLeftIntegerX coordinate in source.
srcTopIntegerY coordinate in source.
alphaIntegerAlpha value (0-255).

Return

No return.


Suika.drawImageAdd()

Draw an image with additive blending.

Parameters (Dictionary)

ParameterTypeDescription
dstImageObjectDestination image.
dstLeftIntegerX coordinate in destination.
dstTopIntegerY coordinate in destination.
dstWidthIntegerWidth to draw.
dstHeightIntegerHeight to draw.
srcImageObjectSource image.
srcLeftIntegerX coordinate in source.
srcTopIntegerY coordinate in source.
alphaIntegerAlpha value (0-255).

Return

No return.


Suika.drawImageSub()

Draw an image with subtractive blending.

Parameters (Dictionary)

ParameterTypeDescription
dstImageObjectDestination image.
dstLeftIntegerX coordinate in destination.
dstTopIntegerY coordinate in destination.
dstWidthIntegerWidth to draw.
dstHeightIntegerHeight to draw.
srcImageObjectSource image.
srcLeftIntegerX coordinate in source.
srcTopIntegerY coordinate in source.
alphaIntegerAlpha value (0-255).

Return

No return.


Suika.makeColor()

Create a pixel value from RGBA components.

Parameters (Dictionary)

ParameterTypeDescription
rIntegerRed (0-255).
gIntegerGreen (0-255).
bIntegerBlue (0-255).
aIntegerAlpha (0-255).

Return

A pixel value.


Suika.fillImageRect()

Fill a rectangular area on an image with a color.

Parameters (Dictionary)

ParameterTypeDescription
imageObjectTarget image.
leftIntegerX coordinate.
topIntegerY coordinate.
widthIntegerWidth.
heightIntegerHeight.
colorIntegerColor created by Suika.makeColor().

Return

No return.


Suika.reloadStageImages()

Reload the stage images by the config.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents success or failure.


Suika.reloadStagePositions()

Reload the stage positions by the config.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.getLayerX()

Get the current position of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Integer value of the coordinate.


Suika.getLayerY()

Get the current position of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Integer value of the coordinate.


Suika.setLayerPosition()

Set the position of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
xIntegerX coordinate.
yIntegerY coordinate.

Return

No return.


Suika.getLayerScaleX()

Get the X scaling factor of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Float value of the scale.


Suika.getLayerScaleY()

Get the Y scaling factor of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Float value of the scale.


Suika.setLayerScale()

Set the scaling factor of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
scale_xFloatHorizontal scale.
scale_yFloatVertical scale.

Return

No return.


Suika.getLayerRotate()

Get the rotation angle of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Returns float.


Suika.setLayerRotate()

Set the rotation angle of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
rotFloatRotation angle in radians.

Return

No return.


Suika.getLayerDim()

Get the dimming state of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Returns boolean.


Suika.setLayerDim()

Set the dimming state of a specific layer.

Parameters (Dictionary) (Set)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
dimBooleanWhether to dim the layer.

Return

No return.


Suika.getLayerAlpha()

Get the transparency of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.

Return

Returns integer.


Suika.setLayerAlpha()

Set the transparency of a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
alphaIntegerAlpha value (0-255).

Return

No return.


Suika.setLayerBlend()

Set the blending mode for a layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
blendIntegerBlend mode (Alpha, Add, Sub).

Return

No return.


Suika.setLayerFile()

Set a file to be displayed on a layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
file_nameStringPath to the image file.

Return

Boolean that represents success or failure.


Suika.setLayerFrame()

Set the frame index for eye blinking and lip synchronization.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerIndex of the stage layer.
frameIntegerFrame index.

Return

No return.


Suika.getLayerText()

Get the string displayed on a text layer.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the text layer.

Return

Returns string.


Suika.setLayerText()

Set the string displayed on a text layer.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the text layer.
textStringText message to set.

Return

No return.


Suika.getSysBtnIdleImage()

Get the sysbtn idle image.

Parameters (Dictionary)

No parameters.

Return

Returns an image object.


Suika.getSysBtnHoverImage()

Get the sysbtn hover image.

Parameters (Dictionary)

No parameters.

Return

Returns an image object.


Suika.clearStageBasic()

Clear the basic layers.

Parameters (Dictionary)

No parameters.

Return

Returns an image object.


Suika.clearStage()

Clear the stage and make it initial state.

Parameters (Dictionary)

No parameters.

Return

Returns an image object.


Suika.chposToLayer()

Convert a character position to a stage layer index.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

Returns an integer.


Suika.chposToEyeLayer()

Convert a character position to a stage layer index (character eye).

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

Returns an integer.


Suika.chposToLipLayer()

Convert a character position to a stage layer index (character lip).

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

Returns an integer.


Suika.layerToChpos()

Convert a stage layer index to a character position.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerLayer index.

Return

Returns an integer.


Suika.renderStage()

Render the stage with all stage layers.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.startFade()

Start a transition effect.

Parameters (Dictionary)

ParameterTypeDescription
descArrayFade descriptor.
methodStringFading method.
timeFloatDuration in seconds.
ruleImageObjectRule image object (optional).

Return

Boolean value.


Suika.getShakeOffset()

Get the offset for the shake command.

Parameters (Dictionary)

No parameters.

Return

An object that contains:

  • x
  • y

Suika.setShakeOffset()

Set the offset for the shake command.

Parameters (Dictionary)

ParameterTypeDescription
xIntegerX offset.
yIntegerY offset.

Return

No return.


Suika.isFadeRunning()

Check if the fading is running.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.finishFade()

Immediately end the fading effect.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.setChNameMapping()

Specify a character name index for a character position.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.
chNameIndexIntegerCharacter name index.

Return

No return.


Suika.getTalkingChpos()

Get the position of the character currently speaking.

Parameters (Dictionary)

No parameters.

Return

Returns an integer.


Suika.setChTalking()

Set the talking character.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

No return.


Suika.getTalkingChpos()

Get the talker character position.

Parameters (Dictionary)

No parameters.

Return

Returns an integer.


Suika.updateChDimByTalkingCh()

Automatically update character dimming based on who is speaking.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.forceChDim()

Update the character dimming manually.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.
dimBooleanDim or not.

Return

No return.


Suika.getChDim()

Get the dimming state.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

Returns a boolean.


Suika.fillNameBox()

Fill the name box by the name box image.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.getNameBoxRect()

Get the name box position and size.

Parameters (Dictionary)

No parameters.

Return

Object.

  • x
  • y
  • w
  • h

Suika.showNameBox()

Show or hides the name box.

Parameters (Dictionary)

ParameterTypeDescription
showBooleanShow or hide.

Return

No return.


Suika.fillMessageBox()

Fill the message box by the message box image.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.showMessageBox()

Show or hide the message box.

Parameters (Dictionary)

ParameterTypeDescription
showBooleanWhether to show the box.

Return

No return.


Suika.getMessageBoxRect()

Get the message box rect.

Parameters (Dictionary)

No parameters.

Return

An object that contains:

  • x
  • y
  • w
  • h

Suika.setClickPosition()

Set the click animation position.

Parameters (Dictionary)

ParameterTypeDescription
xIntegerX position.
yIntegerY position.

Return

No return.


Suika.showClick()

Show or hide the click animation.

Parameters (Dictionary)

ParameterTypeDescription
showBooleanShow or hide.

Return

No return.


Suika.setClickIndex()

Set the index of the click animation frame.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerFrame index.

Return

No return.


Suika.getClickRect()

Get the click animation rect.

Parameters (Dictionary)

No parameters.

Return

An object that contains:

  • x
  • y
  • w
  • h

Suika.fillChooseBoxIdleImage()

Fill a choose box idle layer by the choose box idle image.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerChoose box index.

Return

No return.


Suika.fillChooseBoxHoverImage()

Fill a choose box hover layer by the choose box hover image.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerChoose box index.

Return

No return.


Suika.showChoosebox()

Show or hide a choice box.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerChoice box index. (0-7)
showIdleBooleanShow idle state.
showHoverBooleanShow hover state.

Return

No return.


Suika.getChooseBoxRect()

Get the choose box rect.

Parameters (Dictionary)

No parameters.

Return

An object that contains:

  • x
  • y
  • w
  • h

Suika.showAutoModeBanner()

Show or hide the auto mode banner.

Parameters (Dictionary)

ParameterTypeDescription
showBooleanShow or hide.

Return

No return.


Suika.showSkipModeBanner()

Show or hide the skip mode banner.

Parameters (Dictionary)

ParameterTypeDescription
showBooleanShow or hide.

Return

No return.


Suika.renderImage()

Perform direct rendering of an image to the screen.

Note that you should consider using the stage layers for normal rendering. This API is useful for effects.

Parameters (Dictionary)

ParameterOmissibleTypeDescription
dstLeftNoIntegerDestination top-left X position.
dstTopNoIntegerDestination top-left Y position.
imageNoObjectImage.
srcLeftNoIntegerSource top-left X position.
srcTopNoIntegerSource top-left Y position.
srcWidthNoIntegerSource width.
srcHeightNoIntegerSource height.
alphaNoIntegerAlpha value. (0-255)
blendNoIntegerBlend type.

Blend Types

NameDescription
Suika.BLEND_ALPHAAlpha blending.
Suika.BLEND_ADDAdd blending.
Suika.BLEND_SUBSub blending.

Return

No return.


Suika.renderImage3d()

Perform direct rendering of an image to the screen with 3D transformation.

Note that you should consider using the stage layers for normal rendering. This API is useful for effects.

Parameters (Dictionary)

ParameterOmissibleTypeDescription
x1NoIntegerDestination vertex 1 X position.
y1NoIntegerDestination vertex 1 Y position.
x2NoIntegerDestination vertex 2 X position.
y2NoIntegerDestination vertex 2 Y position.
x3NoIntegerDestination vertex 3 X position.
y3NoIntegerDestination vertex 3 Y position.
x4NoIntegerDestination vertex 4 X position.
y4NoIntegerDestination vertex 4 Y position.
texNoObjectImage.
srcLeftNoIntegerSource top-left X position.
srcTopNoIntegerSource top-left Y position.
srcWidthNoIntegerSource width.
srcHeightNoIntegerSource height.
alphaNoIntegerAlpha value. (0-255)

Return

No return.


Suika.startKirakira()

Start Kirakira effect.

Kirakira effect is an animation that is shown at the screen position where the mouse cursor is clicked.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.renderKirakira()

Render Kirakira effect.


Suika.setMixerInputFile()

Play a sound file on a specific mixer track.

Parameters (Dictionary)

ParameterOmissibleTypeDescription
trackNoStringMixer track name.
fileNoStringPath to the sound file.
isLoopedYes(false)BooleanWhether to loop the playback.

Track Names

NameDescription
bgmBackground music track.
seSound effect track.
voiceCharacter voice track.
sysSystem sound track.

Return

Boolean that represents whether the file was opened successfully.


Suika.setMixerVolume()

Set the volume for a specific mixer track.

Parameters (Dictionary)

ParameterTypeDescription
trackStringMixer track name.
volFloatVolume level (0.0 to 1.0).
spanFloatFade duration in seconds.

Track Names

NameDescription
bgmBackground music track.
seSound effect track.
voiceCharacter voice track.
sysSystem sound track.

Return

No return.


Suika.getMixerVolume()

Get the volume for a specific mixer track.

Parameters (Dictionary)

ParameterTypeDescription
trackStringMixer track name.
volumeFloatVolume level (0.0 to 1.0).
spanFloatFade duration in seconds.

Track Names

NameDescription
bgmBackground music track.
seSound effect track.
voiceCharacter voice track.
sysSystem sound track.

Return

Returns float.


Suika.setMasterVolume()

Set the master volume affecting all tracks.

Parameters (Dictionary)

ParameterTypeDescription
volumeFloatMaster volume level (0.0 to 1.0).

Return

No return.


Suika.getMasterVolume()

Get the master volume affecting all tracks.

Parameters (Dictionary)

No parameters.

Return

Returns float.


Suika.setMixerGlobalVolume()

Set the global volume for a track (often used for config settings).

Parameters (Dictionary)

ParameterTypeDescription
trackStringMixer track name.
volFloatGlobal volume level.

Track Names

NameDescription
bgmBackground music track.
seSound effect track.
voiceCharacter voice track.
sysSystem sound track.

Return

No return.


Suika.getMixerGlobalVolume()

Get the global volume for a track (often used for config settings).

Parameters (Dictionary)

ParameterTypeDescription
trackStringMixer track name.

Track Names

NameDescription
bgmBackground music track.
seSound effect track.
voiceCharacter voice track.
sysSystem sound track.

Return

Returns float.


Suika.setCharacterVolume()

Set the volume for a specific character's voice.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerCharacter name index.
volFloatVolume level.

Return

No return.


Suika.getCharacterVolume()

Get the volume for a specific character's voice.

Parameters (Dictionary)

ParameterTypeDescription
ch_indexIntegerCharacter name index.

Return

Get returns float.


Suika.isMixerSoundFinished()

Check if the playback on a specific track is finished.

Parameters (Dictionary)

ParameterTypeDescription
trackIntegerMixer track index.

Return

Boolean value.


Suika.getTrackFileName()

Get the file name of the sound currently loaded in a track.

Parameters (Dictionary)

ParameterTypeDescription
trackIntegerMixer track index.

Return

String representing the file path.


Suika.applyCharacterVolume()

Apply a character's specific volume setting to the VOICE track.

Parameters (Dictionary)

ParameterTypeDescription
chIntegerCharacter name index.

Return

No return.


Suika.enableSysBtn()

Control the system button.

Parameters (Dictionary)

ParameterTypeDescription
isEnabledBooleanEnable the system button or not.

Return

No return.


Suika.isSysBtnEnabled()

Check if the system button is enabled.

Parameters

No parameters.

Return

Returns a boolean value.


Suika.updateSysBtnState()

Update the mouse tracking for the system button.

Parameters

No parameters.

Return

No return.


Suika.isSysBtnPointed()

Check if the system button is pointed.

Parameters

No parameters.

Return

Returns a boolean value.


Suika.isSysBtnClicked()

Check if the system button is clicked.

Parameters

No parameters.

Return

Returns a boolean value.


Suika.drawTextOnLayer()

Draw a text on a specified layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerTarget stage layer index.
fontTypeIntegerFont selection index.
fontSizeIntegerSize of the font.
colorIntegerColor.
outlineWidthIntegerOutline width.
outlineColorIntegerOutline color.
lineMarginIntegerLine margin.
charMarginIntegerCharacter margin.
xIntegerBounding box X position.
yIntegerBounding box Y position.
widthIntegerBounding box width.
heightIntegerBounding box height.
textStringText.

Return

No return.


Suika.getStringWidth()

Get the total width of a UTF-8 string.

Parameters (Dictionary)

ParameterTypeDescription
fontTypeIntegerFont selection index.
fontSizeIntegerSize of the font.
textStringText.

Return

Integer value of the width in pixels.


Suika.getStringHeight()

Get the total height of a UTF-8 string.

Parameters (Dictionary)

ParameterTypeDescription
fontTypeIntegerFont selection index.
fontSizeIntegerSize of the font.
textStringText.

Return

Integer value of the height in pixels.


Suika.drawGlyph()

Draw a single glyph onto an image.

Parameters (Dictionary)

ParameterTypeDescription
imgObjectTarget image.
font_typeIntegerFont selection index.
font_sizeIntegerRendering font size.
base_font_sizeIntegerBase font size for metrics.
outline_sizeIntegerWidth of the outline.
xIntegerX coordinate.
yIntegerY coordinate.
colorPixelMain text color.
outline_colorPixelOutline color.
codepointIntegerUTF-32 code point.
is_dimBooleanWhether to apply dimming.

Return

Boolean that represents success.


Suika.createDrawMsg()

Create a complex message drawing context for high-level text rendering.

Parameters (Dictionary)

ParameterTypeDescription
imageIntegerDestination image.
textStringMessage to draw.
fontTypeIntegerFont selection.
fontSizeIntegerFont size.
baseFontSizeIntegerBase font size.
rubySizeIntegerRuby size.
outlineSizeIntegerOutline width.
penXIntegerPen X position.
penYIntegerPen Y position.
areaWidthIntegerDraw area width.
areaHeightIntegerDraw area height.
leftMarginIntegerLeft margin.
rightMarginIntegerRight margin.
topMarginIntegerTop margin.
bottomMarginIntegerBottom margin.
lineMarginIntegerLine margin.
charMarginIntegerCharacter margin.
colorIntegerColor.
outlineColorIntegerOutline color.
bgColorIntegerBackground color.
fillBgBooleanFill background?
dimBooleanDim?
ignoreLFBooleanIgnore LF?
ignoreFontBooleanIgnore font change?
ignoreOutlineBooleanIgnore outline change?
ignoreColorBooleanIgnore color change?
ignoreSizeBooleanIgnore size change?
ignorePositionBooleanIgnore cursor change?
ignoreRubyBooleanIgnore ruby?
ignoreWaitBooleanIgnore inline wait?
inlineWaitHookFunctionInline wait hook.
tategakiBooleanUse tategaki?

Return

A message drawing context object.


Suika.destroyDrawMsg()

Destroy a message drawing context.

Parameters (Dictionary)

ParameterTypeDescription
contextObjectDraw message context.

Return

No return.


Suika.countDrawMsgChars()

Count the remaining characters excluding escape sequences.

Parameters (Dictionary)

ParameterTypeDescription
contextObjectDraw message context.

Return

Returns an integer.


Suika.drawMessage()

Draw characters in a message up to (maxChars) characters.

Parameters (Dictionary)

ParameterTypeDescription
contextObjectDraw message context.
maxCharsIntegerMax chars.

Return

Returns an integer that indicates the count of characters drawn in the call.


Suika.getDrawMsgPenPosition()

Get the current pen position from a drawing context.

Parameters (Dictionary)

ParameterTypeDescription
contextObjectDrawing context.

Return

An object containing x and y.


Suika.isEscapeSequenceChar()

Check if a character is part of an escape sequence.

Parameters (Dictionary)

ParameterTypeDescription
cStringCharacter to check.

Return

Boolean value.


Suika.moveToTagFile()

Load a new tag file and move the execution point to its beginning.

Parameters (Dictionary)

ParameterTypeDescription
fileStringPath to the .novel or script file.

Return

Boolean that represents success or failure.


Suika.getTagCount()

Get the total number of tags in the current script file.

Parameters (Dictionary)

No parameters.

Return

Integer representing the tag count.


Suika.moveToTagIndex()

Move the execution pointer to a specific tag index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerTarget tag index.

Return

Boolean value.


Suika.moveToNextTag()

Move the execution pointer to the very next tag.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.moveToLabelTag()

Jump to a specific label.

Parameters (Dictionary)

ParameterTypeDescription
nameStringTarget label name.

Return

Boolean value.


Suika.moveToMacroTag()

Jump to a specific macro by name.

Parameters (Dictionary)

ParameterTypeDescription
nameStringTarget macro name.

Return

Boolean value.


Suika.moveToElseTag()

Jump to a correspoinding else/elseif/endif tag.

Parameters (Dictionary)

ParameterTypeDescription
nameStringTarget macro name.

Return

Boolean value.


Suika.moveToEndIfTag()

Jump to a correspoinding endif tag.

Parameters (Dictionary)

ParameterTypeDescription
nameStringTarget macro name.

Return

Boolean value.


Suika.moveToEndMacroTag()

Jump to a correspoinding endmacro tag.

Parameters (Dictionary)

ParameterTypeDescription
nameStringTarget macro name.

Return

Boolean value.


Suika.getTagFileName()

Get the current script file name current tag.

Parameters (Dictionary)

No parameters.

Return

String representing the file name.


Suika.getTagName()

Get the name of the current tag.

Parameters (Dictionary)

No parameters.

Return

String representing the tag name.


Suika.getTagPropertyCount()

Get the number of the properties of the current tag.

Parameters (Dictionary)

No parameters.

Return

String representing the name or value.


Suika.getTagPropertyName()

Iterate through and retrieve the properties (arguments) of the current tag.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerProperty index.

Return

String representing the name.


Suika.getTagPropertyValue()

Iterate through and retrieve the properties (arguments) of the current tag.

Parameters (Dictionary) (for PropertyName/Value)

ParameterTypeDescription
indexIntegerProperty index.

Return

String representing the value.


Suika.getTagArgBool()

Get a specific argument of the current tag, with support for default values and optionality.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the argument.
omissibleBooleanWhether the argument is optional.
defValBooleanDefault value if missing.

Return

The value of the argument in the requested type.


Suika.getTagArgInt()

Get a specific argument of the current tag, with support for default values and optionality.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the argument.
omissibleBooleanWhether the argument is optional.
defValIntegerDefault value if missing.

Return

The value of the argument in the requested type.


Suika.getTagArgFloat()

Get a specific argument of the current tag, with support for default values and optionality.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the argument.
omissibleBooleanWhether the argument is optional.
defValFloatDefault value if missing.

Return

The value of the argument in the requested type.


Suika.getTagArgString()

Get a specific argument of the current tag, with support for default values and optionality.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the argument.
omissibleBooleanWhether the argument is optional.
defValStringDefault value if missing.

Return

The value of the argument in the requested type.


Suika.evaluateTag()

Evaluate the property values of the current tag to expand inline variables. (${varname} form)

Calling this API updates the cache for the property values.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.pushTagStackIf()

Manage the internal stack for [if] conditional blocks.

This API marks the if block position for nested block processing.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.popTagStackIf()

Manage the internal stack for if conditional blocks.

This API marks the end of if block for nested block processing.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.pushTagStackWhile()

Manage the internal stack for loops (while).

This API marks the while block for nested block processing.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.popTagStackWhile()

Manage the internal stack for loops (while).

This API marks the end of while block for nested block processing.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.pushTagStackFor()

Manage the internal stack for loops (for).

This API marks the for block for nested block processing.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.popTagStackFor()

Manage the internal stack for loops (for).

This API marks the end of for block for nested block processing.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.loadAnimeFromFile()

Load an animation definition from a file and register it.

Parameters (Dictionary)

ParameterTypeDescription
fileStringPath to the anime file.
reg_nameStringRegistration name for the anime.

Return

An array of boolean that indicate each layer is loaded or not.


Suika.newAnimeSequence()

Begin describing a new animation sequence for a specific layer. This API is used for manually generated animations.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerTarget stage layer index.

Return

Boolean that represents success.


Suika.addAnimeSequencePropertyF()

Add a float property (e.g., position, alpha) to the current anime sequence. This API is used for manually generated animations.

Parameters (Dictionary)

ParameterTypeDescription
keyStringProperty key (e.g., "x", "y", "a").
valFloatTarget value.

Return

Boolean value.


Suika.addAnimeSequencePropertyI()

Add an integer property (e.g., position, alpha) to the current anime sequence. This API is used for manually generated animations.

Parameters (Dictionary)

ParameterTypeDescription
keyStringProperty key (e.g., "x", "y", "a").
valIntegerTarget value.

Return

Boolean value.


Suika.startLayerAnime()

Start the registered animation sequence for a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerTarget stage layer index.

Return

Boolean value.


Suika.isAnimeRunning()

Check the overall animation status.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isAnimeFinishedForLayer()

Check if a specific layer's animation has ended.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerTarget stage layer index.

Return

Boolean value.


Suika.updateAnimeFrame()

Update the animation frame state. Usually called once per frame.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.loadEyeImageIfExists()

Manage eye-blinking (eye-patch) image and animation for a character position.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position (Left, Center, etc.).
fileStringPath to the eye image file.

Return

Boolean value.


Suika.reloadEyeAnime()

Restart the eye-blinking (eye-patch) animation for a character position.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position (Left, Center, etc.).

Return

Boolean value.


Suika.runLipAnime()

Start lip-sync animation based on the message content for a character.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.
textStringThe message text to sync with.

Return

No return.


Suika.stopLipAnime()

Stop lip-sync animation.

Parameters (Dictionary)

ParameterTypeDescription
chposIntegerCharacter position.

Return

No return.


Suika.clearLayerAnimeSequence()

Clear animation sequences for a specific layer.

Parameters (Dictionary)

ParameterTypeDescription
layerIntegerTarget stage layer index.

Return

No return.


Suika.clearAllAnimeSequence()

Clear animation sequences for all layers.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.setVariableInt()

Set a value to a local or global variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.
valueIntegerValue to set

Return

Boolean that represents success or failure.


Suika.setVariableFloat()

Set a value to a local or global variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.
valueFloatValue to set

Return

Boolean that represents success or failure.


Suika.setVariableString()

Set a value to a local or global variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.
valueStringValue to set

Return

Boolean that represents success or failure.


Suika.getVariableInt()

Get the current value of a variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.

Return

The value of the variable in integer.


Suika.getVariableFloat()

Get the current value of a variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.

Return

The value of the variable in float.


Suika.getVariableString()

Get the current value of a variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.

Return

The value of the variable in string


Suika.unsetVariable()

Unset (delete) a specific variable.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable to unset.

Return

No return.


Suika.unsetLocalVariables()

Unset (delete) all local variables.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.makeVariableGlobal()

Set a variable to be global (persistent across saves).

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.
is_globalBooleanWhether to make it global.

Return

Boolean value.


Suika.isGlobalVariable()

Check the variable's global status.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName of the variable.

Return

Boolean value.


Suika.getVariableCount()

Get the number of variables.

Parameters (Dictionary)

No parameters.

Return

Integer for count.


Suika.getVariableName()

Iterate through the registered variables.

Parameters (Dictionary) (for getVariableName)

ParameterTypeDescription
indexIntegerIndex of the variable.

Return

String for name.


Suika.checkVariableExists()

Check if a variable with the specified name exists.

Parameters (Dictionary)

ParameterTypeDescription
nameStringName to check.

Return

Boolean value.


Suika.executeSaveGlobal()

Execute a global save. Global data typically includes persistent settings.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents success or failure.


Suika.executeLoadGlobal()

Execute a global load. Global data typically includes persistent settings.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents success or failure.


Suika.executeSaveLocal()

Save the game progress to a specific slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

Boolean that represents success or failure.


Suika.executeLoadLocal()

Load game progress from a specific slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

Boolean that represents success or failure.


Suika.checkSaveExists()

Check if the save data exists for the specified slot index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

Boolean value.


Suika.deleteLocalSave()

Delete a local save slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

No return.


Suika.deleteGlobalSave()

Delete the entire global save data.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.checkRightAfterLoad()

Check if the current frame is immediately following a successful load operation.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.getSaveTimestamp()

Get the timestamp (Unix time) when the save data was created.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

Integer (timestamp).


Suika.getLatestSaveIndex()

Get the index of the most recently updated save slot.

Parameters (Dictionary)

No parameters.

Return

Integer representing the slot index.


Suika.getSaveChapterName()

Retrieve the chapter title stored in a save slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

String representing the chapter name.


Suika.getSaveLastMessage()

Retrieve the last displayed message stored in a save slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

String representing the message.


Suika.getSaveThumbnail()

Get the thumbnail image associated with a save slot.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex of the save slot.

Return

An image object.


Suika.clearHistory()

Clear all messages from the history (backlog).

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.addHistory()

Add a new entry to the history.

Parameters (Dictionary)

ParameterTypeDescription
nameStringCharacter name.
msgStringMessage text.
voiceStringPath to the voice file.
bodyColorIntegerBody color.
bodyOutlineColorIntegerBody outline color.
nameColorIntegerName color.
nameOutlineColorIntegerName outline color.

Return

Boolean that represents success.


Suika.getHistoryCount()

Get the total number of entries currently in the history.

Parameters (Dictionary)

No parameters.

Return

Integer representing the history count.


Suika.getHistoryName()

Retrieve the name at a specific history index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex in the history.

Return

String value.


Suika.getHistoryMessage()

Retrieve the message at a specific history index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex in the history.

Return

String value.


Suika.getHistoryVoice()

Retrieve the voice path at a specific history index.

Parameters (Dictionary)

ParameterTypeDescription
indexIntegerIndex in the history.

Return

String value.


Suika.loadSeen()

Load the seen (read) flags for the current script file.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents success.


Suika.saveSeen()

Save the seen (read) flags for the current script file.

Parameters (Dictionary)

No parameters.

Return

Boolean that represents success.


Suika.getSeenFlags()

Get the seen status for the current tag.

Parameters (Dictionary)

No parameters.

Return

Get returns Integer.

For a [text] tag, 0 means unread and 1 means read.

For a [choose] tag, each bit indicates the option is selected before.


Suika.setSeenFlags()

Set the seen status for the current tag.

Parameters (Dictionary)

ParameterTypeDescription
flagIntegerSeen status flag.

Return

No return.


Suika.loadGUIFile()

Load a GUI definition file and prepare it for execution.

Parameters (Dictionary)

ParameterTypeDescription
fileStringPath to the .gui file.
sysBooleanWhether it's a system GUI (Save/Load/etc).

What is System GUI

System GUI is typically called when [text] or [choose] is running, and the control will return to the interrupted tag.

Return

Boolean that represents success or failure.


Suika.startGUI()

Start the loaded GUI.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.stopGUI()

Stop the currently running GUI.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isGUIRunning()

Check if a GUI is currently active.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.isGUIFinished()

Check if a GUI has completed its operation.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.getGUIResultLabel()

Get the label of the button that was selected to finish the GUI.

Parameters (Dictionary)

No parameters.

Return

String representing the result label.


Suika.isGUIResultTitle()

Check if the GUI was closed with a "back to title" action.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.checkIfSavedInGUI()

Check if a save operation was performed while the GUI was active.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.checkIfLoadedInGUI()

Check if a load operation was performed while the GUI was active.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.checkRightAfterSysGUI()

Check if the current frame is immediately following a return from a system GUI.

Parameters (Dictionary)

No parameters.

Return

Boolean value.


Suika.getMillisec()

Get a lap time since the time origin in milliseconds.

Parameters (Dictionary)

No parameters.

Return

Integer in milliseconds.


Suika.checkFileExists()

Check if a file exists.

Parameters (Dictionary)

ParameterTypeDescription
fileStringPath to the file.

Return

Returns boolean.


Suika.readFileContent()

Read an entire file content.

Parameters (Dictionary) (for readFileContent)

ParameterTypeDescription
fileStringPath to the file.

Return

Returns a string.


Suika.writeSaveData()

Directly write raw save data associated with a key.

Parameters (Dictionary)

ParameterTypeDescription
keyStringUnique key for the data.
dataStringData to write/read.

Return

Boolean that represents success or failure.


Suika.readSaveData()

Directly read raw save data associated with a key.

Parameters (Dictionary)

ParameterTypeDescription
keyStringUnique key for the data.

Return

Boolean that represents success or failure.


Suika.playVideo()

Control video playback.

Parameters (Dictionary) (for playVideo)

ParameterTypeDescription
fileStringPath to the video file.
is_skippableBooleanWhether the user can skip the video.

Return

Play returns Boolean; IsPlaying returns Boolean.


Suika.stopVideo()

Stop the video playback.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.isVideoPlaying()

Check if a video is playing back.

Parameters (Dictionary)

No parameters.

Return

Returns boolean.


Suika.isFullScreenSupported()

Check for full-screen mode ability.

Parameters (Dictionary)

No parameters.

Return

Boolean.


Suika.enterFullScreenMode()

Enter the full-screen mode.

Parameters (Dictionary)

No parameters.

Return

No return.


Suika.speakText()

Execute Text-to-Speech (TTS) for the given message.

Parameters (Dictionary)

ParameterTypeDescription
msgStringText to be spoken.

Return

No return.