BTreesV5 (Rojo Support, Fixes)

BTreesLogo

This is the latest version of this project, to learn more about what it is see this link

Two main changes:

  • Fixed a critical error where trees weren’t properly keeping track of an agents individual running/paused state, effectively breaking trees that were used by multiple agents. I fixed this years ago but forgot to commit a public change

  • Added @MetaProx’s “External Task” node, allowing users to easily use Rojo with their trees

You need to update the plugin, BehaviorTreeCreator module, and the BehaviorTree module for everything to work properly

Updated plugin:

Updated BehaviorTreeCreator module(with Updated BehaviorTree module inside it)
TreeCreatorV5.rbxm (13.1 KB)

Updated the github too with the latest code if you prefer(ignore that it says BehaviorTrees3)

64 Likes

This looks good. Glad this plugin is still getting updates.

Finally! I was looking for something like this! This will definitely make developing and scripting a LOT easier! Thank your for your contribution to the community! This is extremely helpful!

Hi there , i installed bTreesV5 plugin , i suppose it includes visual creator , when clicked on create button it creates the related folders but doesn’t open the visual editor on selecting folder . Nothing happens . I also inserted rbxm file into ReplicatedStore.
Could anyone help what am i doing wrong ?
EDIT: Oh my god i didn’t even look at the world-map tab of editor , i was just expecting it to open up top of a script editor tab. For anyone who made same mistake just look at the world tab , you will see the gui popped up.

Hello, I think I found a bug with the BTreesV5 viewer, if a new NewTree folder is duplicated, the duplicate folder cannot be opened in the viewer, except you turn off and on again the viewer plugin

Edit: Woosh in the video cant see the plugin tab, but yes i turn off and on again

Video of the bug here

2 Likes

Adding a source for an external task does not work for me. I do not know why, but I’ll try to figure it out and tell you.

Edit: Nvm, I used the wrong thing; that looks nearly identical to it, and it now works

> (Awesome Plugin Btw).

Did you manage to fix it? I’m running into the same issue.

FIXED: After inspecting the plugin’s source, it only scans for collection service tags when it first initializes, so you have to disable and reenable the plugin if you duplicated it or restart studio. Works as a hacky fix, for now.

Hello, I am new to using behavior trees, and I am currently learning.

I have been using the README.md file to learn how to use the module.

I have a few questions,
the table that is passed to the tree when :run is called, can it contain multiple actor objects?

Tree = BehaviorTree5:new({
    tree = BehaviorTree5.Sequence({
        nodes = {
            node1,
            node2,

            BehaviorTree5.Random({
                nodes = {
                    node3,
                    node4
                }
            })
        }
    })
})

In this code example that is provided, Tree raises a problem to me, was Tree declared further up in the code, like local Tree?

Finally, I can’t seem to find a post that explains how to use the module in depth, is there any posts out there? if yes, then can I have a link to it. If not, then what a bummer.

I am bad at wording things, ask me if something needs to be clarified.
Thanks in advance.

1 Like

Okay, so I found a good video about the Behavior Tree Editor Plugin, that explains how the trees work.
However, there is something that I am now confused about, what is the actor object? I just have to pass a table containing my NPC, right? (I still don’t know if I can pass multiple NPCs).

And I don’t really understand blackboards is it just like an empty local table for the object that I can use to store variables, and use them across different leaves? If so, how do I define a key-value pair in the table, and where?

question is there a way to destroy or get rid of a behaviour tree once I don’t need it anymore?

How do I use this with alot of NPCs (Open world RPG amount), without losing performance?

Hey, I’m having an issue. Pressing my delete key while dragging things doesn’t work. This means that I have to delete a node, if I want to delete a connection. This would be fine, except for the fact that I have to recreate a task every time I connect things incorrectly. Are there plans to fix this?

Have you tried changing the keybind in the help menu? I noticed the default doesn’t work

At some point I’ll remake this tool and it should have cleaner UX

1 Like

Yep, that did the trick, thanks! I’m hoping the future remake will have more documentation and tutorials. The current btrees tutorials either make extremely basic npcs, or don’t go into detail with the more advanced npcs. It’s a bit overwhelming to learn manually with my currently more restricted schedule. :sweat_smile:

Thanks for the help, and great plugin/module!

Is the plugin also open source? I wanted to check out the internals on that, but looking at the github, as far as I can tell it only includes the base BehaviorTree solver.

Edit

I found this in order to view the internals, I guess the question now is if it’s also open source under GPL 3.0 or if that only includes the main Behavior Tree runner.