MonsterAIElement.xml
Defines the actual actions monsters perform when an Automata transition places them in a state. Each Element is one atomic behavior: chase, attack, heal, summon, teleport, grant immunity, switch AI.
File Location#
Data/Monster/MonsterAIElement.xml
Loaded once at GameServer startup. Changes require a restart. Supports up to 100 element entries (Number 0-99).
After the XML is parsed, the loader also opens Data/Monster/MovePath/MovePath_35.dat, the Crywolf patrol route. It is a plain-text section file in the same format as the event .dat files: section id 2, a //State Map X Y comment header, then one whitespace-delimited waypoint per line, closed by end. State is the AI state the waypoint belongs to, Map is the map number (34 = Crywolf), and X / Y are tile coordinates. Edit it with any text editor; changes require a GameServer restart.
Element Classes#
Class is informational for the evaluator - the actual behavior is dispatched purely by Type. Keep Class consistent with the Type for clarity and for the AI Unit slot mapping.
| Class | Name | Meaning |
|---|---|---|
0 | CONDITION | Passive check / wait (no action) |
1 | MOVE | Movement actions |
2 | ATTACK | Offensive actions |
3 | HEAL | Recovery actions |
4 | AVOID | Evasion actions |
5 | HELP | Support actions (heal allies, buff) |
6 | SPECIAL | Summon, immunity, teleport, skill-pattern attack |
7 | EVENT | AI change (used in shipped data for Type 68) |
Element Types#
Dispatched by Type value. Types not listed here are ignored by the evaluator.
| Type | Name | Meaning |
|---|---|---|
1 | COMMON_NORMAL | Idle / no-op (Class 0) |
11 | MOVE_NORMAL | Chase (move toward target) or patrol when no target |
12 | MOVE_TARGET | Goal move to (X, Y). Uses map movement path if available |
13 | GROUP_MOVE | Group migration. TODO: verify exact semantics |
14 | GROUP_MOVE_TARGET | Group goal move. TODO: verify exact semantics |
21 | ATTACK_NORMAL | General basic attack on current target |
22 | ATTACK_AREA | Position attack at (X, Y) |
23 | ATTACK_PENETRATION | "Rubber Meat" skill-disabling attack |
31 | HEAL_SELF | Self treatment |
32 | HEAL_GROUP | Group therapy (nearby group members) |
41 | AVOID_NORMAL | Flee from danger |
51 | SUPPORT_HEAL | Heal a targeted ally within 6 tiles |
52 | SUPPORT_BUFF | Declared but currently a no-op in the evaluator |
62 | SPECIAL_SOMMON | Group summon: revives a dead member of the same group via monster skill unit 30 |
64 | SPECIAL_IMMUNE | Grants damage immunity. X = physical immunity ticks, Y = magic immunity ticks. Any value below 1 is clamped to 10 ticks |
65 | SPECIAL_NIGHTMARE_SUMMON | Kanturu Nightmare summon hook (fires monster skill unit 30, triggers Kanturu monster stage 6) |
66 | SPECIAL_WARP | Teleport self to (X, Y); broadcasts teleport skill and clears current target |
67 | SPECIAL_SKILLATTACK | Boss skill rotation. Uses the monster's skill slots 0/1/2. TargetType = percent roll for skill 0, X = percent for skill 1, Y = percent for skill 2 |
68 | SPECIAL_CHANGEAI | Calls ChangeAIOrder on group TargetType with order index X. Switches every group member to StartAI / AI01 / AI02 / AI03 |
71 | EVENT | Declared in the enum but has no dispatch branch; treat as unused |
Attributes#
<Element Number="..." Name="..."
Class="..." Type="..."
SuccessRate="..." DelayTime="..."
TargetType="..." X="..." Y="..." />
| Attribute | Type | Effect |
|---|---|---|
Number | 0-99 | Unique Element ID. Referenced by MonsterAIUnit Element slots |
Name | string | Human-readable label. Stored but not used for logic |
Class | 0-7 | Informational category (see Element Classes) |
Type | int | Dispatch key (see Element Types) |
SuccessRate | 0-100 | Probability the element actually executes. A random 0-99 above this rate skips the action |
DelayTime | ms | Used by the owning AI Unit rule; the element itself does not re-check it |
TargetType | int or * | * stored as -1. In shipped data 1 = player targets, 2 = self/monster. For Type 67 it is the skill-0 percent. For Type 68 it is the target group number |
X | int or * | Context-dependent. Move/warp destination X, immunity physical ticks, skill-1 percent for Type 67, AI order (0-3) for Type 68 |
Y | int or * | Context-dependent. Move/warp destination Y, immunity magic ticks, skill-2 percent for Type 67 |
* values for TargetType, X, and Y are stored as -1.
Cross-File Dependencies#
| Attribute | Related in |
|---|---|
Number | Referenced by MonsterAIUnit.ElementNormal / Move / Attack / Heal / Avoid / Help / Special / Event in MonsterAIUnit.xml |
Type 66 warp targets | Must land on a walkable tile; see MapManager.xml |
Type 62 group summon | MonsterAIGroup.xml (dead member with matching GroupNumber) |
Type 68 AI change | TargetType is a group from MonsterAIGroup.xml; X selects StartAI / AI01 / AI02 / AI03 |
Monster skill slots used by Type 67 | Monster skill configuration; see MonsterAIRule.xml and monster-skill configs |
Common Issues#
- Monster attacks but never approaches - Element mapped to state 1 (MOVE) missing or its
Typeis not11(Chase). - Goal-move element lands the monster in a dead-end - Type
12ignores walkability; verify (X,Y) is reachable or provide a Crywolf-style path file. - Teleport always lands on the same tile - Type
66hard-codes (X,Y). Use multiple alternating elements with different Automata priorities for variety. - Immunity is permanent - Type
64withXorYbelow 1 defaults to 10 ticks, not zero. Set explicit values, with 1 tick roughly 1 second. - Attack pattern always fires the same skill - Type
67rollsTargetType, thenX, thenYin order. Lower the earlier percents or set them to 0 to let later skills fire. - AI change does nothing - Type
68needs a valid group inTargetTypeand an order (0-3) inXthat points at a populatedStartAI/AI01/AI02/AI03slot.