-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monster behavior tree #39810
Monster behavior tree #39810
Conversation
My integration is incomplete, will try to get that fixed tonight. |
fd5eb2f
to
10f474d
Compare
Back in business, everything is wired up, shoggoth successfully munched items, but do check behind me. |
c5d9169
to
1e0f02f
Compare
static void build_behavior_tree( mtype &type ) | ||
{ | ||
type.set_strategy(); | ||
if( type.has_flag( MF_ABSORBS ) || type.has_flag( MF_ABSORBS_SPLITS ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we will replace flags with goals in monster definition later (or maybe add monster flags to goals definitions)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably get unified around special attacks, or maybe rename them to "abilities", but I haven't thought about that too much yet.
The behavior elements could even be inlined along with metadata about the attack itself.
Shoggoths are still eating items, so that's correct. |
* Initial integration of behavior tree into monster AI. * Extract character oracle to its own module
Summary
SUMMARY: Infrastructure "Integrate behavior tree implementation into monster AI."
Purpose of change
The existing tactical monster AI is kind of a mess of if statements with careful early termination and special casing scattered all over the place, we can do better.
Describe the solution
Start integrating the behavior tree implementation into the monster tactical AI.
Describe alternatives you've considered
Magic.
I cut it of at essentially a minimum viable implementation for coment and to shakedown the implementation, there's still a significant amount of top-level infrastructure to add.
Testing
Added some very abbreviated unit tests.
Need to spawn a shoggoth or other item eating monster and verify that their ability still triggers.
Additional context
This is just the first step, hopefully it's fairly clear how this gets extended and it's going to be fairly routine to move the rest of this monster decision making into the behavior tree implementation.