Open madeleineostoja opened 9 months ago
I've now added the selection of the evaluation method also to the Behaviour and BehaviourGroup nodes. To keep compatibility with previous versions, the default will be SUM but there are the same choices available as with consideration groups.
I originally went with the sum with the thought that the Consideration Groups can be used to select the evaluation method if something else is needed. But as you suggest, it is better to just avoid the extra node and have the selection at the Behaviour/B.group level.
For all of you reading this: if you feel MULTIPLY should be the default evaluation choice, add a thumbs up to @madeleineostoja post and if there are many who want it that way, I'll do the switch for the next version.
Amazing, thank you!!
@JarkkoPar is the Behaviour and BehaviourGroup evaluation method feature released anywhere? Keen to try it
Not yet, but I can compile a test version during the weekend and post it here. I'm working also on the debugging overlay, so that will be included in the test version.
Here's a test build. As usual with these, please make a backup of your project and then copy the contents in to the addons/utility_ai folder. I had less time than I originally thought for testing, but hopefully everything works as expected without any issues.
This build also includes a version of the debugging overlay. If you want to try it, add a Control-node to your scene, stretch it to cover 100% of the window width. Then, in the _ready() method of the scene where you added it, add the following (assuming you named your Control-node as Control
):
if OS.is_debug_build():
AIDebuggerOverlay.add_as_child_of($Control)
And this should result in the Debug Overlay showing up in your game:
On the left side of the screen you'll see the AI structure and the weights, and the node names blinking based on what gets selected on each tick.
Just a thought if you have any plans for a v2 breaking change release in future, from everything I’ve read on utility ai and my own (admittedly very limited) experience, should the default evaluation strategy for considerations under a behaviour be to multiply rather than add scores? Then you have easy inbuilt vetos (any zero scoring consideration nullifies the option) and more importantly you are always dealing with a normalised score, so adding more considerations doesn’t implicitly skew the weighting of a behaviour.
Alternatively, could the behaviour have an option for its evaluation method, rather than needing to add a consideration group to set that?