Behavior Editor: Nodes – Arma Reforger
Lou Montana (talk | contribs) m (Lou Montana moved page Arma Reforger:Behavior Editor Nodes to Arma Reforger:Behavior Editor: Nodes without leaving a redirect: Name standard) |
Lou Montana (talk | contribs) m (Text replacement - "ize " to "ise ") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 76: | Line 76: | ||
* Behavior Tree: Specify behavior tree to run from the list. | * Behavior Tree: Specify behavior tree to run from the list. | ||
* Run Repeatedly: | * Run Repeatedly: | ||
** True (Checked): | ** True (Checked): Initialise the subtree once, then run it repeatedly without reinitialization | ||
** False (Unchecked): | ** False (Unchecked): Reinitialise and run the subtree every time. | ||
* Variables in Array: New, unfinished feature | * Variables in Array: New, unfinished feature | ||
Line 338: | Line 338: | ||
|- | |- | ||
| Create Position | | Create Position | ||
| Creates position according to specifie vector or position of entity. It's possible to | | Creates position according to specifie vector or position of entity. It's possible to randomise the position from its given center. | ||
Return: | Return: | ||
Line 607: | Line 607: | ||
|- | |- | ||
| Idle | | Idle | ||
| Wait for given seconds. Waiting time can be | | Wait for given seconds. Waiting time can be randomised. | ||
Return: | Return: | ||
Line 628: | Line 628: | ||
Return: | Return: | ||
* True: Current order data | * True: Current order data received. | ||
* False: Failed to | * False: Failed to receive current order data. | ||
| Output: | | Output: | ||
Line 996: | Line 996: | ||
|- | |- | ||
| Get Current Smart Action | | Get Current Smart Action | ||
| Get smart action object currently | | Get smart action object currently realised by Agent. | ||
Return: | Return: |
Latest revision as of 21:12, 24 May 2024
Flow nodes define base rules how and with which conditions, are behavior tree branches executed.
Flow
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Root | The starting point of a behavior tree. | Cannot be removed or inserted from the nodes palette. | |
Selector | Executes children until one of them returns Success.
Returns:
|
||
Sequence | Executes children from left to right as long as they return success. Returns success only if all children returned success.
Returns:
|
||
Parallel | Executes all children regardless what they return.
Returns:
|
Parameters:
|
|
Repeater | Sequence node that is executed multiple times.
Returns:
|
Parameters:
|
|
Run BT | Runs selected Behavior Tree on the agent.
Returns:
|
Parameters:
Input:
|
|
Run Once | Executes all of its children only once.
Returns:
|
Intended to be used for one-time-only tasks, such as initialization. | |
Run On Entity | Executes children on a different entity than the owner of the behavior tree.
Returns:
|
Input:
|
Should be used only with nodes and tasks that are not responding with Running result (reason: currently BT does not switch to scope of entity on which you wish to run those nodes, stays in scope of main BT) |
Switch | Picks children depending on a variable value or randomly.
Returns:
|
Parameters:
Input:
|
|
For Each Child | Iterates through all group children.
Returns:
|
Parameters:
Output:
|
Decorators
Decorators are test checking different states and variables, and determine if child or child branch should be executed.
Decorators
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Decorator | Node which tests specific condition. If condition result is true, decorator will execute its child and return true.
Returns:
|
Common decorator parameters:
|
Useful for tests through its parameters – use child result, aborting, etc.
Combination of parameters can be used: When you use always true and negative result, decorator will also execute its child and return false. It's useful in case when you want your branch to return false, but execute child node in any case. |
Test Variable | Decorator checking provided variable for assignment, comparation against value, or check for value change.
Returns:
|
Parameters:
Inputs:
|
|
Test Entity | Various tests on entity. Decorator checks validity of entity, either connected through variable, or according to its name. Can test other conditions like life state.
Returns:
|
Parameters:
Input:
|
|
Test Distance to Entity | Checks distance of entity with treshold value. Returns true if distance is smaller than treshold by default.
Check for ditance larger than treshold can be done with Use Negative Value parameter. Returns:
|
Parameters:
Inputs:
|
|
Danger Event | Checks agent if he has any danger events. Test can be performed against any or specified danger event.
Returns:
|
Parameters:
|
Danger event is type of event about threat to entity, like someone fired, someone was killed, etc. They all have specified position in world. |
Test Order | Tests if agent has order, or has specific order according to parameters.
Returns:
|
Parameters:
|
|
Aiming | Tests aiming
Returns:
|
Parameters:
|
Scripted Decorators
Decorators created in script, inherited from Scripted Decorator.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Scripted Decorator | Scripted base class of decorator, used for inheritence of other scripted decorators. | Common decorator params:
|
Does not contain any new functionality than basic decorator. |
Tasks
Leaf nodes tasked to perform specific operation. They can return true, false and running.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Get Controlled Entity | Finds character entity controlled by agent running Behavior tree.
Return:
|
Parameters:
Output:
|
AI is composed of two entities, character and AI Agent. This is common way how to access character from Agent in Behavior tree. |
Create Position | Creates position according to specifie vector or position of entity. It's possible to randomise the position from its given center.
Return:
|
Parameters:
Input:
Output:
|
Position output has to be saved as variable, it cannot be used directly as input node. |
Follow Path | Follow given path
Return:
|
Parameters:
Input
|
|
Move to Entity | Requests move to position of entity. This position is regularly updated, it should be used to move to target which can move.
Return:
|
Parameters:
Input:
|
|
Move | Request move to specific position. Use to move to a static target.
Return:
|
Parameters:
Input:
|
|
Aim | Requests aiming on entity, position or specified direction.
Returns:
|
Parameters:
Input:
|
|
Get in Vehicle | Moves character into vehicle.
Return:
|
Parameters:
Input:
|
|
Land | Realizes movement over landing position and descend into position.
Return:
|
Parameters:
Input:
|
|
Stop | Cancel movement and/or aiming of entity.
Return:
|
Parameters:
|
|
Get Out Vehicle | Request disembarking from vehicle.
Return:
|
||
Set Movement Speed | Request change of movement speed of controlled entity.
Return:
|
Parameters:
|
|
Orient | Requests change of orientation of controlled entity.
Return:
|
Parameters:
Input:
|
|
Enable Obstacle Avoidance | Allows or disables obstacle avoidance for controlled character.
Return:
|
Parameters:
Input:
|
|
Get Aiming Position | Calculate the position of the target. It's possible to predict target's position in future using parameter Lead movement time. This node will not calculate any ballistics, just tracks the position of the target and interpolate the result.
Return:
|
Parameters:
Input:
Output:
|
|
Send Order | Creates order and add it to order list. Can be used on any entity, controlled entity is selected by default. Any entity can be also selected as sender.
Return:
|
Parameters:
Input:
|
|
Idle | Wait for given seconds. Waiting time can be randomised.
Return:
|
Parameters:
Input:
|
|
Current Order | Get data about current order.
Return:
|
Output:
|
|
Finish Order | Finishes current order.
Return:
|
Utility Tasks
Tasks handling very basic functions as operations with variables.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Set/Clear Variable | Allows for setting value or clearing variable.
Return:
|
Parameters:
|
|
Find Entity | Find entity by name or class name.
Return:
|
Parameters:
Output:
|
Scripted Tasks
Scripted variants of Task, inherited from scriptedTask.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Find Target | Example scripted node for finding target in certain radius. For now enemy is any character entity other than BT agent or player character.
Return:
|
Input:
Output:
|
Character Tasks
Tasks that can be used only on characters. They will not work on vehicles, turrets, etc.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Fire | Request fire action on controlled character.
Return:
|
||
Change Stance | Request stance change on character.
Return:
|
Parameters:
Input:
|
|
Throw Grenade | Request throw grenade action on controlled character.
Return:
|
This node might be obsoleted in future, depends on implementation of grenade throwing. | |
Character Raise Weapon | Request action to raise or lower weapon.
Return:
|
Parameters:
|
|
Character Set Movement Speed | Request change of movement type on controlled entity.
Return:
|
Parameters:
|
|
Play Gesture | Attempts to find a gesture by name and request it.
Returns:
|
Parameters:
|
|
Perform Object Action | Finds and performs action on object, for example open door.
Returns:
|
Input
|
Waypoints
Tasks related for handling waypoints.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Get Waypoint | Finds and returns waypoint with selected index. | Parameters:
Input:
Output:
|
Group
Tasks related to group management.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Get Group children | Iterates through array of group children, and output child of current index as variable. It can be specified which indexes should be iterated through.
Return:
|
Parameters:
Output:
|
Example:
Behavior tree that will cause all children of the group stop. This BT has to be called multiple times, as Get Group children only stores correct index of array, but cannot call anything multiple times. Note: This handling of "forEach" might change in the future. |
Create Group | This seems to be WIP node. |
Perception
Tasks related to AI Agent perception, which is basic source for finding threats and targets.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Pick Target | Picks one target from known target list, and output it as variable.
Return:
|
Output:
|
Action Tasks
Task nodes helping with performing actions.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Request Action | Attempt to request specified action on controlled entity.
Return:
|
Parameters:
Input:
|
Smart Actions
Tasks related to smart actions. Smart actions are objects in world, with which AI can interact. Bench can have smart action for sitting.
Name | Description | Parameters/Input/Output | Notes |
---|---|---|---|
Perform Smart Action | Makes controlled entity to perform smart action
Return:
|
Input:
|
|
Find Smart Action | Allows finding smart object in the world which support smart action and save it into variable. If multiple smart actions found, random is selected.
Return:
|
Parameters
Output:
|
|
Get Current Smart Action | Get smart action object currently realised by Agent.
Return:
|
Output:
|
|
Get Smart Action Pos | Get position of given smart action.
Return:
|
Input:
Output:
|
|
Get Smart Action BT | Returns behavior tree for given smart action.
Return:
|
Input:
Output:
|
Experimental / Work in Progress
These nodes might not be finished or are used in some experimental or unfinished systems. These nodes are changed often, so it's not recommended to use them.
Name | Description | Parameters | Notes |
---|---|---|---|
Flocking | Implements features | Parameters:
|
|
Get Random Point | |||
Scripted Target | Allows for overriding in scripts |