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.

ClassNameMeaning
0CONDITIONPassive check / wait (no action)
1MOVEMovement actions
2ATTACKOffensive actions
3HEALRecovery actions
4AVOIDEvasion actions
5HELPSupport actions (heal allies, buff)
6SPECIALSummon, immunity, teleport, skill-pattern attack
7EVENTAI change (used in shipped data for Type 68)

Element Types#

Dispatched by Type value. Types not listed here are ignored by the evaluator.

TypeNameMeaning
1COMMON_NORMALIdle / no-op (Class 0)
11MOVE_NORMALChase (move toward target) or patrol when no target
12MOVE_TARGETGoal move to (X, Y). Uses map movement path if available
13GROUP_MOVEGroup migration. TODO: verify exact semantics
14GROUP_MOVE_TARGETGroup goal move. TODO: verify exact semantics
21ATTACK_NORMALGeneral basic attack on current target
22ATTACK_AREAPosition attack at (X, Y)
23ATTACK_PENETRATION"Rubber Meat" skill-disabling attack
31HEAL_SELFSelf treatment
32HEAL_GROUPGroup therapy (nearby group members)
41AVOID_NORMALFlee from danger
51SUPPORT_HEALHeal a targeted ally within 6 tiles
52SUPPORT_BUFFDeclared but currently a no-op in the evaluator
62SPECIAL_SOMMONGroup summon: revives a dead member of the same group via monster skill unit 30
64SPECIAL_IMMUNEGrants damage immunity. X = physical immunity ticks, Y = magic immunity ticks. Any value below 1 is clamped to 10 ticks
65SPECIAL_NIGHTMARE_SUMMONKanturu Nightmare summon hook (fires monster skill unit 30, triggers Kanturu monster stage 6)
66SPECIAL_WARPTeleport self to (X, Y); broadcasts teleport skill and clears current target
67SPECIAL_SKILLATTACKBoss 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
68SPECIAL_CHANGEAICalls ChangeAIOrder on group TargetType with order index X. Switches every group member to StartAI / AI01 / AI02 / AI03
71EVENTDeclared in the enum but has no dispatch branch; treat as unused

Attributes#

<Element Number="..." Name="..."
         Class="..." Type="..."
         SuccessRate="..." DelayTime="..."
         TargetType="..." X="..." Y="..." />
AttributeTypeEffect
Number0-99Unique Element ID. Referenced by MonsterAIUnit Element slots
NamestringHuman-readable label. Stored but not used for logic
Class0-7Informational category (see Element Classes)
TypeintDispatch key (see Element Types)
SuccessRate0-100Probability the element actually executes. A random 0-99 above this rate skips the action
DelayTimemsUsed by the owning AI Unit rule; the element itself does not re-check it
TargetTypeint 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
Xint or *Context-dependent. Move/warp destination X, immunity physical ticks, skill-1 percent for Type 67, AI order (0-3) for Type 68
Yint 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#

AttributeRelated in
NumberReferenced by MonsterAIUnit.ElementNormal / Move / Attack / Heal / Avoid / Help / Special / Event in MonsterAIUnit.xml
Type 66 warp targetsMust land on a walkable tile; see MapManager.xml
Type 62 group summonMonsterAIGroup.xml (dead member with matching GroupNumber)
Type 68 AI changeTargetType is a group from MonsterAIGroup.xml; X selects StartAI / AI01 / AI02 / AI03
Monster skill slots used by Type 67Monster 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 Type is not 11 (Chase).
  • Goal-move element lands the monster in a dead-end - Type 12 ignores walkability; verify (X, Y) is reachable or provide a Crywolf-style path file.
  • Teleport always lands on the same tile - Type 66 hard-codes (X, Y). Use multiple alternating elements with different Automata priorities for variety.
  • Immunity is permanent - Type 64 with X or Y below 1 defaults to 10 ticks, not zero. Set explicit values, with 1 tick roughly 1 second.
  • Attack pattern always fires the same skill - Type 67 rolls TargetType, then X, then Y in order. Lower the earlier percents or set them to 0 to let later skills fire.
  • AI change does nothing - Type 68 needs a valid group in TargetType and an order (0-3) in X that points at a populated StartAI / AI01 / AI02 / AI03 slot.

Last updated August 20, 2026