Encounter Tab: Difference between revisions

From HoF2 Community Modding Wiki
Jump to navigation Jump to search
No edit summary
(→‎Left Toolbar: Fix capitalisation of Keywords link)
Line 102: Line 102:
: Highlights Nodes that use the selected variables.
: Highlights Nodes that use the selected variables.
: Highlights Nodes that use the selected [[keywords]].
: Highlights Nodes that use the selected [[Keywords]].
;Utility Text
;Utility Text
: Todo: Add description
: Todo: Add description
Line 108: Line 108:

[[File:Encounter_tree_right_toolbar.png|400px|thumb|right|The right toolbar of the Encounter tab]]
[[File:Encounter_tree_right_toolbar.png|400px|thumb|right|The right toolbar of the Encounter tab]]
===Right Toolbar===
===Right Toolbar===

Latest revision as of 02:09, 17 September 2018


The Encounters tab showing the starting encounter for The Fool.

The Encounter tab allows Encounter logic to be configured via the Encounter Behaviour Tree (also known as the Encounter Node Tree, or Encounter Tree).

Encounter Tree

The Encounter Tree for the Fool's starting Encounter

On the left of the Encounter tab via is a list of properties for the currently selected Node. Each Node type has different properties that define its behaviour.

When the player begins an encounter, the Start Node will be activated first, and following the logical path defined by conditions, player choices and action outcomes will be followed until an End Node is reached.

Start and End Nodes

A Page Node that is also the Start Node

The Start Node can be set by right clicking on a Node and selecting Set Start. There may only be one Start Node at a time. The first Node added to an Encounter Tree will automatically become the Start Node.

An Action Node that is also an End Node

An End Node is any "leaf Node" (a Node with no children). They are indicated by a white box containing the word "END" in red text.

For testing purposes it may be helpful to change the Start Node to a Node later in the tree.

Adding and Removing Nodes

The Encounter Tree's context menu

Nodes are added from the context menu by right clicking on the background of the Encounter Tree. The Node Types availble are Action, Companion Campfire Encounter, Junction, Nested Encounter, Page, and Trial Campfire Encounter. More details on what these Nodes Types do can be found on the Node Types page.

Nodes can also be created by left clicking and dragging on one of the small circular Connector attachment points on the bottom of every Node, then letting go in an empty space. Nodes created this way will already have a connector between the Connection attachment point clicked on and the newly created Node.

Action Nodes require Action Tasks to be configured in the Node Properties List in order to be functional. Action Nodes with no Tasks will cause the game to hang.

Nodes can be removed by selecting them and pressing Delete, or by right clicking on them and selecting the Delete (DEL) option from the context menu. If a removed Node contains Strings, then a dialog will appear asking if those Strings should be removed as wel.

Adding and Removing Connectors

A fourth Connector being added to a Page Node with three existing Connectors

Connectors show the paths that the game will take between nodes.

To add a Connector that leads to an existing node, left click and drag from the small circular Connection attachment point onto any other Node.

Connectors can be removed by right clicking on the Connector attachment point they are attached to, or by deleting the child Node that they are connected to (the Node that the Connector goes into the top of). If a removed Connector has a String attached to it (eg: if it leads out of a Page Node, the text for the choice that leads to that Connector), then a prompt will appear asking if that String should be removed.

Adding and Removing Conditions

An example node layout that shows a loop which will be run a certain number of times, as determined by a Condition

Conditions can be used to prevent the game from navigating or require the game to navigate a particular Connection.

Excluding Page Nodes, any Node that has more than one Connection exiting from it, must have Conditions attached to all but one of those Connections. In programming terms, multiple Conditions can be thought of as "if"/"else if" chains, with the last (right-most) Connection acting as an "else" to catch anything that doesn't match the other Connections' Conditions.

Conditions attached to Connections leading out of Page Nodes will determine whether or not the player can select the choice options that lead to Connections with Conditions attached. Page Nodes' Hide on failure property determines whether choice options with Conditions that are not met will be hidden or shown, but not selectable.

To create a new Condition, left click on the transparent "+" box at the midpoint of a Connector and click Add Condition Task from the Node Properties List. A pop up showing the many types of Condition Tasks available will appear. If multiple Conditions are desired, select the * Condition List option, and add more Condition Tasks to that in the same manner.

The most common Condition Tasks are found under the * Blackboard category, which includes Condition Tasks for checking the value of most common variable types.


Mouse wheel
Slow Scroll
Shift + Mouse wheel
Middle click and drag
Context menu
Right click
Select node
Left click
Selection box
Left click and drag
Move node(s)
Left click and drag on node
Delete selected node
Duplicate selected node
Ctrl + D


The left toolbar of the Encounter tab

Left Toolbar

Todo: Add description
Todo: Add description
Todo: Add description
Select Owner
Todo: Add description
Select Graph
Todo: Add description
Highlights Nodes that use the entered text.
Highlights Nodes that use the selected tasks.
Highlights Nodes that use the selected combat objectives.
Highlights Nodes that use the selected variables.
Highlights Nodes that use the selected Keywords.
Utility Text
Todo: Add description

The right toolbar of the Encounter tab

Right Toolbar

Provides a list of bookmarks in this and other encounters that can be jumped to at any time providing they exist. NOTE: Bookmarks are stored in the Unity editor preferences, and not mod files. If you create multiple mods, bookmarks from all of them will be visible in this list.
Encounter dropdown
Todo: Add description
Todo: Add Description

Node Properties

Node properties for a Page

On the left of the Encounter tab via is a list of properties for the currently selected Node. Each Node type has different properties that define its behaviour.


The Local Blackboard variables of the Fool's starting encounter.

On the right of the Encounter tab via is a list, showing all of the variables currently defined in the Local Blackboard. These may be used by the current encounter's nodes in addition to Global Blackboard and Game Variables.

Variable names can be changed here (typically they will be updated across the rest of the encounter), and initial values for variables can also be set.