Encounter Tab: Difference between revisions

From HoF2 Community Modding Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
[[File:Encounter_Table.PNG|400px|thumb|right|The Encounters tab showing the starting encounter for The Fool.]]
[[File:Encounter_Table.PNG|400px|thumb|right|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).
The Encounter tab allows [[Encounter]] logic to be configured via the Encounter Behaviour Tree (also known as the Encounter Node Tree, or Encounter Tree).
<br clear=all>
=Encounter Tree=
[[File:Encounter_Table.PNG|400px|thumb|right|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 Types|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.
<br clear=all>
===Start and End Nodes===
[[File:Page_node.png|400px|thumb|right|A [[Node Types#Page|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''.
[[File:End_node.png|400px|thumb|right|An [[Node Types#Action|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.
<br clear=all>
===Adding and Removing Nodes===
[[File:Encounter_tree_context_menu.png|400px|thumb|right|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 [[Variables#Strings|Strings]], then a dialog will appear asking if those Strings should be removed as wel.
<br clear=all>
===Adding and Removing Connectors===
[[File:Connectors.png|400px|thumb|right|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.
<br clear=all>
===Adding and Removing Conditions===
[[File:Condition_loop.png|400px|thumb|right|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' [[Node Types#Page|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.
<br clear=all>
===Shortcuts===
;Scroll
: Mouse wheel
;Slow Scroll
: Shift + Mouse wheel
;Pan
: 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
: Delete
;Duplicate selected node
: Ctrl + D


<br clear=all>
<br clear=all>
Line 31: Line 107:




[[File:Encounter_tree_left_toolbar.png|400px|thumb|right|The left 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==
;Bookmarks
;Bookmarks
Line 57: Line 133:


<!-- Each heading needs to be preceded by a <br clear=all> tag otherwise images will spill over into the next section -->
<!-- Each heading needs to be preceded by a <br clear=all> tag otherwise images will spill over into the next section -->
<br clear=all>
=Encounter Tree=
[[File:Encounter_Table.png|400px|thumb|right|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 Types|Node]]. Each Node type has different properties that define its behaviour.
<br clear=all>
<br clear=all>


[[Category:Reference]]
[[Category:Reference]]

Revision as of 15:49, 16 September 2018

Description

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.


Shortcuts

Scroll
Mouse wheel
Slow Scroll
Shift + Mouse wheel
Pan
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
Delete
Duplicate selected node
Ctrl + D


Toolbar

The left toolbar of the Encounter tab

Left Toolbar

File
Todo: Add description
Edit
Todo: Add description
Prefs
Todo: Add description
Select Owner
Todo: Add description
Select Graph
Todo: Add description
Search
Highlights Nodes that use the entered text.
Tasks
Highlights Nodes that use the selected tasks.
Combat
Highlights Nodes that use the selected combat objectives.
Variables
Highlights Nodes that use the selected variables.
Keywords
Highlights Nodes that use the selected keywords.
Utility Text
Todo: Add description


The right toolbar of the Encounter tab

Right Toolbar

Bookmarks
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
Lock
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.



Variables

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.