# Bot Manager "Invite All" (staged 2026-10-04, TEST only, not published)

Trevor: an [Invite All] button next to Spawn All / Camp All that invites every currently spawned bot into the
group, as many as fit, leaves already-grouped bots alone, and says in chat who was invited and who didn't fit.

Files:
- dinput8.dll: md5 97664513, client_dll 58b48a3 (build of 2305506), on top of the published build ae01b7c
  (= patch_files/dinput8.dll 6b094b7a, gemfilter). Nothing else unpublished is in it.
- HJ_BotWnd.xml (md5 e5916768): patch_files copy (fb22df10) + button BW_InviteAll at x190 on the Spawn All row;
  Refresh moves to x283.
verify_sites.py vs patch_files/eqgame.exe: 39 hook sites, 40 byte patches + signatures, 4 call sites, 0 problems
(no new hooks; the button is handled in the existing Bot Manager click handler).
Server side: NEW zone bot command `^inviteall` (EQEmu has no stock bot invite command; bots normally join only by
targeting them and /invite). Code commit 0af0ca0ae (branch test-botinvite -> test), zone binary, no SQL: the command
registers itself in bot_command_settings on zone boot (status Player). Live on TEST.

What it does:
- Button sends `/say ^inviteall` then `#botui list` (same pattern as the other buttons). The command also works typed.
- Takes your spawned bots in this zone that are in no group and no raid, by name. Not in a raid: each joins your
  group via the stock bot invite (a group is formed if you have none) while it has fewer than 6 members (you, other
  players, mercs and bots all count). In a raid: each joins YOUR raid group the way a targeted /invite does, while
  that group has room; never added as an ungrouped raid member. In a raid but not in a raid group: refused with a
  message.
- Bots already in a group or raid (yours or someone else's) are not touched.
- Chat (yellow): `Invited into your group: A, B, C.` / `No room for: D, E (a group holds 6 including you).` /
  `N bots already in a group or raid were left as they were.` / `You have no spawned bots to invite.` /
  `All your spawned bots are already in a group or raid.`
- Old DLL + new XML: the button shows but does nothing. New DLL + old XML: no button. Without the server command
  the button gets the stock unknown bot command reply.

## Test on the desktop
    scp -r openclawvm:heroes_journey_workspace/patcher/staged_botinvite /tmp/ && bash /tmp/staged_botinvite/install_desktop.sh
Launch with "EverQuest RoF2 Tanks (Direct)", log in to the TEST world. hjclient.log line 1 ends
"+specbuilder+gemfilter+botinvite) loaded". /bots opens the Bot Manager; Invite All is between Camp All and Refresh.
1. Ungrouped, 7+ bots spawned (Spawn All): Invite All. A group forms with 5 bots; chat names the 5 and "No room
   for:" the rest.
2. Disband one bot (or /disband it), Invite All again: one more joins; the other grouped bots are reported as
   "already in a group" and stay put.
3. Group of 6 already: Invite All -> nobody invited, every free spawned bot under "No room for".
4. No bots spawned (Camp All first): "You have no spawned bots to invite."
5. Raid (if you can form one on test with a second character): you in raid group N with room -> bots join group N
   only; overflow listed as no room. You in the raid but ungrouped -> the refusal line.
6. Type `^inviteall` in chat: same as the button. `^help invite` lists it.
Undo: `bash /tmp/staged_botinvite/install_desktop.sh --revert` (or run the Patcher launcher once).

## Publish (after Trevor confirms on test). Order: server first, then the patcher
1. Prod server: `git -C ~/eqserver/Code cherry-pick 0af0ca0ae` (or `merge --ff-only test` if test == heroes-journey
   + only this), build zone + world from that tree, install, restart with the 1-minute in-game warning. Zone log
   shows "New Bot Command [inviteall] found... Adding to `bot_command_settings`". No SQL, no quests.
2. Patcher: back up patch_files/dinput8.dll and uifiles/default/HJ_BotWnd.xml to
   ~/.local/share/eq-backups/<date>/botinvite; copy this folder's dinput8.dll to patch_files/ and HJ_BotWnd.xml to
   patch_files/uifiles/default/; add a news.txt line; `python3 generate_manifest.py`; check the manifest lists both
   with md5 97664513 / e5916768. If patch_files/dinput8.dll is no longer 6b094b7a (another DLL feature published since),
   rebuild from client_dll HEAD instead: this one would drop that feature.
