Skip to main content
Variables let mobs remember things: hit counters, phase numbers, charge states. They’re what turn a bag of effects into a boss with memory.

Writing variables

Use var{...}. It reads like code, and several assignments can share one block:

Reading variables

Anywhere text is shown, and in any number, use <var.name>:
An unset variable resolves to empty. Numbers print without a trailing .0. Names are case-insensitive.

Scopes

Where a variable lives. No prefix means the mob itself: Placeholders follow the same rule: <var.x> is the mob’s, <target.var.x>, <global.var.x>, <world.var.x>, <skill.var.x> for the rest. All variables are in-memory and reset on server restart. Because text resolves per recipient, <target.var.x> differs for each player a message reaches. Every other placeholder (<caster.hp>, <target.l.x>, <random.1to5>, …) is on Placeholders.

A hit counter

Long-form mechanics

MythicMobs’ variable mechanics work as written, and cover the two things var{} can’t do: maths and locations. Variables drive conditions too: “enrage when phase is 2” is if{cond=var.phase >= 2;then=enrage}, or variableEquals{var=caster.phase;value=2} in a conditions: list.