Skip to content

Implement Auchenai Crypts Strategies and TBC Dungeon Contexts#2229

Merged
Celandriel merged 26 commits intomod-playerbots:test-stagingfrom
flashtate98:AuchCryptsStrategies
Apr 17, 2026
Merged

Implement Auchenai Crypts Strategies and TBC Dungeon Contexts#2229
Celandriel merged 26 commits intomod-playerbots:test-stagingfrom
flashtate98:AuchCryptsStrategies

Conversation

@flashtate98
Copy link
Copy Markdown

Pull Request Description

This PR aims to add bot strategies to the Auchenai Crypts dungeon, specifically for the boss Shirrak the Dead Watcher, as his focus fire mechanic is really annoying to deal with.

Additionally I have added TbcDungeonActionContext.h and TbcDungeonTriggerContext.h for future reference as I add more strategies to TBC dungeons that need it.

A HUGE thank you to @brighton-chi for all his help. This has been a fun learning experience!

Feature Evaluation

  • Describe the minimum logic required to achieve the intended behavior.

Trigger: A 20 yard radius grid search is performed to locate the focus fire trigger NPC

Action: Bots will flee from the trigger NPC using MoveAway with a 5 yard safety buffer

Multiplier: A for loop that prevents bots from running back into the focus fire mechanic while its active.

Tanking: Tanks have a set coordinate to drag the boss to for the duration of the fight.

  • Describe the processing cost when this logic executes across many bots.

Minimal, these scripts only execute when Shirrak has been engaged.

How to Test the Changes

Go into Auchenai Crypts (Normal or Heroic) and engage Shirrak the Dead Watcher

Impact Assessment

  • Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots?
      • No, not at all
      • Minimal impact (explain below)
      • Moderate impact (explain below)

This logic is only applied to Auchenai Crypts and activates during Shirrak's encounter.

  • Does this change modify default bot behavior?
      • No
      • Yes (explain why)

Behavior only applies when in the instance and when engaged with Shirrak.

  • Does this change add new decision branches or increase maintenance complexity?
      • No
      • Yes (explain below)

New dungeon contexts were added (TbcDungeonActionContext and TbcDungeonTriggerContext) to provide a clean and dedicated structure for future TBC dungeon strategies that will be developed. This was done to be in alignment with the existing WOTLK contexts that already exist.

Messages to Translate

Does this change add bot messages to translate?
- - [X] No
- - [ ] Yes (list messages in the table)

Message key Default message

AI Assistance

Was AI assistance used while working on this change?
- - [ ] No
- - [X] Yes (explain below)

Gemini was used to help me understand existing code in the module I was referencing and reusing to develop this strategy as I am not a programmer and hardly know anything about C++.

Final Checklist

    • Stability is not compromised.
    • Performance impact is understood, tested, and acceptable.
    • Added logic complexity is justified and explained.
    • Documentation updated if needed (Conf comments, WiKi commands).

Notes for Reviewers

If there are any better alternatives that could be used to help improve the strategy in any way, please suggest it. I am very new to this and want to learn and improve.

Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.h
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsTriggerContext.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h Outdated
@brighton-chi
Copy link
Copy Markdown
Contributor

Alrighty, I fought him 5 times and tried to trigger some different scenarios. I think by having a Paladin healer, that gave me some difficulties because they are definitely the worst healer for this fight, which I think is good for pressure testing.

  1. Tank movement is good. My Warrior tank would charge into combat so he was already at the top of the stairs when the fight started, so I tried making him wait back so that he had to engage the boss on the stairs. He still had no issues with backing up the stairs into position. If it's possible to do faster than 2 yards/s without fucking up the pathfinding, that would be great, but if not, I think this works well regardless. I do suggest a multiplier to disable TankFaceAction anytime there is a fixed tank waypoint because otherwise the tank will still try to turn the boss once arriving at the waypoint and ends up sometimes running side-to-side.

  2. I had some issues with melee running back in after getting out. This shouldn't happen with the multiplier, and I suspect the issue is actually the buffer's interaction with the search radius. Since the search radius is the same distance as the danger zone, but movement calls for the bot to move farther, then when the bot gets farther than 20 yards + hitboxes from the trigger NPC, the NPC is no longer found so the multiplier fails at the flare check (as does the fleeing action), at which point the tank uses Charge, the melee DPS runs back in, etc. That is my guess anyway. I think increasing the search radius to say 30 yards could solve this issue.

  3. I may be wrong, but I think 20 yards might be a greater radius than is needed. I think the actual damaging spell from Focus Fire is 32302, which has a radius of 12 yards.

  4. My casters frequently insisted on finishing their casts before running. I have no idea why since you have InterruptNonMeleeSpells() there. That doesn't seem to interrupt channeled spells in my experience (I still haven't figured out how to do that so my Shadow Priest is always dying), but I'm talking here about a Warlock finishing Shadow Bolts and a Paladin finishing Holy Lights. The only thing I can think of is to try botAI->Reset() instead of AttackStop() and InterruptNonMeleeSpells(), but this one is puzzling to me.

  5. The Attract Magic mechanic actually gave me some trouble. The boss would pull everybody in, and then the casters would get the max effect of Inhibit Magic as well as get hit by Carnivorous Bite, and since my Paladin was then casting 5-second Holy Lights, that would cause the damage to continue to stack, when ideally she'd step away a bit before casting even if everybody needs healing at the moment. My suggestion is to try a method for ranged bots to MoveAway from the boss if within X yards, but have an early return on the trigger if a flare is found since if that is the case they just need to get away from the flare at all costs. According to the boss script, Inhibit Magic increases to 2 stacks at less than 35 yards away, 3 stacks at less than 25 yards, and 4 stacks at less than 15 yards. I'm not sure what distance to use for such an action for the best tradeoff, but that's the context to consider anyway.

