GetDotaStats / stat-collection

Library for setting up stat collection for dota2 mods
http://getdotastats.com/
GNU General Public License v2.0
11 stars 8 forks source link

[SCHEMA] Hunter v Hunted #67

Open veggiesama opened 8 years ago

veggiesama commented 8 years ago

I don't believe my mod has been approved yet, but I started working on a schema anyway.

Console log: http://pastebin.com/FyuuUQ0P Censored settings.kv: https://github.com/smithb589/HVH/blob/master/game/hunter_v_hunted/scripts/vscripts/statcollection/settings%20-%20CENSORED.kv Schema: https://github.com/smithb589/HVH/blob/master/game/hunter_v_hunted/scripts/vscripts/statcollection/schema.lua

Utility functions found at the bottom of the schema.

I'm not clear how the values are handled after being sent to the server and rendered in the pie graph. For example, "unclaimed chests" could be a value from 1 to 100 or even higher. For the pie graph, I'd like to see something like 1-10, 11-20, 21-30,...91-100 as larger slices of the pie rather than dozens of tiny 1,2,3,...99,100 slices. For now I just have all the values rounded in multiples I wanted to see, so it's like 0,10, 20,...90,100. Please tell me if I'm doing that right, or if you know a better way to do it.

Thanks!

jimmydorry commented 8 years ago

It does the grouping on our end, based on the range of data. The data is split into something like 30 groups. So make sure to remove your grouping. I'll look at your schema now.

jimmydorry commented 8 years ago

Your schema and mod has been approved. Make sure to drop the rounding on your end. Your values need to be integers (which the console log shows you already have done).

Your schemaAuth is here: http://getdotastats.com/#s2__my__mods

Your schema contents are here: http://getdotastats.com/#s2__mod_schema?id=52

jimmydorry commented 8 years ago

I would also suggest dropping the Game Time, and double checking the schema in the above link to make sure it matches what you are sending (i.e. the DISPLAY names I've given them, and the variable NAME you are sending them as).

If you drop the Game Time, I can put out a v2 of the schema.

veggiesama commented 8 years ago

Alright, I've removed Game Time and un-rounded all the integers.

https://github.com/smithb589/HVH/blob/master/game/hunter_v_hunted/scripts/vscripts/statcollection/schema.lua

Thanks for the quick replies!

jimmydorry commented 8 years ago

You should be good to go.

Your schemaAuth is here: http://getdotastats.com/#s2__my__mods

Your schema contents are here: http://getdotastats.com/#s2__mod_schema?id=53

veggiesama commented 8 years ago

Thanks again! This is great.

Is it possible to build a different player array for each player? My mod is 4 Snipers v 1 Nightstalker, so the 1 naturally gets more kills than the team of 4. I'd like to have "Nightstalker kills" that's tracked only when playing Night Stalker, "Assassin kills" tracked only when you're playing on the Sniper team and have chosen a certain ability, etc. It's more complex but it'd give me more useful numbers.

Short example of what I'm thinking: http://pastebin.com/dV22hSey (EDIT: oops, line 12 should be sncc = ..., but same difference)

jimmydorry commented 8 years ago

It's coming soon. I was meant to get some work done on my week holiday, but I didn't really get one. :(

https://github.com/GetDotaStats/site/issues/162

veggiesama commented 8 years ago

Hey, what happens if I release a new version and want to wipe previous stats? Do you have to do that manually? (Can they be archived?)

Also any progress on an update? I get that you've been busy, I have been too. =P Eagerly looking forward to more advanced stat tracking though!

jimmydorry commented 8 years ago

The stats don't go anywhere, I just haven't built a way to display them. Kind of a moot point, when the stats shown are only for the last week or so.

If you have a new version with incompatible stats, you need new schemas (which we can do). If it's meerely a version upgrade, you should add a flag for version number, like PMP http://getdotastats.com/#s2__mod_f?id=96

veggiesama commented 8 years ago

Hey, it's been a while.

Are numerical stats that return a nil thrown out or added to the graph?

For instance, there are player stats for nsd (Night Stalker deaths) and snd (Sniper deaths). If you're on the Sniper team, your snd will be 0 to 18. But if you're on the Night Stalker team, your snd will be nil. Instead, your nsd would be 0 to 6. It wouldn't be useful to track both ranges with the same variable (as I've been doing) so I want to split them out.

I just want to know if that will display correctly before I send a new schema. I think it might already be doing that when it sends the stats to the server (http://pastebin.com/LTS9C4L8) but I'm not sure. Player 1 is the Nightstalker so he uses the nsd, nsk, nscc, etc. stats. The other players are Snipers and use the snd, snk, etc. stats.

jimmydorry commented 8 years ago

I should really update the guide, as this is important:

veggiesama commented 8 years ago

New schema ready!

Log Schema Settings

jimmydorry commented 8 years ago

I wouldn't do percentage as a decimal. We can't aggregate that. You should multiply ggcp and bgcp by 100 and floor it.

jimmydorry commented 8 years ago

Your new schema. Double check it please. https://getdotastats.com/#s2__mod_schema?mid=128

Your new schemaID is here: https://getdotastats.com/#s2__my__mods

If I were you, I would definitely make those percentages integer so we can aggregate them. If you do decide to do it, make sure to do it before using the new schemaID.

I see that this is your first update in a while (~226 days), good luck!

veggiesama commented 8 years ago

So far things are going great!

Though, I am having some trouble reading the winrates here: https://getdotastats.com/#s2__mod_wr?id=128

Winrate for being on the NS team is ~36% and winrate for Sniper team is ~27%. Before the schema update I remember it being around 35/65. I'm curious why it's not adding up to 100. I'm not sure if it's taking games where all players DC into account. Actually I'm not even sure if that creates a win condition in my game, so I should probably look into that.

Also this: https://getdotastats.com/#s2__mod?id=128 Is that graph telling me that 60% of games never get to the "Game Ended" phase? That seems.... alarming

jimmydorry commented 8 years ago

Win rates are determined by player values. If you want to be recording win rates at the game level, you would have a game value for "Winning Team". Do people win, or do teams win in your game? Either way has a non-intuitive effect on win rate.

Like you say, you should probably have a look into your win conditions.

I see that you have dedicated servers, but not all of your games are played on them, which is weird... unless you are doing testing. High rates of games not completing, is usually due to not having dedicated servers, which is not the case here. Double check your win conditions.

veggiesama commented 8 years ago

Okay, I'll add a game value for the winning team. I'll set it to "Neither" at game start then right before SetGameWinner() is called, I'll set it to the winning team name. I'm wondering how many games are ending at "Neither".

As for lower rates of game completion, if either side ragequits then I have a feeling the game keeps playing. Mainly because I want people to be able to reconnect. I'll look into how to detect abandonment vs mere disconnects.