Releases: BlackDice/b3-chief
Mistakes do happen :)
Memory & Selector
Breaking change of this release is about renaming native behavior Priority to Selector which is more widely used and easier to comprehend (e761e13).
There is also new method getBehaviorByName to make it easier to find particular behavior without handling their ID (f281221).
Lastly some memory tweaks, mainly ability to set an array as memory value (b3b0b22). Also added method unset on memory model to actually clear value (f2e17aa). And small optimization about using the unset to clear memory flag about open nodes instead of setting it to false. Makes it easier to actually see where are some memory data (c441fb2).
Invalid version
Use 0.7.0 instead since there is a breaking change...
Watch subjects and be careful
Remote watch
Support for remote change watching in Firebase adapter (b470e8a)
Compose tree with other tree
Behaviors on its own do provide good compose ability on its own. Big behavior trees are surely possible, but suddenly you can realize that some part of that tree can be reused in other tree you are building. Copy&pasting that part is no good way to go.
Because of that Chief brings subtrees on the table. It's very simple in it's nature. There is a Subtree native behavior which is essentially considered a leaf, but it accepts treeId configuration which is then executed. If you examine code of that behavior, you'll see there is hidden magic behind it and can easily define own subtree behaviors, eg. executing tree used in many places often.
Minor change in this release is also regarding debugging of execution. Instead of whole chief namespace, you can filter out messages for chief:tick giving you only details about what subject was executed and result states of nodes.
Catch those errors
Main focus of this minor release is about better handling of errors that might occur during parsing or execution of behaviors. Everything is neatly handled by optional onError callback in planExecution method. By default it uses debug module to log errors. Use callback to do something different with errors, eg. send them to some service.