It's the holiday season again. As the forest air reaches freezing temperatures, I break out the ice shaver for my windshield. It's a time for celebrating family, sharing thanks for what we have, and behavior sets. That's right, fuzzy-logic for AI in-game.
Since the world designers for the game won't have access to the direct behaviors, (nor the programming skills to code such things) I've managed to find some use for the custom Entity keys on objects in the Sandbox! Each entity will have actions assigned to a set of situations. Think of it like 'IF' statements that world builders have access too. This Enumeration of behaviors gives the designers flexibility to alter the NPCs actions easily within the sandbox. Global preset behavior collections, or custom sets per situation.
For example, and NPC who follows the player may have something similar to this
DefaultTarget = Player
DefaultAction = FollowTarget
Now if the NPC needs to defend the player...
GuardTargetAction = KillAttacker
Or...
GuardTargetAction = HealTarget