AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Prototype Grenades (1.44) [15-Jun-2022] (https://forums.alliedmods.net/showthread.php?t=318965)

Silvers 10-02-2019 22:00

[L4D & L4D2] Prototype Grenades (1.44) [15-Jun-2022]
 
48 Attachment(s)


About:
  • 20 different types.
  • Customize lots of options in the \data\l4d_grenades.cfg file.
  • Customize which types to allow and which grenade they work for.
  • Menu to change the grenade type. Can be used in combination with the key changing method.
  • Players can equip a grenade and hold SHOOT (LMB) + SHOVE (RMB) keys to change grenade type.
  • Bots can use Prototype Grenades. Requires external plugin.
  • Random grenade type when picking up or client preferences to save selected type for each grenade.
  • Adding new grenade types should be easy so feel free to suggest ideas.


Thanks:
  • Lux - Naming the plugin, code stocks and reviewing code.
  • Dragokas - Various bug reports and new Russian translations.
  • KRUTIK - Russian translations.
  • asd2323208 - Simplified Chinese translations.
  • fbef0102 - Traditional Chinese translations.


Grenade Types:
  • Molotov:
    - Bomb: Explosive grenade. Detonates on impact.
    - Cluster: Shoots out multiple explosive projectiles.
    - Firework: Firework crate explosion. L4D2 only.
    - Smoke: Smoke screen to hide an area.
    - Cluster Fire: Shoots out multiple small fires. L4D2 only.
    - Flak: Shoots up sparks igniting nearby enemies.
    - Airstrike: (L4D2 only, requires "F-18 Airstrike" plugin). Flare to signal Airstrike destination.
  • PipeBomb:
    - Black Hole: Pulls enemies in toward the center.
    - Flashbang: Blinds Survivors and Special Infected on detonation.
    - Shield: Reduces damage to Survivors inside the area.
    - Tesla: Electrocutes enemies inside the area pushing them back.
    - Bullets: Shoots out multiple bullets.
    - Glow: Glow through walls for a short time.
    - Weapon: Creates a weapon on detonation. Choose types via plugin config.
  • VomitJar: (L4D1: these types are split between Molotov and PipeBomb)
    - Chemical: Acid puddle on the ground to damage enemies.
    - Freezer: Freezes enemies inside the area of influence.
    - Medic: Heals - only works on Survivors.
    - Vaporizer: Dissolves enemies within the area.
    - Extinguisher: Extinguishes fires from the ground and players.
    - Anti-Gravity: Makes enemies jump up and slowly fall down.


Public Commands:

PHP Code:

// Type: [1=Bomb, 2=Cluster, 3=Firework, 4=Smoke, 5=Black Hole, 6=Flashbang, 7=Shield, 8=Tesla, 9=Chemical, 10=Freeze, 11=Medic, 12=Vaporizer,
// 13=Extinguisher, 14=Glow, 15=Anti-Gravity, 16=Fire Cluster, 17=Bullets, 18=Flak, 19=Airstrike, 20=Weapon]
sm_grenade // Opens a menu to choose the current grenades mode. Optional: force change with args, usage: sm_grenade [type: 1 - 20] 


Admin Commands: (requires "z" flag)

PHP Code:

sm_grenade_reload    // Reloads the settings config.

// Type: <1=Bomb, 2=Cluster, 3=Firework, 4=Smoke, 5=Black Hole, 6=Flashbang, 7=Shield, 8=Tesla, 9=Chemical, 10=Freeze, 11=Medic, 12=Vaporizer,
// 13=Extinguisher, 14=Glow, 15=Anti-Gravity, 16=Fire Cluster, 17=Bullets, 18=Flak, 19=Airstrike, 20=Weapon>
sm_grenade_spawn     // Spawn grenade explosions. Usage: sm_grenade_spawn <type: 1 - 20>
sm_grenade_throw     // Spawn grenade projectile. Usage: sm_grenade_throw <type: 1 - 20> 


Cvars:

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

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_grenades_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_grenades_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = off).
l4d_grenades_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_grenades_modes_tog "0"

