MonsterAIGroup.xml

Top-level AI configuration. Each entry ties a monster (from Monster.xml) to an AI Unit, a spawn location, and a group membership. Groups enable shared behaviors such as leader-triggered summons, group healing, and phase-based AI changes via Element Type 68.

Supports up to 50 groups, each with up to 100 members.

File Location#

Data/Monster/MonsterAIGroup.xml

Loaded once at GameServer startup. Changes require a restart.

Role in the AI Hierarchy#

MonsterAIGroup.xml  <-- this file (spawn + AI assignments)
         |
         v
MonsterAIUnit.xml   (AI personality)
         |
         +-> MonsterAIAutomata.xml
         +-> MonsterAIElement.xml

Attributes#

<Member Group="..." Guid="..." Class="..." Rank="..."
        StartAI="..." AI01="..." AI02="..." AI03="..."
        CreateType="..." Map="..." X="..." Y="..." Dir="..." RegenType="..." />

Note: the XML root is <MonsterAIGroup>, the child entries are <Member>.

Identity#

AttributeTypeEffect
Group0-49Group ID. Members with the same Group can summon and heal each other, and can be switched in bulk by Element Type 68
Guid0-99Unique member slot within the group. Used as the index into the member array; does NOT mark a leader
ClassintMonster class index from Monster.xml
Rankint or *0 marks this member as the group leader (returned by leader lookups). Any other integer or * (stored as -1) marks a regular member

AI Assignment#

AttributeTypeEffect
StartAIintAI Unit used on spawn (initial CurrentAI and BasicAI)
AI01intAI Unit after an Element Type 68 with order 1
AI02intAI Unit after an Element Type 68 with order 2
AI03intAI Unit after an Element Type 68 with order 3

AI changes are triggered by Element Type 68 (which calls the group-wide AI-order switch) or by event code paths such as Kanturu, Crywolf, Imperial Guardian, and Double Goer stage transitions.

Spawn Configuration#

AttributeTypeEffect
CreateTypeint0 = spawn exactly at (X, Y). 1 = try to find a random free tile within a 10x10 box around (X, Y) (up to 100 retries); falls back to (X, Y) if none is free
MapintMap index
X, YintSpawn coordinates (also copied to StartX / StartY / OldX / OldY / TX / TY)
Dir0-7 or *Facing direction. * stored as -1
RegenTypeint or *Controls whether the generic respawn pipeline touches this monster. * (stored as -1) means group-managed and never re-summonable by Element Type 62. 0 means the monster uses the normal world respawn flow. Any other value (for example 1) means group-managed but re-summonable by Type 62 group summon

Cross-File Dependencies#

AttributeRelated in
ClassMonster.xml
StartAI, AI01, AI02, AI03MonsterAIUnit.xml Number
Map, X, YMapManager.xml, terrain walkability
Group referenced from Element Type 68 TargetTypeMonsterAIElement.xml
Transition rules driving state changesMonsterAIAutomata.xml via the selected Unit
AI personality (Automata + Element mapping)MonsterAIUnit.xml
Event-driven AI order changesevent configs under event/

Common Issues#

  • Monster spawns but has no AI - StartAI references a Unit number missing from MonsterAIUnit.xml, or points at a Unit with no Automata.
  • Group heal or group summon does not work - intended members carry different Group values, so they are not visible to each other's group lookups.
  • AI phase never advances - AI01 / AI02 / AI03 point at the same Unit, or no Element Type 68 ever triggers on the leader's Unit.
  • Boss respawns immediately - RegenType set to 0 on a unique boss; use * to keep it group-managed and non-respawning.
  • Spawn lands off-map or on unwalkable tile - with CreateType="0" the monster spawns on the exact (X, Y); switch to CreateType="1" to pick a random nearby free tile.
  • Leader lookup returns nothing - no member has Rank="0"; group-summon and related lookups that need a leader will fail.

Last updated April 21, 2026