Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. MW3 Modding Support & Discussion
  3. How can I install bots on my server?

How can I install bots on my server?

Scheduled Pinned Locked Moved MW3 Modding Support & Discussion
7 Posts 2 Posters 190 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheBigAndryundefined Offline
    TheBigAndryundefined Offline
    TheBigAndry
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • Resxtundefined Offline
      Resxtundefined Offline
      Resxt Plutonium Staff
      wrote on last edited by Resxt
      #2

      https://github.com/Resxt/Plutonium-IW5-Scripts/tree/main/small_scripts#manage_bots_fillgsc
      https://github.com/Resxt/Plutonium-IW5-Scripts/blob/main/small_scripts/manage_bots_fill.gsc

      Bots here
      https://github.com/ineedbots/t6_bot_warfare

      1 Reply Last reply
      0
      • TheBigAndryundefined Offline
        TheBigAndryundefined Offline
        TheBigAndry
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        • TheBigAndryundefined Offline
          TheBigAndryundefined Offline
          TheBigAndry
          wrote on last edited by
          #4

          "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?

          Resxtundefined 1 Reply Last reply
          0
          • Resxtundefined Offline
            Resxtundefined Offline
            Resxt Plutonium Staff
            replied to TheBigAndry on last edited by
            #5

            TheBigAndry change the content of the HasHumanPlayers function to something that checks for the amount instead

            HasHumanPlayers()
            {
                humanPlayers = 0;
            
                foreach (player in level.players)
                {
                    if (!player IsBot())
                    {
                        humanPlayers++;
                    }
                }
            
                if (humanPlayers >= 4)
                {
                      return true;
                }
                else
                {
                     return false;
                }
            }
            
            TheBigAndryundefined 1 Reply Last reply
            0
            • TheBigAndryundefined Offline
              TheBigAndryundefined Offline
              TheBigAndry
              replied to Resxt on last edited by
              #6

              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?

              Resxtundefined 1 Reply Last reply
              0
              • Resxtundefined Offline
                Resxtundefined Offline
                Resxt Plutonium Staff
                replied to TheBigAndry on last edited by
                #7

                TheBigAndry The code I sent adds bots if there are 4 or more human players, should work

                1 Reply Last reply
                0

                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Donate