GetDotaStats / site

The GetDotaStats site in all of its glory
http://getdotastats.com
MIT License
7 stars 2 forks source link

Work in Progress - Stat Integration Guide #173

Closed jimmydorry closed 9 years ago

jimmydorry commented 9 years ago

http://www.hastebin.com/amomafaxac.vhdl

@mnoya Good start

jimmydorry commented 9 years ago

Couldn't reach this from iPad. Copy paste

Step by Step Guide: Integrating stats-collection into your game mode.

Phase 1: Registering your mod

  1. Login into http://getdotastats.com/#site__home
  2. Go to the Custom Games -> Mods section.
  3. Click on Add New Mod
  4. Fill the Submission form in http://getdotastats.com/#d2mods__mod_request and
  5. An Admin will review your info and send you a modID key of 32 characters. In case you lose this string, it will be available at http://getdotastats.com/#s2__my__mods
  6. Congratulations, your game mode is now enabled to send stats!

Phase 2: Integrating the library into your scripts

  1. Download the statcollection from github and merge the scripts folder into your game/YOUR_ADDON/ folder.
  2. In your addon_game_mode.lua file, copy this line at the top: require('statcollection/init')
  3. Go into the scripts/vscripts/statcollection folder and inside the settings.kv file, change the modID XXXXX value with the modID key that was handed to you by an admin.
  4. After this, you will be sending the default basic stats when a lobby is succesfully created, and after the match ends. You are encouraged to add your own gamemode-specific stats (such as a particular game setting or items being purchased). More about this on the next section.

Phase 3: Sending Custom gamemode specific stats

Having a custom schema is the best way to acquire relevant stats about your gamemode, such as pick and winrates of different heroes, keeping track of special game events, anything that you might find appropiate to register and want to know data about. This information can help you decide what changes or additions to make.

Making a custom schema requires that you build your own custom array of stats and write your own lua functions to put data into them.

In the schema_examples folder we provide examples of how various mods implemented their tracking.

Sending custom data is done inside schema.lua. The data to send is split in 2 parts: Game and Players.

The Game array should contain general info about the game session, for example, how many times Roshan was killed, number of towers left standing, or any settings decided after the pre game phase (if you have a setting that can be known before Pre Game, for example "Version", you should use a Flag instead).

In the Players array, you can put information about each player such as the hero picked, KDA, inventory, abilities leveled up, resources gained, or anything that might be interesting for your specific mod.

If your game uses a Round system and you would like to know stats for each round instead of only at post game, >

jimmydorry commented 9 years ago

The schemaPrint() looks like http://www.hastebin.com/amecitodux.md

We need to add this process to the guide.

jimmydorry commented 9 years ago

http://getdotastats.com/#s2__guide_stat_collection