[TTT] The Bot Project

http://images.akamai.steamusercontent.com/ugc/35219203296703861/2A9F9087C99DA7AF2A9B2F8C97B8D7FAA7D1FA7A/

Information:
The TTT Bot Project is an attempt at creating AI players for Trouble in Terrorist Town to make the game seem a little more lively at low player counts. They are not intended to replace players and are “passive” entities which means unless they are a Traitor, they will only defend themselves. TTT is complex as it requires a lot of critical thinking, which is hard enough for the majority of players, so these bots will end up being pretty stupid. Honestly my AI and pathfinding work is sub-par at best and I’m hoping that by making this addon public, it can gain some more attention and more knowledgeable people can contribute. I try to comment my code pretty well so hopefully you can navigate your way through my codebase. Also you can NOT artificially boost your player count with these, Garry’s Mod and Gametracker both know they are bots.

Gameplay:
Innocent: - These bots will wander around the map and try to pick up weapons to eventually defend themselves. They will not attack you unless you attack them first so you don’t need to worry about RDM.
Traitor: - They will wander the map for a short period of time to find weapons and then will begin targeting and attacking players they encounter.
Detective: - They will buy a health station and drop it then suicide so the Innocents are not at a huge disadvantage

Commands:
!KickBots in chat will start a RTV-esque vote to kick all AI players from the game until the next map.

Issues:

  • Any addon you have that uses voting systems will be slightly broken because of these bots. The solution to that is to go into the code and find all occurences of player.GetAll() and replace it with player.GetHumans() because bots can’t vote. #botsrights

Old video of the Lite bots in a match.

Download
Regular - https://github.com/Exho1/TTT-Bots
*The standard, newer bots that use gm_navigation’s pathfinding to find their way around the map. Comes with the dev map I made for testing the bots on *
Lite - https://github.com/Exho1/TTT-Bots-Lite
The older bots that move around the map by looking at a point and walking towards it. These guys are very stupid but as a result the load on the server is a lot lighter so its uses are expanded.

Looks good man. Cannot wait to see other servers use this!

Why not detour player.GetAll() and make it not return bots? :v:

Why make things harder than they need to be?

Welp, I did feel proud when I showed you my TTT Bots. Now that feeling is gone after seeing yours.

Nice job :stuck_out_tongue:

Because I need player.GetAll to return bots for every other thing in Garry’s Mod?

[editline]11th September 2015[/editline]

You should feel proud, your bots were off to a great start based off what I saw. They probably are smarter than mine

Great release, Exho!
Lets hope some more people pick this up and one day we may have gmod bots that are competent!
Also, the skybox on ttt_bottest seems to be broken for me, is this happening for anyone else?

Oops… Forgot I used a custom skybox and didn’t pakrat it

Damn, looks like there’s lots of potential in this project/concept, Good job man

i’m using this, thanks heaps

[editline]28th September 2015[/editline]

sigh nevermind it’s windows only

its only windows only until you replace capital letters with lowercase letters in the addon folder name
ie. change the folder name to ttt-bots instead of TTT-Bots

Uh no? The pathfinding module gm_navigation that the regular bots use is Windows only

Amazing job so far, can’t wait to see the final product!

oh derp, didnt see a module when i downloaded it XD

Is there a reason you choose not to use nextbot? Not trying to diss, just curious.

I originally attempted to use Nextbots but ran into problems with giving a nextbot all the traits and functions of a Player so TTT would treat it as one. You might think its as easy as copying the metatable but its a pain in the ass and I gave up as soon as a new method was introduced to me.

Hey exho, sorry to bother you however i been trying to install this on my ttt server for quite a while. I have added the map to maps. the lua to addons (in a folder) and the gm_navigator to lua/bin both client and server.

The problem:

the bots still spaz out like hell and get stuck on walls 24/7.
Please note that if you hit the bots from front only then they will follow you and kill you.
Also sometimes even though they have guns they like to use crowbar only?

Any recent updates? :slight_smile:

Question: I want to see how many players my server can hold. Would this be a viable solution to test and see how many players/bots can lag my server?

I don’t understand what to move where. I have the gm_navigation module. I found the DLL. I do not have an existing “\garrysmod\lua\bin” folder. When I was reading the http://forum.facepunch.com/showthread.php?t=953805, I didn’t find a clear answer. Could someone help me with this? Thanks.