Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Bot Healing Values (2.3) [25-May-2023]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
8140
Plugin Version:
2.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    41 
    Plugin Description:
    Set the health value bots require before using First Aid, Pain Pills or Adrenaline.
    Old 08-01-2022 , 17:34   [L4D & L4D2] Bot Healing Values (2.3) [25-May-2023]
    Reply With Quote #1

    About:
    • After several different methods and attempts over the years, finally here is one that works, might possibly break on game updates.
    • Provides 2 cvars to control the health at which bots should attempt to heal with first aid or pills/adrenaline.
    • Provides 2 cvars to determine if healing is only allowed when black and white with first aid or pills/adrenaline.



    Thanks:
    • Psyk0tik - Looking through the code.
    • Forgetest - Helping with version 2.0.
    • Dragokas - Testing on L4D1 linux.
    • Toranks - Asking for the plugin.



    CVars:

    Saved to l4d_bot_healing.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Ignored. 1=Only allowing healing when self or target is black and white (Requires "Actions" extension).
    l4d_bot_healing_die_first "0"

    // 0=Ignored. 1=Only allowing healing or giving pills when self or target is black and white (Requires "Actions" extension).
    l4d_bot_healing_die_pills "0"

    // Allow bots to use First Aid when their health is below this value.
    l4d_bot_healing_first "30.0"

    // Allow bots to use Pills or Adrenaline when their health is below this value.
    l4d_bot_healing_pills "50.0"

    // Bot Healing Values plugin version.
    l4d_bot_healing_version 


    Changes:
    Code:
    2.3 (07-Nov-2023)
        - Fixed not deleting 1 handle on plugin start.
    
    2.2 (25-May-2023)
        - Fixed invalid client errors. Thanks to "Mystik Spiral" for reporting and "BHaType" for information.
        - Client could be 0 but hooking would still be valid, so removing team check works fine and is valid.
    
    2.1 (20-Aug-2022)
        - Fixed the plugin not working on L4D2 Linux. GameData file has been updated.
        - Optimized the "Actions" part of the plugin.
    
    2.0 (19-Aug-2022)
        - Changed the patching method to prevent crashes.
        - Now requires "SourceScramble" extension or "Actions" extension.
        - GameData is not requires when only use the "Actions" extension.
    
        - Optionally uses the "Actions" extension to prevent healing until black and white.
        - Plugin is compatible with the "Heartbeat (Revive Fix - Post Revive Options)" plugin.
    
        - Thanks to "Forgetest" for helping and testing.
        - Thanks to "HarryPotter" and "Toranks" for testing.
    
    1.0 (01-Aug-2022)
        - Initial release.


    Requirements:
    • Recommended: Source Scramble extension (while Actions extension can handle this plugins features, this plugin is more optimized to use Source Scramble to patch the health value at which bots should heal).
    • Optional: Actions extension (used to require bots to only heal when black and white, on their last strike).



    Compiling:


    Installation:
    DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires 2 include files!
    1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
    2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.

    Updating from 1.0:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
    Attached Files
    File Type: txt l4d_bot_healing.txt (3.8 KB, 678 views)
    File Type: smx l4d_bot_healing.smx (10.6 KB, 210 views)
    File Type: sp Get Plugin or Get Source (l4d_bot_healing.sp - 203 views - 13.1 KB)
    __________________

    Last edited by Silvers; 11-07-2023 at 02:41.
    Silvers is offline
     



    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 02:10.


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