Raised This Month: $ Target: $400
 0% 

[L4D2] Spitter Acid Damage (1.13) [20-Sep-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6796
Plugin Version:
1.13
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Unlocks Spitter Acid to damage common and special infected. Also control damage to Survivors.
    Old 11-05-2019 , 15:01   [L4D2] Spitter Acid Damage (1.13) [20-Sep-2022]
    Reply With Quote #1

    About:
    • Unlocks the Spitter Acid to detonate various explosives.
    • Unlocks the Spitter Acid to damage common and special infected.
    • The games default behaviour alternates between 0.2 and 0.3 seconds to damage entities.
    • The game scales damage over the duration of effect: 0 at the start, 6 in the middle and 4 when it ends.
    • This plugin can scale that damage where 1.0 is default, or set a full value to damage each time (this plugins default for common and special infected).
    • Also included in the source for developers a demonstration on "inferno" entities and getting their flame positions.



    Thanks:
    • Iizuka07 - For the idea and request.
    • Lux - For scripting advice.



    CVars:

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

    PHP Code:
    l4d2_spitter_acid_allow "1"             // 0=Plugin off, 1=Plugin on.
    l4d2_spitter_acid_damage "13"           // Omitted values scale the damage the game inflicts. Or: Apply full damage value from dmg_* cvars. on: 1=Common. 2=Survivors (default). 4=Special. 8=Self. 15=All. Add numbers together.
    l4d2_spitter_acid_dmg_common "5.0"      // Damage dealt to common infected. Can use a ratio instead by changing l4d2_spitter_acid_damage.
    l4d2_spitter_acid_dmg_self "0.0"        // Damage dealt to self owner of acid. Can use a ratio instead by changing l4d2_spitter_acid_damage.
    l4d2_spitter_acid_dmg_special "8.0"     // Damage dealt to special infected. Can use a ratio instead by changing l4d2_spitter_acid_damage.
    l4d2_spitter_acid_dmg_survivor "1.0"    // Damage dealt to survivors (games default is 1.0 with l4d2_spitter_acid_damage omitting a value of 2).
    l4d2_spitter_acid_dmg_bots "1.0"        // Damage dealt to survivor bots (games default is 1.0 with l4d2_spitter_acid_damage omitting a value of 2).
    l4d2_spitter_acid_effects "5"           // Displays a particle when hurting. 0=Off, 1=Common Infected, 2=Survivors, 4=Special Infected, 8=Self. 15=All.
    l4d2_spitter_acid_explode "0"           // Which explosives should explode, otherwise they will ignite first: 0=All ignite, 1=Firework Crates, 2=Oxygen Tank, 4=Propane Tank, 7=All explode. Add numbers together.
    l4d2_spitter_acid_explosives "3"        // Allow acid to ignite explosives: 0=Off, 1=GasCans, 2=Firework Crates, 4=Oxygen Tank, 8=Propane Tank, 15=All. Add numbers together.
    l4d2_spitter_acid_grace "1.0"           // How long after Spitter acid detonates until it can cause damage.
    l4d2_spitter_acid_modes ""              // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
    l4d2_spitter_acid_modes_off ""          // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
    l4d2_spitter_acid_modes_tog "0"         // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
    l4d2_spitter_acid_version               // Spitter Acid Damage plugin version 


    Changes:
    Code:
    1.13 (20-Sep-2022)
        - Changed the way "l4d2_spitter_acid_grace" prevents damage, to also prevent the sound and movement slowdown.
    
    1.12 (25-May-2022)
        - Changed the description of "l4d2_spitter_acid_damage" cvar and some default values due to the logic being inverted from the previous description. Thanks to "VYRNACH_GAMING" for reporting.
    
    1.11 (14-Dec-2021)
        - Fixed infected hurt sounds when "l4d2_spitter_acid_dmg_special" or "l4d2_spitter_acid_dmg_self" was set to "0.0". Thanks to "KoMiKoZa" for reporting.
    
    1.10a (19-Oct-2021)
        - Wildcarded the .txt GameData signature for compatibility with "Left4DHooks" plugin version 1.64+.
    
    1.10 (26-Aug-2021)
        - Added cvar "l4d2_spitter_acid_grace" to prevent damaging enemies when spit acid detonates until after the grace period. Requested by "Lukey1028".
        - Potentially fixed hearing pain vocalizations when damage should be blocked. Thanks to "KoMiKoZa" for reporting.
    
    1.9 (25-Jul-2021)
        - Fixed affecting Special Infected ghosts. Thanks to "ddd123" for reporting.
    
    1.8 (24-Apr-2021)
        - Fixed invalid edict error. Thanks to "Krufftys Killers" for reporting.
    
    1.7 (23-Feb-2021)
        - Added cvar "l4d2_spitter_acid_dmg_bots" to set the damage for survivor bots. Requested by "Gobi".
    
    1.6 (09-Oct-2020)
        - Added cvar "l4d2_spitter_acid_explode" to control which explosives should ignite or explode (gascans can only ignite).
        - Fixed map spawn gascans not being affected and igniting. Thanks to "KoMiKoZa" for reporting.
        - Fixed not detecting Scavenge mode if the "_tog" cvar was not being used.
    
    1.5 (04-Jun-2020)
        - Added cvar "l4d2_spitter_acid_explosives" to allow Spitter Acid to ignite/explode explosives.
    
    1.4 (10-May-2020)
        - Added better error log message when gamedata file is missing.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
    
    1.3 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.2 (18-Mar-2020)
        - Fixed crashing in Linux. GameData changed.
        - Fixed cvar "l4d2_spitter_acid_damage" not actually being used.
        - Added cvar "l4d2_spitter_acid_dmg_self" to control Spitter damage from their own spit.
    
    1.1 (05-Nov-2019)
        - Optimized to unhook OnTakeDamage when no longer used.
    
    1.0 (05-Nov-2019)
        - Initial release.


    Requirements:
    • SourceMod 1.11 or newer.


    Installation:
    1. Click "Get Plugin" and put the .smx file 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.9 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_spitter_acid_damage.sp - 1189 views - 26.9 KB)
    File Type: txt l4d2_spitter_acid_damage.txt (920 Bytes, 995 views)
    __________________

    Last edited by Silvers; 10-01-2023 at 09:47.
    Silvers is offline
    Iizuka07
    Senior Member
    Join Date: Aug 2018
    Location: Underground
    Old 11-08-2019 , 01:26   Re: [L4D2] Spitter Acid Damage (1.1) [05-Nov-2019]
    Reply With Quote #2

    Now this will do some damage
    __________________
    死が待っている
    Iizuka07 is offline
    paul92
    Senior Member
    Join Date: Sep 2010
    Old 11-26-2019 , 10:44   Re: [L4D2] Spitter Acid Damage (1.1) [05-Nov-2019]
    Reply With Quote #3

    Genious! You strike again Silver! Will try it soon
    paul92 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-17-2020 , 23:56   Re: [L4D2] Spitter Acid Damage (1.2) [18-Mar-2020]
    Reply With Quote #4

    Suprised no one complained about Linux crashing, or some cvars broken, or the fact Spitters killed themselves standing in their own spit lol. Well all that's fixed.

    Code:
    1.2 (18-Mar-2020)
        - Fixed crashing in Linux. GameData changed.
        - Fixed cvar "l4d2_spitter_acid_damage" not actually being used.
        - Added cvar "l4d2_spitter_acid_dmg_self" to control Spitter damage from their own spit.
    __________________
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-03-2020 , 23:59   Re: [L4D2] Spitter Acid Damage (1.5) [04-Jun-2020]
    Reply With Quote #5

    Code:
    1.5 (04-Jun-2020)
        - Added cvar "l4d2_spitter_acid_explosives" to allow Spitter Acid to ignite/explode explosives.
    PHP Code:
    l4d2_spitter_acid_explosives "3"        // Allow acid to ignite explosives: 0=Off, 1=GasCans, 2=Firework Crates, 4=Oxygen Tank, 8=Propane Tank, 15=All. Add numbers together. 
    Can't believe I didn't add this from initial release. Something I wanted to replicate for years.
    __________________
    Silvers is offline
    KoMiKoZa
    Senior Member
    Join Date: Dec 2017
    Location: Thy old times.
    Old 10-08-2020 , 09:56   Re: [L4D2] Spitter Acid Damage (1.5) [04-Jun-2020]
    Reply With Quote #6

    Thank you for this great plugin, greatly enhances spitter's value!

    I'm having an issues however of the gascans not being burnt by spit. And seemingly that's only gascans, propane tanks actually explode (and instadamage application works). Could you test that on your end? Seems weird, don't think anything on my server (Linux/SM 1.10) interferes with gascans/spit.

    And yes, I've got the explosions set to All, which is supposed to cover gascans.
    KoMiKoZa is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 10-08-2020 , 21:22   Re: [L4D2] Spitter Acid Damage (1.6) [09-Oct-2020]
    Reply With Quote #7

    Thanks, fixed:

    Code:
    1.6 (09-Oct-2020)
        - Added cvar "l4d2_spitter_acid_explode" to control which explosives should ignite or explode (gascans can only ignite).
        - Fixed map spawn gascans not being affected and igniting. Thanks to "KoMiKoZa" for reporting.
        - Fixed not detecting Scavenge mode if the "_tog" cvar was not being used.
    __________________
    Silvers is offline
    Gobi
    New Member
    Join Date: Dec 2020
    Location: Brazil
    Old 12-31-2020 , 21:29   Re: [L4D2] Spitter Acid Damage (1.6) [09-Oct-2020]
    Reply With Quote #8

    This plugin is perfect, thanks.

    could you add an option to disable acid damage in bots?
    Gobi is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-23-2021 , 03:13   Re: [L4D2] Spitter Acid Damage (1.7) [23-Feb-2021]
    Reply With Quote #9

    Quote:
    Originally Posted by Gobi View Post
    This plugin is perfect, thanks.

    could you add an option to disable acid damage in bots?

    Done:

    Code:
    1.7 (23-Feb-2021)
        - Added cvar "l4d2_spitter_acid_dmg_bots" to set the damage for survivor bots. Requested by "Gobi".
    __________________
    Silvers is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 04-24-2021 , 08:21   Re: [L4D2] Spitter Acid Damage (1.7) [23-Feb-2021]
    Reply With Quote #10

    Got this error this morning

    L 04/23/2021 - 23:12:59: Info (map "c1m4_atrium") (file "C:\servers\kruffty\left4dead2\addons\sourcem od\logs\errors_20210423.log")
    L 04/23/2021 - 23:12:59: [SM] Exception reported: Invalid edict (606 - 606)
    L 04/23/2021 - 23:12:59: [SM] Blaming: l4d2_spitter_acid_damage.smx
    L 04/23/2021 - 23:12:59: [SM] Call stack trace:
    L 04/23/2021 - 23:12:59: [SM] [0] GetEdictClassname
    L 04/23/2021 - 23:12:59: [SM] [1] Line 379, C:\Servers\l4d2\left4dead2\addons\sourcemod\s cripting\l4d2_spitter_acid_damage.sp::CanHarm
    L 04/23/2021 - 23:20:47: Error log file session closed.
    Krufftys Killers 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 16:38.


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