I just started working with Lumberyard and have some questions after digging through the documentation. I’m finding the sections regarding MBTs and AI in general fairly confusing, and while I think I understand what’s going on now, I was hoping to have some confirmation before I really commit to a direction.
If I’m reading all the various sources correctly, once upon a time, LY had a MBT implementation that came over from CryEngine. That implementation is pretty closely tied to their AI code, though, in particular ScriptBind_AI that gives you all the calls that would let you interact through Lua. All of that is part of Legacy code.
At some point, a new Behavior Tree component was created, which is what you can now set up through the LY Editor. It’s part of the ComponentEntity system, and allows you to start and stop it and set boolean variables on it through the usual Bus.
However… Most of the nodes available for the tree have a dependency on the old AI system. For example, the Move node allows you to go to the current “attention target”, and I don’t see any references to an “attention target” outside of CryAISystem. Furthermore, I’ve been unable to get any of the Lua nodes to work, which was indicated in one of the two node reference so isn’t terribly surprising. So it seems like MBTs are a thing, but most of the existing nodes aren’t viable at the moment.
So my conclusion at this point is that I have one of three options:
- Get CryAISystem building into the project so that I get the AI functions to make the MBT functional. Seems like that’s a step away from where LY is trying to go though, and I’d still expect issues trying to get anything Lua related to work.
- Try to write my own nodes that do… Well, pretty much whatever I want them to. Downside of this is that without the ability to call into Lua from the MBTs, I expect things to get hairy at times.
- Forget about MBTs for the moment and follow the StarterGame’s example of using a state machine. I’d prefer to use MBTs, but if the tech is in an awkward state right now (as it really seems like it is) I can always wait and rewrite it later. This is a project purely for my own entertainment, so I’m willing to wait if that’s the best option.
Thoughts? Comments? Other options?