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] Anime Imba #112

Closed EYEOFLIE closed 3 years ago

EYEOFLIE commented 5 years ago

https://getdotastats.com/#s2__mod?id=467

Console Log: https://pastebin.com/FdcfUP4P Settings.kv: https://pastebin.com/sdUP5zz8 Schema.lua: https://pastebin.com/BFvXcufF addon_game_mode.lua: https://pastebin.com/53tb3JR1

EYEOFLIE commented 5 years ago

I want activate GDSR for my addon, i seen it in Pure Reflex, checked files and how i understand it's must be activate from ur side or not?

jimmydorry commented 5 years ago

What's your mod? You didn't link it here, and I don't see anything by that name on the site. If you haven't done that yet, go here: https://getdotastats.com/#s2__my__mod_request

Was it this one? https://steamcommunity.com/sharedfiles/filedetails/?id=1506467231

I can't add the schema, until there is a mod to link it against.

After you have added your mod to the site and told me what it is, you should redo the console log. It should show your schema fields, so we can see they are all properly defined, etc.

Yes, GDSR is from our end. If your mod is Player Versus Player (PVP) then you can have GDSR enabled after you have one week of data. We are looking for at least one match played a day for seven consecutive days. If your mod is about a team of players beating a computer controlled enemy, then the GDSR probably won't be very useful.

Remind me in a week, and I'll turn it on for you. We have APIs for getting the player GDSR in-game, if you want it. But you will need to figure out on your own how you want to display it (using Panorama).

jimmydorry commented 5 years ago

Never mind. I found it.

If after making this live, you still don't see any of the stats in your games, then you would need to check your schema values (use the test_schema and test_end_game commands we register at the top of the schema.lua).

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=95

Schema ID: https://getdotastats.com/#s2__my__mods

Your schema ID starts with 2R6... not a v1

EYEOFLIE commented 5 years ago

Thx, my mod is PVP orientated.

jimmydorry commented 5 years ago

Remind me to turn on GDSR in a week.

EYEOFLIE commented 5 years ago

Remind me to turn on GDSR in a week.

Remining xD, and i have some questions, can i set up setting for GDSR?, i mean - i want collect stats from any players values but want collect GDSR only if player more than (number) and only if played on special map name or dota map.

EYEOFLIE commented 5 years ago

Oh, forget, i want API's, pls write me list. P.S I changed name for addon for duration becouse want test why ppls so rofling when in name (Overthrow), it's not new name and no need change, thx.

jimmydorry commented 5 years ago

Activated. It runs / updates once a day.

https://getdotastats.com/#s2__mod_lb?id=467

The API for GDSR is described here under stat-highscore. There is obviously no SAVE method for GDSRs, but you can use TOP (global top) or LIST (values for a specific set of users).

To get the global top, you would be sending something like:

{"type": "TOP", "modIdentifier": "97d......", "highscoreID": "GDSR", "schemaVersion": 1}

To get data on a specific set of users, you would be sending something like:

{"type": "LIST", "modIdentifier": "97d......", "steamID32": ["28755155", "296554474", "163334313"], "highscoreID": "GDSR", "schemaVersion": 1}.


If you only want to send stats under specific conditions, then you need to over-ride the library in a few places.

MIN_PLAYERS needs to be increased, if you want a minimum number of players.

https://github.com/GetDotaStats/stat-collection/blob/master/game/dota_addons/YOUR_ADDON/scripts/vscripts/statcollection/settings.kv#L28

As to on specific maps. There are a few ways to go about it. If it were me, I would set the following to false too GAME_WINNER and ANCIENT_EXPLOSION.

And then manually call the sendStage3 with your custom logic. Something like the following in your main LUA file:

-- Grab the mapname (use it for w/e logic)
local mapName = GetMapName()

ListenToGameEvent('game_rules_state_change', function(keys)
    -- Grab the current state
    local state = GameRules:State_Get()
    if state >= DOTA_GAMERULES_STATE_POST_GAME then
            -- Send postgame stats
            statCollection:sendStage3(this:calcWinnersByTeam(), true)
        end
end, nil)

findWinnerUsingForts()

calcWinnerByTeam()


Tell me what you want the mod name changed to, and I'll do it,

EYEOFLIE commented 5 years ago

Oh, thx, will see, so i can't use GDSR Only for specific map but use other stats collection for other maps...

jimmydorry commented 5 years ago

It would be an all or nothing. No data at all on the other maps (so you can have GDSR on just one map), or data on all maps combined including GDSR.

EYEOFLIE commented 5 years ago

k, i understand, thx

EYEOFLIE commented 5 years ago

It would be an all or nothing. No data at all on the other maps (so you can have GDSR on just one map), or data on all maps combined including GDSR.

Sorr if i noise u, but i can't uderstand why i can't get GDSR value, can u pls write how i must send and get values in js or lua, never did http requests, sorr pls

jimmydorry commented 5 years ago

Have a look at the statcollection.lua

sending

making the payload

Something like that.

To get the global top, you would be sending something like:

{"type": "TOP", "modIdentifier": "97d......", "highscoreID": "GDSR", "schemaVersion": 1}

To get data on a specific set of users, you would be sending something like:

{"type": "LIST", "modIdentifier": "97d......", "steamID32": ["28755155", "296554474", "163334313"], "highscoreID": "GDSR", "schemaVersion": 1}