Raised This Month: $51 Target: $400
 12% 

[L4D2] Realism Penetration Fix (v1.3 bugfix, 2014 Oct 5)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
dcx2
Senior Member
Join Date: Sep 2011
Plugin ID:
2797
Plugin Version:
1.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Fixes the magnum/sniper damage in Realism
    Old 02-10-2012 , 00:43   [L4D2] Realism Penetration Fix (v1.3 bugfix, 2014 Oct 5)
    Reply With Quote #1

    DESCRIPTION

    In non-Realism, penetrating weapons (military sniper, hunting rifle, and magnum) all get a "penetration bonus", such that they will do at least m_iMaxHealth damage to common infected (excluding Witch who takes normal damage, and Fallen Survivor who takes iMaxHealth/2 damage)

    In Realism, only the magnum gets the penetration bonus.

    This plugin aims to fix this problem. It offers cvars that allow nerfing the magnum or buffing the sniper in Realism. It can be configured to provide no penetration bonus (3 shots on advanced/expert to kill most commons), half penetration bonus (2 shots to kill commons on any difficulty), or full penetration bonus (1 shot to kill commons on any difficulty)

    As of v1.1, this plugin can optionally apply to non-realism modes. It can also limit the maximum number of penetration kills; by default the magnum is limited to 2 by the game and the snipers are unlimited.


    CVARS

    sm_realismpenfix_enable - Enables this plugin; 1 = realism only, 2 = all modes, 0 = off (default 1)
    sm_realismpenfix_debug - Print debugging output (default 0)
    sm_realismpenfix_nerfmagnum - 0: Full penetration bonus / 1: Half penetration bonus / 2: No penetration bonus, no distance penalty / 3: no penetration bonus, plus distance damage penalty (default 1)
    sm_realismpenfix_buffsniper - 0: No penetration bonus / 1: Half penetration bonus / 2: Full penetration bonus (default 1)
    sm_realismpenfix_magnumlimit - Maximum number of enemies one magnum bullet can kill (0 disables feature) (default 0)
    sm_realismpenfix_sniperlimit - Maximum number of enemies one sniper bullet can kill (0 disables feature) (default 0)


    CONFIG

    [game]/cfg/sourcemod/l4d2_realismpenfix.cfg


    If upgrading from a previous version, I recommend using SilverShot's Cvar Configs Updater plugin to update because it's the easiest solution. Or you can add any new cvars to this file yourself. Or backup this file, delete it and it will be automatically recreated and then you can restore your backed up settings.


    HISTORY

    v1.3 - The distance damage penalty applied with nerfmagnum 2 was too much for some folks. So nerfmagnum 2 now ignores the distance damage penalty (base magnum damage was selected to be 78). To apply the distance damage penalty to the magnum, set nerfmagnum to 3.

    v1.2 - fixed bug where OnTakeDamage called by an entity instead of a client would cause a plugin error (Array index is out of bounds) (124 views!)

    v1.1 - Added support for non-realism modes (enable cvar = 2)
    Added support for limiting the maximum number of enemies a single bullet can hit (magnumlimit and sniperlimit cvars)
    Magnum damage for nerfmagum == 2 will be accurately reduced according to distance


    DEPENDENCIES

    This plugin requires SDKHooks, so please download the smx file. I use SDKHooks 2.1, but since it uses OnTakeDamage it might work with 2.0
    Attached Files
    File Type: smx l4d2_realismpenfix.smx (9.2 KB, 1049 views)
    File Type: sp Get Plugin or Get Source (l4d2_realismpenfix.sp - 1067 views - 13.8 KB)

    Last edited by dcx2; 10-05-2014 at 13:26. Reason: new features
    dcx2 is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 02-10-2012 , 08:17   Re: [L4D2] Realism Penetration Fix
    Reply With Quote #2

    Excellent you posted it.

    Now that you did, I got some suggestions.

    I did the magnum fix once and my players HATED it with passion. So I had to remove it. The number 1 reason was that it was no longer a 1 hit kill.

    I was thinking that maybe if it made the commons stumble after being shot by a magnum but not killing them it might work better.

    Not sure really if that will make it too powerful again through.
    Mr. Zero is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 02-10-2012 , 10:25   Re: [L4D2] Realism Penetration Fix
    Reply With Quote #3

    Yeah, three shots to kill commons is a bit extreme. That's why I prefer the half penetration bonus, it's a nice compromise.

    Hmm, does left4downtown2's shove function work on commons, or just players? Is there a way to use left4downtown2 without requiring it? I know you can do that with plugins that depend on other plugins.

    I should also note that this isn't a 100% magnum fix; secondary weapon damage is supposed to decrease with distance (I think it's something like 1 point of damage every 50-100 units of distance). But I don't do that. I might add it a bit later.

    EDIT:

    Looked at L4D_StaggerPlayer. Says it works for CTerrorPlayer. I will try it out to see if it works for common infected.

    EDIT2:

    L4D_StaggerPlayer doesn't work on commons. We'd need some other way to do this, maybe an SDKCall or something.

    Last edited by dcx2; 02-11-2012 at 01:25.
    dcx2 is offline
    asto
    Member
    Join Date: Aug 2010
    Old 02-11-2012 , 06:48   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #4

    This is one of the must have plugins. Very necessary.

    When I read the "penetration" word, I thought this plugin removes the infinite penetration of snipers and shotguns (it's also problem, they owerpovered)... But this plugin fixes another big game problem/bug.

    I waited a long time for this plugin. Thank you.
    asto is offline
    asto
    Member
    Join Date: Aug 2010
    Old 02-11-2012 , 06:58   Re: [L4D2] Realism Penetration Fix
    Reply With Quote #5

    Quote:
    Originally Posted by Mr. Zero View Post
    Excellent you posted it.

    Now that you did, I got some suggestions.

    I did the magnum fix once and my players HATED it with passion. So I had to remove it. The number 1 reason was that it was no longer a 1 hit kill.

    I was thinking that maybe if it made the commons stumble after being shot by a magnum but not killing them it might work better.

    Not sure really if that will make it too powerful again through.
    And you didn't release the plugin only because of your players? Your players are beginners. They just use the game exploit that makes the magnum very owerpovered. (If you want to release something, don't listen to them. We will miss the great plugins.)

    And this plugin doesn't need to make the commons stumble. This is realism mode. The magnum should kill commons by 3 shots. (Moreover the magnum still has infinite ammo.)

    Last edited by asto; 02-11-2012 at 08:07.
    asto is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 02-11-2012 , 12:12   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #6

    Thanks for the positive feedback on my plugin. However, I think it's a little rude to call Mr. Zero's players "beginners". Anyone who plays realism expert - over-powered magnum or not - is no beginner.

    I also don't think Mr. Zero's plugin was unreleased because of his players. If he's like me, he has a bunch of plugins that can't be released because they need more work to ready for public consumption. It took me about an hour and a half to get this plugin ready for the public once it was tested and working; removing it from the existing "mega plugin" test bed, adding cvars to enable/disable and debug, testing and fine-tuning, etc.

    When I release, I try to make it so others can customize the game experience to their liking, hence all the cvars to configure it. Originally I just wanted the sniper to have one-shot kills like the magnum (I guess that makes me a beginner), but I decided to make it more flexible and allow a variety of configurations, so that everyone can have the gaming experience they desire.

    That's also why I'm going to look into removing infinite penetration for you, configurable as a cvar. Should be pretty easy; count the commons killed per bullet and when it exceeds some cvar threshold, block all further damage from that bullet.

    I know the magnum only penetrates two Infected, but I don't think there's a way to "increase" penetration count.

    I'm also still going to look into some way to "stumble" infected, again configurable by cvar. I think I'm going to try setting the infected's velocity so that it flies backwards; not a real stumble but maybe close enough.

    I'm also going to try figuring out the distance-damage-reduction formula.
    dcx2 is offline
    asto
    Member
    Join Date: Aug 2010
    Old 02-11-2012 , 12:55   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #7

    Sorry.
    I always see on Realism servers that players always use magnum, nothing else. Instant kill, infinite ammo, good accuraccy... what else would need? It's owerpovered and unbalanced.

    Players who can't play expert realism with the fixed, balanced magnum, the expert realism is not for them.

    This is a similar exploit as the infinite melee in L4D1.

    Mr. Zero also has many great, must have, very necessary plugins. He said his players hated this plugin, this is why I thought this was the reason.

    You can see the distance multiplier in the weapon_pistol_magnum.txt.

    Last edited by asto; 02-11-2012 at 12:57.
    asto is offline
    grasscid
    Junior Member
    Join Date: Jul 2012
    Old 06-05-2013 , 23:25   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #8

    Nice plugin! Would it be possible to just completely disable the penetration bonus all together in every gamemode?
    It annoys me that a little pistol with bullets no bigger than an AK's can kill zombies with one shot.
    grasscid is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 06-05-2013 , 23:59   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #9

    I may consider your request, because it's really not that hard. But a magnum is not a "little pistol"...

    The "Desert Eagle" can use .50 Action Express rounds. http://en.wikipedia.org/wiki/.50_Action_Express These bullets are 12.7mm in diameter and 33mm in length, weigh about 300 grams (!), and have a velocity in excess of 1,300 feet per second. This bullet is meant to take down huge animals like bears.

    For comparison, the AK47 uses 7.62×39mm M43/M67 cartridges. http://en.wikipedia.org/wiki/7.62x9739mm These cartridges, while *slightly* longer, have almost half the diameter. The heaviest bullet weighs a piddly 10 grams, 1/30th of the Magnum's bullet, but makes up for it with about 2,300 feet per second velocity.
    __________________
    dcx2 is offline
    grasscid
    Junior Member
    Join Date: Jul 2012
    Old 06-08-2013 , 22:15   Re: [L4D2] Realism Penetration Fix (v1.0, 2012 Feb 9)
    Reply With Quote #10

    Quote:
    Originally Posted by dcx2 View Post
    I may consider your request, because it's really not that hard. But a magnum is not a "little pistol"...

    The "Desert Eagle" can use .50 Action Express rounds. http://en.wikipedia.org/wiki/.50_Action_Express These bullets are 12.7mm in diameter and 33mm in length, weigh about 300 grams (!), and have a velocity in excess of 1,300 feet per second. This bullet is meant to take down huge animals like bears.

    For comparison, the AK47 uses 7.62×39mm M43/M67 cartridges. http://en.wikipedia.org/wiki/7.62x9739mm These cartridges, while *slightly* longer, have almost half the diameter. The heaviest bullet weighs a piddly 10 grams, 1/30th of the Magnum's bullet, but makes up for it with about 2,300 feet per second velocity.
    That may be so, but the Desert Eagle used in L4d likely uses the .44 magnum rounds (10.9x33) (You can tell this because of the eight round clip) which are noticeably weaker than the .50 action express rounds (12.7x33).
    This is opposed to the AK's 7.62x39 cartridge. On top of that, the AK's bullet velocity is almost double that of the .50 action express AND .44 magnum. The AK is, in every regard, the stronger weapon.
    But I digress. I'd appreciate it if you could make the plugin :p

    Also, I seem to have found a bug. Setting the Deagle's penetration in the .cfg to either 0 or 3 will both cause it to one hit kill. It could've been something on my end, but I don't know what it could've been.

    Last edited by grasscid; 06-08-2013 at 22:17.
    grasscid is offline
    Reply



    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 04:33.


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