From 0afaf753c6ff9e1dd8d3563a8d49c8a388332ab9 Mon Sep 17 00:00:00 2001 From: NoxMax <50133316+NoxMax@users.noreply.github.com> Date: Sat, 30 May 2026 07:48:16 -0600 Subject: [PATCH] Clarifies BG bracket auto-join comments and configs (#2417) ## Pull Request Description playerbots.conf.dist: 1. Updated and clarified comments. At best they were misleading, at worst they were wrong. 2. Reordered brackets configs top to bottom, from Warsong to IOC. 3. No config values have actually been changed. PlayerbotAIConfig.cpp: 1. Made sure the config values actually match the .dist file. 2. Reordered brackets configs top to bottom, from Warsong to IOC. ## Feature Evaluation - Describe the **minimum logic** required to achieve the intended behavior. - Describe the **processing cost** when this logic executes across many bots. ## How to Test the Changes ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [x] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [x] No - - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - - [x] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [x] No - - [ ] Yes (**explain below**) ## Final Checklist - - [x] Stability is not compromised. - - [x] Performance impact is understood, tested, and acceptable. - - [x] Added logic complexity is justified and explained. - - [x] Any new bot dialogue lines are translated. - - [x] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers Bracket ranges are from `pvpdifficulty_dbc` --- conf/playerbots.conf.dist | 59 ++++++++++++++++++++------------------- src/PlayerbotAIConfig.cpp | 20 ++++++------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 81f1b47b2..23885bee3 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -1290,44 +1290,47 @@ AiPlayerbot.RandomBotAutoJoinBG = 0 # This section controls the level brackets and automatic bot participation in battlegrounds and arenas. # # Brackets: -# - Specify the level ranges for bots to auto-join: -# - Warsong Gulch (WS): 0 = 10-19, 1 = 20-29, 2 = 30-39, ..., 7 = 80 (Default: 7) -# - Rated Arena: 0 = 10-14, 1 = 15-19, ..., 14 = 80-84 (Default: 14) -# - Multiple brackets can be specified as a comma-separated list (e.g., "0,2,5"). +# - Specify the level ranges for bots to auto-join (bracket IDs are per-BG and start at 0 from each BG's minimum level): +# - Warsong Gulch (WS): 0=10-19, 1=20-29, 2=30-39, 3=40-49, 4=50-59, 5=60-69, 6=70-79, 7=80 (Default: 7) +# - Arathi Basin (AB): 0=20-29, 1=30-39, 2=40-49, 3=50-59, 4=60-69, 5=70-79, 6=80 (Default: 6) +# - Alterac Valley (AV): 0=51-60, 1=61-70, 2=71-79, 3=80 (Default: 3) +# - Eye of the Storm (EY): 0=61-69, 1=70-79, 2=80 (Default: 2) +# - Isle of Conquest (IC): 0=71-79, 1=80 (Default: 1) +# - Multiple BG brackets can be specified as a comma-separated list (e.g., "0,2,5"). Not applicable for Rated Arena. +# - Rated Arena: 0=10-14, 1=15-19, 2=20-24, ..., 13=75-79, 14=80-84 (Default: 14) # # Counts: -# - Specify the number of battlegrounds to auto-fill per bracket. -# - For battlegrounds, 'Count" is the number of bots per bracket. For example: -# - Warsong Gulch Count = 1 adds 20 bots (10 per team). +# - Specify the number of battles to auto-fill per bracket. +# - For battlegrounds, 'Count" is the number of battles per bracket. For example: +# - RandomBotAutoJoinWSBrackets = 6,7 +# - RandomBotAutoJoinBGWSCount = 1 +# - These configs would create two battles, one for bracket 6 and one for bracket 7. # - Ensure there are enough eligible bots to meet the specified counts. -# -# Arena Considerations: -# - Rated arena brackets default to level 80-84 (bracket 14). -# - Custom code changes are required for lower-level arena brackets to function properly. -# + # Battleground bracket range possibilities: -# AiPlayerbot.RandomBotAutoJoinICBrackets = 0,1 -# AiPlayerbot.RandomBotAutoJoinEYBrackets = 0,1,2 -# AiPlayerbot.RandomBotAutoJoinAVBrackets = 0,1,2,3 -# AiPlayerbot.RandomBotAutoJoinABBrackets = 0,1,2,3,4,5,6 # AiPlayerbot.RandomBotAutoJoinWSBrackets = 0,1,2,3,4,5,6,7 - -AiPlayerbot.RandomBotAutoJoinICBrackets = 1 -AiPlayerbot.RandomBotAutoJoinEYBrackets = 2 -AiPlayerbot.RandomBotAutoJoinAVBrackets = 3 -AiPlayerbot.RandomBotAutoJoinABBrackets = 6 +# AiPlayerbot.RandomBotAutoJoinABBrackets = 0,1,2,3,4,5,6 +# AiPlayerbot.RandomBotAutoJoinAVBrackets = 0,1,2,3 +# AiPlayerbot.RandomBotAutoJoinEYBrackets = 0,1,2 +# AiPlayerbot.RandomBotAutoJoinICBrackets = 0,1 AiPlayerbot.RandomBotAutoJoinWSBrackets = 7 +AiPlayerbot.RandomBotAutoJoinABBrackets = 6 +AiPlayerbot.RandomBotAutoJoinAVBrackets = 3 +AiPlayerbot.RandomBotAutoJoinEYBrackets = 2 +AiPlayerbot.RandomBotAutoJoinICBrackets = 1 -# Battlegrounds count (per bracket!): -AiPlayerbot.RandomBotAutoJoinBGICCount = 0 -AiPlayerbot.RandomBotAutoJoinBGEYCount = 1 -AiPlayerbot.RandomBotAutoJoinBGAVCount = 0 -AiPlayerbot.RandomBotAutoJoinBGABCount = 1 +# Battlegrounds battles count (per bracket): AiPlayerbot.RandomBotAutoJoinBGWSCount = 1 +AiPlayerbot.RandomBotAutoJoinBGABCount = 1 +AiPlayerbot.RandomBotAutoJoinBGAVCount = 0 +AiPlayerbot.RandomBotAutoJoinBGEYCount = 1 +AiPlayerbot.RandomBotAutoJoinBGICCount = 0 -# Arena configuration: +# Arena bracket (single bracket only): +# Custom code changes are required for lower-level arena brackets to function properly. AiPlayerbot.RandomBotAutoJoinArenaBracket = 14 +# Arena battles count: AiPlayerbot.RandomBotAutoJoinBGRatedArena2v2Count = 0 AiPlayerbot.RandomBotAutoJoinBGRatedArena3v3Count = 0 AiPlayerbot.RandomBotAutoJoinBGRatedArena5v5Count = 0 @@ -2463,4 +2466,4 @@ AiPlayerbot.GuildTaskKillTaskDistance = 200 AiPlayerbot.TargetPosRecalcDistance = 0.1 # Allow bots to be summoned near innkeepers -AiPlayerbot.SummonAtInnkeepersEnabled = 1 \ No newline at end of file +AiPlayerbot.SummonAtInnkeepersEnabled = 1 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index fd230cb9b..baaae8c3f 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -365,19 +365,19 @@ bool PlayerbotAIConfig::Initialize() randomBotJoinBG = sConfigMgr->GetOption("AiPlayerbot.RandomBotJoinBG", true); randomBotAutoJoinBG = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBG", false); - randomBotAutoJoinArenaBracket = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinArenaBracket", 7); + randomBotAutoJoinArenaBracket = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinArenaBracket", 14); - randomBotAutoJoinICBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinICBrackets", "0,1"); - randomBotAutoJoinEYBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinEYBrackets", "0,1,2"); - randomBotAutoJoinAVBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinAVBrackets", "0,1,2,3"); - randomBotAutoJoinABBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinABBrackets", "0,1,2,3,4,5,6"); - randomBotAutoJoinWSBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinWSBrackets", "0,1,2,3,4,5,6,7"); + randomBotAutoJoinWSBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinWSBrackets", "7"); + randomBotAutoJoinABBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinABBrackets", "6"); + randomBotAutoJoinAVBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinAVBrackets", "3"); + randomBotAutoJoinEYBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinEYBrackets", "2"); + randomBotAutoJoinICBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinICBrackets", "1"); - randomBotAutoJoinBGICCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGICCount", 0); - randomBotAutoJoinBGEYCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGEYCount", 0); + randomBotAutoJoinBGWSCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGWSCount", 1); + randomBotAutoJoinBGABCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGABCount", 1); randomBotAutoJoinBGAVCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGAVCount", 0); - randomBotAutoJoinBGABCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGABCount", 0); - randomBotAutoJoinBGWSCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGWSCount", 0); + randomBotAutoJoinBGEYCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGEYCount", 1); + randomBotAutoJoinBGICCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGICCount", 0); randomBotAutoJoinBGRatedArena2v2Count = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGRatedArena2v2Count", 0);