Open Freeman322 opened 8 years ago
You've come a lot closer. Now you need to decide what you actually want to track. Your schema is empty.
Have a look at what the mod NWR did at line 51: http://pastebin.com/jQp7YXEn
At a minimum, I suggest recording the heroID, playerTeam, Kills, Assists, Deaths, Items in slot.
Another example to look at is in the files: here and here
We even have some commonly used functions: here in the files.
Take the time to do your schema properly.
I'll be back on tomorrow, so there is no rush to get it done immediately.
One question, i can only send data? Can i get needed me data when game starts?
What kind of data are you wanting to grab from the server?
We did have a library for that but didn't port it over to Reborn, as no-one asked for it.
We have a few APIs that were made for specific mods, like a player summary one (described in technical details here). That API lets a mod display stuff about players like when they last played, when they last abandoned, etc.
I want create myself mmr system, for that i need get it from server and change after game ends
That's very much out of the scope of what I have the time to do right now. :(
I would suggest looking at the Valve docs, and asking questions in #dota2mods .
You also have this library's code to look at, but setting up a MMR is going to need more work than figuring out how to talk to servers.
Have you tested it? I'm not sure if you have defined line 46 and 47.
No errors were observed
If you're happy, then let's do this!
Two suggestions:
game.gl = math.floor(GAME_TIME_ELAPSED) -- Game length, from the horn sound, in seconds
pt = player_team, -- Team this hero belongs to hn = GetHeroName(playerID), -- Hero by its short name hl = hero:GetLevel(), -- Hero level at the end of the game pn = GetNetworth(hero), -- Sum of hero gold and item worth pk = hero:GetKills(), -- Number of kills of this players hero pa = hero:GetAssists(), -- Number of deaths of this players hero pd = hero:GetDeaths(), -- Number of deaths of this players hero
You should double check your schema fields match the site schema.
https://getdotastats.com/#s2__mod_schema?mid=144
Your schemaID should be in your account now: https://getdotastats.com/#s2__my__mods
I should copy it without v1?
without
Mind clarifying? I'm not sure what you meant by "copy without v1".
Have you pushed the schema live yet? You don't have any schema data, which suggests that there is a mistake somewhere.
Settings SHEMA ConsoleLog Addon_game_mode