AIData: CombatState
Part of AIData. The combat state is the largest behavior tree in AIData — it contains scalar configuration plus numerous nested behavior elements.
Complex sub-pages:
- Attack — Work entries and tension-based selection
- Cooperation — Multi-NPC coordination
- ShorttermTarget — Short-term targeting behaviors
- AbsolutelyAttack — Interrupt-priority attacks
- Patterns — HP-gated behavior pattern switching
CombatState Properties
Section titled “CombatState Properties”| Property | Type | Since | Description |
|---|---|---|---|
enable | bool | v92 | Enable combat state behavior |
checkInterval | int | v92 | Behavior check interval in milliseconds |
combatEndDelay | int | v92 | Delay before exiting combat in milliseconds |
combatReadyDelay | int | v92 | Delay before entering combat in milliseconds |
hpResetWhenCombatEnd | string | v92 | Reset HP when combat ends |
playSocialWhenFirstAggro | bool | v92 | Play social animation on first aggro |
targetLostDelay | int | v92 | Delay before dropping target in milliseconds |
watchRotateAngle | int | v92 | Watch rotation angle in degrees |
watchRotateTime | decimal | v92 | Watch rotation time in seconds |
Nested Elements
Section titled “Nested Elements”| Element | Type | Description | Reference |
|---|---|---|---|
idle | nested | Idle behavior in combat | Below |
move | nested | Movement during combat | Below |
avoid | nested | Avoidance behavior | Below |
social | nested | Social animation in combat | Below |
aggroChangeAttack | nested | Aggro-switch attack behavior | Below |
monsterFlee | nested | Flee behavior | Below |
monsterSummon | nested | Summon behavior | Below |
counterFlee | nested | Counter-flee behavior | Below |
attack | nested | Attack work and tension system | Attack |
cooperation | nested | Multi-NPC coordination | Cooperation |
shorttermTarget | nested | Short-term targeting | ShorttermTarget |
absolutelyAttack | nested | Interrupt-priority attacks | AbsolutelyAttack |
patternLists | list | HP-gated pattern switching | Patterns |
Idle behavior parameters within combat state.
| Property | Type | Since | Description |
|---|---|---|---|
duration | string | v92 | Idle duration |
usePercent | decimal | v92 | Probability of idling |
Movement behavior parameters within combat state.
| Property | Type | Since | Description |
|---|---|---|---|
maxRadiusInterval | int | v92 | Maximum movement radius interval |
minRadiusInterval | int | v92 | Minimum movement radius interval |
targetDistance | int | v92 | Preferred distance to target |
timeout | int | v92 | Movement timeout in milliseconds |
Avoidance behavior parameters.
| Property | Type | Since | Description |
|---|---|---|---|
avoidSkillId | string | v92 | Skill used for avoidance |
coolTime | string | v92 | Cooldown between avoidances |
cooltime | string | v92 | Alternate cooldown property (legacy alias) |
enable | bool | v92 | Enable avoidance behavior |
maxRadiusInterval | int | v92 | Maximum avoidance radius |
minRadiusInterval | int | v92 | Minimum avoidance radius |
Social
Section titled “Social”Social animation in combat. Reuses the same block type as PeaceState socials.
| Property | Type | Since | Description |
|---|---|---|---|
socialMotionId | string | v92 | Social animation identifier |
usePercent | decimal | v92 | Selection weight |
AggroChangeAttack
Section titled “AggroChangeAttack”Behavior when aggro target switches.
| Property | Type | Since | Description |
|---|---|---|---|
distantTargetAttackId | string | v92 | Attack ID for distant target |
enable | bool | v92 | Enable aggro change attacks |
maxRadiusInterval | int | v92 | Maximum engagement radius |
minRadiusInterval | int | v92 | Minimum engagement radius |
nearTargetAttackId | string | v92 | Attack ID for near target |
showAggroChangeMotionAfterDistantTargetAttack | string | v92 | Show motion after distant attack |
showAggroChangeMotionAfterNearTargetAttack | string | v92 | Show motion after near attack |
usePercent | decimal | v92 | Probability of using aggro change attack |
MonsterFlee
Section titled “MonsterFlee”Flee behavior when the NPC wants to disengage.
| Property | Type | Since | Description |
|---|---|---|---|
coolTime | string | v92 | Cooldown between flee attempts |
enable | bool | v92 | Enable flee behavior |
executionRate | string | v92 | Execution probability |
fleeDistance | string | v92 | Distance to flee |
hpRate | string | v92 | HP threshold to trigger flee |
runDistance | string | v92 | Running distance |
shareAggroRange | string | v92 | Range to share aggro when fleeing |
targetHpMax | string | v92 | Maximum target HP to trigger flee |
MonsterSummon
Section titled “MonsterSummon”Summon behavior to spawn additional NPCs during combat.
| Property | Type | Since | Description |
|---|---|---|---|
coolTime | string | v92 | Cooldown between summons |
enable | bool | v92 | Enable summon behavior |
executionRate | string | v92 | Execution probability |
hpRate | string | v92 | HP threshold to trigger summon |
msg | int | v92 | Message ID on summon |
msgImmediately | bool | v92 | Send message immediately |
msgProb | decimal | v92 | Message probability |
summonChaseMaxDistance | string | v92 | Maximum chase distance for summons |
summonMaxCount | string | v92 | Maximum active summon count |
summonMaxDistance | string | v92 | Maximum summon spawn distance |
summonMinDistance | string | v92 | Minimum summon spawn distance |
summonNum | string | v92 | Number of NPCs to summon |
summonRange | string | v92 | Summon detection range |
summonTemplateId | string | v92 | Template ID for summoned NPCs |
targetHpMin | string | v92 | Minimum target HP to trigger summon |
templateId | string | v92 | Alternative template ID |
CounterFlee
Section titled “CounterFlee”Counter-flee behavior — a complex flee variant with additional conditions and messaging.
| Property | Type | Since | Description |
|---|---|---|---|
coolTime | string | v92 | Cooldown between counter-flee attempts |
curMpPercent | string | v92 | MP threshold condition |
enable | bool | v92 | Enable counter-flee behavior |
fleeDistance | string | v92 | Distance to flee |
hpResetWhenFleeEnd | bool | v92 | Reset HP when flee ends |
maxMovingTime | string | v92 | Maximum moving time |
maxRadiusInterval | int | v92 | Maximum radius interval |
minRadiusInterval | int | v92 | Minimum radius interval |
msgImmediately | bool | v92 | Send message immediately |
msgMaxMoving | int | v92 | Message ID at max moving |
msgProb | decimal | v92 | Message probability |
msgRecentHit | int | v92 | Message ID on recent hit |
msgRecentPcBehavior | int | v92 | Message ID on recent PC behavior |
recentHitTime | string | v92 | Recent hit time window |
recentPcBehaviorTime | string | v92 | Recent PC behavior time window |
recentPcBehiviorTime | string | v92 | Legacy alias for recentPcBehaviorTime |
runDistance | string | v92 | Running distance |
speedUpRate | string | v92 | Speed multiplier during flee |
targetCountMax | int | v92 | Maximum target count trigger |
targetCountMin | int | v92 | Minimum target count trigger |
targetHpPercent | string | v92 | Target HP percentage condition |
toAnger | string | v92 | Transition to anger mode |
usePercent | decimal | v92 | Probability of using counter-flee |
workId | string | v92 | Associated work ID |