A simple yet powerful scripting language for creating interactive dialogues, quests, shops, and game logic.
# BLOCK_NAME $gold, $hp, $level [give], [take], [set] -> TARGET, -> END
Blocks are named sections of your script. Each block starts with
# followed by the block name. The
first block in your script is the entry point.
# START
Guide: Welcome to the village!
-> END
# SHOP
Merchant: What would you like to buy?
-> END
Variables store player stats, items, currencies, and flags. Prefix
any variable with $.
$hp, $max_hp, $mp, $stamina, $xp, $level $strength, $dexterity, $intelligence, $luck $gold, $gems, $silver, $tokens $quest_active, $quest_done, $boss_dead $sword_iron, $potion_hp_small, $key_dungeon, $shield_wood,
$helmet_iron Write dialogue with the speaker's name followed by a colon. Each line is a separate speech bubble.
Merchant: Welcome to my shop!
Merchant: I have the finest wares in all the land.
Player: What do you have for sale?
Create branching dialogue with choices. Start a line with
* and point to a target block with
->.
Guard: Halt! State your business.
* I'm here to trade -> MARKET
* I seek the King -> CASTLE
* Just passing through -> END
Add requirements to choices or flow using
(need amount $variable). The
choice only appears if the player meets the requirement.
Merchant: What would you like?
* Buy Sword (50g) (need 50 $gold) -> BUY_SWORD
* Buy Potion (10g) (need 10 $gold) -> BUY_POTION
* Leave -> END
// Auto-jump if player has a key
-> OPEN_DOOR (need 1 $key_dungeon)
Door: It's locked. You need a key. Modify player state with actions. Actions are wrapped in square brackets.
Give items or currency to the player.
[give $gold 100] [give $sword_iron 1] [give $xp 50] Remove items or currency from the player.
[take $gold 50] [take $key_dungeon 1] [take $hp 10] Set a variable to a specific value. Great for quest flags.
[set $quest_active 1] [set $hp 100] [set $boss_dead 1]
Control the flow of your script with jumps. Use
-> BLOCK_NAME to jump to another
block, or -> END to end the conversation.
# START
NPC: Hello there!
-> GREETING
# GREETING
NPC: Nice to meet you.
-> END Here's a full example of a merchant shop script.
# START
Merchant: Finest wares in the land!
* Buy Iron Sword (50g) (need 50 $gold) -> BUY_SWORD
* Buy Potion (10g) (need 10 $gold) -> BUY_POTION
* Just looking -> LEAVE
# BUY_SWORD
[take $gold 50]
[give $sword_iron 1]
Merchant: A sharp choice. It will serve you well.
-> END
# BUY_POTION
[take $gold 10]
[give $potion_hp_small 1]
Merchant: Stay healthy out there!
-> END
# LEAVE
Merchant: Come back when you have coin.
-> END A multi-state quest with conditional logic.
# START
// Check if quest is already done
* (need 1 $quest_dragon_dead) -> HERO
* (need 1 $quest_dragon_active) -> RETURN
King: A Dragon plagues our lands!
* I will slay it! -> ACCEPT
* Sounds dangerous... -> COWARD
# ACCEPT
King: Take this key to the dragon's lair.
[give $key_dragon_lair 1]
[set $quest_dragon_active 1]
-> END
# COWARD
King: Then we are doomed...
-> END
# RETURN
// Auto-complete if player has proof
-> VICTORY (need 1 $dragon_head)
King: Have you slain the beast?
-> END
# VICTORY
[take $dragon_head 1]
[set $quest_dragon_active 0]
[set $quest_dragon_dead 1]
[give $gold 5000]
[give $sword_excalibur 1]
King: You are the Savior of the Realm!
-> END
# HERO
King: All hail the Dragon Slayer!
-> END
// Comments
Add notes to your script with comments. They won't affect gameplay.