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] LoD #71

Open ash47 opened 8 years ago

ash47 commented 8 years ago

Console Log: http://hastebin.com/ajoboqewiw.css Settings.kv: https://github.com/ash47/LegendsOfDota/blob/71ffa889d5d4a9fd79df831af1af8f77565beda2/src/scripts/vscripts/statcollection/settings.kv Schema.lua: https://github.com/ash47/LegendsOfDota/blob/71ffa889d5d4a9fd79df831af1af8f77565beda2/src/scripts/vscripts/statcollection/schema.lua

Function to generate player data:

https://github.com/ash47/LegendsOfDota/blob/71ffa889d5d4a9fd79df831af1af8f77565beda2/src/scripts/vscripts/pregame.lua#L137-L195

jimmydorry commented 8 years ago

Your field names should aim to be 3 characters or less. They don't need to be readable, just need to be unique. The mapping of these fields to readable names is done on our end.

Make sure all of your numbers are rounded or floored (like GPM).

Your item values can be way more readable by dropping the "item_" prefix. We have a function for that.

Keep in mind that you can send:

Looks good otherwise.

jimmydorry commented 8 years ago

Give me the updated schema with your shorter field names, or I can generate them for you.

SinZ163 commented 8 years ago

Hero names can also be shortened using this function

jimmydorry commented 8 years ago

Oh yea. Nice pickup. Missed that one.

ash47 commented 8 years ago

@jimmydorry @SinZ163

I have updated the schema as below:

http://hastebin.com/podefaxoru.css

Here is where I am storing the flags, I have added comments and data types to help you guys understand exactly what I am setting:

https://github.com/ash47/LegendsOfDota/blob/975a1e8479c670d3ff2a4e253090e3cd34b43ea9/src/scripts/vscripts/pregame.lua#L1524-L1556

Here is the function I am using to generate the player stats, again, I have commented it to try and help out:

https://github.com/ash47/LegendsOfDota/blob/975a1e8479c670d3ff2a4e253090e3cd34b43ea9/src/scripts/vscripts/pregame.lua#L137-L186

ash47 commented 8 years ago

@jimmydorry @SinZ163

Updated Again, added EXP per minute, and current gold:

http://hastebin.com/ekubaqapim.css

Settings the flags:

https://github.com/ash47/LegendsOfDota/blob/5782ffa3f16cbde2730cc71216f0430d0cf1da19/src/scripts/vscripts/pregame.lua#L1535-L1578

Setting the player stuff:

https://github.com/ash47/LegendsOfDota/blob/5782ffa3f16cbde2730cc71216f0430d0cf1da19/src/scripts/vscripts/pregame.lua#L137-L206

jimmydorry commented 8 years ago

Flags don't have a schema. You will want those keys to be readable. Your schema stuff is fine though.

ash47 commented 8 years ago

Lol FML, will fix On 2 Mar 2016 9:04 PM, "jimmydorry" notifications@github.com wrote:

Flags don't have a schema. You will want those keys to be readable. Your schema stuff is fine though.

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

ash47 commented 8 years ago

Latest: http://hastebin.com/yayoqejizu.coffee