AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Prototype Grenades (1.46) [22-Nov-2023] (https://forums.alliedmods.net/showthread.php?t=318965)

Silvers 10-02-2019 21:00

[L4D & L4D2] Prototype Grenades (1.46) [22-Nov-2023]
 
50 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.46 (22-Nov-2023)
    - Fixed not pushing the Witch. Thanks to "HarryPotter" for finding and fixing.

1.45 (07-Nov-2023)
    - Fixed the "Bullets" type damage becoming extremely high. Thanks to "HarryPotter" for finding and fixing.

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 21: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-02-2019 23:37

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

strikeraot 10-03-2019 00: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 01: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 01: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

Ruthless1 10-03-2019 08: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 06:01

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

zaviier 10-04-2019 06: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 12:34

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

Silvers 10-05-2019 13:05

Re: [L4D & L4D2] Prototype Grenades (1.0) [03-Oct-2019]
 
Will release an update soon. Large update with a lot of options and fixes, taking a while to finish as I'm trying to optimized the whole damage system.

Quote:

Originally Posted by strikeraot (Post 2668645)
But it seems not work on SI, Grenades still dealt a very very small damage on tank and Witch

Next version will allow you to set damage multipliers for Survivors, Special Infected, Common Infected, Witch and Physics props.


Quote:

Originally Posted by Firebred (Post 2668663)
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?

Next version will fix breaking after map change, thanks for reporting. Also taking damaging when throwing maybe hopefully fixed. I'm guessing it was colliding with an invisible "trigger_*" entity since that's the only time it's happened to me.


Quote:

Originally Posted by Crasher_3637 (Post 2668755)
Awesome work as always man!

Thanks :P


Quote:

Originally Posted by zaviier (Post 2668758)
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

Next version has support for bots and the Grenade Throwing Bots plugin (which also needs updating to fix the endless stream of errors).


Quote:

Originally Posted by strikeraot (Post 2668900)
What are the true uses of Smoke bomb in coop? :D

It was a simple addition like most of the modes copied from Mutant Zombies. It has no affect on Common so pretty useless, you can disable it.





Feel free to suggest other grenade types. I'll start adding some after the next update is released, they can be added quickly and easily.

Mi.Cura 10-05-2019 21:16

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

Originally Posted by Firebred (Post 2668663)
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?


same for me. but is a great job.

Silvers 10-08-2019 13:33

Re: [L4D & L4D2] Prototype Grenades (1.1) [08-Oct-2019]
 
Finally updated:

Quote:

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.
Replace the data config or some of the effects will break or not work as intended.

Please feel free to suggest more balanced damage values etc for the config. It's difficult to figure out values without playing or having a server.

BlackSabbarh 10-09-2019 00:08

Re: [L4D & L4D2] Prototype Grenades (1.1) [08-Oct-2019]
 
log

SourceMod error session started
L 10/09/2019 - 00:00:36: Info (map "c1m2_streets") (file "errors_20191009.log")
L 10/09/2019 - 00:00:36: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:00:36: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:00:36: [SM] Call stack trace:
L 10/09/2019 - 00:00:36: [SM] [0] GetEdictClassname
L 10/09/2019 - 00:00:36: [SM] [1] Line 963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponDrop
L 10/09/2019 - 00:00:53: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:00:53: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:00:53: [SM] Call stack trace:
L 10/09/2019 - 00:00:53: [SM] [0] GetEdictClassname
L 10/09/2019 - 00:00:53: [SM] [1] Line 963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponDrop
L 10/09/2019 - 00:00:59: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:00:59: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:00:59: [SM] Call stack trace:
L 10/09/2019 - 00:00:59: [SM] [0] GetEdictClassname
L 10/09/2019 - 00:00:59: [SM] [1] Line 963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponDrop
L 10/09/2019 - 00:01:15: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:01:15: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:01:15: [SM] Call stack trace:
L 10/09/2019 - 00:01:15: [SM] [0] GetEdictClassname
L 10/09/2019 - 00:01:15: [SM] [1] Line 963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponDrop
L 10/09/2019 - 00:01:20: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:01:20: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:01:20: [SM] Call stack trace:
L 10/09/2019 - 00:01:20: [SM] [0] GetEdictClassname
L 10/09/2019 - 00:01:20: [SM] [1] Line 963, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponDrop
L 10/09/2019 - 00:01:29: [SM] Exception reported: Invalid edict (-1 - -1)
L 10/09/2019 - 00:01:29: [SM] Blaming: l4d_grenades.smx
L 10/09/2019 - 00:01:29: [SM] Call stack trace:

gamer_kanelita 10-09-2019 20:34

Re: [L4D & L4D2] Prototype Grenades (1.1) [08-Oct-2019]
 
can someone tell me which keys are SHOOT + SHOVE, which I can't find on my keyboard ?

strikeraot 10-09-2019 21:25

Re: [L4D & L4D2] Prototype Grenades (1.1) [08-Oct-2019]
 
L.Click and R.Click

Silvers 10-09-2019 22:02

Re: [L4D & L4D2] Prototype Grenades (1.2) [10-Oct-2019]
 
Quote:

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

strikeraot 10-09-2019 22:36

Re: [L4D & L4D2] Prototype Grenades (1.2) [10-Oct-2019]
 
Quote:

L 10/10/2019 - 09:37:13: [SM] Exception reported: Language phrase "GrenadeMod_Title_11" not found (arg 8)
L 10/10/2019 - 09:37:13: [SM] Blaming: Grenades.smx
L 10/10/2019 - 09:37:13: [SM] Call stack trace:
L 10/10/2019 - 09:37:13: [SM] [0] Format
L 10/10/2019 - 09:37:13: [SM] [1] Line 941, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnWeaponEquip
this error appear when i pick up a Vomitjar

Silvers 10-09-2019 22:38

Re: [L4D & L4D2] Prototype Grenades (1.2) [10-Oct-2019]
 
You're missing the translations file.

sonic155 10-10-2019 03:21

Re: [L4D & L4D2] Prototype Grenades (1.1) [08-Oct-2019]
 
Quote:

Originally Posted by gamer_kanelita (Post 2669330)
can someone tell me which keys are SHOOT + SHOVE, which I can't find on my keyboard ?

shoot is whatever key you use to fire your gun should be [Left click] on the mouse
shove is whatever key you use to push back commons etc should be [Right click] on the mouse

Silvers 10-10-2019 04:04

Re: [L4D & L4D2] Prototype Grenades (1.3) [10-Oct-2019]
 
Quote:

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.
If you use Gear Transfer plugin and want random grenade types, you'll need to update Gear Transfer also.

KRUTIK 10-10-2019 05:32

Re: [L4D & L4D2] Prototype Grenades (1.3) [10-Oct-2019]
 
1 Attachment(s)
Added Russian language.

KRUTIK 10-10-2019 07:00

Re: [L4D & L4D2] Prototype Grenades (1.3) [10-Oct-2019]
 
[SM] Exception reported: Invalid edict (118 - 118)
L 10/10/2019 - 13:41:34: [SM] Blaming: l4d_grenades.smx
L 10/10/2019 - 13:41:34: [SM] Call stack trace:
L 10/10/2019 - 13:41:34: [SM] [0] GetEdictClassname
L 10/10/2019 - 13:41:34: [SM] [1] Line 900, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::OnNextEquip
L 10/10/2019 - 13:42:25: Error log file session closed.

Silvers 10-10-2019 07:24

Re: [L4D & L4D2] Prototype Grenades (1.4) [10-Oct-2019]
 
Thank you! Updated and added translation.

3aljiyavslgazana 10-10-2019 07:49

Re: [L4D & L4D2] Prototype Grenades (1.4) [10-Oct-2019]
 
forget what i said Awesome plugin !!!!! :twisted::twisted::twisted:

Dragokas 10-13-2019 15:27

Re: [L4D & L4D2] Prototype Grenades (1.4) [10-Oct-2019]
 
Thanks for the very beautiful plugin.

Looks like crash in L4D1 caused by the same issue, wrong sig for OnStaggered.

Bugs:
"Flash" grenade causes "Screen of death" appear, however player is not dead and continue to play.

"Freezer" doesn't target commons.

Also, plugin conflicts with gear_transfer. When you press LMB + RMB and somebody accidentally runs past you, you give him a grenade instead of switching the mode.

Can you add optional ConVar to change the method of switching grenade mode,
e.g.
PHP Code:

// Grenade switch mode: 0 - switch by circle, 1 - switch by menu (list of modes will appear)
l4d_grenades_switchmode "0" 

New grenade type request:
"Tank" - force all tanks on the map to follow the grenade (e.g. use evil witch method - change angle OnThink).

"Antigravity" - force all players in the area to be pushed off the ground for some time (possibly, also not easy one, maybe force "+jump" hijack in OnPlayerRunCmd + changing velocity / gravity prop, and maybe check some abilities from VPhysics).

--
Also, it's very nice to see configs for default "stock" grenade mode, to be able to override them, e.g. ignite time (like,
Spoiler

), radius...