// Grenade Mods plugin version.
l4d_grenades_version 



Changes:
Code:

1.44 (15-Jun-2022)
    - Added data setting "effect_freeze" for the "Freezer" type to set how long Survivors and Special Infected are frozen for. Requested by "weakestL4D2enjoyer".
    - Added data setting "damage_bonus" for the "Glow" type to set a damage multiplier while affected by the "Glow". Requested by "weakestL4D2enjoyer".
    - Changed the "BlackHole" type to not throw Survivors or Special Infected unless they are on the ground.
    - Changes to fix warnings when compiling on SourceMod 1.11.

1.43 (02-Feb-2022)
    - Fixed the "Medic" type not following the "targets" data settings. Thanks to "NoroHime" for reporting.
    - Fixed being able to select the "Airstrike" grenade type if disabled when using M2 to change types. Thanks to "KadabraZz" for reporting.

1.42 (29-Oct-2021)
    - Changed "Medic" grenade type to allow healing all targets specified, no longer only Survivors. Requested by "Dragokas".
    - Fixed "Bullets" and "Freezer" types not excluding the tank correctly.

1.41 (29-Sep-2021)
    - Changed method of creating an explosive to prevent it being visible (still sometimes shows, but probably less).

1.40 (19-Sep-2021)
    - Fixed users without access to the "sm_grenade" command from having different grenade modes when picking up grenades.
    - Thanks to "Darkwob" for reporting.

1.39 (25-Jul-2021)
    - Fixed index errors (replaced using "m_iHammerID" with a variable array). Thanks to "Elite Biker" for reporting.
    - L4D1: Fixed the "Airstrike" potentially showing in the menu.

1.38 (16-Jun-2021)
    - Added new grenade type "Weapon" to spawn weapons and items when the grenade explodes.
    - L4D2 only: Added new grenade type: "Airstrike" to call an Airstrike on the grenade explosion position. Requires the "F-18 Airstrike" plugin.
    - All translation files updated.
    - Config file updated.
    - Requested by "Darkwob"

1.37 (04-Jun-2021)
    - Now tests if clients have access to the "sm_grenade" command to restrict Prototype Grenades to specific users. Requested by "Darkwob".
    - Use the "sourcemod/configs/admin_overrides.cfg" to modify the command flags required.
    - Data config change: "Tesla" and "Black Hole" types no longer create a shake on explosion.

1.36 (10-Apr-2021)
    - Fixed not resetting gravity from the "Anti-Gravity" type when a client died. Thanks to "Voevoda" for reporting.

1.35 (27-Mar-2021)
    - L4D1: Fixed client console error about unknowing particle "sparks_generic_random" and "fireworks_sparkshower_01e" when using the "Flak" type.
    - Added "Flak" type "damage_type" config key value to specify which enemies catch on fire instead of stumble.
    - Changed "Flak" type damage to Blast instead of burn for Special Infected. Thanks to "sbeve" for reporting.
    - Data config "data/l4d_grenades.cfg" updated to reflect changes.

1.34 (04-Mar-2021)
    - Fixed affecting special infected ghosts. Thanks to "Voevoda" for reporting.

1.33 (23-Feb-2021)
    - Fixed errors caused by the last L4D2 update. Thanks to "sonic155" for reporting.

1.32 (15-Feb-2021)
    - Fixed healing with full health when players are black and white.

1.31 (30-Sep-2020)
    - Fixed compile errors on SM 1.11.

1.30a (24-Sep-2020)
    - Compatibility update for L4D2's "The Last Stand" update.
    - GameData .txt file updated.

1.30 (20-Sep-2020)
    - Fixed not working in L4D1 due to various L4D2 specific things not being ignored.
    - GameData for L4D1 updated to fix "CTerrorPlayer::OnStaggered" not being found when detoured by Left4DHooks.

1.29 (18-Sep-2020)
    - L4D2 only: Added new config keys "damage_acid_comm", "damage_acid_self", "damage_acid_spec" and "damage_acid_surv".
    - These control the "Chemical" type acid puddle damage. Thanks to "SilentBr" for requesting.
    - Data config "data/l4d_grenades.cfg" updated to reflect changes.