At the end of the day though, this is still much better than before. I could still clear this encounter, and without a strategy I used to have to make use of Flee a lot and still hope for some good luck on placement.

Minor comments: I don't think you need to suppress AvoidAoeAction in your multiplier. I don't think there's any mechanic in the fight that would cause it to be called. Also, not sure if you were intending to keep STAIRS_TOP_POSITION for another purpose but otherwise that can be removed.

@flashtate98
Copy link
Copy Markdown
Author

Thank you for all the feedback. This is extremely helpful. I'll work on getting actions for ranged bots to keep their distance.

That STAIRS_TOP_POSITION was originally there for when the tank wouldn't go to the position in the center of the corridor for some reason. I was attempting a bread crumb method at the time. But yeah, that will be removed. I'll also see if I can get the tank to be faster, it used to be quicker but the tank was pretty erratic especially when it got Shirrak to the correct position. But I will see if I can make it better.

I have tested it with warlocks and holy paladins and yeah for some strange reason they are hellbent on completing whatever they are casting before running away from focus fire. Hopefully your suggestion works.

I am noticing warriors are still charging back in, I will follow your suggested solution and hope that resolves the issue,

Copy link
Copy Markdown
Collaborator

@Celandriel Celandriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flashtate98 Anymore changes incoming?

@flashtate98
Copy link
Copy Markdown
Author

@flashtate98 Anymore changes incoming?

Yes, I will convert this to draft while I add more actions to this.

@flashtate98 flashtate98 marked this pull request as draft March 26, 2026 22:42
Celandriel and others added 5 commits March 27, 2026 08:39
Renamed action names for organization and consistency. Various adjustments. New action for ranged keeping distance from Shirrak to minimize the inhibit magic mechanic
@flashtate98 flashtate98 marked this pull request as ready for review April 6, 2026 04:54
@flashtate98
Copy link
Copy Markdown
Author

flashtate98 commented Apr 6, 2026

New action was added for ranged bots to keep their distance from Shirrak to minimize the inhibit magic mechanic. They will stand at the top of the stairs while the tank drags the boss further down the room he resides in.

For some reason, bots selected for focus fire will not interrupt any of their casts to move out of the incoming AOE. However, once they finish, they will then move out of the AOE like they are supposed to. Thankfully, since the ranged bots keep their distance, they are not as affected by inhibit magic, and will almost always escape the AOE even after finishing their casts. At worst, I have seen them take one tick of damage as they were running out.

I've done several tests with various ranged classes and it seems to be good now. But if anyone wants to do further testing themselves, that would be most welcome. Any and all further feedback is much appreciated.

Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Analysis from Claude shared by Crow:

During SPELL_STATE_PREPARING, PlayerbotAI.cpp does:

YieldThread(bot, GetReactDelay());
return;  // UpdateAIInternal() never runs
The entire trigger → action pipeline lives inside UpdateAIInternal(). So no matter how high the action's priority is (ACTION_EMERGENCY + 10), no matter what the trigger returns — none of it executes while a spell is being cast. The call to InterruptNonMeleeSpells is dead code in this scenario, because the action simply never gets invoked.

The only things that can interrupt a preparing spell right now are the hardcoded checks already in that block (target died, GO despawned, target full health healed by someone else). Everything else waits until the cast finishes.
Copy link
Copy Markdown
Contributor

@brighton-chi brighton-chi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and works great. Thanks!

Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h Outdated
Comment thread src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsTriggerContext.h Outdated
Comment thread src/Bot/PlayerbotAI.cpp Outdated
Comment on lines +18 to +19
std::list<Creature*> creatureList;
bot->GetCreatureListWithEntryInGrid(creatureList, static_cast<uint32>(AuchenaiCryptsIDs::NPC_FOCUS_FIRE), 20.0f);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIx indentation

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed an update. Let me know if its fixed.

Comment on lines +23 to +25
bot->GetHealthPct()>50.0f)

{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line to delete

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed an update. Let me know if its fixed.

@kadeshar
Copy link
Copy Markdown
Collaborator

kadeshar commented Apr 9, 2026

Codestyle check fails

Comment thread src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp Outdated
@flashtate98 flashtate98 requested a review from noisiver April 10, 2026 01:10
@kadeshar
Copy link
Copy Markdown
Collaborator

Codestyle stills fail

obraz

@flashtate98
Copy link
Copy Markdown
Author

Codestyle stills fail

obraz

Should be fixed now. Let me know if there are any further issues.

@noisiver noisiver dismissed their stale review April 15, 2026 10:13

The issue has been resolved

@Celandriel Celandriel merged commit 8f7d352 into mod-playerbots:test-staging Apr 17, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants