Raised This Month: $32 Target: $400
 8% 

[L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification [+ Stats] v0.9.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author
extrospect
Member
Join Date: Aug 2009
Plugin ID:
1299
Plugin Version:
0.9.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Hunter pounce damage uncapping and modification for L4D2 [now with support for L4D1 too :)]
    Unapprover:
    Reason for Unapproving:
    Doesn't work anymore, author has been inactive for one month.
    Old 11-30-2009 , 16:23   [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification [+ Stats] v0.9.6
    Reply With Quote #1

    [pouncedamage+] Hunter Pounce Uncapping & Modification for L4D2 (+ L4D)


    This is my first attempt at a full plugin, and I have to give credit to n0limit for his Pounce Announce plugin which I nicked the pounce damage calculation code from to create this .

    A few people probably already knew about uncapping pounce damage in L4D with the max, min & damage Cvars - unfortunately Valve decided to steal the max and min cvars from us in L4D2, so you can turn up the damage but not extend the max range.

    This plugin solves all that and more , it allows an admin to:
    - Uncap the hunter pounce damage limit upto any value they like (anything over 400 is essentially uncapped) while maintaining default damage scaling (unless l4d_pdp_scale (see below) or z_hunter_max_pounce_bonus_damage is set to a non-default value).
    - Adjust the scaling of pounce damage relative to default using a single cvar which behaves as a damage multiplier.
    - Enable the carry-over & scaling of any excess dmg dealt when pounce dmg incaps a survivor, i.e. a 20 dmg pounce on a 5 hp survivor with an incap scale of 3.0 would deal an extra 45 (3.0 * (20 - 5)) dmg to the survivor once they are downed.
    - Adjust various properties of the plugin's notifications as well as having the option of blocking ingame notifications.
    - Enable or disable damage scoring for any excess dmg the plugin deals.
    - Enable or disable hunter pounce stats tracking.

    - Set which game modes the plugin is enabled for.
    The plugin also now includes hunter pounce stats with the ability for users to view their own stats and see a top <n> list of the best damage pounces on the server; server average stats are also being collected and will be used in future versions for users to compare their stats to the averages on the server.


    Cvars:

    l4d_pdp_maxdmg: This value is the damage cap the plugin will enforce, it is intended to be a number above the current/normal damage cap (25), however, setting it below will just result in no extension of the normal cap (currently, the plugin will not limit the dmg below the inbuilt cap, although you can acheive this by increasing pdplus_scale and lowering the ingame & pd+ caps); it can be set to any value, although survivors only have 400 hp from full health thru incapped to dead so using a value over 400 is the same as having no cap. (default 100 [upto 100 dmg can be dealt by a single pounce])

    l4d_pdp_scale: This acts as a scaling factor for the damage, so if set to 5 then hunter pounce damage will be 5 times as intense (a normal 20 dmg pounce would now deal 100 dmg), likewise it can be set to a value below 1 (but above 0, e.g. 0.5 to halve pounce damage) to decrease pounce damage - effectively extending how far you need to pounce to deal a given amount of damage. Any positive value should work fine, I tried it with a negative value just for fun and it 'heals' survivors with pounce damage xD, the more damage you land - the more hp the survivors get . (default 1.0 [normal l4d2 pounce damage scaling])

    l4d_pdp_incap_dmg: If this is enabled (set to 1), then any excess damage dealt to a survivor who is incapped by pounce damage will be dealt to their downed hp. See above for a better explanation . (default 1 [enabled])

    l4d_pdp_incap_scale: Allows scaling of the carry-over damage enabled using pdplus_incap_dmg, e.g. pdplus_incap_scale 3 would mean that if you landed a 50 dmg pounce on a 10 hp survivor, the normal 40 dmg carryover becomes 120 hp, leaving them downed with 180 hp left =). (default 1.0 [carry-over damage is not scaled and is applied as it is])

    l4d_pdp_notify: This defines how [pd+] notifications will be shown in chat: 0 - No chat notifications for pounce damage; 1 - Chat notifications for any pounces above the in-game cap (not the plugin cap - pdplus_maxdmg), i.e. the pounces where the victim will experience more damage than the ingame notification can announce; 2 - Chat notifications for pounces equal to or above pdplus_notify_min (see below); 3 - The same as 1, but using hintbox notifications instead of announcing it in chat; 4 - The same as 2, but in a hintbox not chat. (default 3 [hintboxes for over default cap only])

    l4d_pdp_scalenotify: If pdplus_scale is changed from default (1.0) then enabling this cvar (set it to 1) causes clients to be notified of the change to the damage scale in chat at every pounce - this helps to prevent confusion over the mismatch between the ingame pouncedamage value that pops up and the actual damage sustained after the plugin has done its thing. (default 1 [enabled])

    l4d_pdp_incapnotify: If incap dmg carry-over is enabled then settings this to 1 will inform players whenever it occurs, telling them how much extra damage was done, and to who, once they were down. (default 1 [enabled])

    l4d_pdp_gamemodes: Set this cvar to a comma separated list of the gamemodes you want pd+ [including the stats system, if enabled] to be enabled for. e.g. pdplus_gamemodes "versus,scavenge,realism" would enable the plugin for only those gamemodes and disable it for coop, survival, teamscavenge and teamversus. (default "versus, scavenge")

    l4d_pdp_notify_min: (Thanks to Blakeocity for the idea ) This allows you to set a min pounce value required to trigger notifications when pdplus_notify is set to either 2 or 4. Only pounces with damage equal to and above the value set will trigger pd+ announcements. (Default 1 [all dp's trigger notifications])

    l4d_pdp_notify_all: If enabled (set to 1) then pd+ announcements will be broadcast to all players on the server, if disabled (set to 0), then the announcements will only be sent to the pouncing player and their victim. (Default 1 [enabled])

    l4d_pdp_welcome: Enable (1) and disable (0) a welcome message which will be sent to all players who are new to the server through chat about a minute after they connect - the message just explains what effect pd+ is having on this server. (Default 1 [enabled])

    *new stuff*

    l4d_pdp_dmg_scoring: Enable (1) or disable (0) whether any extra damage dealt by the plugin is added to the attacking hunter's score, this function is currently only able to add to a hunter's score and cannot subtract from it, so if l4d_pdp_scale is set to less than 1.0 then the hunter will score more points (as many as they score by default ingame) than the damage they actually deal. (Default 1 [enabled])

    l4d_pdp_block_ingame_dmgtxt: Allows the ingame pounce damage notifications to be selectively blocked; set to 0 to never block ingame msgs, set to 1 to only block the ingame notification if it displays a different dmg value than pd+ and set to 2 to always block the ingame msg if there is a pd+ notification. (Default 1 [ingame msgs are blocked if the dmg they show is not what is actually being dealt])

    l4d_pdp_welc_reg_timeout: The number of days before removing non-admins from the welcome register file, this keeps the size of the file down but means players will receive the pd+ info message they get on first connect once again if they rejoin after being deleted. (Default 30)

    l4d_pdp_version: Version cvar.


    Stats Cvars

    l4d_pdp_stats: Set to 1 to enable pd+ stats on the server, likewise set it to 0 to disable stats (doesn't clear the stats file so stats will still be there when re-enabled). (Default 1 [enabled])

    l4d_pdp_min_visits: The number of visits that the stats system must record for a user before moving them from the 'guest' category to the 'regular' category with regards to deletion of stats after x days without a visit (see pdpstats_guest_timeout and pdpstats_reg_timeout below). (Default 3)

    l4d_pdp_guest_timeout: After this number of days without a visit, a user who has not had sufficient visits to be considered a 'regular' will have their stats flagged for deletion when the statsfile is cleaned. i.e. how many days til random players' stats are automatically cleared. For each of the timeout cvars, a value of 0 results in the stats never being deleted. (Default 5)

    l4d_pdp_reg_timeout: After this number of days without a visit, a user who has had sufficient visits to be considered a 'regular' will have their stats flagged for deletion when the statsfile is cleaned. i.e. how many days til regular players' stats are automatically cleared. (Default 30)

    l4d_pdp_admin_timeout: This is how many days without a visit before a user who is flagged as an admin (with priveledges equal to or above the flag set in pdpstats_min_admin) will have their stats automatically deleted. (Default 0 [Never delete admin stats])

    l4d_pdp_min_admin: The lowest alphabetical admin flag considered to be an admin with regards to stats deletion, only admins with an access level equal to or above this level will be protected from stats deletion for <pdpstats_admin_timeout> days since their last visit. (Default "a" [users who have reserved slot access and above are considered admins])

    l4d_pdp_welcome_msg_default: The default stats welcome message behaviour for new clients, clients are able to change the behaviour later on using !pdpwelcome in chat (see below) but this is just how it will default for people who don't change anything. 0 disables a welcome message, 1 gives a private [client only] welcome message and 2 gives a public welcome message [broadcast to all connected players]. (Default 0 - no stats welcome messages)


    Commands

    l4d_pdp_clean_statsfile: The stats file is cleaned whenever the server empties or the map restarts, but this is here just incase an admin wants to manually trigger a cleaning of the statsfile, it's a server command so needs to be run as rcon.

    l4d_pdp_deleteall: This can be used to completely clear the statsfile of all entries and start afresh. This is also a server command and so needs to be entered as rcon.


    sm_pdpstats / l4d_pdp_statsme: Client command (most easily accessed using !pdpstats in chat) that allows the user to check their stats.

    sm_pdptop: Client command to display a list of the top <n> personal best damage pounces on the server. Usage is sm_pdptop <n> in console or "!pdptop <n>" in chat, i.e. "!pdptop 55" to see the top 55 p.b.'s.

    sm_pdptopdelay: Client command used to set their desired delay between top menu pages. Usage: sm_pdptop <n> to set a specific value or just sm_pdptopdelay to cycle thru defaults, works the same for '!pdptopdelay' in chat.

    sm_pdpwelcome: Client command to toggle (or set, if 0, 1 or 2 is entered after the command (i.e. "!pdpwelcome 2" in chat)) how they are welcomed to the server by pd+stats - switches between no welcome (0), a private welcome (1) and a public welcome (2).


    Limitations

    This plugins does not actually uncap the ingame pounce damage system, it just simulates doing so by calculating how far a hunter has pounced, from that it can work out [based on the standard game damage/distance scaling] how much damage *should* have been done and then it applies the extra damage, to the pounce victim, that the game didn't due to the inbuilt cap (at a pounce of ~1000 distance units).

    As a result, any damage above the cap is applied by the plugin, not the attacking hunter. The current damage application system does allow the additional dmg applied by the plugin to be scored but cannot be used to subtract dmg from a hunter's score (i.e. when l4d_pdp_scale is below 1.0). So, if damage is downscaled, hunter's scores will reflect the original ingame dmg despite the survivors being dealt less damage than the score would suggest.


    Future improvements:

    Include notification options for pdplus_incap_scale.

    Break stats keyvalues file into multiple separate files to avoid loading very large keyvalues tables for servers with lots of user stats.

    Look into modifying hunter scores in other ways in order to allow subtraction from hunters' scores.

    Add a command to let users clear their own stats.

    Add more in-depth stats analysis and possibly a menu to split the stats into separate groups.

    Add translations.


    Changelog:

    Version 0.9.6
    - Fixed a bug which caused an additional entry into the top <n> menu with a pounce dmg equal to the best on the server under the name 'unnamed'.

    Version 0.9.5
    - Added the ability to add any extra dmg a hunter scores due to the plugin onto the hunter's score, this can be turned on or off using l4d_pdp_dmg_scoring.
    - Added function to block the ingame pounce dmg messages, can be set to block whenever there's a pd+ notification, only if the dmg dealt differs from the ingame msg or never by using l4d_pdp_block_ingame_dmgtxt.
    - Added tracking of stats totals, the data is currently collected but unused, future versions of the plugin will make use of it to display averages to users for comparison to their own stats.
    - Reorganised, cleaned & commented code; added changes necessary for approval - including prefixing all cvars with l4d_.
    - Fixed a minor error which caused stats deletion for any 'expirable' stats over New Years D=, apologies to anyone who lost stats, it was a small mistake in the coding and I didn't pick it up til a few days into this year but it is fixed now :>.
    - Added cleanup function for the welcome register (the file that records who has already had their 'first visit welcome message') which runs whenever the stats cleanup function does, the number of days since last visit before removal from the welcome register can be set using l4d_pdp_welc_reg_timeout.
    - Fixed timer handle failing to be reset which was causing some spam in the error logs.
    - If updating it's worth deleting/moving pouncedamageplus.cfg from cfg/sourcemod and letting the plugin rebuild a fresh one using all the new cvar names now that they've all been changed from pdplus_ to l4d_pdp_ .

    Version 0.9.0
    - The top <n> menu is now sent page-by-page, 5 entries at a time, with a user-controlled delay set by saying !pdptopdelay <n> in chat, <n> is the required delay in seconds, leave blank to toggle thru defaults.

    Version 0.8.9
    - Damage is now applied properly to players' temporary health (pills, adrenaline + b+w) as well as their regular health.
    - Fixed some hintbox notification items being repeated.
    - Added register for the welcome msg so it will now only ever be sent to a player once (cleanup function to come but the file shouldn't get too large at less than a couple thousand players).

    Version 0.8.8
    - Bugfixes to the plugin's timer behaviour to keep all timers unique to each user, as well as some other minor fixes in the plugin's behaviour.
    - Re-re-done notifications system to be less obtrusive, included a welcome message to avoid repeatedly explaining the impact of the plugin to users.
    - Added victim + attacker only notifications option
    - Added gamemode filter cvar to allow the plugin to automatically disable itself when in an undesired gamemode.
    - Added the ability to set the minimum value at which pounce notifications kick in.
    - Brand new stats system with (fairly) detailed user stats and a personal best's ranking system.

    Version 0.6.1

    - Fixed carry-over damage being reapplied to same survivor on every subsequent non-carry-over pounce on the server.
    - Further improvements to notification system.
    - Added the ability to scale the incap carry-over damage using pdplus_incap_scale.
    - Added the ability to toggle incap carry-over damage notifications with pdplus_incapnotify.

    Version 0.5.2
    - Fixed the earlier update breaking the plugin for L4D2 >,<, the plugin remains compatible with both L4D1 & L4D2
    - Slightly improved the accuracy of the damage calculation
    - Completely redone notification system with chat and hintbox notifications (see pdplus_notify cvar for more info).

    Version 0.4.5
    - Added L4D1 support.

    Version 0.4.0
    - First version.
    Attached Files
    File Type: sp Get Plugin or Get Source (pouncedamageplus.sp - 4161 views - 79.1 KB)

    Last edited by extrospect; 01-26-2010 at 02:29.
    extrospect is offline
    Dragonshadow
    BANNED
    Join Date: Jun 2008
    Old 11-30-2009 , 21:48   Re: [L4D2] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #2

    stupid question but does this work for l4d1 aswell? It would be nice to have the damage carry over
    Dragonshadow is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 12-01-2009 , 06:14   Re: [L4D2] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #3

    Why do you use fix values for min and max pounce distance, where (created) cvars would allow the 'old' customization range?

    I mean, the Pounce Announce Plugin this is made of even used all the necessary calls
    AtomicStryker is offline
    extrospect
    Member
    Join Date: Aug 2009
    Old 12-01-2009 , 09:30   Re: [L4D2] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #4

    Quote:
    stupid question but does this work for l4d1 aswell? It would be nice to have the damage carry over
    The thing is I specifically designed the plugin for L4D2 (as AtomicStryker said, I took away the plugins ability to utilise the max & min range cvars from L4D1 which no longer exist in L4D2), and the default values for pounce max & min range aren't the same in L4D1 & 2 so the damage formula would most likely be off, however I will look at putting them back in for the next release so it will work on L4D1 too. Will try and get something up soon . If you want to try it out in the meantime you could try changing the server range cvars to the same values as the plugin has hardcoded atm, should make the plugin produce correct results - the scale can be modified using pdplus_scale if it feels off :

    Code:
    sm_cvar z_pounce_damage_range_min 300
    sm_cvar z_pounce_damage_range_max 1024
    Quote:
    Why do you use fix values for min and max pounce distance, where (created) cvars would allow the 'old' customization range?

    I mean, the Pounce Announce Plugin this is made of even used all the necessary calls
    Because 2 Cvars are unnecesary, the single pdplus_scale cvar allows you to rescale damage. Admitedly you can't shift the scale to reduce the min, but 1 dmg pounces occur from pretty close anyway so there really isn't much need for extra cvars.


    The actual values are now fixed in game and I've managed to pin them down with a lot of testing, and using a single scale cvar was just the simplest way for the user to modify the damage scale, rather than trying to copy what valve did. However, after the above post I'll probably try and put the ability to check for the cvars back in to allow L4D1 compatability . Letting the user change custom cvars I create to replace the old ones would require a lot of rewriting though; because, at the minute, the plugin uses the damage formula as a 'reference' of what damage the game has already dealt and so MUST have those, correct, fixed values plugged into it for features of the plugin to work correctly. In order to allow custom max and min values to have an effect its gonna be complicated and, at this point in the plugins development, more effort than its worth when you can already customise the damage scale very easily with pdplus_scale.

    Last edited by extrospect; 12-01-2009 at 10:14.
    extrospect is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 12-01-2009 , 15:44   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #5

    Its not so much about damage scaling but range scaling. What im trying to say is a mediocre pounce will give you maximum damage already (whatever youve set it to), and there is no distinguishing to truly epic pounces.



    But im only throwing ideas at you - and if i want that function i simply alter the code myself (which i did ^^)
    AtomicStryker is offline
    extrospect
    Member
    Join Date: Aug 2009
    Old 12-01-2009 , 18:42   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #6

    I don't think you're getting what the plugin does exactly, you set pdplus_maxdmg to whatever you want to cap pounces at (or 400 if you dont want a cap) and pounce damage will scale exactly as it normally would in l4d2 upto 25, except now it carries on beyond 25 upto pdplus_maxdmg (so to get a 50 dmg pounce you have to jump double the distance for a default 25 dmg pounce when pdplus_scale is 1 (default)). Pounce damage now starts from 1 dmg in l4d2 so you get the full range, you just can't adjust the min distance, if you want to rescale the damage, then you just put whatever amount you want to scale by in pdplus_scale (i.e. pdplus_scale 2 would be like reducing the old z_pounce_damage_range_max by half).

    As I said, you can't adjust the min - the point at which pounce damage starts - so I might add a cvar to do that, but it's not something I think is essential right now. Honestly, I doubt most people would even use the scale cvar, its only really pdplus_maxdmg that anyone would want to touch - just set it to whatever you want pounces to be capped at (400 is full survivor hp though so above that it doesn't matter).

    I appreciate the feedback though and it's something I probably will end up working in eventually, I just need to work on the notifications and stuff more immediately I think .

    Last edited by extrospect; 12-01-2009 at 20:10.
    extrospect is offline
    Blakeocity
    Senior Member
    Join Date: Nov 2009
    Old 12-13-2009 , 12:41   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #7

    It's a great plugin, I cleaned up the messages and now it's perfect.

    Thanks a lot.
    Blakeocity is offline
    Blakeocity
    Senior Member
    Join Date: Nov 2009
    Old 12-16-2009 , 08:35   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #8

    Would it be possible to add another option?

    Show Hint Message for all Pounces over 15 damage?

    Under that isnt really worthy of being noted. And ones above the default 25 aren't common enough.

    Last edited by Blakeocity; 12-16-2009 at 08:53.
    Blakeocity is offline
    extrospect
    Member
    Join Date: Aug 2009
    Old 12-17-2009 , 13:08   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #9

    Cheers for the feedback blake , I'm currently putting the finishing touches on a huge update which includes some minor bug fixes, another over-haul of the notifications system (slimming down to the bare essentials & including the option of attacker+victim only notifications) and a (reasonably) complete hunter pounce stats system. I didn't even think of the idea to let the user choose what level of dmg to notify from, but I'll definitely add that into this release though as it seems like a really worthwhile idea.

    Thanks again for the feedback and ideas and keep an eye out for the new update =), it should be up today or tomorrow if I can get all the testing done in time .

    Last edited by extrospect; 12-17-2009 at 13:32.
    extrospect is offline
    Blakeocity
    Senior Member
    Join Date: Nov 2009
    Old 12-17-2009 , 14:15   Re: [L4D2 + L4D] pouncedamage+ - Hunter Uncapping & Modification
    Reply With Quote #10

    Looking forward to it!

    Is the hunter pounce stat system going to be like the one seen in this plugin for L4D1?
    http://forums.alliedmods.net/showthread.php?t=97947

    I remember using a table with it which you can see here.
    http://l4d.freel4dservers.com/Pounce_Statistics/

    And what your doing now is just icing on the cake. Thanks again.
    Blakeocity is offline
    Reply


    Thread Tools
    Display Modes

    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 03:11.


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