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] Slide Ninja Slide #36

Open ynohtna92 opened 9 years ago

ynohtna92 commented 9 years ago
[   VScript ]: Stat Collection: Attempting to send final stats...
[   VScript ]: {"rounds":{"0":{"players":[{"isWinner":"0","steamID32":66998815,"connectionState":2}]}},"schemaVersion":2,"modIdentifier":"708fc3881df6e26b45fa78ba2529af01","gameDuration":28.733238220215,"matchID":1159994,"authKey":"6O8JNWJ2H2"}
[   VScript ]: -------- GAME DATA --------
[   VScript ]: {
[   VScript ]:    rounds                            = 1 (number)
[   VScript ]:    lives                             = 1 (number)
[   VScript ]:    deaths                            = 1 (number)
[   VScript ]: }
[   VScript ]: 
[   VScript ]: -------- PLAYER DATA --------
[   VScript ]: {
[   VScript ]:    1                                 = table: 0x032d6bf0 (table)
[   VScript ]:    {
[   VScript ]:       level                              = 1 (number)
[   VScript ]:       score                              = -1 (number)
[   VScript ]:       a1l                                = 0 (number)
[   VScript ]:       a4l                                = 0 (number)
[   VScript ]:       ph                                 = "antimage" (string)
[   VScript ]:       a3l                                = 0 (number)
[   VScript ]:       nt                                 = 395 (number)
[   VScript ]:       a1                                 = "antimage_leap_of_faith" (string)
[   VScript ]:       a2                                 = "antimage_thaw" (string)
[   VScript ]:       deaths                             = 1 (number)
[   VScript ]:       a2l                                = 1 (number)
[   VScript ]:       steamID32                          = 66998815 (number)
[   VScript ]:       il                                 = "potion_of_speed,socks_of_ultra_speed" (string)
[   VScript ]:       a3                                 = "antimage_entangling_roots" (string)
[   VScript ]:       a4                                 = "antimage_brilliance_aura" (string)
[   VScript ]:    }
[   VScript ]: }
[   VScript ]: -------------------------------------
[   VScript ]: Stat Collection: Match stats were successfully recorded!

Settings: https://github.com/ynohtna92/SlideNinjaSlide/blob/a3bdc1d828e97dae69aec00da8f87cd7f015be93/game/dota_addons/slideninjaslide/scripts/vscripts/statcollection/settings.kv

Schema: https://github.com/ynohtna92/SlideNinjaSlide/blob/master/game/dota_addons/slideninjaslide/scripts/vscripts/statcollection/schema.lua

Addon: https://github.com/ynohtna92/SlideNinjaSlide/blob/master/game/dota_addons/slideninjaslide/scripts/vscripts/slide_ninja_slide.lua

jimmydorry commented 9 years ago

Looks good.

A few things that need to be considered/answered before approval:

Let's see v2, before accepting.

ynohtna92 commented 9 years ago

Updated log:

[   VScript ]: {"rounds":{"0":{"players":[{"isWinner":"0","steamID32":66998815,"connectionState":2}]}},"schemaVersion":2,"modIdentifier":"708fc3881df6e26b45fa78ba2529af01","gameDuration":68.499298095703,"matchID":1161865,"authKey":"YDWHOJLNAG"}
[   VScript ]: -------- GAME DATA --------
[   VScript ]: {
[   VScript ]:    dth                               = 0 (number)
[   VScript ]:    ch                                = 0 (number)
[   VScript ]:    rnd                               = 1 (number)
[   VScript ]: }
[   VScript ]: 
[   VScript ]: -------- PLAYER DATA --------
[   VScript ]: {
[   VScript ]:    1                                 = table: 0x033a4b90 (table)
[   VScript ]:    {
[   VScript ]:       lvl                                = 1 (number)
[   VScript ]:       abl                                = "0,1,0,0" (string)
[   VScript ]:       dth                                = 0 (number)
[   VScript ]:       nt                                 = 100 (number)
[   VScript ]:       scr                                = 0 (number)
[   VScript ]:       steamID32                          = 66998815 (number)
[   VScript ]:       il                                 = "potion_of_speed" (string)
[   VScript ]:       abn                                = "antimage_leap_of_faith,antimage_thaw,antimage_entangling_roots,antimage_brilliance_aura" (string)
[   VScript ]:       ph                                 = "antimage" (string)
[   VScript ]:    }
[   VScript ]: }
[   VScript ]: -------------------------------------
[   VScript ]: Stat Collection: Match stats were successfully recorded!

Addon: https://github.com/ynohtna92/SlideNinjaSlide/blob/master/game/dota_addons/slideninjaslide/scripts/vscripts/slide_ninja_slide.lua

Schema: https://github.com/ynohtna92/SlideNinjaSlide/blob/master/game/dota_addons/slideninjaslide/scripts/vscripts/statcollection/schema.lua

The scr field is the save-to-death ratio which is an integer and can be negative.
I have concat the ability names and levels into their own strings.

jimmydorry commented 9 years ago

Was that a yes to all ninjas having same skills?

ynohtna92 commented 9 years ago

Yes except when spongebob mode is active where the abilities are changed.

jimmydorry commented 9 years ago

Here is my suggestion. Make sure to test that Lua. I probably did something stupid.

https://github.com/ynohtna92/SlideNinjaSlide/pull/16

MNoya commented 9 years ago

lua doesn't use semicolons jimmy :rage4:

jimmydorry commented 9 years ago

Copied from his version :fist:

https://github.com/ynohtna92/SlideNinjaSlide/blob/master/game/dota_addons/slideninjaslide/scripts/vscripts/statcollection/schema.lua#L66