Closed Wondermarin closed 3 years ago
Here's your schema, please review the fields to make sure I didn't make a mistake.
Feel free to suggest changes!
Schema: https://getdotastats.com/#s2__mod_schema?id=87
Schema ID: https://getdotastats.com/#s2__my__mods
Your schema ID starts with T2B...
not a v1
Please help I have 2 teams, on the page with the last games they are not. How to make was the division into teams and counted the victory for the destruction of the towers.
Add a team name player value
first of all. Secondly, make a game value
that records the winning team (dire or radiant, etc.).
Keep in mind player values
are calculated on a player level per match, while game values
are calculated on a match level per match.
Oh, and test your schema values using the two commands that are registered in the schema: test_schema
and test_end_game
to make sure you are happy with the results. I'll be back in a bit less than 18hours from now. Have fun~
Thanks for the reply. Another question, my game ends after the destruction of the towers (the rules game), but the site doesn't display the checkmark in the winning team, what's the problem?
Update please. Settings.kv: https://pastebin.com/cHbaWryC Schema.lua: https://pastebin.com/kyxh7r5h
Are you setting winner, or setting loser? We hook to set winner. That's the most common reason.
Schema updated, so check the new one for mistakes, and don't forget to use the new schema key.
Now shema is not working, after the games, she shows no information. And how to make "winner" - work?
SetGameWinner() instead of MakeTeamLose() You should double check exactly how you are ending the game. If your game never reaches the final phase, then the stats from phase3 never get recorded.
https://getdotastats.com/#s2__match?id=29149996
I just had a look, and your matches seem to be finishing properly. It's just the schema not getting submitted.
You need to check your custom game console log for an error message starting with either GDS or stat-collection. The most common cause are your fields not match the schema or missing completely... so double check the keys you use in the game and players array against what we entered on the site schema. Again, the custom game console log should tell you what is happening. You can use the two test commands test_schema
and test_end_game
You had it working before.
https://getdotastats.com/#s2__match?id=29132265
So it's definitely an issue of fields not matching the schema. Make sure you are using the correct schema key and the fields are all defined in what you are sending.
All the same that I sent you. Global variables are taken from the statcollection.lua?
That's what I understood. First, most likely a bug in game data. VScript : -------- GAME DATA --------
VScript : VScript : -------- PLAYER DATA --------
VScript : 1 = table: 0x002b5ee0 (table)
VScript : i1 = "" (string) VScript : pk = 0 (number) VScript : pt = "Radiant" (string) VScript : ph = "antimage" (string) VScript : i3 = "" (string) VScript : i4 = "" (string) VScript : pl = 4 (number) VScript : i6 = "tpscroll" (string) VScript : steamID32 = 870935 (number) VScript : i5 = "" (string) VScript : i2 = "" (string) VScript : pa = 0 (number) VScript : pd = 0 (number) VScript : nw = 837 (number)
Second, if I finish the game through: test_end_game, the site displays the winning. https://getdotastats.com/#s2__match?id=29151345
Oh my God, I did it, was a mistake in my code. Sorry to bother with questions <3 Update please Schema.lua: https://pastebin.com/kyxh7r5h
No game values? Didn't you want to know which team won?
New schema is up.
Hello, the question arose whether it is possible that, every month to reset the tab in the TOP PLAYERS?
You should look at the stat-highscore instead. The "Top Players" is a bit of a misnomer. You definitely don't want to be resetting that, as you will no longer be able to query for how many games / wins / losses, etc. that a particular player has for your mod.
Check out this API we have: https://getdotastats.com/#docs__stat-highscore
You may want to refer to the stat-collection library LUA files to see exactly the syntax on how to POST to external APIs.
I never got around to re-adding the site display of the highscores after Reborn landed, but if you end up implementing it in your mod, I would certainly do so. The intention was to give modders an API that they can then render the results of in-game. The three calls are SAVE, LIST, and TOP. By calling TOP at the start of every mod, you could list the top how ever many I cut it off at (either top 50 or 100 scores), somewhere in-game.
You can have multiple high-score boards. You could have one for most kills in a single game, another for fastest game, most damage done in a single game, etc. We can certainly add the option to reset those score-boards on a monthly basis if you wanted, and most importantly it wouldn't interfere with stats you should be keeping.
To give you a key to play around with for now, the highscoreID for a generic score-board tied to your modID is ~~KEY~~
. Let me know when you have written this down, so I can remove it from this post.
Only a few mods implemented this API pre-reborn... so there will certainly be things to improve or fix in it. Let me know how it goes.
If you haven't added me to steam yet, you certainly should. I sent an invite from http://steamcommunity.com/id/jimmydorry/
I should add, I just tested it, and it seems to work. Don't worry about the userAuth key for now. We can come back to that once you have it all up and running. It's essentially a way to secure the scoreboard against easy tampering of other user's scores. If people figure out how it works, just like any game with a highscore board, it can be filled with scores at the maximum value.
And whether any examples, just not quite sure how to implement it and how it will work.
I recorded the key. We need to each month, new statistics about the top players, as we want to give prizes to the best players in the last month.
So how to do that?
Re-implement the following parts of the library, directly in your game code:
From the stat-collection library, that you need to re-implement directly in your game code, except changed to match the defined API above for stat-highscore:
Form payload according the the linked schema and send it: here
Actual sending function: here
Definition of end point that you need to update to match the stat-highscore schema linked above: here
Three parts of the stat-highscore API are:
The only non-obvious thing should be that stageName
= s2_highscore.php
not s2_phase_1.php
Post some LUA code here if you get stuck.
Hi @KaRMa4 I have updated the repository to reflect your needs
Noice
Thank you, and where it will appear?
You need to display the results in-game. Especially for the top list. The chances of people deciding to go to a site are far smaller than them looking at something in your mod. Maybe you would want to list the top 50 players during the "warm-up" phase. Or maybe during "hero pick".
It will involve working with panorama. http://moddota.com/ is a great resource to get started and a community you can ask modding specific questions in.
The fact that I don't know how to link the server and dota that they between them gave statistics that can then be output via the panorama in dota.
The linked library shows how to get and save the data. It even has an example. It doesn't show you how to display it using panorama though.
https://github.com/GetDotaStats/stat-highscore
what the changes to your addon_game_mode.lua would look like
Tomorrow I'll add in a panorama example
Console Log: https://pastebin.com/fEZKXm7P Settings.kv: https://pastebin.com/cHbaWryC Schema.lua: https://pastebin.com/kyxh7r5h addon_game_mode.lua: https://pastebin.com/BRbypGba