1.28 (10-Sep-2020)
    - Fixed "Glow" type not causing any damage. Thanks to "simvolist777" for reporting.

1.27 (01-Sep-2020)
    - Fixed "Glow" type not instantly removing on player death. Thanks to "piggies" for reporting.

1.26 (27-Aug-2020)
    - Fixed "mode_switch" option to block keybind control when using "2" value. Thanks to "Winn" for reporting.

1.25 (15-Jul-2020)
    - Added more checks to prevent gravity reset error. Thanks to "Voevoda" for reporting.

1.24 (14-May-2020)
    - Fixed grenade types not detonating on impact due to accidental deletion in 1.23 update.
    - Replaced some "point_hurt" damage calls with "SDKHooks_TakeDamage" function.
    - Support for compiling on SourceMod 1.11.

1.23 (10-May-2020)
    - Added better error log message when gamedata file is missing.
    - Added random grenade spin when thrown if Left4DHooks is detected.
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Fixed grenades not sticking if enabled, unless they hit a client.
    - Various changes to tidy up code.
    - Various optimizations and fixes.

1.22 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    - Fixed not precaching "env_shake" which caused stutter on first explosion.

1.21 (03-Mar-2020)
    - Fixed 2 particles missing from being precached. Thanks to "foxhound27" for reporting.

1.20 (29-Feb-2020)
    - Fixed conflict with "Detonation Force" plugin. Thanks to "hoanganh81097" for reporting.
    - This will also fix conflicts with any other plugin detecting when a grenade projectile is destroyed.

1.19 (04-Feb-2020)
    - Fixed dissolve from "Vaporizer" type potentially causing godmode zombies.

1.18 (03-Feb-2020)
    - Fixed conflict with "Bile The World" plugin. Thanks to "3aljiyavslgazana" for reporting.
    - Plugin now compiled with SoureMod 1.10. Recompile yourself or time to upgrade your installation.

1.17 (13-Jan-2020)
    - Fixed players "semi-falling" when colliding the grenade. Thanks to "Dragokas" for reporting a fix.

1.16 (05-Jan-2020)
    - Added additional checks to prevent OnWeaponEquip errors. Thanks to "Mr. Man" for reporting.
    - Added Traditional Chinese translations. Thanks to "fbef0102" for providing.

1.15 (29-Nov-2019)
    - Added "messages" option in the config to disable hint messages as requested by "BlackSabbarh".
    - Fixed "preferences" option "0" not resetting grenade type when players take over bots. Thanks to "Voevoda" for reporting.

1.14 (24-Nov-2019)
    - Added Simplified Chinese translations. Thanks to "asd2323208" for providing.
    - Fix for potential godmode zombies when using LMC.
    - Fixed error msg: "Entity 157 (class 'pipe_bomb_projectile') reported ENTITY_CHANGE_NONE but 'm_flCreateTime' changed.".

1.13 (11-Nov-2019)
    - Added option "0" to "preferences" in the config to give stock grenades on pickup.

1.12 (10-Nov-2019)
    - Fixed breaking client preferences after map change due to last version fixes.

1.11 (09-Nov-2019)
    - Small optimizations.
    - Fixed breaking equip on round restart.
    - Fixed "Shield" type not working. Thanks to "fbef0102" for reporting.

1.10 (01-Nov-2019)
    - Changed the way grenade bounce sounds are replaced to prevent plugin conflicts. Thanks to "Lux" for the idea.
    - Optimizations: Changed string creation to static char for faster CPU cycles. Various string comparison changes.
    - Now only supports "Gear Transfer" plugin version 2.0 or greater to preserve random grenade type preferences.
    - Removed 1 frame delay on weapon equip from previous version of supporting "Gear Transfer" plugin.
    - Fixed "GrenadeMenu_Invalid" PrintToChat not replacing the colors. Thanks to "BHaType" for reporting.

1.9 (23-Oct-2019)
    - Fixed "Freezer" mode not preserving special infected render color. Thanks to "Dragokas" for reporting.

