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.
6.4 KiB
Installing the ForeverBots bots
You get: party companions you add with one click, raid/dungeon/battleground bots, bots roaming the
world (about 300), an auction house that is stocked and trades, and the in-game ForeverBots window.
This is advocaite's forever tree with the bots in it. Feedback and logs are welcome (see the end).
Two ways to get a server with the bots. Both end with the same steps 3-6.
A. You already run the Forever repack (Windows)
The bots are part of the server program, so you need a worldserver.exe that was built with them.
- Get that worldserver.exe. Either use a prebuilt one if the person who gave you this
package included it, or build it yourself (section B, steps 1-2). Close the server, then
back up your
charactersdatabase (the bots add a few tables to it) and keep a copy of your oldworldserver.exe. - Copy the new
worldserver.exeover the old one. If aworldserver.conf.dfolder does not exist next to it, create it.
B. Building from source
- Build as for the plain Forever server, adding one option:
cmake -S . -B build -DSERVERS=1 -DSCRIPTS=static -DBUILD_PLAYERBOT_V2=1thencmake --build build --config RelWithDebInfo --target worldserver. Needs the usual TrinityCore requirements (Visual Studio 2022 or newer on Windows, Boost, OpenSSL, MySQL 8 client). Without-DBUILD_PLAYERBOT_V2=1you get the unchanged server and no bots. - The build puts
playerbot.conf.distintoworldserver.conf.d. Runcmake --installor copy the files frombuild\...\worldserver.conf.dnext to yourworldserver.exe. KeepSourceDirectoryinworldserver.confpointing at this checkout: on first start the server applies the SQL files insql\playerbot_v2from there.
Steps for everyone
Optional first: the vanilla (1.12) numbers. They are not in the repository; they are built from the VMaNGOS database dump you download yourself, with a builder script that is not part of this branch. Without them the bots and the server use the client's own values.
- Create the shared bot database (once). In a command prompt, from this folder
(use your own MySQL user;
mysql.exeis in your MySQLbinfolder):Your database user needs rights on the newmysql -u root -p < sql\playerbot_shared\playerbot_shared_schema.sql mysql -u root -p playerbot < sql\playerbot_shared\playerbot_shared_data.sqlplayerbotdatabase (GRANT ALL ON playerbot.* TO '<your db user>'@'%';). The server reads and writes it with the same login as your other databases. The files do not drop anything. - Settings. The build puts
zz-forever-bots.confintoworldserver.conf.d(an existing copy is never overwritten). It turns on the world bots (up to 220 awake, about 160 around each player, from a roster of 3000), the auction house bot, bot raid tactics and bot logging, so they work without further setup. The raid and instance shortcuts that are not Blizzlike (solo raid entry, no attunements, no Molten Core runes, open Ahn'Qiraj gates; seedoc/OptionalServerOptions.md) are in that file but commented out; remove the#to use them. Optionally renameplayerbot.conf.disttoplayerbot.confto change other bot settings (every key is documented there).examples\zz-forever-bots.confis the older optional version (shortcuts switched on, faster raid casting, 300 bots); copy it over to use that. Change a value and restart to tune; setPlayerbot.World.Enable = 0for no roaming bots,AuctionHouseBot.Seller.Enabled = 0for no auction bot. Weak PC: setPlayerbot.World.MaxBots = 100,BotsPerPlayer = 40,CityBots = 40andZoneBots = 20. Expect about 2.9 GB of RAM for the server plus about 4 MB per awake bot (about 3.8 GB at 220 bots). - Start the server (bnetserver, then worldserver). The first start takes longer while the bot
tables are created. Bot log lines go to
Playerbot.login your logs folder. - Install the addon. Copy the folder
src\modules\PlayerbotV2\Addon\ForeverBotsinto<your WoW folder>\_forever_\Interface\AddOns\(so you have...\AddOns\ForeverBots\ForeverBots.toc). On the character screen open AddOns and tick "Load out of date AddOns" if it is greyed out.
Using the bots in game
Your account must be a GM account for the .bot commands and the window (in the worldserver
console: account set gmlevel <accountname> 3 -1).
/fbopens the window: one button per class and role adds a bot to your group at your level, fully geared. Buttons for Follow, Stay, Attack, Pull, Flee, Release (after a wipe), formations, raid icons and tank assignments. Everything also works by typing the word in party/raid chat.- Full command list (chat orders,
.bot, addon, marks, raids):src/modules/PlayerbotV2/BOT_COMMANDS.md. - Commands:
.bot add <class> <role>,.bot call all,.bot dismiss,.bot regear,.bot save <name|all>,.bot delete <name>,.bot world(shows the roaming population)..botlists the rest. - Raids: add the bots, enter the instance, use the window's Pull and Release. A good Molten Core group is 4 tanks, 12 healers, 6 mages, 4 warlocks, 3 hunters, 5 rogues, 4 warriors.
- Battlegrounds: queue yourself; bots fill the other places.
- Hired bots: a Sellsword Captain stands beside the innkeeper of 30 towns, a Veteran Recruiter in each capital and a
Black Market Broker in Gadgetzan, Booty Bay and Ratchet. Talk to one to hire a bot for gold (Veterans and Legends wear
raid and best-in-slot gear at the level cap). Free bots stay the default;
Playerbot.Hire.Mode = 1makes the realm hired bots only. Everything about them:src/modules/PlayerbotV2/Hire/README.md.
Updating, removing, reporting problems
- Update: replace
worldserver.exe, theexamplesfile and the addon; new SQL is applied by the server at start. Back upcharactersfirst. - Remove: delete
playerbot.confandzz-forever-bots.conf(if you used it), and use a worldserver built without the option. The extra tables are harmless. - Report a problem with: what you did,
Playerbot.log,Server.log, and the time it happened. Useful lines are tagged[raid_*],[bot_death],[cast_fail],[world]. Harmless messages: "Invalid BattlegroundMapScript", "OpenSSL failed to load legacy.dll". - Needs 40-player raid content from the Forever core; the bots do not change which content exists.
Credits and licence: BOTS.md, src/modules/PlayerbotV2/NOTICE.md (GPL-2.0).