How can I install bots on my server?
-
Do you know how I can put bots on my server, set their quantity and conditions? Like if there are at least 4 players all the bots are eliminated? Thanks in advance!
-
-
Thank you! I understood that Manage_bots_fill.gsc
checks the bot spawn conditions and that I can modify the InitServersDvar() function to have the desired result.So to install the script, I just need to copy all the contents of the iw5_bot_warfare-master folder and insert the various folders into: C:\Users\Andrea\AppData\Local\Plutonium\storage\iw5 ??
Thanks!
-
"Simple script that changes the Bot Warfare bots_manage_fill dvar dynamically to avoid using resource for an empty server.
Whenever a player connects or disconnects the script checks the amount of human players and the value of bots_manage_fill and sets it accordingly.
If the first player joins, it sets the dvar to the value you configured for that specific server (set in InitServersDvar() with the server port).
If the last player leaves it sets back the dvar to 0 so that no bots will be playing, saving some resources on that server."I modified as mentioned and it works, I see the number of bots I insert in level.manage_bots_fill["27017"] = "12";
as soon as I enter I find a total of 12 players (including me and the bots).
How can I insert logic that allows me to add bots based on the number of "humans" present on the server? my idea is to insert bots when there are few real players (like 4-5) and automatically eliminate them when other people connect. How can I do?
-
TheBigAndry change the content of the
HasHumanPlayers
function to something that checks for the amount insteadHasHumanPlayers() { humanPlayers = 0; foreach (player in level.players) { if (!player IsBot()) { humanPlayers++; } } if (humanPlayers >= 4) { return true; } else { return false; } }
-
Resxt I tried adding the code you provided but it doesn't work. The condition should be 4 or more real players. But as soon as I enter the server alone I already don't see the bots, how can I change?
-
TheBigAndry The code I sent adds bots if there are 4 or more human players, should work