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] 6.85 Dota Global Skillshots #63

Open tianrenli92 opened 8 years ago

tianrenli92 commented 8 years ago

I add 3 values: pstr, pagi, pint to show categorized win rates. Thank you!

https://github.com/litianren001/ags_685/blob/master/game/dota_addons/ags_685b/scripts/vscripts/statcollection/schema.lua#L58-L96

Example output:

VScript : -------- GAME DATA --------

VScript : gw = "NULL" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x001c8a80 (table)

VScript : pint = "chen" (string) VScript : pt = "Radiant" (string) VScript : ph = "chen" (string) VScript : pnw = 11180 (number) VScript : is5 = "" (string) VScript : pd = 0 (number) VScript : pk = 0 (number) VScript : pagi = "" (string) VScript : is4 = "" (string) VScript : pl = 1 (number) VScript : steamID32 = 161697269 (number) VScript : is6 = "" (string) VScript : is2 = "" (string) VScript : pa = 0 (number) VScript : is3 = "" (string) VScript : is1 = "" (string)

jimmydorry commented 8 years ago

No problem. Will do it in a few minutes when i am on the bus.

jimmydorry commented 8 years ago

I think you need to re-run your test. Your pagi is blank, the pint is chen and pstr is missing. ;)

I made the new schema, so check your mod list page.

http://getdotastats.com/#s2__my__mods

tianrenli92 commented 8 years ago

that's intended so that only int heroes will be listed in int sheets, the same as str and agi

tianrenli92 commented 8 years ago

What's more would you please display winrates of top 45 instead of top 30, so that I can see winrates of all heores and perform better balance. Thanks!

jimmydorry commented 8 years ago

We may want to drop the Hero Name variable then, at a later date.

I'll make win rates into a bar or line chart this week. It's been on my todo list for a while.

tianrenli92 commented 8 years ago

Ok, I've changed my mind. I add potr to record some 23 heroes. so all 110 heroes can be displayed in str, agi, int, otr lists. (29+29+29+23=110)

Can you please approve the new schema again? Thank you!

https://github.com/litianren001/ags_685/blob/master/game/dota_addons/ags_685b/scripts/vscripts/statcollection/schema.lua#L86-L133

VScript : -------- GAME DATA --------

VScript : gw = "NULL" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x001a0870 (table)

VScript : pint = "" (string) VScript : pt = "Radiant" (string) VScript : ph = "skeleton_king" (string) VScript : pnw = 6987 (number) VScript : is1 = "" (string) VScript : pstr = "" (string) VScript : pd = 0 (number) VScript : pk = 0 (number) VScript : pagi = "" (string) VScript : is4 = "" (string) VScript : pl = 1 (number) VScript : is6 = "" (string) VScript : steamID32 = 161697269 (number) VScript : is5 = "" (string) VScript : potr = "skeleton_king" (string) VScript : pa = 0 (number) VScript : is2 = "" (string) VScript : is3 = "" (string)

jimmydorry commented 8 years ago

WTF is potr?

Also, if we are so keen to change the schema, please stick to 3 characters max for variable names (preferably two). Linking these two readable names is done our end.

Please don't let the 25 limit change what you want. It was only a quick mock-up of the data. Fifty values per variable should be no problem to show on the bar/line chart, which I'll do this week.

tianrenli92 commented 8 years ago

Ok. Nevermind. :)

jimmydorry commented 8 years ago

And another suggestion, please have an "empty" value for your empty inventory slots. That way we can use a picture for them.

is1 = GetItemSlot(hero,0) or "empty",

And remove the or "" on heroname and teamname. If those are empty, you probably won't want any of the custom stats for that match if those two critical values are empty.

jimmydorry commented 8 years ago

Let me know what your compressed schema looks like, so I can get you a new schemaID.

tianrenli92 commented 8 years ago

I've updated. and just keep the current schema please.

jimmydorry commented 8 years ago

Okay, but I strongly suggest making the item slot change.

tianrenli92 commented 8 years ago

I see. I did just now: http://getdotastats.com/#s2__match?id=2032885

