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

[TF2] MvM Stats (v1.1 12/16/2012)


Post New Thread Reply   
 
Thread Tools Display Modes
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 03-17-2013 , 12:34   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #11

Quote:
Originally Posted by Hextator View Post
Added support for a few things, like scout mad milk and fan o'war/sandman death mark.

Death mark doesn't work completely accurately because for some reason the game sends the crit flag when a death marked target is hit even if the attack isn't a crit. The options were to consider the hit a crit, out-prioritize the death mark bonus and give no credit to the scout, or to give credit to the scout even if the attack really was a crit). I opted for the latter, which will hurt slightly hurt snipers sniping targets that are death marked as well as giving an unfair bonus to the associated scout. Between this bug and all of the events that only fire to clients I'm wondering how anyone gets any plugins done for this game.
Nice work. This plugin should be receiving more attention from anyone who wants to spice up their own MvM server. I'll try this one soon and provide some feedback.
Mr. Man is offline
Hextator
Junior Member
Join Date: Mar 2013
Old 03-17-2013 , 20:32   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #12

I'll attach the smx file for people who can't compile for whatever reason.

The only things left that I'd bother adding myself would be scoring for sappers, dispensers and maybe regular healing by medics (which I don't consider very important myself). For sappers I was thinking the usual 35/135 bonus that a concheror/backup would receive if it's a giant being hit, and a full 100% damage score leech if it's a completely immobilized non-giant (though it'd probably be more fair to share the damage rather than leech it...).

I can't test the vaccinator anymore because my server can't seem to connect to the item server and my sourcemod's tf2items_giveweapon says 998 is an invalid index (could swear everything's up to date, too).
Attached Files
File Type: smx mvmstats_custom.smx (42.5 KB, 123 views)
Hextator is offline
Hextator
Junior Member
Join Date: Mar 2013
Old 03-22-2013 , 20:11   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #13

Made some bugfixes. Apparently "Console" was getting credit for damage dealt as a result of using crit or uber canteens. I also made some improvements to the scoring evaluation, like adding notes that it's a percentage and making the percentages total 100.

Last updated 20130323 @ 17:46
Attached Files
File Type: sp Get Plugin or Get Source (mvmstats_custom.sp - 312 views - 52.0 KB)
File Type: smx mvmstats_custom.smx (43.3 KB, 123 views)

Last edited by Hextator; 03-23-2013 at 18:44.
Hextator is offline
Hextator
Junior Member
Join Date: Mar 2013
Old 03-25-2013 , 03:26   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #14

Added support for scoring sappers/sandman daze and did some bugfixes/code cleaning. The source compiles without warnings now.
Attached Files
File Type: sp Get Plugin or Get Source (mvmstats_custom.sp - 353 views - 55.1 KB)
File Type: smx mvmstats_custom.smx (43.7 KB, 136 views)

Last edited by Hextator; 03-25-2013 at 03:26.
Hextator is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 03-25-2013 , 07:51   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #15

Will upload and test this next week Hextator. It gives alittle extra on our 10 player Mvm gameserver... Gracias
__________________
Happy DODs player is offline
Hextator
Junior Member
Join Date: Mar 2013
Old 03-25-2013 , 23:22   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #16

^ Sounds good.

I personally like to use the plugin to show where the team needs work when a wave is lost more than who pulled their weight when the team wins. If the team wins, everyone's happy. If the team loses, they always blame someone else without considering raw facts.

So I modified the plugin some more to display who the wave loser is in addition to the wave winner, and show this information when the wave is lost in addition to when it is won. I thought the acronym "LVP" could be confusing, so I just used the title "Loser" for the player who contributed the least in the previous wave (whether it was failed or not).

I also made it so there's actually a % sign after the score percentage in the first stat panel and fixed up some of the spacing after class names in the display.

Edit: Bugfixes 20130326.0310
Attached Files
File Type: smx mvmstats_custom.smx (44.0 KB, 148 views)
File Type: sp Get Plugin or Get Source (mvmstats_custom.sp - 331 views - 57.5 KB)

Last edited by Hextator; 03-26-2013 at 04:08.
Hextator is offline
gilmon
Senior Member
Join Date: Feb 2011
Location: China
Old 04-14-2013 , 07:20   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #17

@Hextator

Your version can't compile,always say that "undefined symbol TFCond_CritCanteen/TFCond_Sapped/UberchargedCanteen" error.maybe you don't defined them or you just remove them?

Also,this site is not allow just plugin file here,you have to put right sourcecode at the same time.
gilmon is offline
Send a message via MSN to gilmon
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 04-17-2013 , 20:57   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #18

Quote:
L 04/17/2013 - 19:525: [SM] Plugin encountered error 15: Array index is out of bounds
L 04/17/2013 - 19:525: [SM] Displaying call stack trace for plugin "mvmstats.smx":
L 04/17/2013 - 19:525: [SM] [0] Line 1153, G:\dev\SourceMod\plugins\mvmstats\mvmstats.sp ::TF2_OnConditionAdded()
With Hextator's latest version.
__________________

Last edited by VoiDeD; 04-17-2013 at 20:57.
VoiDeD is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 05-12-2013 , 04:30   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #19

Finding the following errors in /log:

Code:
L 05/12/2013 - 12:25:33: [SM] Displaying call stack trace for plugin "TF2_mvmstats.smx":
L 05/12/2013 - 12:25:33: [SM]   [0]  Line 1153, C:\Program Files (x86)\Steam\TF2\orangebox\tf\addons\sourcemod\scripting\mvmstats_custom.sp::TF2_OnConditionAdded()
L 05/12/2013 - 12:29:26: Error log file session closed.
Mr. Man is offline
Hextator
Junior Member
Join Date: Mar 2013
Old 08-29-2013 , 00:16   Re: [TF2] MvM Stats (v1.1 12/16/2012)
Reply With Quote #20

The source has and still does compile fine. The first post CLEARLY says it requires SDK hooks. So does my version. I didn't rewrite it, I only added stuff.

Also, apparently, when Snipers hit enemies with explosive headshots, the slow down effect on the bots comes from the "stunned" condition being added to them. The API makes it difficult to detect who applied certain status effects, and because of the non standard way Sniper applies the stun effect, the code that was in place for detecting it before was skipped, which resulted in client "-1" getting credit for stunning. I fixed the TF2_OnConditionAdded bug by using an alternate detection method.

The updates to TF2 since the last iteration of the plugin have broken things like detecting damage dealt as a result of the Jarate debuff and giving credit for collecting money to the correct player in the event that red money is dropped from an Explosive Headshot. At present, red money's value is 0 when collected normally as by then its value has already been collected, but the plugin's method of giving credit for collecting money will give credit equal to the amount of money the red money would have been worth to the player that walks over it.

Not only does the responsible Sniper not get credit for the money which they collected, but other players can get the credit instead. It could be very difficult to detect who was responsible for spawning red money if it's even possible to detect whether collected money was red to begin with. There could me more issues if the red money isn't collected manually at all. I wish Valve had called the money collection callback when red money is dropped and modified the pile's value to be 0 for if the event is fired again due to manual collection.
Attached Files
File Type: sp Get Plugin or Get Source (mvmstats_custom.sp - 305 views - 58.0 KB)
File Type: smx mvmstats_custom.smx (44.9 KB, 123 views)
Hextator 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 00:24.


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