thebigsleepjoe / TTT-Bots-2

Player bots for Garry's Mod TTT
Creative Commons Attribution Share Alike 4.0 International
11 stars 4 forks source link

[FEATURE] Improve Traitor Behavior #54

Open DaBassman1 opened 6 months ago

DaBassman1 commented 6 months ago

My idea (what is caused by what, etc.)

Essentially, there are now 3 types of traitors; Overt Traitors, Covert Traitors, and Suicide Traitors. Overt Traitors act like the current traitors, just attacking whoever whenever and wherever, Covert Traitors tend to do things more stealthily by killing when no one is around, planting bombs more secretly, and being more stealthy overall, and Suicide Traitors can run towards crowds with ither C4 or a grenade.

Purpose/motivation

To add more variety to traitor tactics. Right now they only plant c4 and kill. They don't really think, they just kill. That's what i want to change.

How would you add this feature? (optional)

Although I'm not a programmer, i have some ideas on how to implement some ideas. For example, the Covert Traitors could check if they are able to be seen using some ray cast vision to check if they are within the "vision cone" of another bot, the Suicide Traitors could be able to check the density of certain areas using the navmesh (within a acceptable radius, perhaps).

Additional context

For example, there's a map with a large lobby with 4 people in it, a subway with 2 people in it, and a room with no one in it. A Overt Traitor would attack anyone regardless of their location. A Covert Traitor would try to somehow convince one of the people in the subway to go to the room and kill them, and a suicide traitor would run into the lobby with a C4 and blow everyone up. Also some other ideas; the ability to be killed while chatting (I've felt the "last words" thing on the corpse ui never was used enough), add voice chat, and add random playermodels. Hope you can find a way to code all this.

thebigsleepjoe commented 6 months ago

So there is already a system for this in place, it is just clunky. Traitor bots follow what's called the "plan coordinator" to accomplish semi-coordinated plans. The issue is that there is another system in place to prevent stalling rounds which causes traitors to eventually just open fire on nearby targets. They're much less likely to start shooting in crowded areas--but due to the crowding nature of the bots (+some real players), this ends up happening often anyway. So this anti-stalling system ends up dictating most traitor bots behavior.

I intend to overhaul T-behavior dramatically, since I'm unhappy with its current state. I'll likely end up using a system similar to what you're describing, based mainly on difficulty and bot personality.

This will be a sizable code overhaul, so it likely won't be a v1.3 thing (the current dev version). But it'll happen soon-ish.

DaBassman1 commented 6 months ago

Good. Possibly VC for bots? Also, i'm open to discuss any other ideas for that main idea. Plus, more gadgets that the bots will use?

thebigsleepjoe commented 5 months ago

All of that will be in the works with time. Voice chat, in particular, is something I've wanted to do for a while. I won't make any promises, but I have some ideas for getting it working.