Looking for a way to always have 2 bots on a server

Discussions about Servers
Post Reply
Inpu
Novice
Posts: 12
Joined: Thu Apr 04, 2024 1:10 pm

Looking for a way to always have 2 bots on a server

Post by Inpu »

Hello there!

I'm looking for a way to always have 2 bots on a server, no more, no less, no matter the number of real player joining the game.

I understand that for the bots to spawn, a player must at least start the match (unless there's a workaround !), but when he leaves, the bots stays (and if I set no time/frag limit, it'll stay that way)

I've tried playing around with the "MinPlayers" variabies, and also removing bots on the User.ini file (to only have two max), no luck.

I guess i could write a Mutator that increase the "MinPlayers" variable everytime a player join (and decrease it when a player leave) so I'd always have 2 bot, but I was wondering if there was an easier way (I'm not even sure that's possible)

Thanks !   
Auto merged new post submitted 1 hour 1 minute later
I think I've got it with a custom Mutator, I'm playing around with "ForceAddBot" and I'm getting great results
Eternity
Skilled
Posts: 173
Joined: Sat Nov 30, 2019 10:56 pm

Re: Looking for a way to always have 2 bots on a server

Post by Eternity »

I had to modify a GameType functions to have a constant bots count always. This was the most quick and simple way.
Maybe there is some way to do this by a Mutator too, but, definitely it won't be that simple...
User avatar
EvilGrins
Godlike
Posts: 9766
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Looking for a way to always have 2 bots on a server

Post by EvilGrins »

There's always ZenCoder's method, but it's on a map to map basis.

Directly editing bots into a map: https://unreal-games.livejournal.com/159371.html

That way no matter what happens, the map has bots there already.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
Inpu
Novice
Posts: 12
Joined: Thu Apr 04, 2024 1:10 pm

Re: Looking for a way to always have 2 bots on a server

Post by Inpu »

Thanks ! I finally got it with a custom mutator =)
EntraVenuS
Novice
Posts: 5
Joined: Sat Apr 06, 2024 5:12 pm

Re: Looking for a way to always have 2 bots on a server

Post by EntraVenuS »

Inpu wrote: Fri Apr 05, 2024 5:53 am Thanks ! I finally got it with a custom mutator =)
would you care to share what you used as I would be interested in something like this
Inpu
Novice
Posts: 12
Joined: Thu Apr 04, 2024 1:10 pm

Re: Looking for a way to always have 2 bots on a server

Post by Inpu »

EntraVenuS wrote: Sat Apr 20, 2024 10:43 am
Inpu wrote: Fri Apr 05, 2024 5:53 am Thanks ! I finally got it with a custom mutator =)
would you care to share what you used as I would be interested in something like this
Sure, it's on the Timer function :

Code: Select all

function Timer()
{

    if (DeathMatchPlus(Level.Game).NumBots == 0 )
    {

       Level.Game.ForceAddBot();
       Level.Game.ForceAddBot();
    }

     if (DeathMatchPlus(Level.Game).NumBots == 1 )
       {
           Level.Game.ForceAddBot();
        }
  }
Post Reply