jimmydorry commented 8 years ago

Great. Good luck.

jimmydorry commented 8 years ago

I forgot to mention the different ways you handle empty values.

After seeing your schema in action, you may want to be sending nil or NULL for your hero groupings. If you elect to send nil or NULL, I can retro-actively fix up your data to remove those "" values.

tianrenli92 commented 8 years ago

Sorry I didn't see before. Do you mean if I set nil for some values, the whole table won't be discarded as before, so I should set let's say, an Axe has Str value but Agi and Int value of nil?

jimmydorry commented 8 years ago

yea. Give it a shot. It should work. Before, you would actually be setting those values to a valve of nil, now it should just not record them.

tianrenli92 commented 8 years ago

Hi. Can I add one more value to show the amount of the item Extra Attributes consumed? Extra Attributes is a custom item giving +10 all attributes, which is useful in late game for players with excess gold. The name should be "Extra Attributes consumed". And I'm looking forward to your chart update :). Ty.

https://github.com/litianren001/ags_685/blob/master/game/dota_addons/ags_685b/scripts/vscripts/statcollection/schema.lua#L94

VScript : -------- GAME DATA --------

VScript : gw = "NULL" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x001af948 (table)

VScript : pint = "" (string) VScript : pt = "Radiant" (string) VScript : ph = "luna" (string) VScript : pnw = 7826 (number) VScript : is5 = "empty" (string) VScript : pstr = "" (string) VScript : pd = 0 (number) VScript : pk = 0 (number) VScript : pagi = "luna" (string) VScript : is4 = "empty" (string) VScript : pl = 1 (number) VScript : isAttrBonus = 11 (number) VScript : steamID32 = 161697269 (number) VScript : is6 = "empty" (string) VScript : is2 = "empty" (string) VScript : pa = 0 (number) VScript : is3 = "empty" (string) VScript : is1 = "attr_bonus" (string)

jimmydorry commented 8 years ago

Lemme look in a few mins. On Mon, 7 Dec 2015 at 3:19 am litianren001 notifications@github.com wrote:

Hi. Can I add one more value to show the amount of the item Attribute Bonus consumed?

https://github.com/litianren001/ags_685/blob/master/game/dota_addons/ags_685b/scripts/vscripts/statcollection/schema.lua#L94

VScript : -------- GAME DATA --------

VScript : gw = "NULL" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x001af948 (table)

VScript : pint = "" (string) VScript : pt = "Radiant" (string) VScript : ph = "luna" (string) VScript : pnw = 7826 (number) VScript : is5 = "empty" (string) VScript : pstr = "" (string) VScript : pd = 0 (number) VScript : pk = 0 (number) VScript : pagi = "luna" (string) VScript : is4 = "empty" (string) VScript : pl = 1 (number) VScript : isAttrBonus = 11 (number) VScript : steamID32 = 161697269 (number) VScript : is6 = "empty" (string) VScript : is2 = "empty" (string) VScript : pa = 0 (number) VScript : is3 = "empty" (string) VScript : is1 = "attr_bonus" (string)

— Reply to this email directly or view it on GitHub https://github.com/GetDotaStats/stat-collection/issues/63#issuecomment-162330158 .

jimmydorry commented 8 years ago

Done. Your new field is pab, bringing your schema version to 4.

You can grab your schemaAuth from http://getdotastats.com/#s2__my__mods

tianrenli92 commented 8 years ago

It works well. By the way do you disable the display if the value is 0? it seems if a player has 0/0/0 kda, no value of kda is displayed.

jimmydorry commented 8 years ago

Got an example match? You will want to check what you are sending too. Why not try a local game with TESTING enabled, so you can see the schema dump in console?

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

The only values not recorded are 'nil', 'null', NULL, and ''.

https://github.com/GetDotaStats/site/blob/master/site_files/s2/api/s2_custom.php#L204

jimmydorry commented 8 years ago

Oh, and it would help us greatly if you move to v4 of stat-collection, after you verify the above is working.

https://github.com/GetDotaStats/stat-collection/releases/tag/v4.1

tianrenli92 commented 8 years ago

