Skip to content

Rules and signals

A rule says: when this happens, if these hold, do these things, in order. Rules open doors when a boss dies, start waves when the party walks into an arena, give a key for pulling three levers, and show a title when a player finds a hidden room.

Variables remember things between rules, such as how many levers are pulled. Signals let one rule (or another plugin) set off others by name.

Nothing of the rules themselves, only what they do: a title as they walk into a hall, a drawbridge that drops when the boss falls, fire that bursts from the floor every ten seconds, a door that opens once all three levers are down.

Worked example: when the Forgemaster falls

Section titled “Worked example: when the Forgemaster falls”

In the forge dungeon, killing the Forgemaster ends his arena’s waves, seals the lava round it, opens the vault and tells everyone.

  1. In the Logic tool, choose Rules…. The Rules dialog lists every rule in the project.
  2. Choose Add a rule under For the whole dungeon, and name it “The Forgemaster falls”.
  3. When: pick Mobs are killed, the mob type The Forgemaster, and 1.
  4. If: leave it empty (“Always, when it happens”).
  5. Then, in order:
    • Start or stop waves: stop “The anvil’s call”.
    • Fill an area with a block: each arena edge with basalt, so the lava round it is safe.
    • Open, close or lock a door: open the Vault door.
    • Show a title: “The Forgemaster falls”, “The vault stands open. Take the hoard and go.”, to everyone.
    • Play a sound: ui.toast.challenge_complete.
  6. How often: once in the run.
The Rules dialog with “The Forgemaster falls” open: When, If, Then in order, How often
A rule in the Rules dialog

The forge’s Fire vents rule shows the other common shape: Time passes, every 10 seconds, then for each vent in turn: particles, Wait 1 second, fill it with fire, a sound, Wait 2 seconds, fill it with air.

A rule can belong to an object (an area, a door, a switch, waves) and shows in that object’s panel under Rules. Rules for the whole dungeon live in the Rules dialog. Where a rule lives changes nothing about how it runs; it only decides where you find it.

Field What it does Default
Name Optional. Shown on the rule’s line and in Check Empty
When The trigger: what sets the rule off Fits its object, such as “A player walks into an area” for an area
If Conditions. All must hold. Each can be turned round with if / unless None: always
Then, in order Actions, run top to bottom. Earlier and Later move one None
How often once in the run, once for each player, or every time Once for an area’s rule, every time otherwise
wait … s between The least time between two firings, by anyone 0
On from the start A rule switched off waits until another rule switches it on On
When Fires
The run starts When the run begins (after the lobby)
A player walks into an area As someone walks in; or, for the whole party, once every living member is inside
A player leaves an area As someone walks out
A lever, button or plate is used On, off, or either way
A door opens or closes However it happened: a rule, a key, a hand or its timer
A wave is cleared One wave, or all of them
A spawner is cleared Once it’s used up and all its mobs are dead
Mobs are killed Every so many kills of a mob type, by anyone
A checkpoint is reached As it becomes the party’s respawn point
A player dies
A player uses an item Right-clicking with that item in the main hand
Time passes So many seconds after the start, once or over and over
Another rule signals A signal by that name is sent
A variable changes It changes to a new value

The everyday ones: A variable is…, The player has an item, Someone is in an area, A door is…, A lever is on or off, An area is filled with a block, The party has so many players, A random chance, and Any of these… (which holds when any one of its own conditions does).

Also: A variable compared with another, Has a status, and the world: the date, the day of the week, the time of day, the weather, the biome, mobs near the player, what the player holds or wears, their health and potion effects. With companion plugins: The player has a permission or group, A placeholder is… (PlaceholderAPI) and A skill’s level is… (AuraSkills or mcMMO).

The everyday ones:

Action Does
Show a title, Chat message, Text above the hotbar Words on screen, to the player or everyone
Play a sound With volume and pitch
Give an item, Take an item What doesn’t fit drops at their feet
Give an effect A potion effect, for so many seconds
Teleport To the middle of an area’s floor, facing a way you pick
Open, close or lock a door Open, close, toggle, lock or unlock
Start or stop waves, Wake, stop or reset a spawner, Spawn mobs Mobs on cue
Change a variable Set to, add or flip
Switch a rule on or off
Send a signal Sets off every rule waiting for that signal
Set the checkpoint Makes it the party’s respawn point
Fill an area with a block Air clears it
Particles in an area A burst through the area
Wait The actions after it run that many seconds later
End the run Cleared or failed

Combat actions (heal, hit, shoot, statuses, zones, effects) are the same steps mob moves and item abilities use: see Boss move builder and Abilities and effects. Give or take a group or permission works with LuckPerms, and Give skill XP with AuraSkills or mcMMO. Run a server command runs a console command, once the server owner allows it.

The Rules dialog’s Variables tab.

Field What it does Default
Name What conditions and actions call it
Type flag (yes or no), number or text flag
Kept for the run, each party or each player the run
starts Its value at the start off, 0 or empty

Send a signal fires every rule whose trigger is Another rule signals with the same name. Signals tie things together:

  • one rule can send “boss-dead”, and several small rules each listen for it;
  • another plugin can send one with /vfd signal <player> <name>, to the run that player is in. Signals in the editor have a Copy command button that writes it for you.

A signal passes on the player who sent it, so “the player” in the rule it fires is still them.

  • Who “the player” is: whoever set the rule off. Triggers with no one behind them (Time passes, A wave is cleared, Mobs are killed, a variable kept for the run) have no player: a message to “the player” goes to everyone, and The player has an item doesn’t hold.
  • Wait holds only the actions after it. If the rule fires again meanwhile, both sets run.
  • Nothing runs after End the run.

The same as Java.

  • PlaceholderAPI: A placeholder is… reads any placeholder, such as %vault_eco_balance%. Without PlaceholderAPI it uses its “missing” value: holds or doesn’t, as you set.
  • LuckPerms: Give or take a group or permission. Without it, permissions given last until the player leaves, and groups can’t be given.
  • AuraSkills or mcMMO: skill-level conditions and Give skill XP.
  • Other plugins can send signals with /vfd signal. See Commands.
  • Run a server command needs allow-commands: true in the plugin’s config.
  • Read Check. It flags rules that name something that isn’t there, rules that can never fire, variables never set or never declared, doors with no way to open, keys nobody is given, waves that never start and switches that do nothing.
  • Once vs once for each player: a title for finding a hidden room is usually once for each player, so everyone in the party sees it.
  • Prefer signals to long rules. One rule that sends “boss-dead”, and small rules that each listen for it, are easier to read and change than one rule that does everything.
  • A wave rule fires per wave. “A wave is cleared” with wave 0 means all of them.
voxelforge.appPrivacyUser AgreementVF Dungeons licenceinfo@voxelforge.appMade by Voxelforge. Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft. Claude is a trademark of Anthropic. Voxelforge is not affiliated with or endorsed by Anthropic.