Care And Feeding Of Your Bot

Fixes for common problems (A16 and 17)

Updated: 19 December 2018


Notes on bot versions:
For both A17 and A16 there is a code branch called a17. It should work for both A16 and A17 but expect issues as I am still working through bug reports, fixing up command support, the changes to item names etc etc. These should mostly be sorted by the weekend.

For A16 and older you can use the code branch called stable. There is also a much older code branch called oldstable (missing many bug fixes).

You can command your bot to switch to any code branch at any time. They are designed to be 100% forward and backwards compatible. Even in the event that they aren't, you can still command your bot to use another branch or contact me for assistance.

To switch to the stable branch from ingame type /set update branch stable. For A17 replace stable with a17.
If you encounter bugs, your best bet is to report them to me.


Problem:  Bot was working but after a wipe it has not come back on.
You should check for updates to Allocs mod and the BC mod and any other mods you use to make sure your versions are the latest for your server (A16 or A17).  Be careful not to install A17 mods if your server is on A16 as those will not be compatible with your server.  You can monitor the official web pages or grab a zip from me which I maintain and is updated regularly.

For Allocs mod keep an eye on this page..  https://7dtd.illy.bz/wiki/Server%20fixes  For BC mod keep an eye on this page..  https://github.com/7days2mod/BadCompanySM/releases
Or you can grab my zip file http://botman.nz/Botman_Mods_A17.zip  (for A17)  or http://botman.nz/Botman_Mods.zip (for A16).

If your bot is not accepting commands in-game and the mods are current, there are 2 common problems which I will work on fixing today.  First the bot doesn't always read the version command in a timely manner and can think that you have no mods installed.  You can fix that by telling the bot reload bot (no / needed and works from IRC too).  If your server's API port has changed and the bot is using the API, you can tell the bot, use telnet (no / needed and works from IRC too).  In this case you will need to switch to telnet first, then tell the bot to reload bot as it won't be able to re-read version etc if it can't get a response from the API while in API mode.  Ideally your bot should be using the API as it is more efficient than using telnet.  Look up your server's control panel port in your server config (found directly above the telnet port info) and assuming it is the default 8080 tell the bot use api port 8080 (may need a / in-game).  You can check that you got it right on IRC by typing server.  You will see info about your server including a URL to the map.  Click on that.  If you get the map, you set the correct port.  Note that you will only have the map (and API) if you have installed Allocs web map.  If you have removed that for any reason, you won't have the map or his API installed.  Assuming the map is working, you can now tell the bot use api.  Currently there is a minor bug with the bot switching to the API which I will fix today.  In the meantime you need to wait about 30 seconds, then type use telnet,  then type use api (again).  The 2nd time through you should see the bot report that it is using the API.  You can test that it is working in-game by trying any / command (don't just talk to the bot) or from IRC by typing say testing..

Problem: Bot is connected but not talking or won't accept commands.
Assumptions: Mods are installed correctly. You at least have Allocs mod installed.
Appies to: All bot versions and A17 and older.

Command: reload bot
Works in: IRC and in-game (all bot versions)

Either from in-game or from IRC (the current web client) type reload bot. Give it about 30 seconds to do its thing then see if the bot is responding to in-game commands.

If that doesn't fix it and your bot is at least connected to your server you can type restart bot (note: this might not work for self-hosters but you guys can restart it directly).

Check that your bot has the latest bot update..
From in-game or IRC type update code

If bot command are clashing with another mod (CBSM, CSMM, Server Tools all have clashes) you can command your bot to use a different comand prefix. The default uses /. The bot will detect CBSM and automatically switch from / to !. Some mods even use ! so you can force the bot to use something else by typing /set command prefix # (to use #). From irc just type command prefix #.


Problem: Nothing works.
Appies to: All bot versions and A17 and older.

Check that you have mods installed. Join your server and open the console (press F1), type version. If you only see the game version mentioned, you are missing the mods or they are simply not in the correct location on your server. They should be in a folder called Mods that on Windows lives in the main (top) folder of your server.
If you do see the mods listed, type help (in the console). You should see a lot more commands than the server normally comes with. You can test a few specific ones. type pm and press enter. If it doesn't know that command, you are missing Alloc's mod. Type bc-time. If it doesn't know that one, you are missing the BC mod. Type cpm-help. If it doesn't know that command, you are missing the CSMM Patrons mod. Type pgd. If it doesn't know that command, you are missing Coppi's mod.

NOTE: CSMM Patrons mod and Coppis mod are versions of the same mod. DO NOT install them both at the same time as they clash. Also if you have mixed them up, after deleting one, look in your saves folder for a file called CoppisPeristentData.bin These bin files regenerate when you next start the server if you have their mod installed. Deleting that bin will ensure that it is correct for the version of the mod that you have left.

Check that your server's telnet is enabled and that the bot is connected to it.
From IRC (not ingame) you can update the connection info your bot is using by typing set server ip 1.2.3.4 port 1234 pass gas (but with the correct values. Note that port is the telnet port).

Check that external connections can connect to your server's telnet. Use a program such as Putty (which is awesome) and try to connect to your server's IP and telnet port. Set the connection type to raw before you click on the button marked 'Open'. If you get a login prompt you are good to go. Note: You should do this test from outside of the local network where your server resides.

Try restarting your server.


Problem: The bot doesn't talk ingame but on IRC it is working perfectly and you can see it responding to chat.
This happens if your bot is using Allocs web API and you have told your bot to connect to a new server, but the new server uses a different API port number.

To fix this type use telnet. You may need to type that from IRC rather than ingame. That will get your bot working again but now it isn't using the API. Look in your server config for the control panel port (usually directly above the telnet info). Tell the bot /set web panel port 1234 (but give it the real port number from the config). Next tell the bot /use api. There is currently a minor bug where the bot will say that it failed to use the API. Restart the bot. Now repeat the command /use api. It should work this time. If it doesn't you probably gave it the wrong port.