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)

53 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?