added option to skip bot_scaling to use bot_static instead for spawning static amount of bots each round if wanted

This commit is contained in:
jenz 2024-02-25 00:23:58 +01:00
parent 592d3b4c15
commit 8c80d4ac05
2 changed files with 134 additions and 114 deletions

View File

@ -1,6 +1,9 @@
// "bot_scaling"
// Multiplied by the amount of CT players is the total amount of bots.
// Capped at 44 or the amount of T spawns the map. Whichever is lowest.
// "bot_static" if you use bot_scaling 0 the plugin will instead use the value given in bot_static to spawn a static amount of bots into the game.
// if bot_scaling is not 0 it will always pick bot_scaling and just ignore bot_static.
//
// "PlayerScaleAbility"
// Multiplied by the zombie count, the amount of needed kills to add
@ -12,10 +15,11 @@
"Wave 1"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "50"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie1"
"Zombie Class" "zombie2"
@ -26,10 +30,11 @@
"Wave 2"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "30"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie2"
"Zombie Class" "zombie3"
@ -41,10 +46,11 @@
"Wave 3"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "60"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie2"
"Zombie Class" "zombie3"
@ -58,10 +64,11 @@
"Wave 4"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "40"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie2"
"Zombie Class" "zombie3"
@ -74,11 +81,12 @@
// BOSS - Giant Berserker
"Wave 5"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "0.500000"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.000000"
"Zombie Count" "5"
"Respawns" "5"
"bot_scaling" "1"
"Respawns" "99"
"bot_scaling" "5"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "berserker"
"Human Class" "@all"
@ -87,10 +95,11 @@
"Wave 6"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "50"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "uberevil"
"Human Class" "@all"
@ -99,10 +108,11 @@
"Wave 7"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"HealthScaleAbility" "0.100000"
"Zombie Count" "50"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie1"
"Zombie Class" "zombie2"
@ -115,11 +125,12 @@
// Doom Abaddon
"Wave 8"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "1.000000"
"Zombie Count" "75"
"Respawns" "5"
"bot_scaling" "13"
"PlayerScaleAbility" "0.3"
"HealthScaleAbility" "0.100000"
"Zombie Count" "70"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "abaddon"
"Human Class" "@all"
@ -127,11 +138,12 @@
// BOSS - Krall vs Dark Kahn
"Wave 9"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "0.500000"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.000000"
"Zombie Count" "5"
"Respawns" "5"
"bot_scaling" "1"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "3"
"wavecommand" " "
"Zombie Class" "kahn"
"Zombie Class" "krall"
@ -140,11 +152,12 @@
// Mix of Madness
"Wave 10"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "75"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie3"
"Zombie Class" "zombie2"
@ -162,11 +175,12 @@
// Alien Invaders
"Wave 11"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "95"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "alienv1"
"Zombie Class" "alien_spider"
@ -175,11 +189,12 @@
// Terror-Strike
"Wave 12"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "100"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "spitter"
"Zombie Class" "hunter"
@ -189,11 +204,12 @@
// Deadly Strike
"Wave 13"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"Zombie Count" "4"
"Respawns" "5"
"bot_scaling" "13"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "100"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "akasha"
"Zombie Class" "alien_spider"
@ -205,11 +221,12 @@
// Left 4 Doge
"Wave 14"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "85"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "doge"
"Human Class" "@all"
@ -217,11 +234,12 @@
// BOSS - Krall and Kahn come back
"Wave 15"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "0.500000"
"Zombie Count" "4"
"Respawns" "5"
"bot_scaling" "1"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.000000"
"Zombie Count" "5"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "3"
"wavecommand" " "
"Zombie Class" "krall"
"Zombie Class" "kahn"
@ -230,11 +248,12 @@
// Invaders vs Akasha
"Wave 16"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"Zombie Count" "120"
"Respawns" "5"
"bot_scaling" "13"
"PlayerScaleAbility" "0.15"
"HealthScaleAbility" "0.100000"
"Zombie Count" "100"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "akasha"
"Zombie Class" "alienv1"
@ -244,48 +263,39 @@
// MINI BOSS - Spiders Party
"Wave 17"
{
"PlayerScaleAbility" "0.5"
"HealthScaleAbility" "0.750000"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.000000"
"Zombie Count" "16"
"Respawns" "5"
"bot_scaling" "2"
"Respawns" "99"
"bot_scaling" "5"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "bosspider"
"Human Class" "@all"
}
// Cyborg Skull
// BOSS - Raam vs Theron
"Wave 18"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"Zombie Count" "60"
"Respawns" "5"
"bot_scaling" "13"
"wavecommand" " "
"Zombie Class" "servo_skull"
"Human Class" "@all"
}
// BOSS - Raam vs Theron
"Wave 19"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "0.500000"
"Zombie Count" "9"
"Respawns" "5"
"bot_scaling" "1"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.000000"
"Zombie Count" "10"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "3"
"wavecommand" " "
"Zombie Class" "raam"
"Zombie Class" "theron_guard"
"Human Class" "@all"
}
// Nightmares
"Wave 20"
"Wave 19"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.1"
"HealthScaleAbility" "0.100000"
"Zombie Count" "225"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "16"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "strong"
"Zombie Class" "verdugo"
@ -307,13 +317,14 @@
"Human Class" "@all"
}
// Armageddon
"Wave 21"
"Wave 20"
{
"PlayerScaleAbility" "1"
"HealthScaleAbility" "1.000000"
"PlayerScaleAbility" "0.1"
"HealthScaleAbility" "0.100000"
"Zombie Count" "250"
"Respawns" "5"
"bot_scaling" "13"
"Respawns" "99"
"bot_scaling" "20"
"bot_static" "0"
"wavecommand" " "
"Zombie Class" "zombie1"
"Zombie Class" "zombie2"
@ -343,40 +354,42 @@
"Human Class" "@all"
}
// BOSS - Bahamut
"Wave 22"
"Wave 21"
{
"PlayerScaleAbility" "1"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.500000"
"Zombie Count" "3"
"Respawns" "5"
"bot_scaling" "1"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "3"
"wavecommand" " "
"Zombie Class" "bahamut"
"Human Class" "@all"
}
// BOSS - El Gigante
"Wave 23"
"Wave 22"
{
"PlayerScaleAbility" "1"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.500000"
"Zombie Count" "2"
"Respawns" "5"
"bot_scaling" "1"
"Zombie Count" "1"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "1"
"wavecommand" " "
"Zombie Class" "gigantev2"
"Human Class" "@all"
}
// FINAL BOSS - The Balrog
"Wave 24"
"Wave 23"
{
"PlayerScaleAbility" "1"
"PlayerScaleAbility" "0"
"HealthScaleAbility" "0.500000"
"Zombie Count" "1"
"Respawns" "5"
"bot_scaling" "1"
"Respawns" "99"
"bot_scaling" "0"
"bot_static" "1"
"wavecommand" " "
"Zombie Class" "balrog"
"Human Class" "@all"
}
}

