Explore Videos Pricing Docs Launch Engine
Documentation

VXL Script

A simple yet powerful scripting language for creating interactive dialogues, quests, shops, and game logic.

📦

Blocks

# BLOCK_NAME
💰

Variables

$gold, $hp, $level
🎯

Actions

[give], [take], [set]
➡️

Flow

-> TARGET, -> END

# Blocks

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

Variables store player stats, items, currencies, and flags. Prefix any variable with $.

Stats

$hp, $max_hp, $mp, $stamina, $xp, $level

Attributes

$strength, $dexterity, $intelligence, $luck

Currencies

$gold, $gems, $silver, $tokens

Flags

$quest_active, $quest_done, $boss_dead

Items & Equipment

$sword_iron, $potion_hp_small, $key_dungeon, $shield_wood, $helmet_iron

💬 Dialogue

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?

* Player Choices

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

🔒 Conditions

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.

[⚡] Actions

Modify player state with actions. Actions are wrapped in square brackets.

[give item amount]

Give items or currency to the player.

[give $gold 100] [give $sword_iron 1] [give $xp 50]

[take item amount]

Remove items or currency from the player.

[take $gold 50] [take $key_dungeon 1] [take $hp 10]

[set variable value]

Set a variable to a specific value. Great for quest flags.

[set $quest_active 1] [set $hp 100] [set $boss_dead 1]

➡️ Flow Control

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

// Comments

Add notes to your script with comments. They won't affect gameplay.

// This is a comment
// Check if player has the quest item
-> REWARD (need 1 $dragon_head)

📜 Complete Example: Shop

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

🐉 Advanced Example: Quest

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