Work Behaviours
This behaviour type is used to denote a job which an agent can hold within society.
Creating Work Behaviours
Like all behaviours they are made within the 'Behaviour Tree Editor'. When creating work behaviours you will use the different type of nodes shown below to define how the agents act.
Types of Nodes
There are a total of five different node types which are mentioned below. Each type plays a specific role within the behaviour tree.
Job
This is the top layer of the behaviour tree. It represents a collection of duties which an agent with this job would be responsible for completing. There are global settings for the job timings as well as wether the agent has to turn up to a work location before starting any duties.
Duty
This is the second layer of the behaviour tree and belongs to a job. These represent a high level concept that is part of a job and can be thought as the responsibilities and duties section on a job specification. For example a cleaner could have serval duties such as; refilling and restocking cleaning supplies, taking out rubbish and cleaning surfaces.
Task
The third layer of the behaviour tree belongs to one or more duties. There should break down the duty they belong to into smaller more manageable bite size pieces. Taking our example from earlier of a cleaner. The cleaning surfaces could be broken into three stages; removing clutter from surface, cleaning the surface and putting items back. There are three separate steps which are distinct starts and ends and builds into a more complex behaviour of cleaning surfaces.
Method
The penultimate layer of the behaviour tree belongs to a task and is used to describe a way of achieving a task. This means that each method that belongs to the same task should all achieve the same output as one another but by different means. This layer is designed to provide resilience for your agents by giving them more options to do something.
Action
The final layer which is shared across all behaviour trees. Actions are actual scene affecting effects such as moving somewhere, playing animations or a host of other changes. They belong to methods.
Best practices when designing
Work your way down the tree
The easiest way to develop the work behaviour tree is to start at the very top and work your way down. Choose a name for the job that is easy to understand first that gives a clear image in your head of what they are meant to do. After that work out the responsibilities that worker would have at the highest level possible and make them succinct and have no overlap with one another. These will make up your duties. By planning these top two layers it should give you a clear plan so when you are doing any of the lower levels of the tree it will prevent overlap and duplication of behaviours lower down the tree giving you a focused tree which is easier to understand and expand over time.
Examples
Coming soon.