* Revert "[Large server fix] #1537 Serialize playerBots/botLoading with a mutex and use snapshot-based loops to fix concurrency crashes (#1540)" This reverts commit 3fff58df1a2058894e9b758be07869aec87c2c70. * Revert "[Fix] teleport to invalid map or invalid coordinates (x , y , z 200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o ) (#1538)" This reverts commit ca2e2ef0dbd8dcfb16123db65ae638424550e50c. * Revert "Fix: prevent MoveSplineInitArgs::Validate velocity asserts (velocity > 0.01f) for bots, pets, and charmed units (#1534)" This reverts commit 4e3ac609bd23d991150d956d4e69ee6de2fcf2bf. * Revert "[Fix issue #1527] : startup crash in tank target selection — add TOCTOU & null-safety guards (#1532)" This reverts commit c6b0424c29b6a1bf5b3574135128d30d19838411. * Revert "[Fix issue #1528] Close small window where the “in a BG/arena” state can change between the check (InBattleground() / InArena()) and grabbing the pointer (GetBattleground()), which leads to a null dereference. (#1530)" This reverts commit 2e0a161623eaa97b7d9ceea076779ae0cabeb877. * Revert "Harden playerbot logout & packet dispatch; add null-safety in chat hooks and RPG checks (#1529)" This reverts commit e4ea8e2694b0f6d098a945c6f863526cd14f9b3f. * Revert "Dont wait to travel when in combat. (#1524)" This reverts commit ddfa919154529fee59e7ba30d2ebe29c0ae4abdf. * Revert "nullptr fix (#1523)" This reverts commit 380312ffd231fd5e663a8a17daa80dd39906e3f0. * Revert "Playerbots/LFG: fix false not eligible & dungeon 0/type 0, add clear diagnostics (#1521)" This reverts commit 872e4176137b66c83ebcb03932fa8ff1e39fd791. * Revert "nullptr exception (#1520)" This reverts commit 3d28a815089fd0a878a6a1d469db657c6030d4b2. * Revert "Removed bot freezing at startup and system message, not relevant anymore (#1519)" This reverts commit bcd6f5bc066d5e8a54f2d37b7dfc54e5db0dd2d1.
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:
- Bots that utilize real player data, allowing players to interact with their other characters, form parties, level up, and more;
- Random bots that wander through the world and behave like players, simulating the MMO experience;
- Bots capable of running raids and battlegrounds;
- Highly configurable settings to define how bots behave;
- Excellent performance, even when running thousands of bots.
This project is still under development. If you encounter any errors or experience crashes, we kindly request that you report them as GitHub issues. Your valuable feedback will help us improve this project collaboratively.
Playerbots Module has a Discord server where you can discuss the project.
Installation
Classic Installation
mod-playerbots requires a custom branch of AzerothCore to work: liyunfan1223/azerothcore-wotlk/tree/Playerbot. To install the module, simply run:
git clone https://github.com/liyunfan1223/azerothcore-wotlk.git --branch=Playerbot
cd azerothcore-wotlk/modules
git clone https://github.com/liyunfan1223/mod-playerbots.git --branch=master
For more information, refer to the AzerothCore Installation Guide and Installing a Module pages.
Docker Installation
Docker installation is considered experimental. To install the module on a Docker installation, run:
git clone https://github.com/liyunfan1223/azerothcore-wotlk.git --branch=Playerbot
cd azerothcore-wotlk/modules
git clone https://github.com/liyunfan1223/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, and recommended configurations. Please note that documentation may be incomplete or out-of-date in some sections. Contributions are welcome.
Frequently Asked Questions
- Why aren't my bots casting spells? Please make sure that the necessary English DBC file (enUS) is present.
- What platforms are supported? We support Ubuntu, Windows, and macOS. Other Linux distros may work, but will not receive support.
- Why isn't my source compiling? Please check the build status of our CI. If the latest build is failing, rever to the last successful commit until we address the issue.
Addons
Typically, bots are controlled via chat commands. For larger bot groups, this can be unwieldy. As an alternative, community members have developed client Add-Ons to allow controlling bots through the in-game UI. We recommend you check out their projects:
- Multibot (by Macx-Lio)
- Unbot Addon (zh) (Chinese version by Liyunfan)
- Unbot Addon (en) (English version translated by @Revision)
Acknowledgements
mod-playerbots is is based off ZhengPeiRu21/mod-playerbots and celguar/mangosbot-bots. We extend our gratitude to @ZhengPeiRu21 and @celguar for the continued efforts in maintaining the module.
Also, a thank you to the many contributors who've helped build this project: