bot_debug

A Tutorial for Counter-Strike: Source

Hey, you! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending ramjam18 points.
  • Post: Give ramjam18 your thoughts on this Tutorial.
  • Vote: Help ramjam18 win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

Updates

V2
  • Updated silencer attach condition
ramjam18 avatar
ramjam18 Offline
Member Joined 10mo
605 points Ranked 7349th
ramjam18
1mo

A Life Behind Silent Warriors

ramjam18 here, back at it again, and I'm here to introduce you to even more bot science in Counter-Strike.

I'll quickly demonstrate a few things about the bot_debug command -- the key to seeing what is going on in the bot's mind.
It's a cheat command, so be sure to set sv_cheats to 1.

Joining me today with this tutorial is my friend Cliffe!
Hey Cliffe, how're you doing!

Upload preview

As you can see, Cliffe here is feeling pretty good today and isn't up to anything special, so I thought, hey why not ask him. 

He will help us explain bots' behaviour and thoughts.

First, notice the new text elements after enabling bot_debug.
You can see them only when cam-following a bot (spectating in freecam will not show any info).

Upload preview

These instruments are the bot's "mind". Here you can read what the bot wants to do and how he feels.

Skill

In Counter-Strike Source, the Skill attribute at the top indicates the amount of aiming precision and a few other details.
Those details include:
  • If the skill is 25% or less, the bot will never use his knife to rush strategic points and will always wield a gun.
  • If the skill is less than 50%, the bot will almost only sprayfire.
  • If the skill is at least 71%, the bot will always attach a silencer to weapons with silencers.
  • If the skill is at least 81%, the bot will aim at the head if possible, instead of at the torso.
  • The lower the skill is, the longer it takes the bot to cease fire after his enemy is killed, regardless of reaction time.
  • Bots with lower skill are less likely to strafe when engaging enemies.

In Counter-Strike Global Offensive, thanks to an array of new variables, the Skill number no longer affects aiming precision.
On top of that, while the rest apply, the third and fourth bulletpoints from Source do not apply.

It should also be mentioned that bots with less than 50% skill will now perform spray control while spraying. This makes way for an effective exploit, since sprayfire behaviour can now be combined with precise aim.

State

What the bot is currently doing.

For example, when the bot is in Hunt state, he will check the map for enemies and hunt them down.
Or the bot may be in MoveTo state if he is on his way to a specific place, for example bringing hostages to the rescue zone, going to the bomb to defuse it, et cetera.

More states include Hide, Buy, Idle and others.

Task

What the bot's top priority is at the moment.

For example, the bot might consider FIND_TICKING_BOMB or DEFUSE_BOMB to be top priority.
Or he may think it's best to COLLECT_HOSTAGES.

Or sometimes, when he feels like sniping, he goes SNIPING. :-)

Disposition

The way by which the bot means to accomplish his Task.

When his disposition is ENGAGE_AND_INVESTIGATE, he will be actively looking for enemies.
If instead it is OPPORTUNITY_FIRE, he might likely be camping and will shoot any enemies on sight.
If it is IGNORE_ENEMIES,... well, he's running like a little sissy.

Morale

This one is important. The Morale represents the bot's mood. It changes based on how the bot performs and how the round ends.

The Morale can be one of following: NEUTRAL, POSITIVE, GOOD, EXCELLENT, NEGATIVE, BAD, TERRIBLE.

The following actions change the Morale:
  • Winning the round increases the bot's morale by +1
  • Losing the round decreases the bot's morale by -1
  • Dying decreases the bot's morale by -1
  • Killing enemies or tying rounds does not affect the morale

The Morale acts as a bonus/penalty to the bot's Aggression attribute. 

The higher the morale, the more confident the bot is: he is less likely to retreat from multiple enemies, he will more actively look for enemies and will hide less in general.
The lower the morale, the earlier a bot retreats and generally fears enemies.

For example, Cliffe is more concentrated when in EXCELLENT morale.


But if Cliffe's morale decreases to TERRIBLE, he will hide more and panic earlier.


This also affects bots in CS:GO. When winning more rounds, the bots will be more confident. As the bots in competitive games are on Easy though, they are more likely to face enemies and die earlier, losing their purpose as additional stock.


Additional info

Let's take a look at the lower screen.

Upload preview
Steady view is a Boolean that is either YES or NO

It is YES when the bot is done looking towards something and is now looking at it. This means the bot considers his aim "on point". This also applies when the skill value is not 100% and therefore the bot has an aim error.
It is NO when the bot does not consider his aim "on point".

Nearby friends counts the amount of teammates around the bot. It acts as an amplifier towards the bot's Aggression attribute.
He doesn't have to see his friends to know they're there, however, the line of sight should still not be obstructed by walls et cetera.
Nearby enemies counts seen enemies within the last few seconds. Note that the bot doesn't have to be near the enemies for them to be counted. Heard enemies don't count.
This counter acts as an amplifier towards the bot's cowardice.

(An equal amount of nearby friends and enemies does not influence the bot's Aggression attribute.)

Nav Area shows the nav area ID and place name in which the bot is at the moment.

However, that's not all of the information.

Upload preview
The bot will also indicate panic moments. When PANIC appears, the bot knows he is being attacked, but doesn't know from where. He will wildly aim around until he finds his enemy.

When ALERT appears, the bot is more aware of his surroundings and therefore will react faster, even when his enemy isn't moving.



This is very important, especially in CS:GO competitive matches. Once the bot is ALERT, he is aware of his enemy and will fire at him on sight, depending on his reaction time.
Additionally, if the bot is blinded, ALERT will be overlapped by <<<BLIND>>>.

There is also another mechanic called SafeTime. It's a number in seconds and milliseconds in which the bot considers himself safe from enemies. During that time, the bot will rush with his knife, if his skill is at least 26%.
Upload preview
At the start of a match, however, this is an arbitrarily large number and it must be calibrated by initial encounters with enemies. 
That means that the earlier the bot sees the enemy in any round, the shorter SafeTime will be. The shortest recorded SafeTime will be utilised.

Bots will not only react to what they see, they will also react to what they hear. 

If the bot hears the enemy without seeing him, he will pinpoint his location and will accordingly aim towards the spot. This is marked by a yellow arrow.

This is a very interesting feature. Even more when the bot hears someone walking on the bombsite, trying to hide... the bot will still be aware.

There are many more informations that bot_debug shows us about these mythical creatures. They're full with thoughts. You can read them on the screen or in the console.

PS: Using bot_traceview 1 will show you where the bot is headed.


Understanding bots and their ways is a very interesting opportunity. They are continuously disowned by most human players... not knowing that those have only yet met the tip of the iceberg.

I'm trying to spread awareness of the capabilities that bots in Counter-Strike have not yet had the chance to unfold. They can be more efficient than just placeholders... if understood correctly.

I've made custom bots for CS:GO, better than the original bots.
Want a .rar? PM me!


PS: Here's some trivia -- the bot putting on silencers (in Source) is also dependent on the first letter of their name. I'm not kidding, try it out! 
Alternating: [A] Silencer, [B] No silencer, [C] Silencer, and so on.

Posts

  • 1mo
    Rockett Sally avatar
    Rockett Sally avatar Offline
    CS:GO Ports Flag Affiliation: CS:GO Ports
    Member Joined 6y
    338 points Ranked 11956th
    11 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    Rockett Sally avatar
    Rockett Sally
    CS:GO Ports Flag
    CS:GO Ports
    Everyone despises one of the best features ever implemented to games: BOTS.

    Think of it. How many of these current multiplayer-oriented games (not exactly only-MP) will stand the time and survive through years and years to come without suffering a major hit on its player base?

    BOTS are a worthy (and... expensive) feature that ensures a higher life-span of the game. It gives players a way for them to train, relax from the chaotic (and sometimes, toxic) multiplayer environment and, of course, when the players leave the current game and move to another one, you can still have a feeling of how was to play it back in the days because of BOTs.

    Unreal Tournament, Quake, Perfect Dark, GoldenEye 007, ArmA, Operation Flashpoint, Counter-Strike, Team Fortress 2, Battlefield 1942 and 2 (believe it or not) and the list goes on...

    These game can be played with BOTs and you'll have a blast with them, even though they'll never replicate how humans really play.

    Of course, because it became so "cheap" to host online games, devs actually started to use their resources to make a better online-environment and gameplay rather than programming BOTs (which IS really difficult). And suddenly, what back in the days of Arena Shooters it was an embedded feature to any game, it disappeared...

    And the only "MAINSTREAM" game that still supports it... it's Call Of Duty. CoD, since Black Ops 1 (skip MW3) had a bot system that wasn't "hyper-fantastic" like CS Bots but got the job done (I've probably spent more time on Combat Training that the actual MP) and got better and better after each game. Even the "Space-Odyssey" Infinite Warfare had those.

    I understand that, suddenly, putting bots onto every game is not a current industry business model, but in 10 years, if you wonder how was to play Rainbow Six: Siege? You'll have to resort to YouTube for that. (R6S Single-Player mode is just bare-bones, don't count on that)

    More about the relevance of bots, find here:



    HUGE PROPS TO THE ARCTICLE! I, TOO, AM A BOT-LOVER!

    9/10

    • Win x 1
    REBORN! ("gamebit257"
  • 4mo
    For some reason, every time I read "Or sometimes, when he feels like sniping, he goes SNIPING. :-)" It makes me smile.

    Anyway, this is a good tutorial. It made me think differently about bots. Thank you!

    9/10

    Lady in Black
  • 4mo
    Micro-Storm avatar
    Micro-Storm avatar Paused
    Complicated Inc. Flag Affiliation: Complicated Inc.
    Member Joined 6mo
    326 points Ranked 12327th
    10 medals 1 rare
    • Submitted 20 Maps Medal icon
    • Submitted 5 Maps Medal icon
    • Became a Studio Leader Medal icon
    • Thanked 5 submitters Medal icon
    • Submitted 1 Tool Medal icon
    • One month a member Medal icon
    Micro-Storm avatar
    Micro-Storm
    Complicated Inc. Flag
    Complicated Inc.
    I miss this command! Thanks for the tutorials!

    10/10

    Are you sure it was perfect? avatar
    Mantra
    Are you sure it was perfect?

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Author
ramjam18
ramjam18 Offline
Member Joined 10mo
605 points Ranked 7349th
Writing and images
Special Thanks
3kliksphilip
Member Joined 9y
4,959 points Ranked 936th
9 medals 2 legendary 2 rare
  • 1st Place - Red Planet Mapping Contest Medal icon
  • Reached 100 subscribers Medal icon
  • 3rd Place - Winter Wonderland Mapping Contest Medal icon
  • Reached 50 subscribers Medal icon
  • Mapper of the Month, September 2012 Medal icon
  • MiPper of the Month, December 2012 Medal icon
The YouTuber

Submitter

ramjam18 avatar
ramjam18 Offline
Member Joined 10mo
605 points Ranked 7349th

ramjam18
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Details

Difficulty Level
Beginner Difficulty

Attributes

Miscellaneous
AI

Stats

Posts
4
Views
1,369
Date Added
4mo
Date Modified
1mo
Date Updated
1mo

Scores

84 bScore
9.4 Rating

5 voters

Sign up to access this!

More from Submitter

bcp.crwdcntrl.net tracking pixel