+ Like :)

Dragokas 10-13-2019 16:08

Re: [L4D & L4D2] Prototype Grenades (1.4) [10-Oct-2019]
 
Code:

                "damage_physics"                "2.0"                // Damage multiplier against Physics objects.
                "damage_special"                "2.0"                // Damage multiplier against Special Infected.
                "damage_survivors"                "0.05"                // Damage multiplier against Survivors.
                "damage_tank"                        "1.0"                // Damage multiplier against the Tank.
                "damage_witch"                        "1.0"                // Damage multiplier against the Witch.
                "damage"                                "75.0"                // Amount of damage to deal each hit. Damage falls off over range.

How to differentiate damage done to common zombies (not specials) ?
I'm trying to hit zombie horde when horde runs next to a chemical grenade, but I can't even with extra high damage values.

Also, "Mod_Freezer" with "targets" "29" freeze survivors.

Silvers 10-14-2019 01:29

Re: [L4D & L4D2] Prototype Grenades (1.4) [10-Oct-2019]
 
Update coming soon with fixes for the above mentioned issues. Menu to select mode and some new grenade modes.


Quote:

Originally Posted by Dragokas (Post 2669690)
How to differentiate damage done to common zombies (not specials) ?
I'm trying to hit zombie horde when horde runs next to a chemical grenade, but I can't even with extra high damage values.

