How to Host a Bot

  • Moderators Admin

    Anyone that can host a room in the lobby is able to host a bot. If we had more hosts that donated a few bots to triplea the overhead of triplea would be decreased greatly. (Less servers would be needed)

    This is an example of a bot script which can be edited using notepad but needs to be saved as a .bat file in your triplea installation directory in windows.
    You can name the .bat file what you wish and the bot number needs to be something other than the current triplea bot numbers. Slap me if any need some help. Or Slap @RoiEX Hopefully we will get some bot host volunteers 🙂

    @echo off
    SET PORT=3350
    java -Xmx320m -Djava.awt.headless=true -classpath bin/triplea- games.strategy.engine.framework.headlessGameServer.HeadlessGameServer -Ptriplea.server=true -Ptriplea.port=%PORT% -Ptriplea.lobby.port=%LOBBY_PORT%"automated_host"

  • Moderators Admin

    Also the set port number is the port you have opened should be noted.

  • Still confused as to exactly how this works. So do I need to set this up just to have an AI at all in my game????

  • Moderators Admin

    @storm-gav No. If you can host you can use the AI live in the lobby. Otherwise you can use the AI offline vs yourself or others using PBEM. This is only if you wish to host a bot in lobby for others to use. Example (the lobby bots that triplea hosts for everyone).

  • @prastle I'm curious about this thread. I have posted on another thread that I can host a game on the lobby. Therefore if I can host, am I able to host a bot, and if so, does that mean I need to have my PC on all the time to host? I'm rather unfamilair with this concept.

  • Moderators Admin

    @scousemart Yes if you wanted to host a bot or bots pc would have to stay on.

  • Moderators Admin

    @scousemart Well done! Hopefully more in the lobby will learn to host bots and we can close a server or two. Great job!

  • Hosting bots is not as difficult as it sounds. If I can do it, then I’m sure most people here can too. If you can Host a game on the Lobby, then you are almost there. Just needs a few tweaks to your router, a .bat file, a bit of patience and possible some help from a friendly Mod!
    First you need to update your router settings and open more ports. You should already have port 3300 open. I opened 6 in all, 3300 to 3305 (one for your own Hosting and 5 for the Bots). There is a freeware program you can use: Simple Port Forwarding (see here ), which can help with the task. Follow the program instructions and open the required ports.
    Once you’ve opened the ports, you need to download the latest Beta(Pre-Release) version of TripleA. This is located here . This can be installed in a different folder from your stable TripleA. It's is recommended that you keep the stable version for testing purposes between the two versions of TripleA. I used the version. It is in this new folder that the .bat files must be inserted.
    Next is to create a .bat file. Using the attached .txt file as an example, edit the following asterisked sections:

    SET PORT= **** (the number of the port)
    SET BOT_NUMBER= *** (the number to identify the bot on the lobby, your choice)
    .name=Bot%BOT_NUMBER%_ ***** (letters and/or numbers to identify the bot on the lobby, your choice. Mine is DKMart1)
    .hostedBy= Bot%BOT_NUMBER%_***** (letters and/or numbers to identify the bot on the lobby, your choice. Mine is DKMart1)
    .supportEmail=************** (your email so Mods know where to find you… )

    Once you’ve finished editing, save the file with the .bat extension. You can call the file anything you wish (in my case DKMart1_bot_1.bat).

    Repeat for the number of bots you wish to create.

    Remember, SET PORT= must be different for each .bat file and correspond to the ports you have opened on your router!
    Place the .bat files in the TripleA folder. If all goes to plan, when you click on the .bat file a command prompt window will open and attempt to load the bot to the server lobby. Open TripleA as usual (not the version), go to the lobby and marvel at the wonder of your work.
    Any problems contact a Mod (@prastle). He’ll sort you out! LOL


Log in to reply

Visitors Today