Fixes for common problems (A16 and 17)

Updated: 23 June 2019


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_A174.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.

NOTE: CSMM Patrons mod is not supported by the bot due to Prisma's exclusive license restrictions, but you can use it on your server.  You will probably have command clashes between the bot and the mod.  You can tell the bot to use a different command prefix so that the bot and mod no longer clash. You can use any symbol for the bot's command prefix except for \ which is an escape character in Lua.  If you wanted to use ! instead of /, in-game you can tell the bot /set command prefix !   From IRC type command prefix !   The bot will inform everyone in-game about the change.

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.


Problem: The bot does not respond at all to commands or any chat on IRC.
There are several possible reasons for this with easy fixes. Your bot will have a name on IRC (the default is Bot).  It is coded to not respond to itself on IRC to triggering on commands from the help.  If you give yourself the same IRC nickname as your bot, you will not be able to talk to the bot from IRC at all.  Call your bot something else.

You can also try restarting your bot.  You may be able to command it ingame.  The command is /restart bot.  If I am hosting your bot, you can also message me for help.  The bot can and does automatically fix itself and even restart itself but those actions don't always happen quickly.

Another possible cause is you don't yet have a player record with the bot.  If the bot is very new on your server, you usually need to join your server once with the bot present for it to create a player record for you in its database.  The bot uses that player record to control and manage many things and not having a player record yet is going to cause the bot to ignore most commands you give it..


Problem:  The shop does not give items or only some items.

This usually means the item names that the bot has in its shop do not match valid item names in the server.  To fix it you can use the in-game command /fix shop.  From IRC type cmd /fix shop.
The bot will take up to a few minutes to complete the task as will become unresponsive until it is finished.  The bot reads all the known item names from the server and validates the shop items, automatically correcting item names where possible and removing all item names that are unknown to the server.


Problem: The bot is banning players for teleporting but they are not doing anything wrong.
This can happen when the bot is new to the server (but very rarely).  If an admin does a map teleport and the bot isn't aware that they are an admin, it will ban them.  It can also happen if a mod does not report teleport commands to the server log.  It could also be possible that a coding error in the bot is preventing it from properly processing teleport commands that it sees in the server data.  The part of the bot that usually does the ban is the bot's hacker teleport detection system.  You can disable it with /disable hacker tp detection.  Also report the issue to me so I can investigate and fix it.