Skip to content

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.


attack
├── workList
│ └── Work [multiple]
└── tensionList
└── Tension [multiple]
└── Info [multiple]

Each Work entry defines a single attack behavior with normal and anger mode variants.

PropertyTypeSinceDescription
idintv92Unique work identifier (referenced by Info.workId)
descstringv92Internal description
normalBehaviorIdintv92Behavior/skill ID for normal mode
normalBehaviorTypestringv92Behavior type for normal mode (e.g. “skill”)
angerBehaviorIdintv92Behavior/skill ID for anger mode
angerBehaviorTypestringv92Behavior type for anger mode
distanceRatedecimalv92Distance rate modifier
distanceTypeintv92Distance calculation type
activeMoveIdForSkillOnNormalModestringv92Active move for normal mode skill
activeMoveIdForSkillOnAngerModestringv92Active move for anger mode skill
isDirectionRevisionboolv92Enable direction correction
offFlockOnNormalModeboolv92Disable flocking in normal mode
offFlockOnAngerModeboolv92Disable flocking in anger mode
msgstringv92Message ID on execution
msgImmediatelystringv92Send message immediately
msgProbstringv92Message probability
nextAttackIdstringv92Chained attack ID
nextAttackProbstringv92Chained attack probability
nextShorttermTargetIdstringv92Chained short-term target ID
nextShorttermTargetProbstringv92Chained short-term target probability
noCancelNextAttackByAggroChangedstringv92Prevent chain cancel on aggro change
preProcessstringv92Pre-processing action
coolTimestringv92Cooldown after execution
referenceNextAttackPreprocessstringv92Reference next attack pre-process

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.

PropertyTypeSinceDescription
idintv92Tension identifier (referenced by Pattern tension values)

Each Info entry maps to a Work by workId and defines its selection probability.

PropertyTypeSinceDescription
workIdintv92Reference to a Work.id in the workList
probdecimalv92Selection probability weight
distanceRatedecimalv92Distance rate override

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.


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