View File

@ -1275,7 +1275,15 @@ public void LoadWave(int wave)
g_iClientRespawnCountNum = kv.GetNum("Respawns", 5);
l_iBotQuote = kv.GetNum("bot_scaling", 1);
SettingBotQoute(l_iBotQuote);
int l_iBotQuoteStatic = kv.GetNum("bot_static", 1);
if (l_iBotQuote == 0) //we use static bot amount instead
{
SettingBotQoute(l_iBotQuoteStatic, true);
}
else
{
SettingBotQoute(l_iBotQuote, false);
}
while (!IsEndOfFile(l_hFile) && ReadFileLine(l_hFile, l_cLine, sizeof(l_cLine)))
{
if (StrContains(l_cLine, l_cJumptokey) == -1 && !l_bKeyIndex)
@ -1418,7 +1426,7 @@ public void LoadWave(int wave)
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
public void SettingBotQoute(int botscale)
public void SettingBotQoute(int botscale, bool bot_static)
{
int l_iPlayers;
for (int i = 1; i < MaxClients; i++)
@ -1428,14 +1436,13 @@ public void SettingBotQoute(int botscale)
l_iPlayers++;
}
}
if (botscale > 0)
if (bot_static)
{
addBots(l_iPlayers * botscale);
addBots(botscale);
}
else
{
//bot_scaling 0 should imply we spawn zombie_count amount of bots instead of scaling bots to player amount.
addBots(g_iZMCount);
addBots(l_iPlayers * botscale);
}
}
//----------------------------------------------------------------------------------------------------