How to Host a Bot
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 SET BOT_NUMBER=25 SET LOBBY_HOST=22.214.171.124 SET LOBBY_PORT=3304 java -Xmx320m -Djava.awt.headless=true -classpath bin/triplea-126.96.36.199.8941-all.jar games.strategy.engine.framework.headlessGameServer.HeadlessGameServer -Ptriplea.game.host.console=false -Ptriplea.game= -Ptriplea.server=true -Ptriplea.port=%PORT% -Ptriplea.lobby.host=%LOBBY_HOST% -Ptriplea.lobby.port=%LOBBY_PORT% -Ptriplea.name=Bot%BOT_NUMBER%_Pras1 -Ptriplea.lobby.game.hostedBy=Bot%BOT_NUMBER%_Pras1 -Ptriplea.lobby.game.supportEmailemail@example.com -Ptriplea.lobby.game.comments="automated_host" -Ptriplea.lobby.game.reconnection=172800 pause
Also the set port number is the port you have opened should be noted.
Storm Gav last edited by
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????
@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).
scousemart last edited by scousemart
@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.
@scousemart Yes if you wanted to host a bot or bots pc would have to stay on.
@scousemart Well done! Hopefully more in the lobby will learn to host bots and we can close a server or two. Great job!
scousemart last edited by
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 http://www.simpleportforwarding.com/download ), 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 https://github.com/triplea-game/triplea/releases/ . 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 188.8.131.52.10245 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 184.108.40.206.10245 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 220.127.116.11.10245 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