Well, the problem is more complex than that.
Imagine I have 3 NPC types
Station - stays in place, doesn’t walk anywhere, doesn’t interact with environment
Wanderer - selects goals according to its internal state and walks everywhere needed
Chaser - follows player or other NPC.
All NPCs can be friend/neutral and enemy to player and any other NPC/faction.
Also NPCs are visually different, some are unique.
Also there is dependency on distance - 3 versions of NPCs are for far away, away and close.
They differ in behavior and many other aspects (like path-based motion vs physics-based motion)
Also any NPC can become any different type because of player actions dynamically as many times as needed as quickly as needed.
So there are many complicated things associated with each NPC.
At first I implemented a script (with many #includes) which I used for NPC for all things,
but everything depended on everything and intermixed. I implemented more or less
proper class system to isolate some things, but quickly found that many things in
each NPC system supersede each other. And now I think that instead of writing single complex class (of ScriptObject) which would handle everything I might write several completely independent classes,
which would handle different aspects of NPC and replace them on the run.
Is it right idea or should I do something else to reduce complexity and finally start to understand what is going on? As I want to add IK to characters and clothes system, which will farther complicate
NPC script and with current state I will have big trouble adding there anything at all