Commit Graph
13 Commits
Author SHA1 Message Date
Karrz1 69f6f6249c Bots: hired bots (sellsword brokers) in the bot module, as their own part (Hire/)
Ubuntu x64 / build (clang-17, clang++-17, <nil>, 1) (push) Waiting to run
Ubuntu x64 / build (clang-17, clang++-17, ccache, 0) (push) Waiting to run
Ubuntu x64 / build (gcc-13, g++-13, <nil>, 1) (push) Waiting to run
macOS arm64 / build (push) Waiting to run
Windows x64 / build (push) Waiting to run
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.
2026-11-24 11:30:11 +00:00
Karrz1 0e233adfd9 PlayerbotV2: migration 0063 column comments without a semicolon
Ubuntu x64 / build (clang-17, clang++-17, <nil>, 1) (push) Canceled after 0s
Ubuntu x64 / build (clang-17, clang++-17, ccache, 0) (push) Canceled after 0s
Ubuntu x64 / build (gcc-13, g++-13, <nil>, 1) (push) Canceled after 0s
macOS arm64 / build (push) Canceled after 0s
Windows x64 / build (push) Canceled after 0s
The migration runner splits statements on every ';' outside a whole-line comment, so the 'ChrRaces id; 0 = any race' column comments cut the first CREATE TABLE in two and MySQL error 1064 stopped the worldserver at start (PR #394).
2026-11-24 11:11:13 +00:00
Karrz1 4345001212 PlayerbotV2: rpg names migrations as 0063/0064
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.
2026-11-23 23:18:32 +00:00
Zapgun 1f86c6ef66 PlayerbotV2: race/sex RPG first names + reusable surnames for bot chars
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).
2026-11-23 22:13:07 +00:00
Karrz1 b441bf74e0 0.1.39: bots and core since 0.1.38 (Naxxramas fights, hunter companions get their pet, dungeon runs, bug fixes) 2026-11-21 17:45:23 +00:00
Karrz1 8e679df0e1 0.1.38: bots and core since 0.1.37.6 (Naxxramas: Patchwerk, Grobbulus, Gothik, Maexxna, Sapphiron; raid healers and tanks; bug fixes) 2026-11-18 21:11:41 +00:00
Karrz1 e73c987502 Bots: change talents <Wowhead link> learns the owner's own build
Asked on Discord #bot-feedback (Dumpins, 11-12), as ike3 bots' talents order: make the
talents in the Wowhead Forever talent calculator, whisper the bot "change talents <link>"
(or the code alone) and it learns that build.

- Api/TalentCode.h: reads the calculator link or code (class word, "v2" version, the
  "_t0/..." tail skipped), checks it against the class's tabs (talents per tab, ranks,
  5 points per row, 51 points), writes a build back as a code and a link, and gives the
  levelling order (the tab with most points first, row by row).
- ClassicSpec: GetTalentTabs lays the class's three tabs out from the trait data the way
  the calculator does (tabs left to right, rows 600 apart, talents left to right; hidden
  off-grid nodes left out). Checked against the 70862 client data for all nine classes.
  The owner's code per bot (SetTalentCode / GetTalentCode), and InferSpecFromRanks so the
  rotation and role follow the build.
- PlayerbotAPI: apply_classic_talents learns the owner's code instead of our build when one
  is set; the old talents go, the ranks are bought in the levelling order and each new
  level's point goes on down the build.
- BotCommandParser: "change talents <link>" (also "set talents", "talents <link>"),
  "talents link" (the bot's talents as a calculator link), "talents default" (our builds
  again); setspec clears the code. Refusals say why (another class's link, a code that does
  not fit the trees). Russian replies in BotLocaleRu.
- OwnerRegistry + migration 0040: a companion's code is kept across relog and restart.
- .playerbot talentcode <Name> [<link or code> | clear] (GM, console): the class's tabs as
  laid out, sets the code, walks at once and prints the code the bot then holds, so it can
  be tested with world bots and nobody in game.
2026-11-12 14:22:09 +00:00
Karrz1 a7feec8180 Raid: the player's boss tactics in plain words, kept per boss
"tactics Lucifron: adds first, no aoe, no fear, tank here" in party, raid,
a whisper or a ';' line. The plan is kept for that boss (per account, across
restarts) and the bots follow it every time the boss is in the fight:

- adds first: the damage dealers leave the boss to the tanks while one of his
  adds is up; boss first: they stay on him and the tanks keep the adds.
- no aoe: no spell that hits more than one enemy in that fight.
- no fear / no sheep / no banish ...: that crowd control is not elected and not
  cast in that fight, on top of the owner's standing orders.
