Since SDKHooks OnTakeDamage now supports L4D2 again... have proper damage modding!
Features modifying any Damage dealt to Commons/Witch/any Player by pretty much anything. There is 2 seperate multipliers - one for Friendly Fire, and one for Enemy Attacks. If for example you wanted to nerf the Nadelauncher you'd raise Friendly Fire and decrease Enemy Damage.
Since i wanted max configurability without writing a million convars i went for a keyvalue file solution ... put the l4d2damagemod.cfg in your Sourcemod/configs/ folder and config away!
PHP Code:
Example excerpt l4d2damagemod.cfg
"L4D2 Damage Mods"
{
"MP5"
{
"weapon_class" "weapon_smg_mp5"
"modifier_friendly" "1.0"
"modifier_enemy" "1.2"
}
"AWP Sniper"
{
"weapon_class" "weapon_sniper_awp"
"modifier_friendly" "1.75"
"modifier_enemy" "1.75"
}
}
You require a target String behind "weapon_class", and then you can set your modifiers behind "modifier_friendly" and "modifier_enemy"
The header Strings, in this case "MP5" and "AWP Sniper" are arbitrary and for your information only
Damage gets multiplied with the Modifiers, 0 would STOP any damage from that source, 1.0 would be default, 2.0 is twice the damage
Possible Target Strings:
normal guns - by their entity class, e.g. "weapon_smg_silenced"
melee weapons - by their string, e.g. "katana"
pipes ("pipe_bomb_projectile"), and molotovs ("entityflame")
common infected - "infected"
witch - "witch"
Special Infected: by their weapon strings, i know for example spitter was "weapon_insectswam"
The car Mr. Tank just put into Ellis: "prop_physics"
My current l4d2damagemod.cfg is attached. It buffs the underpowered CSS weapons, nerfs the Nadelauncher, and has a lot of blank classes in it.
Please report any errors you may get ... L4D2 inflictor business is difficult.
Requires SDKHooks, tested on Sourcemod 1.4
Changelog:
1.0.0 - Release
1.0.1 - fix for invalid client id errors on victims
1.0.2 - fix for invalid client id errors on attackers
, also changed mod routine
1.0.3 - Updated in anticipation of upcoming SDK Hooks Update rendering it functional again
1.0.4 - fixed local hoster errors
1.0.5 - fixed stupid code oversight
1.0.6 - fixed tank claw special case
1.0.7 - doubled max modded weapons limit to 64
1.0.8 - fixed melee weapon classname
1.0.9 - fixed new crop of invalid client indizes