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] Gladiator Arena Allstars (魔兽竞技场) #65

Open Catzee opened 8 years ago

Catzee commented 8 years ago

Link to your console log: http://hastebin.com/ireduwinom.go Link to your settings.kv: http://hastebin.com/oheqejexuk.vhdl Link to your schema.lua: http://hastebin.com/uqifomucik.lua Link to your addon_game_mode.lua: http://hastebin.com/xamepowugi.lua

Thanks for your efforts! Greetings, Catze

jimmydorry commented 8 years ago

Let's have a look.

Catzee commented 8 years ago

that was quick :)

Catzee commented 8 years ago

i just realized that GAME_WINNER_TEAM and GAME_TIME_ELAPSED are not valve constants, so they are not set. thats probably why they dont appear at the end

jimmydorry commented 8 years ago

Sorry, I said I would have a look. But something else requires my attention right now. I'll come back to this in an hour or so.

:sob:

Catzee commented 8 years ago

no problem. ive fixed the 2 issues mentioned above (removed the game time, dont need it and set the winner correctly).

i will sleep now, we can continue tomorrow :) thank you!

jimmydorry commented 8 years ago

Looks good, but your Hero name can be improved. Add a function like the one I mocked up below. Make sure to test it though!

function GetHeroNameGAA(hero)
    if hero then
        local heroName = hero:GetUnitName()
        if heroName then
            heroName = string.gsub(heroName, "npc_dota_hero_", "")
        else 
            heroName = "unknown"
        end
    else
        heroName = "unknown"
    end

    return heroName
end
jimmydorry commented 8 years ago

Make sure to double check the above.

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

Your schema contents are here: http://getdotastats.com/#s2__mod_schema?mid=126

Catzee commented 8 years ago

i implemented your proposals.

thanks for the nice and quick support!

Catzee commented 8 years ago

will the stat highscore you are working on also be able to do some sort of ELO Rating system?

jimmydorry commented 8 years ago

Iv'e never been a fan of ELO. Especially in large systems where players feasibly won't ever play against each other. The best ranking systems I have seen have been derived from game values. Check out win8 http://wiki.wnefficiency.net/pages/WN8

SinZ163 commented 8 years ago

Considering the custom games population is smaller than the total dota population, its quite likely to get the same people multiple times. One thing that makes it iffy, is that its stupidly easy to "rig" matches, as everyone has to be assumed to be in the same party, as we cant know if it was matchmaking or an invite only lobby.

jimmydorry commented 8 years ago

More importantly, you should hurry up and make your schema live, or debug why it's not working.

Catzee commented 8 years ago

oh i see. ive seen some MMR ratings on "for the king" map and found it kinda cool. but yea, easy to manipulate. you could not really take it serious.

about the schema, i assumed it just didnt have enough data yet. do i have to do something else besides adding the schema ID?

Catzee commented 8 years ago

and schemaID is 16 chars right? did not put in the "V1"

jimmydorry commented 8 years ago

Just the characters. Turn testing on in your settings.kv and try playing a game locally. Post the console log here (via text sharing service). I'm guessing you didn't change the name of your rounds field.

Catzee commented 8 years ago

do i need "submitRound" when i do not use rounds?

Catzee commented 8 years ago

i changed the rounds field to "rn", thats not the issue

jimmydorry commented 8 years ago

No, run a game locally with the TESTING set to true. The console log will say what's wrong.

Catzee commented 8 years ago

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

VScript : Stat Collection: The server said something went wrong, see below: VScript : Caught Exception: Missing Game length from Round 0 in Game array!

jimmydorry commented 8 years ago

Oops, one of the schema fields was filled out wrong. Lemme fix that.

http://getdotastats.com/#s2__mod_schema?mid=126

jimmydorry commented 8 years ago

You should double check your schema fields against the site schema. You are on v2 now, with a new schemaAuth from here http://getdotastats.com/#s2__my__mods

Catzee commented 8 years ago

i dont have to set the new schema version, right?

jimmydorry commented 8 years ago

I could retroactively fix it so you don't need a new auth, but it means that your flag counts won't match the player and game value counts (due to the custom stats of games not getting recorded).

Catzee commented 8 years ago

ok nice, thank you!

Catzee commented 8 years ago

it would be nice if the winrates category would show the values for healer ratio too. so i can see if teams with more healers win more often etc. if you set healer ratio 1 and healer ratio 2 to "maximize" would that already work?

jimmydorry commented 8 years ago

Game values apply for the entire match. If it needs a winrate it should be under player. :)

Catzee commented 8 years ago

ah i understand. can i add it to the players and update the schema?

Catzee commented 8 years ago

i would name it "hr" in the players array. tell me when you have time to update it.

Catzee commented 8 years ago

i just had some ideas for additional stats, let me finish those first :D

Catzee commented 8 years ago

so i finished my new stats now: i added 3 new fields to the player array.

"hr" for the healer ratio on that players team "dps" for measuring the dps of that player over the whole game "hps" for measuring the healing of that player over the whole game

jimmydorry commented 8 years ago

Ok, gimme a sec.

jimmydorry commented 8 years ago

Are you leaving the old healing ratios?

jimmydorry commented 8 years ago

You have a v2 schema that has a new auth code with those three new values.

http://getdotastats.com/#s2__my__mods

http://getdotastats.com/#s2__mod_schema?id=50

Catzee commented 8 years ago

yes i left the old ones in there. i think it makes sense, if you wanna find out how many healers teams usually have.

thanks, you are quick :D

jimmydorry commented 8 years ago

Ping @SinZ163 @MNoya

What can I say? The site developer (who ever he is) sometimes does good work.

MNoya commented 8 years ago

You should get admins to do the work for you

Kappa

jimmydorry commented 8 years ago

GreyFace GreyFace GreyFaec GreyFace GreyFace

Catzee commented 8 years ago

is there a way to aggregate the items of the 6 item slots? im rather interested in how often certain items are bought in total, not per slot. or is that difficult to achieve technically?

jimmydorry commented 8 years ago

Yea, it's been on the todo for the last few weeks. It was meant to be done last weekend, and now I have a server rebuild todo, which takes higher priority.

It's coming soon. I hopefully get some time off for Christmas holidays. :)

Catzee commented 8 years ago

i have another question, i hope im not bothering you.

now that i measure the dps and hps for each hero, is it possible to display the average dps / hps for each hero? or formulated in another way, is it possible to make a list with heroes just like the list showing the win %, but with dps instead of the win %? sorted by highest dps first.

jimmydorry commented 8 years ago

Not possible, yet. That feature has been on the todo for a while, but has been very low priority. :sob:

Catzee commented 8 years ago

can i update my schema with 2 more variables? i wanna track the total dps and hps of each team, but place that value in the players array, so i can see how it affects winrates.

i would like to add the field "dpst" and "hpst" to the players array (standing for dps team average and hps team average).

jimmydorry commented 8 years ago

Okay, added

Catzee commented 8 years ago

thank you :)

Catzee commented 8 years ago

did i make a mistake or why is everything not working? :D

SinZ163 commented 8 years ago

did you update to the new schema ID?

Catzee commented 8 years ago

yea i did, i check again.

Catzee commented 8 years ago

schemaID looks correct, hmm

SinZ163 commented 8 years ago

remember that the graphs were last generated 7.5 hours ago, so if you updated the schemaID < 7.5 hours ago, they haven't regenerated yet

Catzee commented 8 years ago

yea maybe there was no game with the new schema before that breakpoint. that could be it, ty!