A port of the AzerothCore playerbots system to SkyFire (World of Warcraft 5.4.8 / Mists of Pandaria), intended to populate a test server with bot players so features such as LFG, LFR, random battlegrounds, arenas and open-world activity can be exercised without a large human population.
Command reference: see COMMANDS.md for every GM slash
command and whisper/party order (including what is not ported yet, such as
co / nc).
Upstream references:
- Core fork: https://github.com/mod-playerbots/azerothcore-wotlk/tree/Playerbot
- Module: https://github.com/mod-playerbots/mod-playerbots
- AC command wiki: https://github.com/mod-playerbots/mod-playerbots/wiki/Playerbot-Commands
This module is being ported in phases. What is present today:
- Integrated into SkyFire's new module system (builds + links automatically).
- Configuration (
playerbots.conf.dist) and aPlayerbotMgrthat reads it. - Phase 1 core hooks: socketless bot
WorldSession, synchronous character login, and a per-player tick hook (PlayerScript::OnUpdate). - GM commands and chat orders — full tables in COMMANDS.md.
- Basic bot AI: follow/assist when grouped, combat fillers, LFG role/proposal answers, solo wander, auto-accept trade/duel, corpse loot, and opportunistic free repair near repair NPCs.
- Self-bot mode (
.playerbots self): you move, AI casts fillers / Wave-1 per-spec rotations (Ret, WW, BM, Shadow, Affliction, Elemental). - Per-spec rotation framework under
src/rotations/(Hekili.simcas offline reference).
Offer a guild charter to an online bot through the normal client interface, or
invite it with /ginvite BotName. Socketless bots sign eligible charters and
accept eligible invitations automatically. Turning in a charter adds its bot
signers through the core's normal guild creation process. Membership is saved
in the character database and survives bot logout and server restarts.
Playerbots.Guild.SignCharters and Playerbots.Guild.AcceptInvites default to
1; set either to 0 in playerbots.conf and use .playerbots reload to
disable that response. Dedicated accounts matching RandomBots.AccountPrefix
can be recruited by any eligible player. Human-owned alt bots respond only to
their account owner or a GM. Self-bot players retain manual control.
Normal core rules still apply, including faction restrictions, existing guild membership, pending invitations, and one charter signature per account. Use bots from different accounts for multiple signatures. Bots do not leave an existing guild automatically. No database migration is needed.
Requires a core with WorldSession::SetPacketObserver (SkyFire commit
d4b0e568ba or later). Social responses run on the world thread, including for
throttled bots; pending requests expire after 30 seconds and are discarded on
relogin. The queue is bounded at 1,024 requests, processed at most 16 per tick;
offers dropped during saturation can be sent again.
Validation: tests/BotGuildPacketsTests.cpp uses core ByteBuffer headers to
check charter decoding, duplicate-signature notifications, truncated packets,
GUID encoding, and signature requests. For an in-game check, offer a charter
to bots from different accounts, turn it in, then log a member bot out and in
and check the guild roster. Also test /ginvite and verify same-account and
opposite-faction charter offers still obey the core rules.
.playerbots self attaches AI to your character without replacing the
client session:
- You move and jump as normal until you whisper yourself
nc +walk. - In combat the AI picks a target (selection / attackers /
attackorder) and casts the class filler when you are in range with LoS. nc +walk/co +walk(and-walk) lets the bot path to loot, to the right target, and out of bad ground, then gives you the keys back while it is idle. See COMMANDS.md..playerbots initrefreshes gear and spec. On yourself:.playerbots initor.playerbots init self. Whisper a botautogearto upgrade its gear for its current spec, ormaintenanceto refresh spells/talents/glyphs/mounts, enchant and gem its gear and repair (see COMMANDS.md).
Toggle again or .playerbots self off to detach.
The auto-creator provisions dedicated bot accounts and fills them with
characters, so you do not have to create bot accounts/characters by hand. It is
driven entirely by the Playerbots.AutoCreate.* keys and is incremental and
idempotent - existing accounts and characters are reused, only the missing
ones are created.
- Accounts are named
<AccountPrefix><n>(e.g.RNDBOT1..RNDBOTn) up toPlayerbots.AutoCreate.AccountCount. New accounts get the realm's expansion so every race/class is available. - Each account is filled to
Playerbots.AutoCreate.CharactersPerAccountcharacters. For each character the faction is chosen byAlliancePct, the role byTankPct/HealerPct(remainder become DPS), and a class capable of that role plus a valid race for the faction are selected. Characters are created atPlayerbots.AutoCreate.Level. Death Knights and neutral Pandaren are skipped. - If the start level is at least 10, the character is given the specialization
matching its rolled role (e.g. a tank Warrior gets Protection) and learns the
spells that spec grants for its level, so it can actually fill the role. Use
.playerbots initto re-apply this later (after leveling, respec, etc.).
Run it on demand with .playerbots create, or set
Playerbots.AutoCreate.OnStartup = 1 to run it once when the world boots. Newly
created characters are picked up by the random-bot pool automatically.
.playerbots init re-gears an active bot for its current level and spec
(level is unchanged unless you pass relevel):
- Existing equipment is preserved until a replacement is successfully equipped; each slot is filled with the best uncommon-to-epic item the bot can equip, biased toward the spec's primary stat (STR/AGI/INT). Armor slots prefer the heaviest armor type the class can wear at that level; weapons/shields/off-hands/ranged are chosen per class and role. Re-run it after leveling to pull in level-appropriate upgrades (e.g. gear a fresh level-80 bot).
- Optional
relevelrolls a new level inAutoCreate.MinLevel–MaxLevel(set Min=Max for a fixed level), then gears for that level. - Optional
tele/teleportscatters the bot to a level- and faction-safe open-world anchor after gear (and afterrelevelif used), so the destination matches the bot’s final level. Levels 1–5 go to homebind / race spawn instead of a random hub. - First-time gear on create / first login also scatters when
Playerbots.AutoCreate.TeleportOnInit = 1(default), except levels 1–5 which stay at their normal starting area. - Learns remaining class trainer spells for the bot's level, plus SkillLine / specialization spells.
- Teaches riding by level (20/40/60/70/80) and one random mount per unlocked tier (normal ground, swift ground, flying, epic flying) from faction pools.
- Add a role token (
tank/healer/dps) to change the bot's spec first, then re-gear for the new role - e.g..playerbots init Arix tank.
What is not implemented yet (tracked in PORTING.md):
- Mounts (learn/use a default ground/flying mount).
- Vendor sell-junk, rest/eat/drink, gossip/quest NPC interaction.
- Deeper per-spec combat rotations.
- Full AC-style
co/ncstrategy engine, RTSC, loot-lists, item/vendor chat ops. - The automated LFG/LFR/RBG queue behaviour.
To try it: set Playerbots.Enable = 1, then .playerbots add <charname> for a
character that is offline. The bot appears in the world at its saved location.
Nothing special is required. With the SkyFire module system enabled
(-DMODULES=1, the default), this folder is compiled into the modules
library and linked into worldserver automatically.
Copy playerbots.conf.dist to playerbots.conf next to worldserver.conf
(the build also stages a copy next to the binary) and set Playerbots.Enable = 1.
Module SQL lives under sql/ and is not applied by the core updater. Apply
files to the matching database:
| Path | Database |
|---|---|
sql/characters/playerbots_preferred_mounts.sql |
characters |
Preferred mounts: the table is also created at runtime with
CREATE TABLE IF NOT EXISTS on module load, so a fresh characters DB will not
error. Keep the SQL file for tooling, backups, and manual apply.
Quest travel loads creature and game-object spawn coordinates into a shared in-memory index at startup. AI lookups, including missing entries, require no SQL or connection-pool locks. Creature and game-object IDs are separate; travel selects the nearest same-map spawn from all positions instead of the first eight.
After changing spawn coordinates, run .playerbots reload. The index rebuilds
on the world thread after map workers finish. Its two bulk reads can briefly
delay that update; avoid repeated reloads during load tests. If either read fails
or its table is empty, the previous snapshot is retained and an error is logged.
On initial failure, long-distance objective travel remains unavailable until a
successful reload; nearby objective handling continues. AI never falls back to SQL.
This is a static travel hint, not a live phase/respawn-state index. No schema or configuration changes are required.
Standalone regression test:
g++ -std=c++17 -Wall -Wextra -Werror -pthread tests/BotQuestSpawnsTests.cpp -o /tmp/bot-quest-spawns-test
/tmp/bot-quest-spawns-testThe upstream module targets AzerothCore, which is WotLK (3.3.5a). SkyFire is
MoP (5.4.8): the class/spell system, talent trees, LFG internals, packet/opcode
layout, and many core APIs differ substantially. Upstream also requires a
forked core with extra hooks, so a straight copy does not compile. PORTING.md
describes the staged approach used here.