Skip to main content
Version: 0.14.0

Work Behaviours

Work behaviours define the structured work an agent performs as part of a role in society.

Creating work behaviours​

Create work behaviours in BardTreeLtd/Civil AI/Behaviour Tree Editor.

The goal is to describe a job in layers, from broad responsibility down to concrete scene actions.

Node types​

Work trees use five main layers.

Job​

The top layer is the full role.

Examples:

  • Blacksmith
  • Innkeeper
  • Guard
  • Miller

This layer contains high-level settings such as timing and whether the agent must be at a valid workplace before beginning duties.

Duty​

A duty is a major responsibility within the job.

For a blacksmith, duties might include:

  • maintain the forge
  • fulfill tool orders
  • restock raw materials

Task​

Tasks break a duty into manageable pieces.

For maintain the forge, tasks might include:

  • collect coal
  • light or tend the fire
  • move finished work from the anvil area

Method​

Methods describe alternate ways to complete the same task.

This gives agents flexibility. For example, collect coal could mean:

  • take coal from the smithy store
  • take coal from a shared workplace supply area

Action​

Actions are the concrete scene steps such as:

  • move to a location
  • interact with an item
  • play an animation
  • use a point of interest

Actions are shared building blocks across behaviour types.

Best practice​

Design from the top down​

Start with the job title, then define the duties, then the tasks, and only then the methods and actions.

This helps keep the tree readable and avoids duplication lower down.

Keep duties distinct​

If two duties feel nearly identical, they probably belong under the same duty with separate tasks.

Make methods about fallback, not complexity​

Use methods when the same result can be achieved in more than one way. Do not use them just to make a tree look larger.

Medieval fantasy example: Blacksmith​

Here is a concrete example of a believable work breakdown for a medieval town.

Job​

Blacksmith

Duty 1​

Prepare the forge

Possible tasks:

  • gather coal
  • gather metal stock
  • move to forge station
  • start the workday at the anvil

Duty 2​

Forge useful goods

Possible tasks:

  • heat metal
  • hammer a tool head
  • cool the workpiece
  • place finished item in output storage

Duty 3​

Keep the workshop supplied

Possible tasks:

  • check raw material storage
  • fetch charcoal or ore
  • return tools to the correct place

Example method breakdown​

Task: gather coal

Possible methods:

  • use personal workshop stockpile
  • use shared workplace fuel crate

Example action chain​

Method: use shared workplace fuel crate

Possible actions:

  1. move to fuel crate
  2. interact with crate
  3. take coal item
  4. move to forge
  5. play stoking animation

How to judge whether a work tree is good​

A good work tree is:

  • easy to read from the top down
  • believable in the world context
  • robust when one method is unavailable
  • tied to scene objects that actually exist

Next step​

Read Using the Behaviour Tree Editor while building your first work tree.