Code:

                "damage_physics"                "0.2"                // Damage multiplier against Physics objects.
                "damage_special"                "0.2"                // Damage multiplier against Special Infected.
                "damage_survivors"                "0.1"                // Damage multiplier against Survivors.
                "damage_tank"                        "0.1"                // Damage multiplier against the Tank.
                "damage_witch"                        "0.1"                // Damage multiplier against the Witch.
                "damage"                        "150.0"                // Amount of damage to deal each hit. Damage falls off over range.
                "damage_tick"                        "0.5"                // How often to deal damage during the "effect_time".
                "effect_range"                        "300.0"                // Distance the effect can influence.

Remember "Damage falls off over range". At 300 units away it will be 1 HP. The closer to the center the more damage. This would do 150.0 damage to common and 15.0 to survivors. This works nicely to kill the common instantly near center. I might use this for the default values.



Quote:

Originally Posted by Dragokas (Post 2669688)
Also, plugin conflicts with gear_transfer. When you press LMB + RMB and somebody accidentally runs past you, you give him a grenade instead of switching the mode.

Menu will be added. Unless someone can recommend a good alternative key combination. Holding shoot + Use is bad because of interacting with objects. Reload key is also used by Gear Transfer.


Quote:

Originally Posted by Dragokas (Post 2669688)
Also, it's very nice to see configs for default "stock" grenade mode, to be able to override them

