Raised This Month: $ Target: $400

Automatic Bot Names

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Junior Member
Join Date: Jan 2010
Plugin ID:
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Gives automatic names to bots on creation.
    Old 01-13-2010 , 18:06   Automatic Bot Names
    Reply With Quote #1

    This is a simple plugin to give names to bots when they are created. I wrote it and tested it under TF2, but it should work fine with other games.

    (edit: this mod definitely doesn't work on Left 4 Dead (2) servers, for reasons that I have not yet discovered. Apparently, it also crashes INS servers, but I'm currently looking in to that.)

    I wrote this plugin because the names for the new bots for TF2 KOTH are hardcoded into the game, and I don't think that's very cool. This plugin reads bot names from a file, and gives every new bot an appropriate name.

    Update (version 1.1):
    If you're having issues with the auto-fill bots recently added to TF2 not getting names, see this post for the (not anymore) latest version.

    Update (version 1.2):
    I just added support for loading bot names from a database table rather than from a text file. If that's your thing, see this post for the (not anymore) latest version.

    Update (version 1.2.1):
    This small change to version 1.2 adds a few bug fixes, and more advanced options for database name loading. See this post for the (not anymore) latest version.

    (!!!) Update (version 1.3.0):
    This update incorporates a 3 patches from contributors and consolidates them into one place. See this post for the latest version.

    Most Recent Documentation
    and most recent releases

    Updating this post for each new version has become a hassle, so I'll just say that the most recent documentation and stable source can always be found here. I'll probably still announce new releases here, though.

    About botnames.txt

    botnames.txt should be at {sourcemod}/configs/botnames.txt (so, for me, it's in valve/orangebox/tf/addons/sourcemod/configs/botnames.txt). It's a simple text file, with one name per line, and some basic comments. Anything on a line after a '#' or '//' is ignored, and blank lines are also ignored. Excessive whitespace is also trimmed off the ends.

    I've included a generic botnames.txt here, with names of Physicists, and an extra one with character names from science fiction novels, for a quick start and as examples. For best results, though, write your own! It's fun and easy!

    botnames CVars

    Here's a list of the relevant cvars, their defaults, and what they do:
    • sm_botnames_version : always set to the current version
    • sm_botnames_enabled (default 1) : set to 0 to disable everything
    • sm_botnames_prefix (default "") : set this to add something before each bot name. Remember to add a space at the end if you want a space between your prefix and the name! Requires reload.
    • sm_botnames_random (default 1) : when set to 1, randomly give out names. When 0, the names are given out in the same order as in the file. Requires reload.
    • sm_botnames_announce (default 1) : print a message to general chat (and the server) whenever a bot is added, when this is 1
    • sm_botnames_suppress (default 1) : when set to 1, suppress connect/team change/name change messages for bots. This reduces visual spam, and is best replaced by sm_botnames_announce = 1
    Reloading of the file, and setting new values of sm_botnames_prefix and sm_botnames_random is done on map load. To do this manually, use the command sm_botnames_reload.

    Other Notes

    If anyone ends up using this plugin, I would love to see your bot name file. This could be fun!

    Also, I'd like to know if this works fine with other games. I'll work to fix anything that comes up.

    I would also like to thank contributors to this thread for their tutoring in the arcane art of blocking name change notifications.
    Attached Files
    File Type: sp Get Plugin or Get Source (botnames.sp - 15258 views - 7.7 KB)
    File Type: txt botnames.txt (613 Bytes, 11467 views)
    File Type: txt botnames.scifi.txt (1.7 KB, 7150 views)

    Last edited by agrif; 01-24-2014 at 12:19. Reason: added link to version 1.2.1
    agrif is offline

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump

    All times are GMT -4. The time now is 04:47.

    Powered by vBulletin®
    Copyright ©2000 - 2023, vBulletin Solutions, Inc.
    Theme made by Freecode