Writing variables
Usevar{...}. It reads like code, and several assignments can share one block:
Reading variables
Anywhere text is shown (message, actionbar, title, setname, command), use <var.name>:
.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.
Placeholders
The full set of tokens substituted in text, per recipient:
Because text resolves per recipient,
<target.var.x> differs for each player a message reaches.
A hit counter
Long-form mechanics
MythicMobs-style equivalents exist too, useful for the two thingsvar{} can’t do: math and locations.
Variables also drive conditions: “enrage when phase is 2” is
if{cond=var.phase >= 2;then=enrage}.
