Difference between revisions of "Behavior pack"

From AI Product Manuals
Jump to navigationJump to search
m (Davemark moved page Behavior Pack to Behavior pack without leaving a redirect: Capitalization)
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:


== Code ==
== Code ==
The implementation for a behavior pack is kept in the class, '''BehaviorPackage'''. It is merely a name, description and a list of [[behavior]]s.
In addition to standard accessor functions, there are functions for adding a behavior to the package, removing one from the package, and seeing if an selected behavior is already in the list.


== Data ==
== Data ==
Behavior packages are created in the [[data tool]] and behaviors are assigned to them there. Once they have been created, they can be assigned to a [[brain]] which has the effect of allowing that brain to use all the behaviors in the behavior pack.

Latest revision as of 02:47, 8 October 2021

This page is part of the IAUS Manual.BrainBehaviorBehavior TypeDecisionAI Entity

Concept

A Behavior Pack is merely a collection of Behaviors that is named and given a description. They are then assigned to one or more Brains to indicate that the agent has access to the behaviors in it. Typically, Behavior Packs are "conceptual" in that they contain similar behaviors or behaviors that are part of a large idea. For example, Behavior Packs may be named (and filled accordingly):

  • "Tactical Movement"
  • "Ambient Wander"
  • "Social Emotes"

Some may be specific to a type of character archetype and would be named and filled accordingly. So instead of simply a "Tactical Movement" Behavior Pack, there may also be a "Tactical Movement - Aggressive" one. Some of the contents may be the same but the latter may have some more aggressive Behaviors such as one that closes to melee range regardless of the character's health. By doing this, a Brain can be assigned the appropriate Behavior Pack depending on the type of character and the desired behavior.

Because of this organization by concept, typically more than one Behavior Pack is assigned to a Brain.

Code

The implementation for a behavior pack is kept in the class, BehaviorPackage. It is merely a name, description and a list of behaviors.

In addition to standard accessor functions, there are functions for adding a behavior to the package, removing one from the package, and seeing if an selected behavior is already in the list.

Data

Behavior packages are created in the data tool and behaviors are assigned to them there. Once they have been created, they can be assigned to a brain which has the effect of allowing that brain to use all the behaviors in the behavior pack.