> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/server/muserver/data/monster/monsterai/monsteraiautomata.md).

# MonsterAIAutomata

<mark style="color:green;">State machine that determines when a monster changes behavior (e.g., from "idle" to "chasing," from "chasing" to "attacking," or from "attacking" to "fleeing"). Used by</mark> <mark style="color:green;"></mark><mark style="color:green;">`MonsterAIUnit.txt`</mark><mark style="color:green;">.</mark>

<table data-search="false"><thead><tr><th>Column</th><th>Accepted Values</th><th>Description</th></tr></thead><tbody><tr><td>Number</td><td>Number, one per state machine</td><td>Identifies this state machine. Referenced by the <code>Automata</code> column in <code>MonsterAIUnit.txt</code>.</td></tr><tr><td>Name</td><td>Text enclosed in quotes</td><td>Description of the transition (e.g., <code>"General -> Go"</code>), used for identification only.</td></tr><tr><td>Priority</td><td>Number, in sequence (0, 1, 2...)</td><td>Order in which this transition rule is evaluated within the same current state.</td></tr><tr><td>CurrentState</td><td>Number</td><td>The state the monster must currently be in for this rule to apply.</td></tr><tr><td>NextState</td><td>Number</td><td>The state the monster transitions to if the rule is triggered.</td></tr><tr><td>TransitionType</td><td>Number (fixed code)</td><td>Condition that triggers the state change (e.g., always, time-based, health-based, distance-based).</td></tr><tr><td>TransitionRate</td><td>Number (%)</td><td>Chance that the transition actually occurs when the condition is met.</td></tr><tr><td>TransitionValueType</td><td>Number, or <code>*</code></td><td>Determines how <code>TransitionValue</code> is interpreted. <code>*</code> = not used.</td></tr><tr><td>TransitionValue</td><td>Number, or <code>*</code></td><td>Value used by the condition (e.g., distance, time, health percentage). <code>*</code> = not used.</td></tr><tr><td>DelayTime</td><td>Number, in milliseconds</td><td>Minimum interval before this transition can be evaluated again.</td></tr></tbody></table>

### <mark style="color:yellow;">Notes</mark>

* The states (`CurrentState`/`NextState`) are fixed internal server values (e.g., idle, chase, attack, flee)—the same numbering scheme is used across all state machines in the file.
* A single `CurrentState` may have multiple entries with different `Priority` values—the server evaluates the lowest `Priority` first.
