SPT Version
4.0
Project Type
Server
Expected Result
idk im asking for clarification
Actual Result
When the client goes to generate a wave at the url https://127.0.0.1:6967/client/game/bot/generate HTTP/1.1 with the following payload
{
"conditions": [
{
"Role": "assault",
"Limit": 8,
"Difficulty": "easy"
},
{
"Role": "assault",
"Limit": 8,
"Difficulty": "hard"
},
{
"Role": "marksman",
"Limit": 8,
"Difficulty": "normal"
},
{
"Role": "marksman",
"Limit": 8,
"Difficulty": "hard"
}
]
}
the server returns with 150 bot configs
Steps To Reproduce
Analysis
BotCountToGenerate = Math.Max(GetBotPresetGenerationLimit(condition.Role!), condition.Limit), // Choose largest between value passed in from request vs what's in bot.config
From here
As commented returns the larger of the two values. In this case it returns 45 for the "Assault" type and 30 for the "marksman" type since those are greater than the 8 for each type (per difficulty) the client asked for. This results in the server generating 150 bot configs in the response 45 +45 +30 +30 = 150
I was just curious if this was intended behaviour, in that, idk maybe the server generates a large pool for the client to sample or if this was a bug.
Screen shots show the MITM proxy Request and Response. The Response screenshot, I dumped the response object into the browser just to get the length of the data object, as can be seen it's 150
Server Log
Default values from SPT_DATA\configs\bot.json#presetBatch
"presetBatch": {
"arenaFighter": 15,
"arenaFighterEvent": 15,
"assault": 45,
"bossBoar": 5,
"bossBoarSniper": 5,
"bossBully": 5,
"bossGluhar": 5,
"bossKilla": 5,
"bossKillaAgro": 5,
"bossKnight": 5,
"bossKojaniy": 5,
"bossKolontay": 5,
"bossPartisan": 5,
"bossSanitar": 5,
"bossTagilla": 5,
"bossTagillaAgro": 5,
"bossTest": 10,
"bossZryachiy": 5,
"crazyAssaultEvent": 15,
"cursedAssault": 50,
"exUsec": 15,
"followerBigPipe": 5,
"followerBirdEye": 5,
"followerBoar": 15,
"followerBoarClose1": 10,
"followerBoarClose2": 10,
"followerBully": 5,
"followerGluharAssault": 5,
"followerGluharScout": 5,
"followerGluharSecurity": 5,
"followerGluharSnipe": 5,
"followerKojaniy": 5,
"followerKolontayAssault": 10,
"followerKolontaySecurity": 10,
"followerSanitar": 5,
"followerTagilla": 5,
"followerTest": 10,
"followerZryachiy": 10,
"gifter": 5,
"infectedAssault": 30,
"infectedCivil": 30,
"infectedLaborant": 30,
"infectedPmc": 30,
"infectedTagilla": 5,
"marksman": 30,
"peacefullZryachiyEvent": 5,
"peacemaker": 10,
"pmcBEAR": 15,
"pmcBot": 40,
"pmcUSEC": 15,
"ravangeZryachiyEvent": 5,
"sectactPriestEvent": 10,
"sectantOni": 10,
"sectantPredvestnik": 10,
"sectantPriest": 10,
"sectantPrizrak": 10,
"sectantWarrior": 10,
"shooterBTR": 1,
"skier": 10,
"tagillaHelperAgro": 5,
"test": 30
},
BepinEx Log
N/A
Client Log
N/A
Player Profile
No response
Screenshots

SPT Version
4.0
Project Type
Server
Expected Result
idk im asking for clarification
Actual Result
When the client goes to generate a wave at the url https://127.0.0.1:6967/client/game/bot/generate HTTP/1.1 with the following payload
{ "conditions": [ { "Role": "assault", "Limit": 8, "Difficulty": "easy" }, { "Role": "assault", "Limit": 8, "Difficulty": "hard" }, { "Role": "marksman", "Limit": 8, "Difficulty": "normal" }, { "Role": "marksman", "Limit": 8, "Difficulty": "hard" } ] }the server returns with 150 bot configs
Steps To Reproduce
Analysis
BotCountToGenerate = Math.Max(GetBotPresetGenerationLimit(condition.Role!), condition.Limit), // Choose largest between value passed in from request vs what's in bot.configFrom here
As commented returns the larger of the two values. In this case it returns 45 for the "Assault" type and 30 for the "marksman" type since those are greater than the 8 for each type (per difficulty) the client asked for. This results in the server generating 150 bot configs in the response 45 +45 +30 +30 = 150
I was just curious if this was intended behaviour, in that, idk maybe the server generates a large pool for the client to sample or if this was a bug.
Screen shots show the MITM proxy Request and Response. The Response screenshot, I dumped the response object into the browser just to get the length of the data object, as can be seen it's 150
Server Log
Default values from SPT_DATA\configs\bot.json#presetBatch
BepinEx Log
N/A
Client Log
N/A
Player Profile
No response
Screenshots