Introduction

Open View → Behaviour Tree Editor (shown below) to launch the OpenCAGE Behaviour Tree Editor. Unlike the other editors under View, this runs as a separate process (a Brainiac Designer fork with OpenCAGE's LegendPlugin node set) and works on global AI data — you don't need a level loaded.

OpenCAGE's View menu open with the Behaviour Tree Editor entry highlighted.

Authoritative trees live in:

  • DATA/BINARY_BEHAVIOR/_DIRECTORY_CONTENTS.BML — packed catalogue the game loads

On startup the editor extracts every tree to DATA/BEHAVIOR/*.xml for editing (it clears existing XMLs first) and lists them under Behaviours in the Explorer, as shown below. That folder is scratch space — don't treat leftover XMLs as a permanent source of truth.

The Behaviour Tree Editor on first launch, with the extracted trees listed under Behaviours in the Explorer and no tree open yet.

Nothing is open yet: the palette groups under the tree list start collapsed, and the document area and Properties panel stay empty until you open a tree.

Closing OpenCAGE, or choosing View → Behaviour Tree Editor again, kills any open Behaviour Tree Editor instance without prompting. Save first if you have unsaved graphs.

Editing Trees

The main layout:

  • Explorer (left) — the Behaviours tree listing every tree in the catalogue (top) and the node palette (bottom), whose groups start collapsed: Actions, Conditions, Decorators, Selectors, Sequences
  • Document tabs (centre) — one graph canvas per open tree, with Save, Show Properties and Save Image Of Behavior buttons in its top-right corner
  • Properties (right) — property grid for the selected node

Double-click a tree in Explorer to open it as a document tab, as shown below. Drag nodes from the palette onto the canvas and wire the graph; select a node to edit its properties in the Properties panel (Show Properties, next to Save, pops the selected node's properties out into a floating panel). Left-drag the background to pan and scroll to zoom when a graph runs off the canvas, as it does here. The ? button in the window's top-right corner opens the Behaviour Tree Nodes reference.

The Behaviour Tree Editor with a tree open: Explorer and node palette on the left, the graph canvas in the middle with a node selected, and its properties on the right.

alien_flamed_unaware open in a document tab with its Sequence node selected; the node's parameters appear in the Properties panel on the right.

You can also export a graph snapshot with the Save Image Of Behavior button, the rightmost of the three in the canvas's top-right corner (the dialog is titled Save Graph As Image; *.emf or *.png). This editor does not edit per-level WORLD/BEHAVIOR_TREE.DB files.

Keyboard Shortcuts

Shortcuts depend on focus — graph canvas vs Explorer. There is no Ctrl+S save shortcut; use the Save button in the top-right corner of the open tree's canvas (its tooltip reads Save Behavior). The same list of controls is available in OpenCAGE under Options → Controls, on the Behaviour Tree Controls tab.

Graph Canvas

When the behaviour graph has focus:

  • Ctrl (hold) — arrow cursor; drag with Ctrl to duplicate the selection
  • Shift (hold) — operate on the whole branch (copy / cut / delete / paste / drag)
  • Ctrl+C — copy the selected node
  • Ctrl+Shift+C — copy the selected node and its branch
  • Ctrl+V — enter paste mode (ghost preview); left-click to place under a target (release V to cancel)
  • Ctrl+V + Shift — paste as a full branch instead of a single node
  • Ctrl+X — cut the selected node (children are reparented to its parent)
  • Ctrl+Shift+X — cut the selected node and its entire subtree
  • Delete — remove the selected node by extracting it (children kept / reparented)
  • Shift+Delete — delete the selected node and its entire subtree
  • Right-drag — move the selection (hold Shift for the whole branch)

Copy / cut / delete apply to non-root nodes only. There is no undo/redo on the canvas.

Explorer

When the Explorer tree list has focus:

  • F2 — rename the selected behaviour or folder
  • Delete — delete the selected behaviour or group from the catalogue (this is the only way to do it: the Explorer has no toolbar or context menu)

Explorer does not use Ctrl+C / Ctrl+V / Ctrl+X, and there is no button for creating a brand-new tree — the shipped catalogue is edited, renamed (F2) or deleted in place. Delete here removes trees from the catalogue, not nodes from an open graph.

Saving

Use the Save button at the top-right of the tree's canvas (shown below) — not OpenCAGE's File → Save Level. Save writes XML for the tree(s), then repackages all DATA/BEHAVIOR/*.xml files back into _DIRECTORY_CONTENTS.BML.

The graph canvas for one tree, with the Save, Show Properties and Save Image Of Behavior buttons in its top-right corner.

Each open tree has its own Save button at the top-right of its canvas; beside it are Show Properties and Save Image Of Behavior.

If you close the editor's window with unsaved graphs, the Unsaved Behaviors dialog lists them with checkboxes and offers Save Selected Behaviors, Discard All Unsaved Changes, or Cancel.

Assigning Trees

Editing a tree changes the global definition. To point a character at a tree name from that catalogue, use View → Configuration Editors → Characters → Attributes and the Behaviour Tree field (names come from _DIRECTORY_CONTENTS.BML).

Resetting

To restore stock trees, open the Backup Manager → Revert Configs → Reset Behaviour Trees. That closes the game and Behaviour Tree Editor if open, restores the vanilla BML, and refreshes the DATA/BEHAVIOR extract.