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] Custom Hero Arena #91

Closed Darkenlord1 closed 3 years ago

Darkenlord1 commented 7 years ago

Console Log settings.kv schema.lua addon_game_mode.lua gamemode.lua

SinZ163 commented 7 years ago
[   Developer         ]: scripts/vscripts/statcollection/schema.lua:86: attempt to index a nil value

You have some errors in your schema logic, be careful to check if the item actually exists before trying to do GetName(), and should remove any prefix on the item name (such as item_)

Also, you should have your schema variables have short names (3 or less characters), and we can give it a display name on our end, and this helps conserve bandwidth.

Darkenlord1 commented 7 years ago

Check files again pls. I don't see errors.

SinZ163 commented 7 years ago

For your ability display logic, rather than "No Ability 5" and other stuff, having it spit out -1 will do the job great. It won't display on pie charts and such but it is considered for win-rates and such.

Also for hero name, filtering out npc_dota_hero will make graphs and winrate statistics easier to read.

Those two changes combined with shortening variable names and the schema can be created on our end

jimmydorry commented 7 years ago

Shortening variable names, meaning max of two characters please.

playerName = pn abilitySlot1 = s1 abilitylvlSlot1 = l1

etc.

The names don't need to be readable. That's what your schema comments are for, and the names on our end are done manually.

Darkenlord1 commented 7 years ago

I think now its work good? W8, i say if I complete work on this.

Darkenlord1 commented 7 years ago

Now it's work fine.

jimmydorry commented 7 years ago

Two things you need to change, the rest looks good now:

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?mid=150

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

Darkenlord1 commented 7 years ago

Ascentions need become in plural. And check shema file. I think i need set "test" flag on false before upd game?

jimmydorry commented 7 years ago

The TESTING setting of true means workshop games count (i.e. when you are testing locally). TESTING set to false means only games in the dota2 proper client are recorded.

It's plural now. SchemaID should be unchanged.

Are your hst and hin now integers? Your console log showed them to be decimal before. You should floor them just in-case.

Darkenlord1 commented 7 years ago

Now i reloaded files, shema and console log.

jimmydorry commented 7 years ago

You included the version number in your schemaAuth.

Remove the v1

Your schemaAuth starts with C8

Darkenlord1 commented 7 years ago

Complete

Darkenlord1 commented 7 years ago

Hmm. I have question for you. I can make so stats will send without game end, on player disconnect?

jimmydorry commented 7 years ago

That's a dedicated server thing. When the host rage quits in normal games, the game gets force quitted. Most games will have leavers too, so you don't want games to partially submit before game end either.

Every few weeks, Valve enables dedicated servers for a heap of the top custom games. I wouldn't worry about it.

Darkenlord1 commented 7 years ago

i think i can set version in quotations ""?

jimmydorry commented 7 years ago

Not sure what you mean.

Darkenlord1 commented 7 years ago

Currently version of my mod setted at 0.82 without quotations, i want to set it "0.82" with quotations.

jimmydorry commented 7 years ago

Oops. Was too busy to respond immediately, and then forgot to come back.

At the top of the schema, we say to use the following to set a flag:

statCollection:setFlags({version = GetVersion()})

If you don't have a function to return the game version, you would just use statCollection:setFlags({version = "0.82"})

Whack this line as early as possible into your code, before you pick heroes, etc.

jimmydorry commented 3 years ago

xD I should go an close all of these.