-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Trent Monahan edited this page Sep 20, 2015
·
3 revisions
#StatsCollection API
This needs to be at the top of your code
local statCollection = require("lib.statcollection")
And first thing you need to do in your Activate()
function is: (Note, this can only be run once)
statCollection:init({
modIdentifier = "XXXXXXXXXXXXXXXXXXX", --This would be your modID allocated by GetDotaStats
customSchema = "none" -- the custom schema in use
})
During GameSetup you will be wanting to store all settings defined during that time period, in a key-values fasion. This function can be called as many times as you like, but only the last call will matter, and needs to be before pregame. Any calls during pregame or later will do nothing.
statCollection:setFlags({
mode="CTF15",
winCondition="kill50",
crazyCouriers=true
})
For round based gamemodes, you can use statCollection:submitRound(args)
to communicate to your customSchemas submitRound(args)
. Just make sure it returns a table roughly looking like:
{
[79037155] = 1, --steamID32 = winner
[28755155] = 1, --[PlayerResource:GetSteamAccountID(i - 1)] = 1
[28090256] = 1,
[68903670] = 0
}