Crow dca0be2932 Updates to SSC Strategies (#2138)
# Pull Request

Most of the changes are not functional but are to modify style based on
comments received to the TK PR (e.g., eliminate nesting of if
statements) and leverage general boss helpers. There is some reordering
of returns and other changes to try to consolidate or clean-up the code
(such as removing unnecessary parameters).

The strategies themselves have only minor changes.

- Main tank no longer uses tangential movement for Lurker Spout, unlike
other bots. The MT will just call moves directly to a position behind
Lurker. This is because I found tangential movement was taking too long
for the MT to get in place since it starts right in front of Lurker.
- Vashj MT group Shaman will now use Grounding Totem without actually
switching to the Grounding Totem strategy. I have now eliminated all
strategy swaps, which I dislike because they persist after the
encounter, and it's better not to mess with player strategies since
presumably people are generally using Windfury or Wrath of Air for the
Air Totem.
- I made a ton of changes to Vashj core passing as I noticed the
existing logic is nonfunctional in several ways. It generally works fine
ingame, but the changes should make things much smoother. For example,
the storing of the nearest trigger NPC for generators in the existing
strategy is useless because it relies on insert_or_assign for an
unordered map that will continue to run during the course of the core
passing logic, and a similar issue exists with respect to the map to
store the last time a bot held a core. The result is that there is
slight movement of bots when the core is flying through the air and not
held by any bot because the trigger for core passing does not fire
during that period. In practice, the time is brief enough that the
sequence works OK, but it looks stupid because the bots should not be
moving at all. So that should be fixed.

There is a known issue re: core passing that would take extreme effort
to fix and I am not going to do it because it is a fringe situation.
There are a couple of spots where the Tainted Elemental can rarely spawn
that can result in a straight-line passing sequence to the nearest
generator that is blocked by LoS. Fixing this would be extremely
difficult and niche, so what you will need to do if this happens is to
just command your bots to destroy the core and try again with the next
spawn.

---

## Design Philosophy

We prioritize **stability, performance, and predictability** over
behavioral realism.
Complex player-mimicking logic is intentionally limited due to its
negative impact on scalability, maintainability, and
long-term robustness.

Excessive processing overhead can lead to server hiccups, increased CPU
usage, and degraded performance for all
participants. Because every action and
decision tree is executed **per bot and per trigger**, even small
increases in logic complexity can scale poorly and
negatively affect both players and
world (random) bots. Bots are not expected to behave perfectly, and
perfect simulation of human decision-making is not a
project goal. Increased behavioral
realism often introduces disproportionate cost, reduced predictability,
and significantly higher maintenance overhead.

Every additional branch of logic increases long-term responsibility. All
decision paths must be tested, validated, and
maintained continuously as the system evolves.
If advanced or AI-intensive behavior is introduced, the **default
configuration must remain the lightweight decision
model**. More complex behavior should only be
available as an **explicit opt-in option**, clearly documented as having
a measurable performance cost.

Principles:

- **Stability before intelligence**  
  A stable system is always preferred over a smarter one.

- **Performance is a shared resource**  
  Any increase in bot cost affects all players and all bots.

- **Simple logic scales better than smart logic**  
Predictable behavior under load is more valuable than perfect decisions.

- **Complexity must justify itself**  
  If a feature cannot clearly explain its cost, it should not exist.

- **Defaults must be cheap**  
  Expensive behavior must always be optional and clearly communicated.

- **Bots should look reasonable, not perfect**  
  The goal is believable behavior, not human simulation.

Before submitting, confirm that this change aligns with those
principles.

---

## Feature Evaluation

Please answer the following:

- Describe the **minimum logic** required to achieve the intended
behavior?
- Describe the **cheapest implementation** that produces an acceptable
result?
- Describe the **runtime cost** when this logic executes across many
bots?

I have attempted to streamline methods and even remove some. The
strategy is admittedly somewhat performance heavy due to the need for
function calls such as iterating over inventory items. However, the new
version should be less performance intensive than the merged
strategy--for example, there were places where all members of the raid
would have their inventory checked, but I've now limited the check to
only the 5 core handler bots. I've run the instance with pmon on, and
there are no methods that stand out as particularly resource intensive
when not in a boss encounter, and I view that as the most important
thing (though I make effort to reduce performance impact during
encounters also). Expensive checks that are unavoidable for the strategy
to work such as grid searches are gated behind cheaper checks.

---

## How to Test the Changes

- Step-by-step instructions to test the change
- Any required setup (e.g. multiple players, bots, specific
configuration)
- Expected behavior and how to verify it

Enter SSC with a raid group and run the instance, including all bosses.
Every boss should be killable, and every major mechanic should be
addressed by bots. I will work with Dreathean to get the Wiki up soon so
that should be a reference for testing strategies.

## Complexity & Impact

Does this change add new decision branches?
- - [ ] No
- - [x] Yes (**explain below**)

Only within the context of strategies, which are basically all new
decision branches, and there are some tweaks here to what is currently
merged.

Does this change increase per-bot or per-tick processing?
- - [x] No
- - [ ] Yes (**describe and justify impact**)

Could this logic scale poorly under load?
- - [ ] No
- - [x] Yes (**explain why**)

I'm sure if you have a large server, with multiple raid groups running
the instance at the same time, the performance impact could be
significant. But I have done my best to limit it, and I think some
notable performance impact is unavoidable with the current framework for
raid strategies.

---

## Defaults & Configuration

Does this change modify default bot behavior?
- - [ ] No
- - [x] Yes (**explain why**)

Only for strategies in the instance.

If this introduces more advanced or AI-heavy logic:
- - [ ] Lightweight mode remains the default
- - [x] More complex behavior is optional and thereby configurable

There should be no impact if co +ssc and nc +ssc are not added to bots.
Because raid strategies are currently not removed after leaving an
instance, players should manually remove them (or reset botAI). This is
a general issue that needs to be addressed with the module.

---

## AI Assistance

Was AI assistance (e.g. ChatGPT or similar tools) used while working on
this change?
- - [ ] No
- - [x] Yes (**explain below**)

If yes, please specify:

- AI tool or model used (e.g. ChatGPT, GPT-4, Claude, etc.)
- Purpose of usage (e.g. brainstorming, refactoring, documentation, code
generation)
- Which parts of the change were influenced or generated
- Whether the result was manually reviewed and adapted

AI assistance is allowed, but all submitted code must be fully
understood, reviewed, and owned by the contributor.
Any AI-influenced changes must be verified against existing CORE and PB
logic. We expect contributors to be honest
about what they do and do not understand.

GPT-4 because I don't like to use up my premium requests in CoPilot and
I generally like it better than GPT-5 =P

I use LLMs to draft code snippets but do review everything and have
become less-and-less reliant over time. I don't use agent mode, only
ask. For this PR, I had it do the updated version of
AnyRecentCoreInInventory(), which is more complicated than before and
uses indexing for each bot to consider status of only prior bots in the
passing chain. Everything else either I wrote or could have written but
had the AI help and just edited afterward to save time.

---

## Final Checklist

- - [x] Stability is not compromised
- - [x] Performance impact is understood, tested, and acceptable
- - [x] Added logic complexity is justified and explained
- - [x] Documentation updated if needed

---

## Notes for Reviewers

Anything that significantly improves realism at the cost of stability or
performance should be carefully discussed
before merging.

---------

Co-authored-by: Keleborn <22352763+Celandriel@users.noreply.github.com>
Co-authored-by: bash <hermensb@gmail.com>
Co-authored-by: Revision <tkn963@gmail.com>
Co-authored-by: kadeshar <kadeshar@gmail.com>
2026-03-13 22:21:37 +01:00
2026-03-06 07:58:47 -08:00
2025-11-05 21:10:17 +01:00
2026-03-13 22:21:37 +01:00
2021-12-30 17:13:09 +01:00
2021-12-30 17:13:09 +01:00
2025-11-05 21:10:17 +01:00
2022-03-12 22:27:09 +01:00
2024-03-05 11:06:57 +08:00
2024-04-08 21:38:36 +08:00

English | 中文 | Español

Playerbots Banner

Playerbots Module

mod-playerbots is an AzerothCore module that adds player-like bots to a server. The project is based off IKE3's Playerbots.

Features include:

  • The ability to log in alt characters as bots, allowing players to interact with their other characters, form parties, level up, and more
  • Random bots that wander through the world, complete quests, and otherwise behave like players, simulating the MMO experience
  • Bots capable of running most raids and battlegrounds
  • Highly configurable settings to define how bots behave
  • Excellent performance, even when running thousands of bots

We also have a Discord server where you can discuss the project, ask questions, and get involved in the community!

Installation

Supported platforms are Ubuntu, Windows, and macOS. Other Linux distributions may work, but may not receive support.

All mod-playerbots installations require a custom branch of AzerothCore: mod-playerbots/azerothcore-wotlk/tree/Playerbot. This branch allows the mod-playerbots module to build and function. Updates from the upstream are implemented regularly to this branch. Instructions for installing this required branch and this module are provided below.

Cloning the Repositories

To install both the required branch of AzerothCore and the mod-playerbots module from source, run the following:

git clone https://github.com/mod-playerbots/azerothcore-wotlk.git --branch=Playerbot
cd azerothcore-wotlk/modules
git clone https://github.com/mod-playerbots/mod-playerbots.git --branch=master

For more information, refer to the AzerothCore Installation Guide and Installing a Module pages.

Docker Installation

Docker installations are considered experimental (unofficial with limited support), and previous Docker experience is recommended. To install mod-playerbots on Docker, first clone the required branch of AzerothCore and this module:

git clone https://github.com/mod-playerbots/azerothcore-wotlk.git --branch=Playerbot
cd azerothcore-wotlk/modules
git clone https://github.com/mod-playerbots/mod-playerbots.git --branch=master

Afterwards, create a docker-compose.override.yml file in the azerothcore-wotlk directory. This override file allows for mounting the modules directory to the ac-worldserver service which is required for it to run. Put the following inside and save:

services:
  ac-worldserver:
    volumes:
      - ./modules:/azerothcore/modules:ro

Additionally, this override file can be used to set custom configuration settings for ac-worldserver and any modules you install as environment variables:

services:
  ac-worldserver:
    environment:
      AC_RATE_XP_KILL: "1"
      AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN: "1"
    volumes:
      - ./modules:/azerothcore/modules:ro

For example, to double the experience gain rate per kill, take the setting Rate.XP.Kill = 1 from woldserver.conf, convert it to an environment variable, and change it to the desired setting in the override file to get AC_RATE_XP_KILL: "2". If you wanted to disable random bots from logging in automatically, take the AiPlayerbot.RandomBotAutologin = 1 setting from playerbots.conf and do the same to get AC_AI_PLAYERBOT_RANDOM_BOT_AUTOLOGIN: "0". For more information on how to configure Azerothcore, Playerbots, and other module settings as environment variables in Docker Compose, see the "Configuring AzerothCore in Containers" section in the Install With Docker guide.

Before building, consider setting the database password. One way to do this is to create a .env file in the root azerothcore-wotlk directory using the template. This file also allows you to set the user and group Docker uses for the services in case you run into any permissions issues, which are the most common cause for Docker installation problems.

Use docker compose up -d --build to build and run the server. For more information, including how to create an account and taking backups, refer to the Install With Docker page.

Documentation

The Playerbots Wiki contains an extensive overview of AddOns, commands, raids with programmed bot strategies, and recommended performance configurations. Please note that documentation may be incomplete or out-of-date in some sections, and contributions are welcome.

Bots are controlled via chat commands. For larger bot groups, this can be cumbersome. Because of this, community members have developed client AddOns to allow controlling bots through the in-game UI. We recommend you check out their projects listed in the AddOns and Submodules page.

Contributing

This project is still under development. We encourage anyone to make contributions, anything from pull requests to reporting issues. If you encounter any errors or experience crashes, we encourage you report them as GitHub issues. Your valuable feedback will help us improve this project collaboratively.

If you make coding contributions, mod-playerbots complies with the C++ Code Standards established by AzerothCore. Each Pull Request must include all test scenarios the author performed, along with their results, to demonstrate that the changes were properly verified.

We recommend joining the Discord server to make your contributions to the project easier, as a lot of active support is carried out through this server.

Please click on the "" button to stay up to date and help us gain more visibility on GitHub!

Acknowledgements

mod-playerbots is based on ZhengPeiRu21/mod-playerbots and celguar/mangosbot-bots. We extend our gratitude to @ZhengPeiRu21 and @celguar for their continued efforts in maintaining the module.

Also, a thank you to the many contributors who've helped build this project:

Languages
C++ 99.8%
Python 0.2%