The hire brokers were in the world database without their code, so for a server built from this source the
Sellsword Captains, Veteran Recruiters and Black Market Brokers did nothing. Here is the code, as it runs in the
WoW Forever Bots repack, built so it can be left out or replaced:
- Hire/: the brokers' gossip (npc_fb_hire_broker), the contracts (HireMgr), the rules (HirePolicy.h: prices,
grades, upkeep, who must hire) and HireModule.cpp, which registers them. Hire/README.md explains the grades,
the Playerbot.Hire.* settings, the commands and how another hire module plugs in.
- HireHooks.h/.cpp and HireTypes.h: the one door between the bot module and hired bots. `.bot add`, `.bot call`,
`.bot delete`, the Group Finder, companion upkeep, gear and the add-on ask Fleet::Hiring(); without a hire
module the answer is "no hired bots" and companions are free as before.
- CMake option PLAYERBOT_V2_HIRE (default on). Off: `.bot hire` and the brokers say there are no hired bots.
- `.bot hire [on|off]`, the ForeverBots add-on's hired-bots-only view (ForeverBots_Hire.lua, /fb hire), the
Playerbot.Hire.* settings in playerbot.conf.dist (Mode 0 = off by default).
- SQL: the 39 brokers and their gossip menu (world, same files as the repack), the contracts table
(sql/playerbot_v2/0037_hired_bots.sql, applied by the module at start).
- tests/game/ClassicHirePolicy.cpp pins the rules.
Bot migrations are numbered in one sequence and 0062 is the last one in use, so 9001/9002 become 0063/0064 (file names, headers and schema_version rows). The conf and the missing-tables warning now point at those migrations instead of a local sql-changes folder.
Adds LocalFauna(): resolves the bot snapshot's nearby enemies through
their creature templates and returns the distinct creature names it
can see (players and critters skipped, capped at 160 chars).
The channel-post detail now ends with "The creatures around you
here: <names>." so the model's "dry joke about the mobs here" speaks
of real ones — without this it joked about creatures its zone does
not have, the same failure VanillaLevelPlaces fixed for zone names.
BotNamePool gains three first-name tiers: curated per-race/sex names from
the new playerbots_race_names table (consumed on spawn, released on bot
delete, orphans reclaimed by ReconcileOnBoot), then the generic
playerbots_names pool, then the existing syllable fallback. CharacterCache
collision checks self-heal taken rows.
BotComposition Pick carries a surname; name hints with a space split into
first name + surname (a hinted surname is never re-rolled).
BotCharacterFactory writes characters.surname in the same transaction as
the INSERT and mirrors it into the character cache, capped at 48 UTF-8
chars like the player path.
Surnames come from playerbots_surnames (whole names) or
playerbots_surname_parts (prefix/suffix compounds that reject degenerate
pairs), chosen by Playerbot.Names.SurnameCompoundChance; whole vs compound
is gated by Playerbot.Names.Surnames.
SQL: 9001 creates the three tables on the shared db (plain `race` column
so Skyborne ids 95/96 fit); 9002 seeds 995 first names, 404 surnames and
551 parts for all races incl. Skyborne. The 9000-series keeps the
community migrations clear of upstream numbering.
Also adds ".playerbot selftest botnames <race> <sex> [n]" to sample the
pool without spawning, and guards "selftest namegen" with IsValidRace /
IsValidGender before calling GetNameGenEntry (sex 3 crashed the client).
hf-01372 (Karrz): pressing the window key or the minimap button again
and again in a fight printed the line eight times. The wait is now said
once per fight for each wish (open or close), like the tab wait already
was; the flag clears when combat ends. Opening and closing work as
before.
Most quest chests of the current client give their item as personal
loot (chest data 30). The objective locator only read the legacy loot
id, so bots never found those chests for item objectives.
SIN's fix for creature models whose client data stores a negative
'unset' collision height (-20000000, model 34 and others): such a model
now gets the default collision height (2.03128), and a mount height
that is not set is ignored. Some raptors' melee swings failed the line
of sight check because of it.
This replaces our fix for the same bug, which took the top of the
model's bounding box instead (CreatureModelDataEntry::GetCollisionHeight,
removed). For those 68 models the height is now the default, not the
model's own.
Code by SIN (1amcoff1n), Invalid creature collision heights for 0.1.35.
Applied as written; only the hunk position differs in our Unit.cpp. To build,
the bot module's collisionprobe command now prints the raw model height
(it called the removed helper).
SIN's Hunter Bot Pet Revive for 0.1.37, as he wrote it. The snapshot
marks a dead pet saved in an active stable slot; Call Pet waits while
there is one, and Revive Pet runs for it with or without a body, both
in the combat rotation and in the idle pet upkeep.
Code by SIN (1amcoff1n). Applied unchanged.
SIN's Bot Trading fix for 0.1.36, as he wrote it. The add-on puts its
own button over the stock Trade button; when a bot is the trader it
asks the server for a view of the trade, and a click sends that view
back, so the server accepts only the trade the player saw. Solo
players send the request as a hidden whisper to themselves; grouped
players use the add-on channel.
Code by SIN (1amcoff1n). Applied unchanged; only the add-on version
is set to 0.6.22.
Our own versions of SIN's 0.1.37 fixes come out, so his code can go in
as he wrote it: bot trading, Excavation Tools and the Ironforge banner
site, the Algaz and Rethban Gauntlet quests and map pins, the Deadmines
cannon, the Lakeshire posters and Redridge grunt, the Darnassus guild
vault, the Warpwood Crusher size, the hunter bot pet revive and the
open-world respawns.
Kept: the Ironforge guild vault (not part of SIN's packs) and the
Goldshire/Northshire trainer duplicates fix (2026_11_14_02, made
before his pack and covering all four NPCs).
The minimap menu gets an entry for SIN's Forever Combat Nameplates that
shows its state (on / off) and switches it without typing. His add-on is
on while Enemy Unit Nameplates are on and Always Show Nameplates is off,
so the entry flips Always Show (and turns enemy nameplates on if they
were off). Greyed out when his add-on is not loaded; refused in combat,
where the client does not change nameplate settings. Russian text added.
SIN's add-on is unchanged.
The four chat messages of the add-on were German. They are English now,
with Russian text when the client locale is ruRU. Only the printed text
changes; the add-on logic is SIN's 3.0 as before.
SIN's 3.0 accepts only build 70532: the add-on stops at its first line on any other build, and the realm ignores the
ON/OFF request and sends no READY to other builds. On our 70938 client it therefore did nothing. The three checks now
take 70532 and later; nothing else in SIN's code changes.
The add-on 3.0 as given (lua, toc, COPYING) in Addon/ForeverCombatNameplates. The package, the add-on zip, Install.cmd, the
add-on installer, the launcher and the uninstaller handle it like ForeverDots. NOTICE credits SIN (GPL-2.0).
Reverts 1c33b428e, a7f630fbe and e0f252c1b: the /fb plates switch in ForeverBots, the PLATES add-on request, our server
filter and its corpse fix. The next commit puts in SIN's Forever Combat Nameplates 3.0 in their place.
0141 did not do it: Chaelanna, grouped with her player, had the invite
pending and never ran idle:guild_invite_accept. Every "idle:guild_"
rule counts as a world errand, and world errands are skipped for a bot
led by a player, so the accept rule never reached its gate. Accepting
an invite takes the bot nowhere; it is no errand now.
IsWorldErrand moves to Bot/IdleRuleErrands.h so a Catch2 case can check
the list.
Five Brilliant Mana Oil traded to a healer bot by its player were
answered with "i'll give you 10s for that": only gear upgrades, gear
for later levels and recipe reagents counted as gifts. A potion,
elixir, flask, food or drink, weapon oil or stone, or bandage the bot
can use itself is now a gift from its owner or a group mate too.
Strangers still sell it at the fair price.
The guild invite accept rule ran at priority 853, below the owner
orders. A bot on a Follow order fires idle:owner_following (990)
every tick, which ends the tick, so a /ginvite from its player was
never accepted. The accept moves nothing and only fires once per open
invite, so it now runs at 997, above the owner orders. The accept is
logged ("[guild_invite] ... accepts").
Healer bots never used a weapon oil: the damage casters get Brilliant
Wizard Oil, and the healers' pick named in its comment did not exist.
Brilliant Mana Oil (20748) gives +12 mana every 5 s and +25 healing for
30 minutes, about 720 mana over a 5-minute boss fight, a tenth of a raid
healer's pool. Nefarian 11-14: ten healers at 18% mana when he landed.
The healer raid kit stocks five (stock only, like the casters' oil and
potions), and idle:classic_weapon puts one on the main hand while it
carries no temporary enchant or under a minute of one. A Restoration
shaman that has the oil, or wears it, puts no imbue on the main hand: a
Rockbiter or Flametongue Weapon heals nothing and would replace the oil.
Playerbot.Interact.AutoAcceptInvites was parsed and never read: bots took
every invite. Every installed playerbot.conf holds friends_or_higher for
it, so making that key work would have started bots refusing strangers on
every realm. The new key AcceptInvitesFrom (anyone, guild, friends, none)
defaults to anyone, which is today's behaviour. The bot's owner and game
masters are always answered and the bots' own invites are not touched.
Friends are the bot's own friend list (whisper it "addfriend <name>"),
guild is friends plus guild members. A refused invite is declined and
logged.
Two world bots that grouped on their own (idle:invite_nearby_player) stayed
grouped until the next restart: grouped bots counted as tied up, outside
the world cap, the spawner never logged them out and the runtime group
hygiene left every pure-bot group alone, so the grouped count only grew
(GitHub #345).
A group a bot's own invite made is now noted as a pickup group
(Fleet/PickupGroups.h). Its bots count toward Playerbot.World.MaxBots, the
spawner breaks it up once none of its bots is near a player (they are then
logged out like any far world bot), and the group hygiene breaks it up at
the end of its 10 to 20 minute life. Never while a member fights, is being
teleported or is in an instance, and a group a player joined is his.
The [world] line counts pickup_groups and how many were broken up.
Under level 10 every bot ran its class's spec 0 rotation, which is the
damage rotation for the druid, shaman and paladin. A healer companion of
those classes never healed its owner during a fight and only healed him
after it, through the out-of-combat heal that goes by role. On the Classic
realm a healer now keeps its healer rotation at any level: each class has
its heal from level 1 and the Classic healer rotations check every spell
before they cast it.
[pull_stats] gains the threat each raider holds on the boss, sampled once a
second: for the boss's victim its threat a second and how long the boss was
on it, for everyone else the peak percent of the victim's threat and the
seconds spent at 85 % or more of it. A DPS bot that sits there is capped by
the tank's threat, not by its rotation, so the line tells which of the two
limits the raid's damage before either is tuned.
`.playerbot reload` re-added playerbot.conf on top of the merged config.
Any key in playerbot.conf then beat the same key in worldserver.conf.d
(test runs set Playerbot.World.SoakAnchors, PlayerbotV2.SnapshotBuildSplitMap
and the like there), so a test setting could vanish on reload. And
`.reload config` alone did not refresh the module's cached settings, so a
run needed both commands.
- playerbot.conf is loaded as a base file: worldserver.conf.d overrides it,
at startup and after every reload.
- `.playerbot reload` reads every config file again in that order and takes
the values; `.reload config` now also refreshes the module's settings
(OnConfigLoad), so it is enough on its own.
- after every load and reload the log, and the `.playerbot reload` reply,
show the effective ParallelSnapshotBuild, SnapshotBuildSplitMap,
World.Enable and World.SoakAnchors.
Changes for a realm that has the same key in playerbot.conf and in
worldserver.conf.d with different values: the conf.d value now wins.
0085 dragged him to the east wall again whenever he stood 12 y from the
spot where he had stopped. He steps after his tank by up to its 10 y
step, so the step itself sent the tank back to the wall every few
seconds: in naxx_gluth 1115h the holder moved for 62 of 90 s, made 15
white hits and no Sunder at 86 rage on average, and every DPS stood
26-29 s in the threat hold under it. Gluth stayed at 94-99%.
He is now dragged again only when he leaves the wall area: farther
than 32 y from the drag spot (he settles within 20 y of it and his tank
stands 10 y past him).
naxx_patchwerk 1115i met him at his spawn as planned, but the healers
stood on the room's lower floor, 75 y and out of sight from the fight.
Each soaker took one Hateful Strike (7k of 10.7k) in the first 3 s, the
healers spent 29 of 61 s walking, cast nothing for 18 s, and every tank
died before the first heal landed.
The healers' posts move to the two corners of the hall's east end,
3326,-3223 and 3326,-3241: 20 y from his spawn, 23-26 y from him where
the main tank holds him, off his walk. While he is 90 y or more down his
walk the raid brain sends them there as pre-pull spots (the scenario
waits for them), and they stay sent while he walks back.
The idle rules run on the worker pool while the map threads update the
world, and several of them check paths and nav points on the bot's live map
(stand points, dungeon steps, regroup and rejoin steps, water exits). Those
searches used the one Detour query each map instance shares with the map's
own creature pathing, which is not thread-safe, and NearestNavPoint called
Map::LoadGrid from the worker.
Each worker thread now:
- searches with its own navmesh queries (MMAP::ScopedThreadNavMeshQuery), and
SehSafeCalculatePath, SehSafeCalculatePathFrom and SehSafeNearestPolyProbe
hold the navmesh read lock for the search, so no tile changes under it;
- never touches the grids (BotMovement::ScopedBotLogicThread): a nav-point
probe hands its grid to the world thread, which loads it at the start of
the next snapshot phase, and searches the tiles loaded now.
World and map thread searches are unchanged. Deferred grid requests are
kept by map id and instance id and looked up again before loading, so a
request never outlives its map. TickPerf logs bot_logic_grid_loads when
there were any.
The parallel snapshot build gave each map one thread. With nearly all bots on
one continent (the busy-world soak: ~300 bots on Eastern Kingdoms) the whole
build ran on the world thread, about as much world-thread time as all the map
updates together.
PlayerbotV2.SnapshotBuildSplitMap = 1 (default 0, read every tick) also splits
an open-world map with 16 or more due bots into parts, at most one per build
thread (8 bots per part at least). A bot's part comes from its group (or the
bot alone when ungrouped), so a group always builds on one thread. Dungeons,
raids, battlegrounds and arenas are never split.
Building a snapshot is not read-only, so a split part changes two things:
- every navmesh query on the thread uses the thread's own query
(MMAP::ScopedThreadNavMeshQuery), never the shared per-instance one;
- a build never loads a grid (water-escape footing and elevator ledges used to
call Map::LoadGrid). The grid goes to a list and the world thread loads it
right after the build barrier; that build has no answer and the next one
gets it. An elevator ledge is no longer stored as "none" when its grid was
not loaded yet.
TickPerf gains a "same_map_split" line (parts per tick, bots per part, grids
handed to the world thread). With the switch off nothing changes.
Patchwerk's Hateful Strike goes to the off tanks in his reach; with only
the main tank there it takes every strike. naxx_patchwerk 1115h: the
off tanks stayed where the raid waited until he was in combat, 57 y
away, and the main tank died at 3 s, then the next tank 3 s later.
For a boss with a melee soak rule on off tanks, the order now sends that
many off tanks onto him together with the main tank.
A tank on the run builds no threat, and the timed threat releases let
the raid take Gluth off it: naxx_gluth 1115g had him on the main tank at
3 s and on a fury warrior at 6 s with the drag half done, then on one
DPS after another. The DPS now hold on him until he stands at his spot
(ordered casts such as Tranquilizing Shot still go), at most 15 s from
the start of the drag, then the normal threat holds take over.
naxx_patchwerk 1115h ordered the pull with Patchwerk 18 y from his
spawn, walking home, while the tanks waited 57 y away on the lower
floor. He reached home and walked off again before the main tank got
there, and the fight started 90 y west of his post.
The runner now measures his walking speed and the main tank's route
from where it waits to his spawn, and sends the order once he is due
home no more than 1.5 s after the tank. The tank may be up to 90 y from
him for this order.
A healer skipped a patient when heals in flight covered the damage taken
until the first of them landed. On Patchwerk six healers left a tank at
79% to 6292 healing in flight against a 4286 deficit, and the tank fell
before the next heal started. The in-flight cover now has to hold until
the last in-flight heal lands, and at least 2.5 s ahead.
The early "already full" cancel no longer stops a heal on a tank: the
next boss swing lands inside the cast, and the cast lockout after a
cancel left tanks without heals during Hateful Strike.
naxx_gluth 1115f (0083): the step back was measured from his live position,
so it moved with every step he took. His tank walked him from the east wall
to 6 y from the camp and back four times in 45 s and died there. The drag
spot, 57 y from the camp, left the tank out of heal reach while it dragged.
The swap tank picked up chows 3-14 y from him, and he went from 91% back to
94-96% three times.
- When he stops within 20 y of the drag spot, that point is his spot. The
holder stands 10 y from it toward the camp, and the swap tank stands 5 y
beside the holder. He is dragged again only if he moves 12 y off it.
- The drag spot moves to 3330,-3125 and the camp to 3290,-3110, 43 y apart.
The chow posts move to 3288,-3148 and 3265,-3136, within 40 y of the camp.
- A swap tank with a chow on it takes the chow to the nearest chow post.
- Hateful Strike hits the highest-health player in melee among his top
four on threat. The threat hold kept melee DPS at up to the main tank's
threat, with a timed release, so rogues and warriors were among those four
(naxx_patchwerk 1115f/1115g: 31 and 36 dead to Hateful Strike). A melee
DPS on a melee-soak enemy now holds under 90% of the lowest soaker's
threat while a soaker is in his reach, with no timed release.
- A staged raid that opens on an add: when the add is not in the world near
the boss (naxx_thaddius 1115f: still checked to Thaddius), the route is
checked to the add's own spawn row nearest the boss's spawn, and a
[scenario] line says which.
- The patrol wait line says "home", "walking home" or "walking away" from
the measured direction; it printed the order condition, so a boss 59 y
from home and closing read "walking away".
A combat log parse shows where a player's damage came from: the share of
each spell, its hits, and for a healer the overheal of each heal. The
[pull_stats] line had only totals and the last rule that fired each second,
so a warlock with 34 of 90 s casting could not be told apart from one that
cast the wrong spells.
- [pull_spells] lines after each [pull_stats] line: damage by spell (melee
as "melee", the pet's spells as "pet <spell>"), top ten, with the share
of the total and the hits; healing by spell with heals and overheal.
- [pull_stats] adds a mana user's average and lowest mana and its seconds
under 20%.
- A staged raid that opens on an add checks its route to that add: the add
is now searched for from the boss's own spawn. FindBoss searched from the
squad, still at the instance entrance, found nobody, and naxx_thaddius
1115e checked the route to Thaddius again and failed its setup.
- A patrolling boss's distance from home is measured from his spawn point:
waypoint movement moves GetHomePosition along with him, so every wait
line in naxx_patchwerk 1115f said 0 y and counted as walking home.
- The order goes out when he is home, or within 20 y of it and walking
toward it: 1115f was ordered with him 50 y west of his spawn, the tanks met
him there off their posts and Hateful Strike killed 31.