Feature Request for Behavior Tree Reference Task

Hello Opsive,
I've been using Behavior Designer extensively over the past months. I had an ecstasy when I discovered the power of behavior tree references. Unfortunately, I can't reference a behavior variable within a "Behavior Tree Refence" task. That would have been awesome to have since I am creating modular trees and each of these smallest modules are optimized in themselves.
It's very useful when there are hundreds of agents in the game and when you want to change a small reference all at once.
Here is an example of sequence starter module using integers. I would like to have a sub sequence as a reference tree so I would use different reference trees under different agents:

1657670953948.png
Example use of the above reference tree: The reference tree task in the end of tree would start a vegetable search loop for some animals when their hunger is below a certain value. But it can also start the mating loop of another animal when their horniness is below a certain value as well.

Also there is a behaviour variable type under variables but it only accepts prefabs and not external behavior trees.


1657671224593.png

I'm going to ask for the help of my programmers to enable this when they are back from their vacation. But I felt the urge to give a feature request to you so that everyone can benefit from it.

Best,
 
Thanks for the feature request :)

When you say access a variable from within the external task, can you give some more details? When the reference task loads it pulls in all of the child tree's variables into the loading tree. If you want to use one of those variables within your loading tree you can create a new variable on your main tree that has the same name/type as the child variable.
 
Thank you Justin,

I am aware of what you're saying and I'm using the variables on the main tree to override the variables on the child tree already. This works well for all types of variables except the one that we can't turn into a variable: "external behaviors"

I have child trees that have their own child trees. The example on my previous post belongs to a child tree already. The reference tree task at the end refers to a single external behavior. Instead I want to turn that behavior into a variable, so that when I attach this child tree to a main tree each of my agents can call a different child tree during that task.

Let me try to give a concrete example: I have two different agents, let them be different animals. They have their own metrics: let's say horniness and hunger. Rabbits are going to use the horniness integer for mating and frogs are going to use the hunger metric for start searching for food.
I created the above child tree to trigger a reaction when an integer(metric) drops to a certain level. I attach it to both animals and set the variables to override on their main trees.

Yet I can't change the task (the reference tree) they should be doing at the end of the child tree, because there is no way ( or I couldn't find) how to turn that external tree into a variable. Rabbits should start the mating sequence there, and frogs should start the food search sequence. The external trees for mating and food search are completely different than each other.

If the example wasn't clear I might try to give other use cases as well. I have many :)
 
Ahh, I see. So basically you're looking for a SharedExternalBehavior variable, and have that variable used by the reference task?
 
Just popping up the issue. I would really appreciate to see this feature. If it comes, I can promise to show a very large scale use case for behavior designer. I have hundreds of different creatures with some unique and many shared behaviors. I need to appoint reference trees to variables to be able to use them under bigger trees.
 
I definitely want to add this, it's just that I am waiting for version 1.8 since it will break the existing external behavior tree references and I don't want to do that in a bugfix release. We are releasing a new major update to our character controller and after that settles down Behavior Designer will be my main focus again.
 
Top