1.8 (23-Oct-2019)
    - Changed "Bullets" mode projectile sound.
    - Maybe fixed invalid entity errors again, reported by "KRUTIK".
    - Minor changes to late loading and turning the plugin on/off.

1.7 (18-Oct-2019)
    - Fixed handle memory leak.

1.6 (18-Oct-2019)
    - Fixed invalid entity errors reported by "KRUTIK".
    - Fixed L4D1 errors reported by "Dragokas".
    - Fixed not completely disabling everything when the plugin is turned off.
    - Now prevents ledge hanging when floating in Anti-Gravity.

1.5 (17-Oct-2019)
    - Added 6 new types: "Extinguisher", "Glow", "Anti-Gravity", "Fire Cluster", "Bullets" and "Flak".
    - Added command "sm_grenade" to open a menu for choosing the grenade type. Optional args to specify a type.
    - Added "mode_switch" in the config to control how to change grenade type. Menu and/or key combination.
    - Auto display and close menu with "mode_switch" when selecting a different type via key combination.
    - Changed L4D2 vocalizations from "throwing pipebomb" or "throwing molotov" etc to "throwing grenade" when not stock.
    - Changed grenade bounce impact sound.
    - Cleaned up the sounds by changing some and adding a few missing ones.
    - Feature to push and stumble Common Infected now works in L4D1.
    - Fixed wrong Deafen offset for L4D1 Linux. Fixes "Flashbang".
    - Fixed wrong OnStaggered signature for Linux L4D1. Fixes staggering clients.
    - Fixed "Freezer" type not following the "targets" setting.
    - Fixed "damage_tick" to function for most types. Values smaller than "effect_tick" will use the effect tick time.
    - Thanks to "Dragokas" for the menu ideas and reporting problems in L4D1.

    - Required updated files:
    - Config: l4d_grenades.cfg
    - Gamedata: l4d_grenades.txt
    - Translations: grenades.phrases.txt.

1.4 (10-Oct-2019)
    - Added Russian translations. Thanks to "KRUTIK" for providing.
    - Fixed OnNextEquip errors. Thanks to "KRUTIK" for reporting.

1.3 (10-Oct-2019)
    - Added support for "Gear Transfer" plugin. For persistent grenade types when "preferences" is set to random grenade mode.
    - Changed "Vaporizer" to inflict full damage on Common instead of range scaled. Original functionality before 1.1.

1.2 (10-Oct-2019)
    - Fixed OnWeaponDrop errors. Thanks to "BlackSabbarh" for reporting.
    - Some optimizations.

1.1 (08-Oct-2019)
    - Added "bots" in the config to control if bots can use Prototype Grenades. Requires external plugin.
    - Added "damage_special", "damage_survivors", "damage_tank", "damage_witch" and "damage_physics" in the config to scale damage.
    - Added "preferences" in the config to save a players selected mode, or give a random grenade type. Persistent with dropping.
    - Added "targets" in the config to control who can be affected by the grenade effects.
    - Changed "nade" in the config to use bit flags, which allows all grenade modes to work for all grenades.
    - Fixed map transition breaking the ability to change grenade modes.
    - Fixed over-healing when a player has temp health.
    - Fixed sometimes detonating immediately after throwing.
    - Fixed sounds not stopping when reloading the plugin during an active grenade.
    - Updated data config, plugin requires new version, or effects will break: l4d_grenades.cfg.

1.0 (03-Oct-2019)
    - Initial release.



Installation:
  • Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.

Updating from 1.4 or older:

New updated files required:
  • Config: l4d_grenades.cfg
  • Gamedata: l4d_grenades.txt
  • Translations: grenades.phrases.txt.

Current Translations: English (en), Russian (ru), Simplified Chinese (chi), Traditional Chinese (zho).

Marttt 10-02-2019 22:59

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
Amazing work Silvers, as always.

