AIData: Attack
Part of CombatState. The attack system defines what attacks an NPC can perform (Work entries) and when to use them (Tension → Info selection). This is the primary damage-dealing behavior tree.
Structure
Section titled “Structure”attack├── workList│ └── Work [multiple]└── tensionList └── Tension [multiple] └── Info [multiple]Work Properties
Section titled “Work Properties”Each Work entry defines a single attack behavior with normal and anger mode variants.
| Property | Type | Since | Description |
|---|---|---|---|
id | int | v92 | Unique work identifier (referenced by Info.workId) |
desc | string | v92 | Internal description |
normalBehaviorId | int | v92 | Behavior/skill ID for normal mode |
normalBehaviorType | string | v92 | Behavior type for normal mode (e.g. “skill”) |
angerBehaviorId | int | v92 | Behavior/skill ID for anger mode |
angerBehaviorType | string | v92 | Behavior type for anger mode |
distanceRate | decimal | v92 | Distance rate modifier |
distanceType | int | v92 | Distance calculation type |
activeMoveIdForSkillOnNormalMode | string | v92 | Active move for normal mode skill |
activeMoveIdForSkillOnAngerMode | string | v92 | Active move for anger mode skill |
isDirectionRevision | bool | v92 | Enable direction correction |
offFlockOnNormalMode | bool | v92 | Disable flocking in normal mode |
offFlockOnAngerMode | bool | v92 | Disable flocking in anger mode |
msg | string | v92 | Message ID on execution |
msgImmediately | string | v92 | Send message immediately |
msgProb | string | v92 | Message probability |
nextAttackId | string | v92 | Chained attack ID |
nextAttackProb | string | v92 | Chained attack probability |
nextShorttermTargetId | string | v92 | Chained short-term target ID |
nextShorttermTargetProb | string | v92 | Chained short-term target probability |
noCancelNextAttackByAggroChanged | string | v92 | Prevent chain cancel on aggro change |
preProcess | string | v92 | Pre-processing action |
coolTime | string | v92 | Cooldown after execution |
referenceNextAttackPreprocess | string | v92 | Reference next attack pre-process |
Tension
Section titled “Tension”Tension entries group Info entries that define weighted attack selection. The id of a Tension is referenced by Patterns to select which tension set is active.
| Property | Type | Since | Description |
|---|---|---|---|
id | int | v92 | Tension identifier (referenced by Pattern tension values) |
Each Info entry maps to a Work by workId and defines its selection probability.
| Property | Type | Since | Description |
|---|---|---|---|
workId | int | v92 | Reference to a Work.id in the workList |
prob | decimal | v92 | Selection probability weight |
distanceRate | decimal | v92 | Distance rate override |
Structural Defaults
Section titled “Structural Defaults”When a pattern does not specify an attackTension, the engine uses the first tension in the list (id-order). If no tensions are defined, attack behavior is disabled.
DSL Example
Section titled “DSL Example”ai: create: - huntingZoneId: 9001 id: 200 name: "dual_attack_npc" combatState: enable: true checkInterval: 1000 attack: workList: - id: 1 desc: "Basic melee" normalBehaviorId: 1001 normalBehaviorType: "skill" angerBehaviorId: 1002 angerBehaviorType: "skill" distanceType: 1 - id: 2 desc: "Heavy slam" normalBehaviorId: 2001 normalBehaviorType: "skill" angerBehaviorId: 2002 angerBehaviorType: "skill" coolTime: "5000" tensionList: - id: 1 infos: - workId: 1 prob: 0.7 - workId: 2 prob: 0.3 - id: 2 infos: - workId: 2 prob: 1.0