Suddenly all StateTrees are broken, AI NPCs no longer function

I’m not positive exactly what went wrong but it’s a mess to be sure.

Project Source; 5.8.1 C++ ThirdPerson (with all 3 variants, because it auto adds all 3)

I was working on my surfaces and noticed that none of the AI spawned by the volume, were working anymore. They aren’t even accessing the StateTree.

In the StateTree, it’s trying to reference an editor instanced file with C. IE BP_CombatEnemy_C

Well… ok Mr. Editor. Not sure why you’ve decided to do that. But in any regard the whole thing has errors all over the place and is broken, because it’s trying to find an instanced copy of a file, and not the actual hard copy of the file.

Is there some reason it would decide to do this without explicitly being told to?

I guess I don’t understand precisely how the editor is working when run from the IDE. This could be the problem I suppose?

Example StateTree error:

Combo Attack Task ‘Combo Attack’: Could not find matching Context object for Context property ‘Character’ on ‘Task ‘Root/Select Behaviors at Random/Attacking/Melee/MeleeAttack/Combo Attack/Combo Attack’’. Property must have manual binding.

I’ve also noticed I do not have the ability to go in and tell it where the correct file is.

Thanks.

That _C is the compiled blueprint with c++ bindings. This is normal.

The error points to your context not being set properly. That state tree expects to be run on a character actor, and the task needs the context set explicitly.

I couldn’t physically set it anywhere; ultimately I gave up because it’s just a part of the example root project and went back to doing other things, then low and behold 3 npcs came up behind me and started beating the snot out of me.

I still have no idea how it ‘broke’. Which will probably bother me down the line as I write my own.
I couldn’t set it explicitly anywhere, and the c++ & header file were still correct and unchanged.

I did at one point today do a full wipe & build; wiped all the temporary stuff, built important changes.

So maybe I guess… something was stuck somewhere? It wasn’t in memory as it persisted beyond 10+ reboots. I had also already compiled several times over the last 30 hours, as well I even at one point walked back to 3 different project versions.

Hopefully it won’t be a problem for me down the road when I start building my npc’s ai systems. I am a wee bit concerned however;

If Unreal NPC AI is this easy to mysteriously break with no clear fix other than nuke from orbit and hope for the best… then I might have to switch to an engine that doesn’t experience this.

Once you understand the systems it doesn’t mysteriously break. State trees are very stable and easy to debug.