- tank here: the tank holding the boss drags him to where the player stood,
  never into a hazard and not where the raid rules already place the tank.

"tactics: boss first" uses the targeted boss, "tactics Lucifron" shows his plan,
"tactics" lists all, "clear" drops one. Names can be short ("geddon") and a plan
can be set from outside the raid. No model is needed; with the bot bridge on, a
free sentence becomes the same order ("tactics ..." is one of its safe orders).
Plain party chat that only starts with the word stays chatter. Russian clients
get the answers in Russian.

New table playerbot_v2_owner_tactics (migration 0039).

(cherry picked from commit 99f77b0b0e04ec83c2b0da6f13c5f274523c7245)
2026-11-11 23:44:07 +00:00
Karrz1 312fdf59e4 PlayerbotV2: no hired bots and no bot arenas
The hired bots (hire brokers, Playerbot.Hire.*, .bot hire, the add-on's hire panel) and the bot arena play
(.bot arena, arena bot teams, the add-on's arena buttons and the Ring of Law arena script) are taken out.
Neither is Blizzard content. The stock TrinityCore arena code and the bot module's arena tactics stay.
2026-11-09 17:35:58 +00:00
Karrz1 b5f1d43560 Merge forever (sync with WoW Forever 0.1.34) into forever-bots
forever-bots is forever plus the optional player bots module (src/modules/PlayerbotV2), now at our 0.1.34 bot code:
dungeon and raid tactics (BWL Nefarian, Zul'Gurub), pull back, ships and zeppelins, gear trading, orders in party chat,
autosave every 15 minutes, the ForeverBots add-on 0.6.20 and the Playerbot.Enable master switch.
World PvP bots and the optional bot chat program are in the module but off by default.
2026-11-09 17:27:57 +00:00
Karrz1 9df935eed5 PlayerbotV2: bot module update
conf/zz-forever-bots.conf ships the WoW Forever repack settings: world bots on with the
16-29 GB crowd preset (RssBudgetMb 6000), start zone caps, spawn pacing, and the auction
house bot listing every quality on the neutral house with a fair-price buyer. A
playerbot.conf next to worldserver.conf is read too; one in worldserver.conf.d is not
loaded twice.
2026-10-27 23:06:42 +00:00
Karrz1 956aff2834 Bots: module update (raid tactics, group control, world-bot pool, riding, starter gear, combat fixes) (#71)
* Bots: module update (raid tactics, instance entry, world-bot and combat fixes)

* Bots: module update from the current build (follow-the-owner on drops, group-human instance entry, raid-ready and population fixes)

* Bots: group control, pool balance at every level, starter outfit for low world bots, riding tiers and mount fallback

* World bots: no quest hub for a bot that can take no quest there (#87)

* World bots: no quest hub for a bot that can take none there (ring spot instead); move_abandon logs why the bot did not move

* Starter outfit: wait while the bot casts or fights, and leave quivers and ammo out of the pieces that must be worn

* Bots: seven small cleanups of the bot rules (#88)

* Bots: one OwnerOrders struct holds the owner's orders (command, follow, stance, windows) and the cross-thread fields are now locked

* Bots: one pet attack order per combat tick; drop the warlock and hunter duplicates, new victim ordered at once and the same one every 3 s

* Raids: one script_names_target() test for the boss script's kill target, used by the raid dispatch and both generic pickers

* Bots: idle:rest sits a solo bot under 50% health that has nothing to eat

* Bots: remove the retail rotations of the nine vanilla classes (every spec is already overridden by the Classic rotation)

* Group: one movement_owned_elsewhere test for the follow, slot move and recall gates

* Bots: the threat drop spells and the 60/80 percent triggers live next to the other threat limits in ThreatLimits.h

* Trade: reagents of a recipe the bot knows, from the owner or a group mate, are a gift; trade line in the command guide (#89)
2026-10-20 09:05:38 +08:00
Karrz1 d13cdf728d Add WoW Forever Bots by Karrz (optional, -DBUILD_PLAYERBOT_V2=1, default off)
Imported from Karrz's karrz-bots branch (12a3d94547) on top of forever: the
PlayerbotV2 module, the ForeverBots add-on (/fb), the bot SQL, the core hooks
and API it needs, and the Classic battleground, raid, auction house and road
navigation changes it was tested with.

Left out of this import: the world editor, tests, protocol research and data
generator tools, dev setup scripts, the realm example config, the design notes,
the older PlayerbotControl add-on, and changes to sql/create, the Boost
minimum, and the build revision files. These stay in Karrz's own repository.
2026-10-13 09:21:34 +08:00