Open ndouglas opened 5 years ago
I think the Actions should return Effects, not invoke them. That's one piece that will make this easier.
well, not necessarily. That would preclude multiple effects. Still need to think about this some more.
I think that might actually be a good restriction. 1->1 Action to Effect. After all, Effects can themselves have effects and so on, but that should not necessarily be the concern of a naïve AI.
As I get more into this, the simplistic AI of the monsters is going to get substantially more frustrating. And the whole point of this game is interesting AI.
I think the best way to set the monsters up is with Goal-Oriented Action Planning. I think I'll need to write my own system to integrate it with the existing Command -> Rule -> Action -> Effect structure I have set up for things.
In order for the AIs to understand this, I need them to be able to model that C->R->A->E system. Fortunately, I think this maps okay onto the GOAP concept.
GOAP Postconditions or Effects are just simplifications of the Effect system I have set up. Summaries, even.
GOAP Preconditions -- which is really a better name than Rules for how I'm using them -- map to rules. Brb changing that.
Then GOAP Actions map to Actions. But also Commands, since I have those apart somewhat. Mostly Actions. I suppose the thing to do is consider them a map to Actions, but use the Commands to invoke them, as I do now. No biggy.
So, all in all, I think this might be fairly painless to create and implement.