BehaviorTrees3 + BTrees Visual Editor v3.0

I’m not even gonna lie to myself, This looks like an actual software outside of Roblox, Which is how incredible it looks. Might as well try it out once in a while. Looking forward to using this!

1 Like

Fixed issue where tree node didn’t always work properly

1 Like

Is there an open-sourced .rbxl file I could look at to see how this works in a game?

4 Likes

I noticed that another breaking change is that a folder must be specified if the tree is run in studio? I think this might just be an oversight related to the new debugger functionality? On line 446 of BehaviorTree3.lua, self.folder is referenced only if IsStudio is true and it is breaking some example code from BehaviorTree3TS. I believe the check above should be checking if IsStudio and self.folder?

Also, I second the usefulness of an example game!

Can You Do A “How To Use” Video

8 Likes

Yes, this would be really useful.

5 Likes

Good catch thanks! Updated the module on github.

As for a video/example game, I plan on doing that if someone else doesn’t do it before me. May take awhile though as I’m pretty busy these days

6 Likes

Wow. This deserves to be recognised. This’ll probably make NPC making / behavior building like, I dunno, a BAZILLION times easier.

For any of you who grabbed the BehaviorTree3 module directly from the plugin folder in studio instead of the github, the module was actually named BehaviorTree4 there , so BehaviorTreeCreator will fail because it’s attempting to index “BehaviorTree3”.

Small issue, just rename the module in that case back to BehaviorTree3. @Defaultio should be able to update the plugin when he gets the time

2 Likes

If anyone uses Rojo and wants to sync their data up externally, I’m currently doing the following. Granted, it’s not the smoothest experience, but it’s better than nothing. In short, I use remodel to read the place file that contains the behavior trees and then write an .rbxmx file.

  1. Create a new place file that contains your behavior tree folders in a folder named Trees under ServerStorage
  2. Save the place as an .rbxlx file (the XML format)
  3. Write a remodel script to grab the Trees folder and write an .rbxmx file whenever needed:
    local game = remodel.readPlaceFile("YOUR_PLACE_FILE.rbxlx")
    local trees = game:GetService("ServerStorage").Trees
    remodel.writeModelFile(trees, "./some/path/for/rojo/trees.rbxmx")
    
  4. Point that trees.rbxmx file into your game within your Rojo configuration
  5. Run the above script whenever you want to write the file remodel your_script.lua

Now you can freely open up the place file and edit it however you like. Whenever you want to sync it into your actual game with Rojo running, just save the place file and then run the remodel script.

Bonus points if you set up some sort of file watcher on the place file and automatically run the remodel script when the place file is saved.


Alternatively, if you don’t want to use remodel, you could just right-click the Trees folder and save it as an .rbxmx file in your desired location, but this feels too manual to me.

7 Likes

Not my video, but for those who wanted a video I found one!

12 Likes

what is an blackboard, invert anyway?

2 Likes

Very interesting plugin. Will most certainly be incorporating this into a future project.

Not sure if anyone else has reported this but there are some slight issues with Team Create and using the plugin where deleting a node will replicate immediately to other team create members but creating a new node won’t replicate until the other clients either disable and reenable the plugin or they leave and reopen the place.

Is there any possibility of implementing a force refresh button/have the BTree refresh the node data each time the root is opened? I really don’t care about having true live syncing but being able to work on a BTree and then letting another team create member work on it after I’m done without having them close/reopen studio and/or disable/reenable the plugin would be life changing.

Thanks again Defaultio!

1 Like

This plugin has been a huge quality of life when creating AI. Though I do have one question, Is there any way to recover a tree if you accidently delete it? Some times I muscle memory press the key delete when trying to delete a node and end up deleting the whole tree. From what I can tell hitting undo or even trying to make duplicates of a tree all seem unsuccessful when trying to access them. If there is a way, it would be a huge life savor for me haha.

1 Like

Superb Plugin!

However, perhaps I’m missing something.
I have my trees working great with one NPC. However, I run into an issue where I cannot have more than one tree :Running() at once. The tree will not run until all other trees are not running. I’ve even tried putting the :run function in a coroutine (different threads anyways).

2 Likes

How do i run a Tree created by the plugin? I don´t really understand how to do it. But everything else is fine

I’m not sure if it’s just me or what but I can’t seem to find the BehaviorTreesCreator module for my life! Does anyone have a link to the model?

1 Like

In awesome Upgrade for Btrees4 (if there is a btrees4 ever) would be a system similar to unity bolt where btrees becomes an all in one tool for VBS and AI behaviors. It could be insanely helpful for quick and dirty testing when your too lazy to script, though I can see it being used to create Story games (not like roblox ones, more like DBH or telltale games)

Uh. I am still confused on how this works. Does this script for you or do I need to do work still. And what would I have to script?

2 Likes

This is a really neat plugin, thank you for sharing.
Is it possible to set weights through code or some kind of input? For example, I have characters with different personalities so the weights may vary.