Skip to content

Command Reference

Meredith Espinosa edited this page Nov 13, 2021 · 1 revision

Below is a list of all the commands available in GB Studio, and their syntax inside of GBS Toolkit.

This list is in progress for GB Studo 2.0.0 Beta 5. It may not match with other versions, and is definitely missing !

Important

There are various general properties that all events can have. They are not required to be present, and should usually not be changed in kdl:

  • __eventid: Stores the unique UUID for this command.
  • __collapse: If true, this command and its children will be collapsed in the GB Studio UI.
  • __comment: If true, this command and its children will be ignored during compilation.
  • __label: Stores a custom name for the command in GB Studio.

The end command needs to be placed at the end of every block of children and every script. This may be done automatically in the future. Adding a __eventid property is not necessary.

Variable Types

There are a few types of data that will regularly be used for commands:

  • Numbers: Any numerical value. May sometimes be placed in quotes due to JavaScript typing quirks.
  • Literals: Any string value with specific required values. Options will be listed for literals.
  • Actors: Any actor name or "player". Actor names are based off the folder name for each actor.
    • Actor names will be numbers inside of player scripts! These are based off argument number.
  • Scenes: Any scene name. Scene names are based off the folder name for each scene.
  • Variables: A number wrapped in dollar signs, ex. `"$12$". This formatting may change in future GBS Toolkit versions.
  • Assets: The names of sprites, songs, and more. Asset names are based on the filename of the asset.
  • Palettes: The names of color palettes.
  • Custom events: The names of custom events.
  • Actor Properties: Active properties of an actor in the scene. Formatted as <Actor>:<Property>. Property values are as such:
    • xpos: the X coordinate of the actor's position.
    • ypos: the Y coordinate of the actor's position.
    • direction: the current direction the actor is facing. down = 1, right = 2, up = 3, left = 4.
    • moveSpeed: the current movement speed of the actor.
    • animSpeed: the current animation speed of the actor.
    • frame: the current animation frame the actor is on.

Actor Commands

enableCollisions <Actor>

GB Studio equivalent: "Actor: Collisions Enable"

Enables the actor <Actor> colliding with objects.

disaleCollisions <Actor>

GB Studio equivalent: "Actor: Collisions Disable"

Disables the actor <Actor> colliding with objects.

show <Actor>

GB Studio equivalent: "Actor: Show"

Shows the actor <Actor> if they are hidden.

hide <Actor>

GB Studio equivalent: "Actor: Hide"

Hides the actor <Actor> if they are shown.

emote <Actor> <Emote>

GB Studio equivalent: "Actor: Emote Bubble"

Makes the actor <Actor> display emote number <Emote>:

  • 1 - Shock
  • 2 - Question
  • 3 - Love
  • 4 - Pause
  • 5 - Anger
  • 6 - Sweat
  • 7 - Music
  • 8 - Sleep

These will change in GB Studio V3. Please keep this in mind.

storeDirection <Actor> <Variable>

GB Studio equivalent: "Actor: Store Direction In Variable"

Stores the current direction of actor <Actor> in variable number <Variable>.

setDirection <Actor> <Value>

GB Studio equivalent: "Actor: Set Direction"

Sets the direction of actor <Actor> to a literal "up" "down" "left" or "right", a variable, or an actor property <Value>.