This is something I'll write as an external plugin.

Silvers 10-16-2019 20:00

Re: [L4D & L4D2] Prototype Grenades (1.5) [17-Oct-2019]
 
Large update:

Code:

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.


KRUTIK 10-18-2019 01:54

Re: [L4D & L4D2] Prototype Grenades (1.5) [17-Oct-2019]
 
: [SM] Exception reported: Entity -1 (-2137104103) is invalid
L 10/17/2019 - 20:52:45: [SM] Blaming: l4d_grenades.smx
L 10/17/2019 - 20:52:45: [SM] Call stack trace:
L 10/17/2019 - 20:52:45: [SM] [0] DispatchKeyValue
L 10/17/2019 - 20:52:45: [SM] [1] Line 3234, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Explode_Bullets
L 10/17/2019 - 20:52:45: [SM] [2] Line 2188, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Explode_Effects
L 10/17/2019 - 20:52:45: [SM] [3] Line 2144, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Timer_Repeat_Explod e
L 10/17/2019 - 20:52:45: [SM] Exception reported: Entity -1 (-2137104103) is invalid

Dragokas 10-18-2019 10:27

Re: [L4D & L4D2] Prototype Grenades (1.5) [17-Oct-2019]
 
Thanks, very funny.

New tests on L4D1:
Code:

Attempted to precache unknown particle system "fireworks_sparkshower_01e"!
Attempted to precache unknown particle system "sparks_generic_random"!
Attempting to create unknown particle system 'fireworks_sparkshower_01e'
Attempting to create unknown particle system 'sparks_generic_random'

Freezer resets render color of special infected.

Antigrav deal damage to survivor (at least to thrower). Wrong description?
Quote:

"damage" "1.0" // Does no damage but required to work.
Also, can't set up it to force double jump even with:
Quote:

"effect_tick" "0.3"
Any example?

Quote:

L 10/18/2019 - 08:20:58: [SM] Exception reported: Temp entity property "m_vOrigin.x" not found
L 10/18/2019 - 08:20:58: [SM] Blaming: l4d_grenades.smx
L 10/18/2019 - 08:20:58: [SM] Call stack trace:
L 10/18/2019 - 08:20:58: [SM] [0] TE_WriteFloat
L 10/18/2019 - 08:20:58: [SM] [1] Line 4502, H:\_To_games\Left4Dead_2\My_mods\Mutant\Grena des\1.5\scripting\l4d_grenades.sp::L4D_TE_Cre ate_Particle
L 10/18/2019 - 08:20:58: [SM] [2] Line 3159, H:\_To_games\Left4Dead_2\My_mods\Mutant\Grena des\1.5\scripting\l4d_grenades.sp::Explode_Bu llets
L 10/18/2019 - 08:20:58: [SM] [3] Line 2188, H:\_To_games\Left4Dead_2\My_mods\Mutant\Grena des\1.5\scripting\l4d_grenades.sp::Explode_Ef fects
L 10/18/2019 - 08:20:58: [SM] [4] Line 2111, H:\_To_games\Left4Dead_2\My_mods\Mutant\Grena des\1.5\scripting\l4d_grenades.sp::Detonate_G renade
L 10/18/2019 - 08:20:58: [SM] [5] Line 2048, H:\_To_games\Left4Dead_2\My_mods\Mutant\Grena des\1.5\scripting\l4d_grenades.sp::Timer_Deto nate
Bullets type doesn't cause any effect or damage.

Recall my request to update "gear transfer" by blocking LMB + RMB hotkey.

Thanks.
Have a nice day!

Silvers 10-18-2019 11:15

Re: [L4D & L4D2] Prototype Grenades (1.6) [18-Oct-2019]
 
Done and done.

Code:

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.


Ruthless1 10-20-2019 17:41

Re: [L4D & L4D2] Prototype Grenades (1.7) [18-Oct-2019]
 
