UI assets by @bizbot19
For my projects, I’ve gotten comfortable using Behavior Trees for game AI agents, and even some behavior for things like UI.
However, I disliked having to scroll through large amounts of behavior tree code/objects because I’m more of a visual person and it got hard to manage and remember how things worked - especially with larger trees.
I needed something to speed up my workflow and make trees easier with less headache - and so I made BTrees!
I released it for free because I’m sure I won’t be the only one to find use from it.
BTrees is a visual node based editor that allows you to create Behavior Trees just as you would normally, but in a node based environment.
Here’s an example of a Tree I made for my wild west project.
and this is a (tiny) snippet of what it looked like before, just written out in code
The actual functionality is the same. I use @oniich_n’s BehaviorTree2 module that I helped write.
All my plugin is designed to do is act as a visual layer so you don’t have to write quite as much.
What are Behavior Trees?
Behavior trees are a popular plan execution model used in a lot of modern games.
This is a great article that explains how to use them.
And this is a great excerpt from that blog which helps explain why they’re so useful
The trees can be extremely deep, with nodes calling sub-trees which perform particular functions, allowing for the developer to create libraries of behaviours that can be chained together to provide very convincing AI behaviour. Development is highly iterable, where you can start by forming a basic behaviour, then create new branches to deal with alternate methods of achieving goals, with branches ordered by their desirability, allowing for the AI to have fallback tactics should a particular behaviour fail. This is where they really shine.
How do I use it?
To create a new tree, simply click the create button on your plugin toolbar.
This will create the BehaviorTrees folder under ReplicatedStorage if none exists, as well as open a new blank tree.
Deselect a tree folder to stop editing the tree, or select one to start editing it.
Hold LMB down on the editor’s background to pan the editor, and mouse wheel to zoom
You can read the ReadMe for the full rundown of the plugin
Here are some basics on how to use a tree you’ve made
Here’s an example tree made in the editor.
Tasks can be edited by clicking on the task node’s edit icon. This is a modified template example for “WalkToDoor”
Finally, when you’re done with your tree, you can simply create it with the specified object you want to use(obj parameter in tasks), and then run it as you normally would!
I’m going to be honest - I’m not much of a plugin developer. I made this out of necessity and to help, not because I enjoy making plugins. As a result there may be issues you run into - if you do let me know here on the forums or on discord(tyridge77#5390) and I’ll resolve them as quickly as I can