np. and the example: http://getdotastats.com/#s2__match?id=2570657 and http://getdotastats.com/#s2__match?id=2570709 in the first i did nothing but rapier-singeing buildings. in the second i fed fountain 2 times and consumed 4 Extra Attr.

jimmydorry commented 8 years ago

Did you check that you actually sent values for them?

tianrenli92 commented 8 years ago

Yep. http://getdotastats.com/#s2__match?id=2571040

VScript : Stat Collection: Attempting to send final stats... VScript : -------- GAME DATA --------

VScript : gw = "Dire" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x0033f218 (table)

VScript : pint = "" (string) VScript : pt = "Radiant" (string) VScript : ph = "templar_assassin" (string) VScript : pnw = 0 (number) VScript : is1 = "empty" (string) VScript : pstr = "" (string) VScript : pd = 2 (number) VScript : pk = 0 (number) VScript : pagi = "templar_assassin" (string) VScript : is4 = "empty" (string) VScript : pl = 1 (number) VScript : is6 = "empty" (string) VScript : steamID32 = 161697269 (number) VScript : is5 = "empty" (string) VScript : pa = 0 (number) VScript : pab = 0 (number) VScript : is2 = "empty" (string) VScript : is3 = "empty" (string)

VScript : Stat Collection: Attempting to send custom stats...

tianrenli92 commented 8 years ago

if there's no problem on server, let me move to v4 first and check then.

jimmydorry commented 8 years ago

Try again, it may have been a type comparison error on my end.

'' == 0 might be evaluating to true.

tianrenli92 commented 8 years ago

ok. and do you still want "empty" or "" for empty slot? maybe you can change this line in utilities.lua, or i keep my custom line in schema.lua. https://github.com/GetDotaStats/stat-collection/blob/master/game/dota_addons/YOUR_ADDON/scripts/vscripts/statcollection/lib/utilities.lua#L57

jimmydorry commented 8 years ago

Do what ever you want.

'nil', 'null', NULL, and '' means the value won't get recorded. You may want this, or you may not (it effects your charts).

-1 gets recorded but doesn't appear in charts. Meaning it effects pick rates, but doesn't appear in graphs.

tianrenli92 commented 8 years ago

ok.

jimmydorry commented 8 years ago

Looks like it's working?

Ship it. :)

tianrenli92 commented 8 years ago

Can I add one more value to show if the player has consumed Moon Shard? The identifier is pms and the name "Moon Shard consumed". Ty.

https://github.com/litianren001/ags_685/blob/master/game/dota_addons/ags_685b/scripts/vscripts/statcollection/schema.lua#L92

VScript : -------- GAME DATA --------

VScript : gw = "NULL" (string)

VScript : VScript : -------- PLAYER DATA --------

VScript : 1 = table: 0x001a2018 (table)

VScript : pint = "" (string) VScript : pt = "Radiant" (string) VScript : ph = "abaddon" (string) VScript : pnw = 102943 (number) VScript : is3 = "rapier" (string) VScript : pstr = "abaddon" (string) VScript : pms = 1 (number) VScript : pk = 0 (number) VScript : pagi = "" (string) VScript : is4 = "rapier" (string) VScript : is6 = "moon_shard" (string) VScript : is2 = "rapier" (string) VScript : is5 = "rapier" (string) VScript : steamID32 = 161697269 (number) VScript : pd = 0 (number) VScript : pa = 0 (number) VScript : pab = 0 (number) VScript : pl = 25 (number) VScript : is1 = "blink" (string)

jimmydorry commented 8 years ago

Sure thing. You know the drill. New schemaAuth in the usual place. You are on v5 now.

tianrenli92 commented 8 years ago

would you please delete 6.85 from the mod name which is outdated? By the way I'm interested in your state-save function. May I implement it in my mod to save MMR for players?

jimmydorry commented 8 years ago

Done. And sure. I'll bring it up tonight, as no one has been using it... so I've been making some improvements on the back end of it.

I'll post back here when it's up again.

tianrenli92 commented 8 years ago

Ok. Ty so much :)