Open arthurgeron opened 4 years ago
I can't find anything meaningful at line 1226 in my version of ZS, but i assume you added that to function GM:CalculateNextBoss()
. If so, then it should be ok.
D3bot isn't blocking bots from becoming bosses, but with too few players bosses may be disabled. And depending on the version of ZS you are using, bots don't add to the total player count.
I assume you just need to tweak the GM.BossZombiePlayersRequired
value in gamemode/sh_globals.lua
(or gamemode/shared/sh_globals.lua
).
Just tested it here. It works fine when i add your snippet to GM:CalculateNextBoss()
:
function GM:CalculateNextBoss()
local livingbosses = 0
local zombies = {}
for _, ent in pairs(team.GetPlayers(TEAM_UNDEAD)) do
if ent:GetZombieClassTable().Boss and ent:Alive() then
livingbosses = livingbosses + 1
if livingbosses >= 3 then return end
else
if ent:GetInfo("zs_nobosspick") == "0" then
table.insert(zombies, ent)
end
end
end
if #zombies == 0 then
for _, ent in pairs(D3bot.GetBots()) do
if ent:Team() == TEAM_UNDEAD and not ent:GetZombieClassTable().Boss then
table.insert(zombies, ent)
end
end
end
table.sort(zombies, BossZombieSort)
local newboss = zombies[1]
local newbossclass = ""
if newboss and newboss:IsValid() then newbossclass = GAMEMODE.ZombieClasses[newboss:GetBossZombieIndex()].Name end
net.Start("zs_nextboss")
net.WriteEntity(newboss)
net.WriteString(newbossclass)
net.Broadcast()
return newboss
end
So it must be something in your gamemode.
I've set my zombiesurvival to select bots as possible bosses when there are no playerbosses available, on
gamemode/init.lua:1226
I've added the following lines:But I think somehow D3BOT is forcing zombies to not spawn as bosses, even if the gamemode has set them to be, what could I possibily change or did I do something wrong?
Thank you for your time :)