Some suggestions (I'm not creative for names):
*Gravity -> changes temporary the gravity of zombies/clients inside the area
*Extinguisher -> Removes fire from the ground (when allowed to)
*Slow -> Makes the movement temporary slower inside the area (don't know if the freeze already does that)
*Bile -> makes all zombies/clients temporary biled inside the area
*Glowing -> Makes all zombies/clients inside the area temporary glow

Not related, to the plugin, but I always thought that would be amazing a "Tornado" of tank rock

Also, in the config section would be nice to be able to select more than 1 type of grenade in the "nade" config, e.g. having the same effect enabled for molotov and pipe (you could use the same flag concept as in "stocks")
add which target should the "negative effects" be applied (zombie only, or human survivors also)
and maybe another cvar to allow the grenade type to be randomly chosen on pickup, instead of through a menu

Anyway, this is just some ideas, your work is a 11/10.

Thanks for the share, keep it up to reach the 100 count.

strikeraot 10-03-2019 00:37

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
Amazing Work, Silvers :D

strikeraot 10-03-2019 01:42

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
How about Bomb type for Pipebomb? It will be more realistic. We can use pipebomb to fight a tank

Silvers 10-03-2019 02:01

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
Quote:

Originally Posted by Marttt (Post 2668636)
*Gravity -> changes temporary the gravity of zombies/clients inside the area
*Extinguisher -> Removes fire from the ground (when allowed to)
*Slow -> Makes the movement temporary slower inside the area (don't know if the freeze already does that)
*Bile -> makes all zombies/clients temporary biled inside the area
*Glowing -> Makes all zombies/clients inside the area temporary glow

I'll try Gravity and see how it looks. Extinguisher maybe to remove Boomer Vomit also? Bile too similar to vomitjar. Glowing through walls?

Quote:

Originally Posted by Marttt (Post 2668636)
Also, in the config section would be nice to be able to select more than 1 type of grenade in the "nade" config, e.g. having the same effect enabled for molotov and pipe (you could use the same flag concept as in "stocks")

Done this, will release soon.

Quote:

Originally Posted by Marttt (Post 2668636)
add which target should the "negative effects" be applied (zombie only, or human survivors also)

Almost done the damage/effect targeting. Not all will be controllable.

Quote:

Originally Posted by Marttt (Post 2668636)
and maybe another cvar to allow the grenade type to be randomly chosen on pickup, instead of through a menu

When picking up a randomly chosen type should they be allowed to change type? Might add option for both. What about when they drop the grenade, tracking the type once it's been dropped becomes tedious which is why I never added that to begin with.


Quote:

Originally Posted by strikeraot (Post 2668642)
How about Bomb type for Pipebomb? It will be more realistic. We can use pipebomb to fight a tank

Next update allows setting all types to all grenades.

strikeraot 10-03-2019 02:49

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
how can i change grenade's damage on tank or witch? I tried to edit this:
Quote:

"Settings"
{
// Damage multiplier against Special Infected.
"special" "1000"

// Allow these grenades to keep their default feature.
// 0=None. 1=Molotov, 2=PipeBomb, 4=VomitJar. 7=All. Add numbers together.
"stocks" "7"

// Which grenades modes are enabled.
// 1=Bomb, 2=Cluster, 4=Firework, 8=Smoke, 16=Black Hole, 32=Flashbang, 64=Shield, 128=Tesla, 256=Chemical, 512=Freeze, 1024=Medic, 2048=Vaporizer, 4095=All.
// Minimum: "0"
// Maximum: "4095"
// Default: "4095"
"types" "4095"
}
But it seems not work on SI, Grenades still dealt a very very small damage on tank and Witch

Firebred 10-03-2019 09:08

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
A very cool plugin that i'm using for L4D2. I'm taking damage when i throw a particular bomb, is there a way i can remove this damage? The plugin works really well for the first map but for the following maps it won't let me change the bomb type and remains on the last type i used. If i restart the server it will repeat the same process. What can i do to fix this please?

Psyk0tik 10-04-2019 07:01

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
Awesome work as always man!

zaviier 10-04-2019 07:09

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
can you make this work for bot? also in versus gamemode.

i have server with vs bot only, so i want these bot can use this grenade skill

strikeraot 10-05-2019 13:34

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
What are the true uses of Smoke bomb in coop? :D


All times are GMT -4. The time now is 07:20.

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