Skill / Behavior System¶
When an object in the game has a Skill Component (9) attached, it has one or more skills attached to it, which it can trigger. A skill is the root of a tree of behaviors that get executed once the skill is triggered.
In the case of an attack by a player, these skills are executed on the client and the synchronized to the server. The server may then interpret what the client has done (and possibly sanity-check it) and execute any server side consequences of the attack. This includes updating the health of enemies for all players and smashing an object once it has been killed.
For enemies, the Combat AI triggers the skill and as such the server must execute it. That information is then synchronized to the clients for display.
Handling a behavior¶
When a skill is triggered on the client, it will send a StartSkill message. This message contains a bitstream that represents all the decisions the client has made whenever a behavior has multiple paths to continue. An example for this would be the Area of Effect / AoE (7) which will serialize the amount of objects within the area, and then the object id and remaining bitstream for all of these objects.
When a behavior is not completed immediately, it will serialize a handleID
, which will then
later be used to identify a SyncSkill message that serializes the continued execution. It
is possible that this happens multiple times for a single skill execution.
Behavior Templates¶
Via the BehaviorTemplate table, each behavior is assigned a template. This template defines what the behavior does, what it serializes to the bit stream and which subsequent actions will be triggered. These templates are parameterized via the BehaviorParameter table.
The following is a list of (networked) behavior templates.
- Basic Attack (1)
- TacArc (2)
- And (3)
- Projectile Attack (4)
- Heal (5)
- Movement Switch (6)
- Area of Effect / AoE (7)
- Play Effect (8)
- Immunity (9)
- Damage Buff (10)
- Damage Absorption (11)
- Over Time (12)
- Imagination (13)
- Target Caster (14)
- Stun (15)
- Duration (16)
- Knockback (17)
- Attack Delay (18)
- Car Boost (19)
- Fall Speed (20)
- Shield (21)
- Repair Armor (22)
- Speed (23)
- Dark Inspiration (24)
- Loot Buff (25)
- Venture Visison (26)
- Spawn Object (27)
- Lay Brick (28)
- Switch (29)
- Buff (30)
- Jetpack (31)
- Skill Event (32)
- Consume Item (33)
- Skill Cast Failed (34)
- Imitation Skunk Stink (35)
- Change Idle Flags (36)
- Apply Buff (37)
- Chain (38)
- Change Orientation (39)
- Force Movement (40)
- Interrupt (41)
- Alter Cooldown (42)
- Charge Up (43)
- Switch Multiple (44)
- Start (45)
- End (46)
- Alter Chain Delay (47)
- Camera (48)
- Remove Buff (49)
- Grab (50)
- Modular Build (51)
- NPC Combat Skill (52)
- Block (53)
- Verify (54)
- Taunt (55)
- Air Movement (56)
- Spawn Quickbuild (57)
- Pull to Point (58)
- Property Rotate (59)
- Damage Reduction (60)
- Property Teleport (61)
- Clear Target (62)
- Take Picture (63)
- Mount (64)
- SkillSet (65)