I am trying to come with a system using behavior graph for a unique NPCs.
The NPCs have some common behavior (dynamic) driven by the environment - talking to each other ect.
They have unique behavior that is set in their own behavior graph.
I have tried to create a subgraph that can be reused for all NPCs but I am struggling with a few things.
-
I am using the “CharacterMovement” blackboard to store values used for navigation if I share the values they can be used by the subgraph but then all the instances of “DynamicBehavior” are using the same values, so I can’t change them per NPC. If I don’t share them then I have to duplicate them on the subgraph and link them.
-
I am using “CharacterMovement” to help organize the blackboard variables if I add it to the subgraph “DynamicBehavior” there is no way to assign values to it from the “Run Subgraph” node.
What is the best approach to share common behavior between NPCs and is there a better way to link values from the parent graph to the subgraph without duplicating them?
I am currently seeing a bug where changes to the subgraph are now no longer having any immediate effect, it will just run a cached version. Currently I am deleting runtime assets and then reattaching the graphs to the BehaviorAgent components in order to get changes to be run. I think this had been bugged already, but let me know if I can provide more information.

