AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Spitter Acid Damage (1.13) [20-Sep-2022] (https://forums.alliedmods.net/showthread.php?t=319526)

Silvers 11-05-2019 14:01

[L4D2] Spitter Acid Damage (1.13) [20-Sep-2022]
 
32 Attachment(s)
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.

Iizuka07 11-08-2019 00:26

Re: [L4D2] Spitter Acid Damage (1.1) [05-Nov-2019]
 
Now this will do some damage :D

paul92 11-26-2019 09:44

Re: [L4D2] Spitter Acid Damage (1.1) [05-Nov-2019]
 
Genious! You strike again Silver! Will try it soon :)

Silvers 03-17-2020 22:56

Re: [L4D2] Spitter Acid Damage (1.2) [18-Mar-2020]
 
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 06-03-2020 22:59

Re: [L4D2] Spitter Acid Damage (1.5) [04-Jun-2020]
 
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.

KoMiKoZa 10-08-2020 08:56

Re: [L4D2] Spitter Acid Damage (1.5) [04-Jun-2020]
 
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.

Silvers 10-08-2020 20:22

Re: [L4D2] Spitter Acid Damage (1.6) [09-Oct-2020]
 
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.


Gobi 12-31-2020 20:29

Re: [L4D2] Spitter Acid Damage (1.6) [09-Oct-2020]
 
This plugin is perfect, thanks. :up:

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

Silvers 02-23-2021 02:13

Re: [L4D2] Spitter Acid Damage (1.7) [23-Feb-2021]
 
Quote:

Originally Posted by Gobi (Post 2730857)
This plugin is perfect, thanks. :up:

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".


Krufftys Killers 04-24-2021 07:21

Re: [L4D2] Spitter Acid Damage (1.7) [23-Feb-2021]
 
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.


All times are GMT -4. The time now is 09:55.

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