How to play with bots ?

Topic created · 5 Posts · 87 Views
  • Hello,

    I tried several commands to make the bots appears in my server but nothing works.

    I have tried this :

    seta scr_bot_difficulty "normal"
    seta scr_bots_managed_all "19"
    seta scr_bots_managed_spawn "19"

    and this :

    set scr_bot_difficulty "normal"
    set scr_bots_managed_all "19"
    set scr_bots_managed_spawn "19"

    Can i have some help please ? Thanks a lot.

  • Put the maps folder of Bot Warfare in %localappdata%\Plutonium\storage\t5 then set the dvar bots_manage_fill to 12 or whatever
    https://github.com/ineedbots/bo1_bot_warfare/releases

  • @Daishinkan96 Like @Resxt said, take the maps folder from bot warfare but I have an addon for you to try with it, this goes in %localappdata%\Plutonium\storage\t5\scripts\mp

    #include maps\mp\_utility;
    #include common_scripts\utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
        thread manageBots();
        level thread onPlayerConnect();
    
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connected", player);
    
            if(!player is_bot())
    	{
    		//kick a bot everytime a real player joins the server
            	player kickBot();
            }
        }
    }
    
    
    manageBots()
    {
        level endon("game_ended");
    
        print(va("*****Manage Bots FFA Func Started*****"));
        
        CHECK_INTERVAL = 2;
        BOT_MAX = 12;
        BOT_MIN = 2;
        PLAYERS_LIMIT = 16;
        
        for(;;){    
            botsCount = countBots();
        
            if( (level.players.size > PLAYERS_LIMIT && botsCount > BOT_MIN) || botsCount > BOT_MAX)
            kickBot2();
            else if( (level.players.size < PLAYERS_LIMIT && botsCount < BOT_MAX) || botsCount < BOT_MIN)
            setdvar("bots_manage_add", 1);
    
            wait CHECK_INTERVAL;
        }
    }
    
    countBots(){
        botsCount = 0;
    
        for ( i = 0; i < level.players.size; i++ ) {
            if(level.players[i] is_bot())
                botsCount++;
        }
    
        return botsCount;
    }
    
    
    kickBot()
    {
        players = level.players;
        for ( i = 0; i < players.size; i++ )
        {
            player = players[i];
            if(player is_bot())
            {
            kick(player getEntityNumber(),"EXE_PLAYERKICKED");
            break;
            }
        }
        wait .5;
    }
    
    kickBot2(){
        players = level.players;
        for ( i = 0; i < players.size; i++ )
        {
            player = players[i];
            if(player is_bot() && !player isHost())
                return kick(player getEntityNumber());
        }
    }
    
    
  • @Quikkster you should explain what it does, not everyone can read scripts.

    Also it looks like something you could do with bots_manage_fill "12" and bots_manage_fill_kick "1"
    https://github.com/ineedbots/bo1_bot_warfare#dvars

  • @Resxt true true

Log in to reply