CombatActions
Asset path: Server/NPC/DecisionMaking/CombatActions/*.json
This object has different properties depending on the value of the Type property.
All possible options are listed below:
Ability
A combat action which executes an attack or ability by triggering an Interaction.
AbilityCombatAction with the following properties:
| Key | Type | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Constant value: Ability | This field controls the type, it must be set to the constant value "Ability" to function as this type. | ||||||||||
| Parent | String | When set this asset will inherit properties from the named asset. When inheriting from another AbilityCombatAction most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together. | ||||||||||
| Description | (Nullable) String | A friendly description of this option's outcome. | ||||||||||
| Conditions | Array of the type: Either String or Condition | The list of conditions for evaluating this option's utility. | ||||||||||
| WeightCoefficient | Number defaults to: 1.0 | An additional weighted ranking that can be used to greatly increase the utility of this option. | ||||||||||
| Target | Any one of the following String:
Target
| The target type this action applies to. | ||||||||||
| PostExecuteDistanceRange | (Nullable) Array of Number | An optional range the NPC will try to maintain from the target after executing the combat action. | ||||||||||
| Ability | Either String or RootInteraction | The interaction (ability) to use. | ||||||||||
| AbilityType | (Nullable) Any one of the following String (defaults to Primary):
AbilityType
| The ability type. | ||||||||||
| ChargeFor | (Nullable) Either Number defaults to: 0.0 or String that matches the pattern: ^(-?Infinity|NaN)$ | How long to charge the ability for before using it. | ||||||||||
| AttackDistanceRange | Array of Number | The range at which the NPC needs to be from the target to execute the attack. | ||||||||||
| WeaponSlot | Integer defaults to: 0 | The weapon (hotbar) slot to switch to for this attack. | ||||||||||
| OffhandSlot | Integer defaults to: -1 | The off-hand slot to switch to for this attack. -1 set to no off-hand equipped. | ||||||||||
| FailureTimeout | (Nullable) Either Number defaults to: 10.0 or String that matches the pattern: ^(-?Infinity|NaN)$ | How long to try and run the action before giving up if it can't be completed in time. | ||||||||||
| SubState | (Nullable) String that matches the pattern: [^\s] and is at least 1 characters long | An optional substate to switch to when selecting this combat action to modify motion or other available actions. | ||||||||||
| InteractionVars | (Nullable) Map of the following:
Map
| Interaction vars to modify the values in the interaction itself. | ||||||||||
| DamageFriendlies | Boolean defaults to: false | Whether or not this ability should be able to damage friendly targets. | ||||||||||
| RequireAiming | Boolean defaults to: true | Whether or not this ability needs to be aimed at the target. | ||||||||||
| Positioning | (Nullable) Any one of the following String (defaults to Any):
Positioning
| Where the NPC should try to position itself relative to the target's facing direction. | ||||||||||
| PositionFirst | Boolean defaults to: false | Whether the NPC should try to reach the correct positioning before executing the ability. | ||||||||||
| ChargeDistance | Number defaults to: 0.0 | If this is a charge attack, the distance the charge will cover. | ||||||||||
| Tags | (Nullable) Map of the following:
Map
| Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit. For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore. Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone. |
SelectBasicAttackTarget
A combat action which simply selects a target and sets up distances for use with substates that only contain basic attacks.
BasicAttackTargetCombatAction with the following properties:
| Key | Type | Description | ||||
|---|---|---|---|---|---|---|
| Type | Constant value: SelectBasicAttackTarget | This field controls the type, it must be set to the constant value "SelectBasicAttackTarget" to function as this type. | ||||
| Parent | String | When set this asset will inherit properties from the named asset. When inheriting from another BasicAttackTargetCombatAction most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together. | ||||
| Description | (Nullable) String | A friendly description of this option's outcome. | ||||
| Conditions | Array of the type: Either String or Condition | The list of conditions for evaluating this option's utility. | ||||
| WeightCoefficient | Number defaults to: 1.0 | An additional weighted ranking that can be used to greatly increase the utility of this option. | ||||
| WeaponSlot | Integer defaults to: 0 | The weapon (hotbar) slot to switch to for basic attacks. | ||||
| OffhandSlot | Integer defaults to: 0 | The off-hand slot to switch to for basic attacks. -1 set to no off-hand equipped. | ||||
| Tags | (Nullable) Map of the following:
Map
| Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit. For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore. Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone. |
State
A combat action which switches the NPCs state. Using substate only will switch between combat substates, whereas including the main state can be used to transition out of combat.
StateCombatAction with the following properties:
| Key | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Type | Constant value: State | This field controls the type, it must be set to the constant value "State" to function as this type. | ||||||||
| Parent | String | When set this asset will inherit properties from the named asset. When inheriting from another StateCombatAction most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together. | ||||||||
| Description | (Nullable) String | A friendly description of this option's outcome. | ||||||||
| Conditions | Array of the type: Either String or Condition | The list of conditions for evaluating this option's utility. | ||||||||
| WeightCoefficient | Number defaults to: 1.0 | An additional weighted ranking that can be used to greatly increase the utility of this option. | ||||||||
| Target | Any one of the following String:
Target
| The target type this action applies to. | ||||||||
| PostExecuteDistanceRange | (Nullable) Array of Number | An optional range the NPC will try to maintain from the target after executing the combat action. | ||||||||
| State | String that matches the pattern: [^\s] and is at least 1 characters long | The main state name. | ||||||||
| SubState | (Nullable) String | The substate name. | ||||||||
| Tags | (Nullable) Map of the following:
Map
| Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit. For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore. Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone. |
