-
Notifications
You must be signed in to change notification settings - Fork 29
Home v0.1
José Rey Méndez edited this page Aug 21, 2020
·
2 revisions
Welcome to the Planilo documentation! This project is based on the open source project xNode.
Planilo is intended to be a visual node editor for AI tools, the first available tools will be Behavior Trees and Finite State Machines. Any AI graph can be run from a game object by just adding the AIGraphRunner
component.
- The blackboard is a dictionary used to contain data relevant to identify and execute a single AI runner. Each AIGraphRunner component creates it's own blackboard to contain information.
- Add blackboard variables to be on your AIGraphs by adding some of the blackboard variable nodes implemented (See here). Set the name of the nodes to the intended blackboard key.
- Implement your own blackboard variable nodes by inheriting from the generic
BlackboardVariableNode
. - Modify the blackboard on runtime from your components by using the methods
SetInBlackboard
andUnsetInBlackboard
found in theAIGraphRunner
component.
- Create a new behavior trees using the context menu asset creation
BT/BehaviorTree
open it and start editing.- The minimum requirement for a Behavior tree to work is to have either a composite or decorator node set as root. Select your root node by using the context menu on a node and using the "Set as Root" option.
- You can create your own tasks and checks by inheriting from
BTTaskNode
. and overriding theInternalRun
method. This method should return one of the defined states inBTGraphResult
: Success, Failure or Running.- Success and Failure will somehow advance the execution from the behavior tree.
- Running will normally stop the behavior tree execution and continue from the same point on the next execution.
- See examples
DebugVariable
,IsNullCheck
.
- Implement your own composites by inheriting from
BTCompositeNode
. - Implement your own decorators by inheriting from
BTDecoratorNode
. - Use your blackboard variables from tasks, checks and other types of nodes by using input ports and using the utility function
GetBlackboardValue
inherited fromBTNode
. - Make your behavior trees modular using the Sub-tree nodes already implemented. This nodes never return the Running result allowing you to interrupt them from their parent trees.
- Create a new finite state machine using the context menu asset creation
FSM/Machine
open it and start editing.- The minimum requirement for a finite state machine to work is to have a state node set as the entry state. Select your entry state node by using the context menu on a node and using the "Set as Entry State" option.
- Connect different states to create transitions between them, transitions are executed in order so the first valid transition will cancel all following transitions.
- Add checks between state connections to limit the transitions to certain conditions.
- You can create your own states by inheriting from
FSMStateNode
and overriding theRun
method were the actual work of your state takes place.- Optionally implement the
Enter
andExit
methods for set up and clean up of the state. - See example
DebugState
- Optionally implement the
- You can create your own checks by inheriting from
FSMCheckNode
and overriding theInternalCheck
returning a bool to indicate whether the transition needs to take place or not.- See example
IsNullCheck
,IsTrueCheck
- See example