Since my last post regarding taking damage after throwing a grenade, its still happening as of the time of writing this post. When i throw a pipe or molly in L4D2 it knocks me over (additional plugin i use that causes a player to get pushed over after an explosion) and i take damage. This would indicate that there is some type of explosive event as soon as the pipe or molly has left my hand. Any idea why this is happening?

Silvers 10-20-2019 18:07

Re: [L4D & L4D2] Prototype Grenades (1.7) [18-Oct-2019]
 
Quote:

Originally Posted by Firebred (Post 2670423)
Since my last post regarding taking damage after throwing a grenade, its still happening as of the time of writing this post. When i throw a pipe or molly in L4D2 it knocks me over (additional plugin i use that causes a player to get pushed over after an explosion) and i take damage. This would indicate that there is some type of explosive event as soon as the pipe or molly has left my hand. Any idea why this is happening?

Plugin conflict? It happens every time you throw? You have the latest version? It doesn't happen to me so I don't know how to fix. Try disabling all other plugins and testing. If it works then starting adding half of the disabled plugins and testing until you find which ones causing it. Which game and server OS?

KRUTIK 10-21-2019 01:22

Re: [L4D & L4D2] Prototype Grenades (1.7) [18-Oct-2019]
 
[SM] Exception reported: Entity -1 (-2094521783) is invalid
L 10/21/2019 - 08:19:51: [SM] Blaming: l4d_grenades.smx
L 10/21/2019 - 08:19:51: [SM] Call stack trace:
L 10/21/2019 - 08:19:51: [SM] [0] DispatchKeyValue
L 10/21/2019 - 08:19:51: [SM] [1] Line 3270, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Explode_Bullets
L 10/21/2019 - 08:19:51: [SM] [2] Line 2224, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Explode_Effects
L 10/21/2019 - 08:19:51: [SM] [3] Line 2180, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_grenades.sp::Timer_Repeat_Explod e
L 10/21/2019 - 08:19:52: [SM] Exception reported: Entity -1 (-2094521783) is invalid

Silvers 10-21-2019 09:58

Re: [L4D & L4D2] Prototype Grenades (1.7) [18-Oct-2019]
 
It makes no sense why this error happens. The entity should be valid and exist prior to the explode timer call. The only way I've caused it was by disabling the plugin while a grenade was active (fixed for next version).

Can you make this happen everytime? If so what are the steps to replicate the problem? Which map, which gamemode, after a round restart or map change? Do you have any plugins that delete entities to clean the map?

Worst scenario I'll paste "CreateHurtEntity()" everywhere before using g_iEntityHurt but that shouldn't be required. Does anyone else have this problem?

Silvers 10-23-2019 15:04

Re: [L4D & L4D2] Prototype Grenades (1.8) [23-Oct-2019]
 
Quote:

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.
Pasted "CreateHurtEntity()" around in places before use. Hopefully that fixes the errors.

Dragokas 10-23-2019 15:34

Re: [L4D & L4D2] Prototype Grenades (1.8) [23-Oct-2019]
 
I noticed that sometimes when you are throwing grenade right before round ends, I see explosion begins, but when next round starts grenade is not disappeared in my hands, and when you try to throw it, possibly, game think that I have no grenade and switch me to primary weapon instead of throwing.

Not sure is it some plugin conflict or something.

I want recall my ask to preserve special infected color before freeze and restore after removing freeze effect.

Silvers 10-23-2019 16:10

Re: [L4D & L4D2] Prototype Grenades (1.9) [23-Oct-2019]
 
Quote:

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

This plugin does not handle removing the grenade when firing, the game does that itself. Throwing in the saferoom before the door opens will switch from the grenade to your weapon, again this is what the game does.

Silvers 10-31-2019 23:06

Re: [L4D & L4D2] Prototype Grenades (1.10) [01-Nov-2019]
 
Code:

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.



All times are GMT -4. The time now is 19:57.

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