Raised This Month: $12 Target: $400
 3% 

Ace Bot Taunt:SM (v1.2.1) with renaming and quota manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Timiditas
Senior Member
Join Date: Apr 2009
Plugin ID:
1704
Plugin Version:
1.2.1
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    ace_botchat sourcemod conversion
    Unapprover:
    Reason for Unapproving:
    Multiple interoperability issues with other plugins, https://forums.alliedmods.net/showthread.php?p=1554271#post1554271
    Old 06-01-2010 , 10:22   Ace Bot Taunt:SM (v1.2.1) with renaming and quota manager
    Reply With Quote #1

    _
    This is a SourceMod-conversion of the EventScripts addon ace_botchat with kind permission from Phil Pendlebury,
    using part of es_ace_fakebots

    Original scripts (botchat, fakebots) and replies written by Phil Pendlebury - aka - Ace Rimmer and is available at: http://www.pendlebury.biz/acerimmer/

    Faked Chatmessages code (stock PrintGameChatMessage) taken from
    'DeadChat' -> http://forums.alliedmods.net/showthread.php?p=651748
    with kind permission from Greyscale

    What it does:

    Basically it will force BOTs to speak randomly when certain events happen,
    and it renames bots when they join, using a list of names that you provide.

    (deadchat cvar added, rcon_lock incompatibility fixed)

    Put
    sm_bot_replies_db.txt
    sm_bot_fakebotnames_db.txt
    to cstrike/addons/sourcemod/configs/
    botchat.phrases.txt
    to translations

    Plugin will create sm_ace_botchat.cfg in cstrike/cfg/sourcemod on first run
    which has:
    Code:
    // Block bot connected message
    // -
    // Default: "0"
    sm_ace_botchat_block_connect "0"
    
    // Block bot disconnected message
    // -
    // Default: "0"
    sm_ace_botchat_block_disconnect "0"
    
    // Block bot changed name message
    // -
    // Default: "1"
    sm_ace_botchat_block_namechange "1"
    
    // Block bot/unconnected changed team message
    // -
    // Default: "1"
    sm_ace_botchat_block_team "1"
    
    // Living players see dead bots chat
    // -
    // Default: "1"
    sm_ace_botchat_bot_deadchat "1"
    
    // BOTS WILL ALSO RESPOND TO PLAYER CHAT?
    // -
    // Default: "1"
    sm_ace_botchat_bot_say_replies "1"
    
    // Chance of bots commenting events. Set to 1 to make them respond every kill etc. or higher number for less responses. Use default(-1) to have it set to double the bot count automatically
    // -
    // Default: "-1"
    sm_ace_botchat_chance_of_chat "-1"
    
    
    // sm_ace_botchat_enable REMOVED
    // just unload the plugin if you don't need it
    
    
    // Use name list to rename bots
    // -
    // Default: "1"
    sm_ace_botchat_rename_bots "1"
    
    // Manage bot quota in running rounds/neverending rounds
    // (Experimental. Might not work as you expect/work at all)
    // Default: "0"
    sm_ace_botchat_deathmatch_control "0"
    At the moment the events are:

    Code:
    Player Death (various different types  of death) -
     headshot
     knife
     TK
     grenade
     suicide
    
    Bomb  Exploded
    Bomb Defused
    Hostage Killed (chat from killing bot)
    Hostage Killed (chat from other bots)
    
    Item Pickup (only starts 5 seconds after spawn) <-- blocking this for 5secs should work now
    
    Blinded
      Bomb Planted
     Bomb Pickup
     Hostage Follows
     Hostage Stops  Following
    
    On connect -
     greeting from BOT when join
      greeting to new players from BOT
    
    Player chat (you can add any  word)
    I might add more events if they are requested.

    Editing the replies.db
    For examples, take a look at the included replies file.
    Code:
    //Original script and replies written by Phil Pendlebury - aka - Ace Rimmer and is available at: http://www.pendlebury.biz/acerimmer/
    //
    //Use a texteditor that supports UTF-8 encoding
    //Instead of using ES 'event_var()', use '{tags}'.
    
    //Supported {tags} :
    // supported NAME tags are currently: {attacker} {victim}
    // {section} will replace the tag by the section name. see example near end of this file
    
    // if a tag is not supported in a specific event (e.g. {victim} in bomb planted) it is simply deleted from the reply
    
    // add "teamonly" "1" or "0" below "count" for a generic setting for that section
    // if you omit the "teamonly" entry, the whole section is considered to be alltalk
    // add {talkteam} or {talkall} in front of a specific reply to override a generic section setting
    
    // "link", "teamonly", {section}, {talkteam} and {talkall} is supported in every section
    // use "link" "sectionname" to use the same replies for multiple keywords. see example at the end of this file
    // {section} will use the LINKING sections name if used in links (see example near end of this file)
    // *************************************EVENTLIST************************************************************************************
    // [EventName]                  -    Supported name tags    -    Description (Name of ?)
    // -------------------------------------------------------------------------------------------------
    // blinded                      -                     - none
    // hostagekilled                - {attacker}          - the talking bot that killed the hostage
    // hostagekilledother           - {attacker} {victim} - attacker = the PLAYER/BOT that killed the hostage, victim = the talking bot
    // hostagestops                 -                     - none
    // hostagefollows               -                     - none
    // bombdefused                  -                     - none
    // bombplanted                  -                     - none
    // bombexploded                 -                     - none
    // bombpickup                   -                     - none
    // itempickup                   -                     - none
    // normaldeath                  - {attacker} {victim} -
    // headshotdeath                - {attacker} {victim} -
    // knifedeath                   - {attacker} {victim} -
    // nadedeath                    - {attacker} {victim} -
    // tkdeath                      - {attacker} {victim} -
    // suicidedeath                 - {attacker} {victim} -
    // normalkill                   - {attacker} {victim} -
    // headshotkill                 - {attacker} {victim} -
    // knifekill                    - {attacker} {victim} -
    // nadekill                     - {attacker} {victim} -
    // tkkill                       - {attacker} {victim} -
    // greetings                    - {attacker}          - bot will say this when he joins - attacker = his own name
    // playerconnect                - {attacker} {victim} - bots will say this to a new player - attacker = talking bot - victim = joining player
    
    // any additional chat keyword  - {victim} {attacker} - victim = chatting player/bot - attacker = answering bot
    
    // you could theoretically simply take your original replies.db from the ES-plugin
    // and run a search&replace in your favourite utf-8 capable text editor for:
    // event_var(es_username) ----to----> {victim}
    // event_var(es_attackername) ----to----> {attacker}
    Added "links" and an additional {tag} called {section}.
    Code:
       "hacker"
       {
          "count" "19"
          "1" "I never hack"
          "2" "It's part of the game"
       }
      
      "haxor"
       {
                //if someone types "haxor", bot will use the same replies as in 'hacker'. additional replies in THIS (haxor) section are ignored
                //"teamonly" in linked sections is always completely ignored, which means if you link to a teamonly section and want it to stay
                //that way, you have to specify teamonly 1 in the linking section as well
          "link"    "hacker"
       }
      
        "rank"
        {
        "count" "18"
        "1" "{section}, {section} always {section}..."
        "2" "Stop typing {section} and play the game ffs!"
        "3" "{victim} your RANK is still CRAP no matter how many times you check it"
        }
        "top"
        {
            "link"    "rank"
        }
        //see how top is linked to rank. look at the first reply. when someone types rank, the bot says: "rank, rank always rank..."
        //when someone types "top" instead, the bot would say: "top, top always top..."
        //the need for the {section} tag arose after introducing the links which wouldn't have made any sense without them

    Servertime tag example:


    It is {servertime}. I am severly tired!
    Result: It is 225. I am severly tired!

    You can add different formats by adding a colon and a time format string:

    Shit, I LOVE {servertime:%As! %I%p} and drunk already...
    Result: Shit, I LOVE Tuesdays! 06PM and drunk already...
    Shit, I LOVE {servertime:%A}s! {servertime:%I%p} and drunk already...
    would yield the same result.

    See this URL for valid parameters: http://cplusplus.com/reference/clibr.../strftime.html

    Map tags:
    {mapminutesleft}, {mapname}
    Example (given the current maps name is gg_aim_simpsons_green_v2):
    THANK GOD! Only {mapminutesleft} minutes left! I freaking HATE {mapname}!
    Result: THANK GOD! Only 2 minutes left! I freaking HATE simpsons_green!

    (As you can see, any substring smaller than four chars is stripped out of the mapname.)



    There is also an additional admin command -
    botchat_say
    which can be triggered through console or also by chat if you use
    the preceding forward slash /botchat_say
    Usage:
    botchat_say "quoted text if contains whitespace" <botname/id> (if you omit botname/id, a random bot is selected to say your text)
    if you type !botchat_say or /botchat_say into the chat, omitting all arguments, it will
    open a menu listing all bot names. select one (closing menu) THEN then next thing you type into the chat will be said by
    the selected bot. this function supports the {talkteam} tag to make the bot use teamchat instead allchat.
    you can also type {botchat_cancel} to abort

    Using Bot-Namelist
    You can either use your namelist from ace_fakebots eventscripts addon directly by putting it in sourcemod/configs and rename it to:
    sm_bot_fakebotnames_db.txt
    Or if you want to create one from scratch, you can also use a simple list with every name line by line instead of a KV-file.
    In that case, use the filename: sm_bot_fakebotnames_db_plain.txt

    If there are not enough names on the list, newly spawned bots will start to use vanilla names again until some bots with new names leave.


    v1.2.1 fixed sourceTV fakeclient talking randomly
    Attached Files
    File Type: txt botchat.phrases.txt (741 Bytes, 1547 views)
    File Type: txt sm_bot_fakebotnames_db.txt (797 Bytes, 1590 views)
    File Type: txt sm_bot_replies_db.txt (23.9 KB, 1567 views)
    File Type: sp Get Plugin or Get Source (ace_botchat.sp - 2909 views - 39.9 KB)
    __________________


    Last edited by Timiditas; 07-03-2010 at 06:00.
    Timiditas is offline
    fpsbrian
    Senior Member
    Join Date: Feb 2008
    Old 06-01-2010 , 23:18   Re: Ace Bot Taunt:SM
    Reply With Quote #2

    very nice!
    __________________
    fpsbrian is offline
    Ace Rimmer
    Senior Member
    Join Date: Apr 2005
    Old 06-02-2010 , 05:38   Re: Ace Bot Taunt:SM
    Reply With Quote #3

    Hi there,

    I just wanted to say thanks to Timiditas for doing this.

    It can be so annoying when you see your work blatantly ripped off with no trace to your original effort.

    Timiditas actually mailed me first and inserted the relevant credits perfectly. Very respectful and very decent and honest.

    Much appreciated.

    :-)
    __________________
    Smoke me a kipper, I'll be back for breakfast

    Main Web Site-Ace Rimmer-System Information
    Ace Rimmer is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 06-05-2010 , 09:49   Re: Ace Bot Taunt:SM
    Reply With Quote #4

    ace_botchat:SM now uses part of ace_fakebots, which will rename your bots using a namelist. itempickup still seems to be not working as intended (the 15 seconds block on round_start) and I need to rework the renaming to be less of a cpu hog (endless loop - select random name till a free name is found).
    Thats why it is disabled by default as of yet. Everything else work as intended by now though.

    Ace Rimmer, thanks for your approval
    __________________


    Last edited by Timiditas; 06-05-2010 at 09:53.
    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 06-13-2010 , 04:46   Re: Ace Bot Taunt:SM (v1.0)
    Reply With Quote #5

    new since v1.0

    fixed rcon_lock incompatibility by using faked 'say' chatmessages.
    Faked Chatmessages code (stock PrintGameChatMessage) taken from
    'DeadChat' -> http://forums.alliedmods.net/showthread.php?p=651748
    with kind permission from Greyscale

    // Chance of bots commenting events. Set to 1 to make them respond every kill etc. or higher number for less responses.
    // New: Use default(-1) to have it set to double the bot count automatically
    // -
    // Default: "-1"

    sm_ace_botchat_chance_of_chat "-1"

    // use "link" "sectionname" to use the same replies for multiple keywords.
    // {section} will use the LINKING sections name if used in links

    Code:
       "hacker"
       {
          "count" "2"
          "1" "I never hack"
          "2" "It's part of the game"
       }
      
      "haxor"
       {
                //if someone types "haxor", bot will use the same replies as in 'hacker'. additional replies in THIS (haxor) section are ignored
                //"teamonly" in linked sections is always completely ignored, which means if you link to a teamonly section and want it to stay
                //that way, you have to specify teamonly 1 in the linking section as well
    
          "link"    "hacker"
       }
      
        "rank"
        {
        "count" "18"
        "1" "{section}, {section} always {section}..."
        "2" "Stop typing {section} and play the game ffs!"
        "3" "{victim} your RANK is still CRAP no matter how many times you check it"
        }
        "top"
        {
            "link"    "rank"
        }
    see how top is linked to rank. look at the first reply. when someone types rank, the bot says: "rank, rank always rank..."
    when someone types "top" instead, the bot would say: "top, top always top..."
    the need for the {section} tag arose after introducing the links which wouldn't have made any sense without them

    Extending the plugin to other mods than CSS is planned but don't expect that too soon.
    Having problems blocking the name change message without relying on #Cstrike_Name_Change saytext2 message. Blocking the broadcast of the 'player_name'-event doesn't supress it.
    I'd like a more generic solution than just checking for a gazillion message name strings.
    __________________


    Last edited by Timiditas; 06-14-2010 at 09:14.
    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 06-15-2010 , 13:11   Re: Ace Bot Taunt:SM (v1.1)
    Reply With Quote #6

    Added three new {tags}:
    {servertime}
    {mapminutesleft}
    {mapname}
    __________________

    Timiditas is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 06-19-2010 , 06:26   Re: Ace Bot Taunt:SM (v1.2)
    Reply With Quote #7

    v1.2:
    extended botchat_say function. if you type !botchat_say or /botchat_say into the chat, omitting all arguments, it will
    open a menu listing all bot names. select one (closing menu) THEN then next thing you type into the chat will be said by
    the selected bot. this function supports the {talkteam} tag to make the bot use teamchat instead allchat.
    you can also type {botchat_cancel} to abort
    ______________________________________
    added experimental bot quota manager, that works while a round is running (for very long/neverending rounds on deathmatch servers or whatever)

    sm_ace_botchat_deathmatch_control
    default : 0

    bot_quota_mode "fill" is always assumed. bot_quota is read on map start, so you can't change the bot_quota mid-game if you use this.
    __________________

    Timiditas is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 06-19-2010 , 11:49   Re: Ace Bot Taunt:SM (v1.2) with renaming and quota manager
    Reply With Quote #8

    Sounds awesome especially the part with random bot names. Its embarrassing having bots on when the server is empty just to attract players. The only thing is their connect time is a little obvious.

    connection time -1sec
    sinblaster is offline
    Timiditas
    Senior Member
    Join Date: Apr 2009
    Old 06-19-2010 , 12:03   Re: Ace Bot Taunt:SM (v1.2) with renaming and quota manager
    Reply With Quote #9

    Good Idea. I would have liked to also give the bots a ping on the scoreboard, but that would be obsolete since there already exists a plugin that is doing just that.
    Too bad it will stop working when CSS goes OrangeBox. Its already failing on TF2. Valve "fixed" this. I don't know what their problem is, none of this stuff make the bots appear as real players in the server browser.
    __________________

    Timiditas is offline
    deadbwoy
    Member
    Join Date: Mar 2009
    Location: The Intarweb
    Old 06-20-2010 , 06:01   Re: Ace Bot Taunt:SM (v1.2) with renaming and quota manager
    Reply With Quote #10

    Quote:
    Originally Posted by Timiditas View Post
    Good Idea. I would have liked to also give the bots a ping on the scoreboard, but that would be obsolete since there already exists a plugin that is doing just that.
    Too bad it will stop working when CSS goes OrangeBox. Its already failing on TF2. Valve "fixed" this. I don't know what their problem is, none of this stuff make the bots appear as real players in the server browser.
    you currently CAN fake bot's scoreboard pings in css beta, however...
    I'm sure they'll "fix" it when the beta ends, or soon after...
    deadbwoy is offline
    Reply


    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 07:33.


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