Skip to content

Commit a37dd2b

Browse files
authored
Clarify random bot timing configuration section and parameter descriptions (mod-playerbots#1826)
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!
1 parent 9c8ba42 commit a37dd2b

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

conf/playerbots.conf.dist

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,24 +1196,46 @@ AiPlayerbot.FastReactInBG = 1
11961196
####################################################################################################
11971197

11981198
####################################################################################################
1199-
# INTERVALS
1199+
# RANDOM BOT TIMING AND BEHAVIOR
12001200
#
12011201
#
12021202

1203-
# All in seconds
1203+
# How often (in seconds) the random bot manager runs its main update loop
1204+
# Default: 20
12041205
AiPlayerbot.RandomBotUpdateInterval = 20
1206+
1207+
# Minimum and maximum seconds before the manager re-evaluates and adjusts total random bot count
1208+
# Defaults: 1800 (min), 7200 (max)
12051209
AiPlayerbot.RandomBotCountChangeMinInterval = 1800
12061210
AiPlayerbot.RandomBotCountChangeMaxInterval = 7200
1211+
1212+
# Minimum and maximum seconds a random bot will stay online before logging out
1213+
# Defaults: 600 (min), 28800 (max)
12071214
AiPlayerbot.MinRandomBotInWorldTime = 600
12081215
AiPlayerbot.MaxRandomBotInWorldTime = 28800
1216+
1217+
# Minimum and maximum seconds before a bot is eligible for re-randomization (gear, class, talents, etc.)
1218+
# Defaults: 7200 (min), 1209600 (max)
12091219
AiPlayerbot.MinRandomBotRandomizeTime = 7200
12101220
AiPlayerbot.MaxRandomBotRandomizeTime = 1209600
1221+
1222+
# Number of bots processed (login, logout, update) per manager update cycle
1223+
# Default: 60
12111224
AiPlayerbot.RandomBotsPerInterval = 60
1225+
1226+
# Minimum and maximum seconds after death before a bot revives
1227+
# Defaults: 60 (min), 300 (max)
12121228
AiPlayerbot.MinRandomBotReviveTime = 60
12131229
AiPlayerbot.MaxRandomBotReviveTime = 300
1230+
1231+
# Minimum and maximum seconds between bot teleports to new areas or zones
1232+
# Defaults: 3600 (min), 18000 (max)
12141233
AiPlayerbot.MinRandomBotTeleportInterval = 3600
12151234
AiPlayerbot.MaxRandomBotTeleportInterval = 18000
1216-
AiPlayerbot.PermanantlyInWorldTime = 31104000
1235+
1236+
# Number of seconds bots flagged as permanent stay in the world (31,104,000 ≈ 1 year)
1237+
# Default: 31104000
1238+
AiPlayerbot.PermanentlyInWorldTime = 31104000
12171239

12181240
#
12191241
#

src/PlayerbotAIConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ bool PlayerbotAIConfig::Initialize()
199199
maxRandomBotReviveTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE);
200200
minRandomBotTeleportInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotTeleportInterval", 1 * HOUR);
201201
maxRandomBotTeleportInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotTeleportInterval", 5 * HOUR);
202-
permanantlyInWorldTime =
203-
sConfigMgr->GetOption<int32>("AiPlayerbot.PermanantlyInWorldTime", 1 * YEAR);
202+
permanentlyInWorldTime =
203+
sConfigMgr->GetOption<int32>("AiPlayerbot.PermanentlyInWorldTime", 1 * YEAR);
204204
randomBotTeleportDistance = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleportDistance", 100);
205205
randomBotsPerInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotsPerInterval", 60);
206206
minRandomBotsPriceChangeInterval =

src/PlayerbotAIConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class PlayerbotAIConfig
132132
uint32 minRandomBotChangeStrategyTime, maxRandomBotChangeStrategyTime;
133133
uint32 minRandomBotReviveTime, maxRandomBotReviveTime;
134134
uint32 minRandomBotTeleportInterval, maxRandomBotTeleportInterval;
135-
uint32 permanantlyInWorldTime;
135+
uint32 permanentlyInWorldTime;
136136
uint32 minRandomBotPvpTime, maxRandomBotPvpTime;
137137
uint32 randomBotsPerInterval;
138138
uint32 minRandomBotsPriceChangeInterval, maxRandomBotsPriceChangeInterval;

src/RandomPlayerbotMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
822822
uint32 add_time = sPlayerbotAIConfig->enablePeriodicOnlineOffline
823823
? urand(sPlayerbotAIConfig->minRandomBotInWorldTime,
824824
sPlayerbotAIConfig->maxRandomBotInWorldTime)
825-
: sPlayerbotAIConfig->permanantlyInWorldTime;
825+
: sPlayerbotAIConfig->permanentlyInWorldTime;
826826

827827
SetEventValue(charInfo.guid, "add", 1, add_time);
828828
SetEventValue(charInfo.guid, "logout", 0, 0);

0 commit comments

Comments
 (0)