Actions Reference

All built-in actions for scenes and choices.


Core Actions

ActionDescriptionExampleDelayed
notificationDisplay a notification popup"Hello!"
flashDisplay a flash message"Item received!"
stateSet game states"game_state=battle, disable_ui=true"
popupOpen a popup or close current popup"my-popup" or false✓
propertyModify game properties (= set, > add, < subtract)"gold>100, score=0"
discover_loreMark one or more lore records as discovered"kingdom_of_luminaria" or "goblins, orcs, trolls"

property Examples

// String format (= set, > add, < subtract)
{ property: "gold>100" }           // add 100 to gold
{ property: "score=0, lives<1" }   // set score to 0, subtract 1 from lives

// Object format (for setting complex values)
{ property: { settings: { volume: 80, theme: "dark" } } }

Dungeon Actions

ActionDescriptionExampleDelayed
musicPlay background music"battle_theme"
soundPlay a sound effect"sword_slash"
assetAdd, update, or remove assets(!)"bg1, alice(x=50)" or "!bg1"
flagSet flags (= set, > add, < subtract)"gold>10, count=5"
exitExit current scenetrue✓
enterEnter a room"room5"✓
scenePlay a scene"intro_scene"✓
redirectRedirect to a scene"&alt_scene"
choicesLoad choices from a scene"&choice_scene"
choices_overLoad choices (override mode: hide default scene ~choices)"&choice_scene"
actorAdd, move, or remove actors"alice->center, bob->left"
questAdd quest log entry"main_quest.goal1.log1"

Scene Params

ParamDescriptionExample
introPlay block 1 on first visit, block 2 on repeat visits{intro: true}

intro

Add {intro: true} to the first paragraph of a scene. On the first visit, column 1 plays normally. On any subsequent visit, the engine skips column 1 and plays column 2 instead.

Example (DryadScript):

#npc~talk{intro: true}
1
%
The old man looks up from his desk.

old_man: Ah, a visitor. I am Gareth, the keeper of this archive.

old_man: What brings you here?
%
Gareth nods as you approach.

old_man: Back again? What do you need?

Column 1 (before %) plays on first visit. Column 2 (after %) plays on every subsequent visit. Both share the same choices below.

Note: Column 2 must exist. If missing, the engine logs an error.

Character Actions

ActionDescriptionExampleDelayed
join_partyAdd character to party"alice, bob"
leave_partyRemove character from party"alice"
create_characterCreate a new character{ id: "npc1", template: "villager" }
update_characterUpdate character properties{ id: "alice", party: true }
delete_characterDelete a character{ id: "npc1" }
statusApply / remove status effects per target. & separates items; ! prefix removes"alice->buff1 & buff2, bob->!debuff"
charModify character property (= set, > add, < subtract)"alice.resource.health>10"
Types: trait, attribute, stat, resource, skinStyle"mc.attribute.belly=2"
skin_layerAdd / remove skin layers per target. & separates layers; ! prefix removes"alice->armor & helmet, bob->!cloak"
item_slotAdd / remove equipment slots per target. & separates slots; ! prefix removes"alice->ring & necklace, bob->!belt"
skillLearn a skill for character"alice.fire_magic.fireball"

Targeted-spec syntax (status, skin_layer, item_slot)

Each action takes a string of the form targetId->item & item & ..., targetId->!item, ...:

  • Comma separates per-target groups.
  • Within a group, & separates items.
  • Items prefixed with ! are removed; bare items are added.
{ status: "alice->blessed & focused, bob->!cursed" }
{ skin_layer: "mc->armor_dirty, mc->!armor_clean" }
{ item_slot: "alice->extra_ring, bob->!ring_3" }

Item Actions

ActionDescriptionExampleDelayed
equip_itemEquip item to charactertrue
unequip_itemUnequip item from charactertrue
add_itemAdd item to inventory"sword, potion#5"
lootOpen loot exchange"chest_inventory"✓
tradeOpen trade exchange"merchant_inventory"✓
learn_recipeLearn a crafting recipe"iron_sword, steel_sword"