This document tracks the staged effort to bring the AzerothCore playerbots system to SkyFire. The upstream project depends on a forked core with extra scripting hooks plus a very large module (bot sessions, AI, strategies, actions, triggers, a random-bot pool, and gear/talent generation). It cannot be copied verbatim because SkyFire is a different expansion (5.4.8) with different core APIs, spell/talent systems, LFG internals and opcodes.
The work is therefore split into independently testable phases.
- Added an AzerothCore-style module system to SkyFire (
modules/+AddModulesScripts()core hook). Seemodules/README.md. - Registered
mod-playerbotswith config, manager and.playerbotscommand.
Upstream relies on core changes. On SkyFire these are added as minimal,
well-isolated hooks (prefer new ScriptMgr hooks over scattered edits):
- [DONE] Socketless
WorldSession("bot session"): aSetBot/IsBotflag, null-socket guards inWorldSession::Update, andSendPacketalready no-ops without a socket. Bot sessions are NOT tracked inWorld::m_sessions; they are owned byPlayerbotMgr. - [DONE] Character login for a session:
BeginBotCharacterLogin/PollBotCharacterLogin(async; random pool) and syncLoginBotCharacter(single-bot add/create). Random pool never spin-waits the world thread on DB. - [DONE] Per-
Playertick hook:PlayerScript::OnUpdate(Player*, uint32), dispatched fromPlayer::UpdateviaScriptMgr::OnPlayerUpdate. Because bot players are updated by theirMap, this fires for bots automatically - the attach point for Phase 3 AI. - [DONE]
PlayerbotMgrbot lifecycle +.playerbots add/remove/listcommands, with cleanup on world shutdown.
Remaining for later phases:
- Outgoing packet interception so bot AI can react to server packets it would normally receive as a client (Phase 3).
- Group/LFG/Battleground entry points reachable programmatically for bots (Phase 4).
- [DONE] Random-bot pool sourced from dedicated bot accounts
(
Playerbots.RandomBots.AccountPrefix). Candidates are all characters on accounts whose username matches the prefix (looked up across the auth and character databases). - [DONE]
PlayerbotMgr::Update()driven from the module'sWorldScript::OnUpdate(no core change): keeps up toPlayerbots.RandomBots.MaxBotsonline via async login pipeline (LoginIntervalstarts,MaxPendingLoginsin flight,LoginsPerTickcompletes LoadFromDB), trims excess when the cap is lowered, and cleans up bots whose player left the world.Init.PerTickis gear-only. - [DONE]
.playerbots reload(re-reads config + candidate pool) and richer.playerbots status(random/active/candidate counts). - [DONE] Bot auto-creator (
Playerbots.AutoCreate.*/.playerbots create): provisions bot accounts and characters by faction and tank/healer/dps ratio at a configured MinLevel–MaxLevel band (legacyLevelseeds both), with unique generated names and correct realm id. Each new character is auto-inited (spec/gear) so the pool is LFG-ready without a manual init pass. - [DONE] Bot pool wipe:
Playerbots.DeleteRandomBotAccountson startup and.playerbots wipe confirmdelete allAccountPrefixaccounts/characters. - [DONE] Specialization assignment: created/init bots (level >= 10) get the spec
matching their role and learn its spells (
Player::LearnSpecialization). - [DONE] Gear initialisation via create auto-init /
.playerbots init: clears and refills slots fromitem_templateusing confGear.MinQuality–MaxQuality(init quality token overrides the cap). Among the top ilvl candidates per slot, one is chosen at random. - [DONE] Role change via
.playerbots init <name> <tank|healer|dps>: switches the bot's spec and re-gears it for the new role. - [TODO] Per-master "alt bots" (a real player summoning their own alts).
- [DONE] Async random-bot login pipeline (
BeginBotCharacterLogin/PollBotCharacterLogin,MaxPendingLogins+LoginsPerTick) so the world thread does not spin-wait on character DB queries.
- [DONE]
PlayerbotAIcontroller: one instance per bot, created inPlayerbotMgr::SpawnBotand destroyed with the bot. Ticked fromPlayerScript::OnUpdateviaPlayerbotMgr::UpdateBotAI(throttled to ~500ms per bot). This is the attach point for the strategy engine. - [DONE] Auto-accept group/raid invites (mirrors
HandleGroupAcceptOpcode) so bots can be pulled into parties, and thus LFG/LFR/RBG queues. - [DONE] Defensive combat: bots keep swinging at a valid victim, retaliate against attackers, and chase the target into melee range.
- [DONE] Server-side movement: bots follow the group leader out of combat (spread around the leader by a GUID-derived angle) and chase in combat. State is tracked so generators aren't re-issued every tick.
- [DONE] Teleport/summon: bots warp to the leader when they're on another map or
too far to catch up on foot (auto), and
.playerbots summonteleports all of the caller's grouped bots to their position (manual). Because bots have no client to send the teleport ack, the core exposesWorldSession::FinalizeBotTeleport()(mirrors the near/far worldport ack handlers) which the module calls right afterPlayer::TeleportTo- without it the bot got stuck "being teleported" forever. - [DONE] Combat target acquisition/assist: bots pick a unit attacking them, and otherwise assist the group leader's target (within 60y) so the party focus-fires the same mob.
- [DONE] Basic class rotation: melee classes close in and auto-attack (paladin and rogue also use a filler strike); ranged/caster classes (hunter, priest, mage, warlock) hold at ~25y and spam a single filler spell. Bots only cast spells they actually know; casts go through the normal path so GCD/power/range/ LoS are validated by the core.
- [DONE] Per-spec rotation framework (
modules/mod-playerbots/src/rotations/): priority picker with aura/resource/enemy-count helpers. DPS specs with hand-ported MoP Hekili.simcpriorities: Ret, WW, BM/MM/Survival, Shadow, Affliction/Demo/Destro, Elemental/Enhancement, Feral, Arms/Fury, Combat Rogue, Frost Mage, Unholy DK. Wave 3: Balance, Guardian, Fire/Arcane, Assassination/ Subtlety, Frost/Blood DK, Prot Pala/War, Brewmaster. Elemental/Balance ranged stance..playerbots initlearns recommended talent spells and accepts explicit names (enhancement,feral,moonkin, …). LocalHekili/is reference-only (gitignored). - [DONE] Wave 4 healers + shared combat utilities:
- Per-spec heals: Holy Pala, Disc/Holy Priest, Resto Shaman/Druid, Mistweaver
(via
SelectNextHeal, used byHandleHealing). - Shared
TryCombatUtilities: class interrupt when the target is casting, offensive/defensive racials, on-use trinkets — wired into DPS rotation and healer combat.
- Per-spec heals: Holy Pala, Disc/Holy Priest, Resto Shaman/Druid, Mistweaver
(via
- [DONE] World interaction (first pass):
- Solo bots wander to nearby random ground points so they aren't frozen statues.
- Bots auto-accept trade windows and duel challenges.
- Bots walk to and loot nearby corpses they are allowed to take from (group
loot rules still apply via
isAllowedToLoot). - Bots walk to a nearby repairer and repair for free when equipped durability drops below 50%.
- Rest:
eat/drinkornc +food— sit and regenerate HP/mana (no spell spam); thresholds viaPlayerbots.Rest.HealthPct/ManaPct. Self-bots never get stood up by rest AI (AFK sit / clicked food&drink stay intact). - Healer strategies via
co +heal/co +healer dps/co +save mana. - Bots whisper back their
co:/nc:state on strategy commands.
- [DONE] Chat orders via whisper or party/raid chat:
stay/follow(alsocome) - hold position or resume following.flee/summon- run to / teleport to the issuer.leave- leave the current group.grind- attack nearest hostiles;resetclears orders/casts.passive/aggressive- stop assisting (still retaliate) or resume normal assist behaviour.attack- all bots attack the issuer's current target.tank attack/dps attack- same, filtered by the bot's combat role (from its active specialization).pull- tanks engage the issuer's target, or the configured RTI mark.rti/rti skull|cross|…- set which raid icon bots focus (default skull).maintenance- ACMaintenanceAction(PlayerbotMgr::MaintainBot): spells, proficiencies, talents, glyphs, riding/mounts, hunter pets, bags, enchants and gems, repair; keeps spec and gear. Alt bots honourPlayerbots.AltMaintenance.*. Enchants/gems (BotEnchants) are chosen from the game data with per-spec stat weights (BotStatWeights, Wowhead MoP stat priorities, rank-based) instead of AC's fixed enchant tables. Not ported (no SkyFire equivalent yet): food/reagents/potions, reputation, attunement quests, pet talents, keyring/ammo (removed in MoP).autogear [reset] [match|<quality>|<ilvl>]- ACAutoGearAction(PlayerbotMgr::AutoGearBot): incremental slot-by-slot upgrades scored by the spec's stat weights (BotEnchants::GearValue, AC also scores by stat weights) or item level,resetfor a full re-roll, config capsPlayerbots.AutoGear.*.autogear bisis not ported (needs AC's BiS list tables).- Party filters:
@tank/@dps/@heal/@rangedbefore an order. help- list orders (whisper reply). Whisper commands get a short ack; party/raid orders apply silently to avoid spam.
- [DONE] Self-bot mode (
.playerbots self): attach cast-only AI to a real logged-in player. Client keeps movement; AI casts fillers / per-spec rotations..playerbots initwith no args gears yourself and grouped bots. - [DONE] Thin AC-style strategy engine (
src/engine/BotStrategyEngine):- Named strategy sets per
BotState(Combat / NonCombat), source of truth forco/nc(+/-/~/?, comma lists). - Chat shortcuts apply AC packs:
follow,stay,flee,grind,passive,aggressive,resetrewrite both engines like ACChatShortcutActions. - Procedural AI still reads synced flags (
_passive,_stay, …) so MoP rotations and movement keep working. - DPS default includes
+dps assist(group assist);-dps assist= own aggro / forced targets only.
- Named strategy sets per
- [DONE] Trigger → Action → Queue (
src/engine/BotAiEngine+ Action/Trigger/ Queue/Multiplier): AC-shaped tick selects combat/rest/follow/stay/loot/wander.PassiveMultiplierzeroes combat when+passive. MoProtations/unchanged. - [DONE] Target Values (
BotTargetValues): pull / current / dps (least HP) / tank / assist-tank — SelectTarget reads these like AC AiObjectContext values. - [DONE] wait for attack (
co +wait for attack, default on for DPS): non-tanks hold damage forPlayerbots.WaitForAttack.Secondsafter combat starts; still fight back if attacked. Tanks ignore. Disable withco -wait for attack. - [DONE] Role formations: unique GUID-sorted slots per tank / healer / melee
DPS / ranged DPS bucket (
BotFormation) with radial stagger so same-role bots do not stack. Follow uses height-validated points (BotMovement::MoveToFollowSlot) to reduce wall/stair clipping. - [DONE] Party support utilities (
TryPartySupportinTryCombatUtilities): class cleanses on dispelable ally debuffs, self-defensives under ~40% HP, Paladin Lay on Hands / Hand of Protection on critically low allies. - [DONE] Richer AC actions: raid-target icon preference (
rti skulletc., default skull) in SelectTarget; tankpullas reach → opener → fight; combat kite viaBotFleeManagerwhen ranged is too close; tank auto-marks the preferred RTI on an unmarked pack mob. - [DONE] Class/raid buff maintenance (self + party equivalents), recommended
major/minor glyphs on
.playerbots init(3+3 per spec). - [DONE] Deeper cooldowns/DoTs/AoE on thinner DPS lines (Balance, Destro/Demo, Subtlety, MM, Arms, Feral). Still TODO: SimC-faithful tuning, glyph-aware rotation branches, boss-specific holds, trinket sync polish.
- [DONE] Party resurrection: Priest/Pala/Shaman/Druid/Monk OOC rez, Druid Rebirth / DK Raise Ally in combat; dead bots auto-accept rez requests.
- [DONE] co aoe / boost / cc / avoid aoe (thin gates on MoP rotations):
aoeclamps multi-target branches;boostgates trinkets + offensive racials (class major CDs still fire);ccruns thin Polymorph/Fear/Trap/Hex/etc.;avoid aoesteps out of damaging dynobjects. Defaults: aoe on tank/DPS, boost + avoid aoe on all, cc on Mage/Hunter/Warlock. - [DONE] Point movement / travel destinations: chat
go/go x y z/position save|go <name>;BotMovement::MoveTouses PathGenerator + generatePath;TravelActionwalks until arrival. Same-map only — TravelNode / portals / RTSC / auto quest POIs still deferred. - [DONE] Init scatter teleports:
.playerbots init … tele/teleportpicks a curated open-world anchor by post-init level + faction viaBotTeleportMaps::TeleportForLevel(same map/zone gates as above). Master summon / follow-teleport stays unrestricted. - [TODO] Broader random teleports to POI / banker / flight master while
wandering (reuse
CanBotTeleportTo). Level map gates:<69EK/Kalimdor + worgen/goblin/pandaren starts;69–79- Outland;
80–84+ Northrend;85++ Cata/MoP continents. Faction: no Alliance scatter into Orgrimmar (etc.), no Horde into Stormwind (etc.). Master summon / follow-teleport stays unrestricted.
- Outland;
- [TODO] AC wiki backlog (later): RTSC/aedm, loot lists (
ll), item/vendor chat ops, glyphs, raid-specific strats, Multibot addon protocol. - [DONE] Non-combat sell / mount / nearby quests (thin pass): sell
ITEM_QUALITY_POORat nearby vendors + free repair; auto-mount OOC outdoors when traveling or following far; accept/turn-in on nearby questgivers (PrepareQuestMenu/AddQuest/RewardQuest). Chat:sell,mount/dismount,quests/accept/turn in. - [DONE] Vendor hubs + greens dump: in-memory vendor hub index from
creature/creature_template; same-map travel when no vendor in 20y; vendor-dump unbound uncommon+ (not real AH). Conf:Playerbots.Vendor.SellGreens,HubMaxDistance. Chat:sell all. - [DONE] Preferred-mount DB:
playerbots_preferred_mounts(characters DB);TryMountprefers configured spell. Chat:mount prefer <spellId>|clear. - [DONE] Thin gossip: hello + select by index; 1–2 hop auto for vendor/quest
options. Chat:
gossip/gossip <n>. - [DONE] Reward-choice AI:
BestRewardIndex(upgrade / sell price). Conf:Playerbots.Quest.AutoPickReward. - [DONE] Open-world auto-quest (
nc +quests): walk to questgivers, turn-in / accept, same-map objective travel. Default on for ungrouped random bots; off whenfollowpack is applied. Bag pressure routes to vendor hubs. - [DONE] Party quest-log sync: when a real player accepts a quest, grouped
bots with AI mirror it via
PlayerScript::OnQuestAdd(CanTake/CanAdd→AddQuest) and stay on follow — no independent quest travel. TravelNode / quest graph still deferred.
Upstream AC module checked into the repo root as mod-playerbots/ (study /
command semantics). SkyFire runtime module remains modules/mod-playerbots/.
Do not compile the root tree into worldserver.
Merged the lfg_mechanics branch (LFG/LFR/scenario/challenge-mode work) into
playerbots so bots can use the existing dungeon finder. lfg_mechanics is kept
for future updates.
- [DONE] LFG auto-response: the master queues a party (normal client UI) and the
bots auto-answer the group role check and accept the join proposal. Role check
uses a deterministic, group-aware assignment (first tank-capable bot tanks,
first healer-capable heals, rest dps) so a bot party forms a valid composition
without communicating. Core exposes
LFGMgr::GetActiveProposalIdForPlayerso the module can find a bot's pending proposal to accept. Solo LFG fill teleports bots viaLFGMgr::TeleportPlayer, which finalizes bot worldports withFinalizeBotTeleport(no client ack). Leaving the dungeon guardsGroup::Disbandagainst re-entry when bots finalize their exit teleports. - [DONE] Solo LFG fill (
Playerbots.RandomBotJoinLfg=1): ungrouped botsJoinLfgthe same dungeons as queued real players, with console join logs. Excludes bot tanks when a player queued tank, and bot healers when a player queued healer. Bot-only LFG groups are still ejected. - [DONE] Between-pull food: socket + self-bots sit only while food/drink auras are active (no empty-sit contagion); full allies stand and wait. Refreshment uses Food/Drink auras — no bag food/drink. Cancels at full resources.
- [DONE] In-dungeon behaviour: party holds follow between pulls until allies are
almost ready (
Rest.AlmostFullHealth/Rest.MediumMana); instance DPS sticks to the tank's victim;+threatthrottles vs tank threat and pauses melee as well as spells. Boss/trash scripting still thin — depends on deeper rotations. - [DONE] Loot rolls: bots auto Need/Greed/Pass on GROUP_LOOT / NEED_BEFORE_GREED
(LFG). Need only on a genuine upgrade (
PlayerbotAI::IsLootUpgrade: usable, own armor type, >=Playerbots.Loot.NeedUpgradePercentbetter by the spec's stat weights with must-reach caps xPlayerbots.Loot.CapBoost), Greed otherwise. Corpse loot peels briefly when OOC withnc +loot. - [DONE] Equip upgrades (AC
AutoEquipUpgradeLoot/equip upgrade): bots equip bag items that beat the worn piece by the Need rule, after loot, won rolls and quest rewards and everyPlayerbots.AutoEquip.Intervals out of combat; never from the PvP gear bag, not in battlegrounds/arenas. Alts only onequip upgradesunlessPlayerbots.AutoEquip.Alts = 1. - [TODO] LFR: bots fill raid finder queues (auto-accept the LFR prompt/roles).
- [TODO] Random battlegrounds / rated battlegrounds and arenas.
- [TODO] Open-world grinding population polish (TravelNode / full quest graph still
deferred; same-map
nc +quests+ party quest-log sync while following are in).
- Bot equipment/talent templates appropriate to 5.4.8.
- SQL for any module-owned tables (kept under
sql/, applied by your tooling).
- The upstream AI is data/logic heavy but many strategies are conceptually portable; the class-specific spell IDs and rotations must be rebuilt for MoP.
- Keep core edits behind
ScriptMgrhooks where possible so the core diff stays reviewable and this module remains self-contained.
- [DONE] All 34 MoP specializations have combat (or heal) priority lists.
- Healer specs also have
*Dpsdamage lines forco +healer dps. - Trinkets sync with burst windows; Elemental/Assassination/Mage lines deepened (AoE, bombs, Ascendance Lava Beam, Marked for Death). Balance/Destro/Demo/ Subtlety/MM/Arms/Feral also deepened (Incarnation, Havoc, Infernal/Doomguard, Hellfire, Vanish/MfD, Murder of Crows, Avatar/Skull Banner).
- [DONE]
.playerbots initapplies recommended major/minor glyphs per spec;TryMaintainBuffskeeps MotW/Fort/Brilliance/shouts/blessings/etc. up. - [TODO] Further SimC-faithful tuning, glyph-aware rotation branches, and boss-specific holds.