stats logging.
Moderator: Moderators
stats logging.
As part of my scoreboard work, I plan on doing stats logging. and yes I want to do graphs, line and bar..
this will be done as 2 parts:
gadget:
- stores stats
- returns stats when requested
widget(will be chili deal with it)
- During the game will show player/team stats
-- unless you are a spec
- shows stats at end of game for all teams. Each team is it's own tab.
-- in not team games all players are shown on one screen.
will probably take me a few weeks to do. So the thoughts are what relevant stats? How do I record things like APM?
This is a general discussion thread about the idea, please do not be upset if I do NOT implement your suggestion, just doing this stuff will be a lot of work.
this will be done as 2 parts:
gadget:
- stores stats
- returns stats when requested
widget(will be chili deal with it)
- During the game will show player/team stats
-- unless you are a spec
- shows stats at end of game for all teams. Each team is it's own tab.
-- in not team games all players are shown on one screen.
will probably take me a few weeks to do. So the thoughts are what relevant stats? How do I record things like APM?
This is a general discussion thread about the idea, please do not be upset if I do NOT implement your suggestion, just doing this stuff will be a lot of work.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: stats logging.
I can think of 3 things that may be able to record APM.
Widget:
I'm sure this method would work. Create a widget that collects whichever actions you want to track and periodically send them to synced. Users aren't really suppose to know about widgets when using a game with a complete UI so it's usage is almost guaranteed. To really enforce usage put the code in something important like the main UI.
Gadget:
I'm not sure if unsynced gadgets can track mouse and keyboard input. I've seen something in gadgets.lua that suggests they do but I have not looked into it. This is for strict enforcement.
Endgame Stats:
The engame stats have an APM field and I'm pretty sure lua can read them but this method has a few pitfalls. Firstly you are entirely at the mercy of the engine's APM implementation (I have no idea if it actually works), it doesn't display time dependant data and I think it only shows at the end of the game.
I'd go with a widget communicating with a gadget.
As for relevance you could collect keyboard and mouse presses. If you want to be really fancy you could further break down what those actions are used for.
As for team stats it's a question of how much you want to collect. Stats can be divided down to ridiculously fine levels. You can collect the incomes of your various resources, resource allocation, power etc... There are lots of combat stats many of which are useless. Units could be split into general classes (something like tanks, aircraft, light mech, medium mech, special mech, turrets) and you could track the damage dealt by each.
I don't know the game well enough to discern the line between relevant and useless stats. Mostly it's down to how much work you want to put into it.
Widget:
I'm sure this method would work. Create a widget that collects whichever actions you want to track and periodically send them to synced. Users aren't really suppose to know about widgets when using a game with a complete UI so it's usage is almost guaranteed. To really enforce usage put the code in something important like the main UI.
Gadget:
I'm not sure if unsynced gadgets can track mouse and keyboard input. I've seen something in gadgets.lua that suggests they do but I have not looked into it. This is for strict enforcement.
Endgame Stats:
The engame stats have an APM field and I'm pretty sure lua can read them but this method has a few pitfalls. Firstly you are entirely at the mercy of the engine's APM implementation (I have no idea if it actually works), it doesn't display time dependant data and I think it only shows at the end of the game.
I'd go with a widget communicating with a gadget.
As for relevance you could collect keyboard and mouse presses. If you want to be really fancy you could further break down what those actions are used for.
As for team stats it's a question of how much you want to collect. Stats can be divided down to ridiculously fine levels. You can collect the incomes of your various resources, resource allocation, power etc... There are lots of combat stats many of which are useless. Units could be split into general classes (something like tanks, aircraft, light mech, medium mech, special mech, turrets) and you could track the damage dealt by each.
I don't know the game well enough to discern the line between relevant and useless stats. Mostly it's down to how much work you want to put into it.
Re: stats logging.
APM:
imo useless in spring, the ui is too good so it has little meaning.
stuff like "mouse movement in pixel" might be interessting and the endgraph even shows that but I dont even know if it is dependant on screen resolution.
You could log where players click on the screen to see what buttons are used. (or where they click on the map)
But that are not really "game statistics."
For example units shooting a turret that is constantly repaired gives no advantage at all for the attacking player but boosts his damage dealt graph. In games without repair/self healing it will be different blablalabla.
http://springrts.com/wiki/CollectionOfS ... ring_games
imo useless in spring, the ui is too good so it has little meaning.
stuff like "mouse movement in pixel" might be interessting and the endgraph even shows that but I dont even know if it is dependant on screen resolution.
You could log where players click on the screen to see what buttons are used. (or where they click on the map)
But that are not really "game statistics."
iirc players get more APM if you play replays at higher speed.the engine's APM implementation (I have no idea if it actually works)
depends on which game you mean. One might think that "damage dealt" is universally the most important factor but I find in ie xta (maybe ba too, to less extent) it does not mean that much. I have seen many 1v1 games where the winning player had fewer damage dealt.So the thoughts are what relevant stats?
For example units shooting a turret that is constantly repaired gives no advantage at all for the attacking player but boosts his damage dealt graph. In games without repair/self healing it will be different blablalabla.
http://springrts.com/wiki/CollectionOfS ... ring_games
Re: stats logging.
gadgets have unsynced space as well google. I would probably stay in gadget space as much as possible. I don't like using a lot of widget->gadget messages. I already have plenty of those. I will look into the gadget key press stuff but honestly apm is a low priority, I am doing it because people here wank to how much they spam keys.
My thoughts are that I hate relying on the engine's recorded player stats. This is part of my want for this to be moved into lua. My code won't be the best to be sure but it'll be there for when someone wants to strip this crap out of the engine.
well that is the thing knorke, I just mentioned apm because it is the stat I give the least shits about
. Yeah, is damage important? I dunno? is damage taken important? I dunno but I will record it all the same. am I gonig to record the amount of hover unit types with damage higher than 100 built? no probably not.
my thoughts on stats are this:
My thoughts are that I hate relying on the engine's recorded player stats. This is part of my want for this to be moved into lua. My code won't be the best to be sure but it'll be there for when someone wants to strip this crap out of the engine.
well that is the thing knorke, I just mentioned apm because it is the stat I give the least shits about

my thoughts on stats are this:
- income levels over time
damage dealt
damage taken
kills
deaths
repair
score(gundam specific)
xp(gundam specific and not per unit xp)
time levels acquired(gundam specific)
time research acquired(gundam specific)
what killed your units
what you killed
Re: stats logging.
At least gadget:KeyPress works.Google_Frog wrote:Gadget:
I'm not sure if unsynced gadgets can track mouse and keyboard input.
Re: stats logging.
Why was this moved to lua? It isn't about HOW..it was about WHAT players/gamedevs may want to see in this sort of code.
Re: stats logging.
One would be forgiven for thinking a thread talking about what stats needs to be logged by a lua gadget and what should be shown by a lua widget would belong in a lua forum.
IIRC this was in general discussion right?
IIRC this was in general discussion right?
Re: stats logging.
I mention that I am doing it in a gadget because most of the stats stuff around here is done in widget.
I mention the way they will interact for gamedevs who may not like chili and wonder if it'll be usable with their other ui stuff...
the way I approach it is not really up for debate, I was not asking, I was telling.
it was in games and mods.
I mention the way they will interact for gamedevs who may not like chili and wonder if it'll be usable with their other ui stuff...
the way I approach it is not really up for debate, I was not asking, I was telling.
it was in games and mods.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: stats logging.
I would like a total score based upon metal value of the units you've killed.
Re: stats logging.
In BA i think a good indicator is (damage dealt / metal used)
APM is trickier, some people have high apm despite being poor players, but most low apm players are poor players.
APM is trickier, some people have high apm despite being poor players, but most low apm players are poor players.
Re: stats logging.
I have a scoring gadget, it uses the unit cost at unit killed to assign xp to the killer. You guys can tweak that to whatever game conditions you want.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: stats logging.
Your ally dealt 99% damage to a large unit and your lucky bullet kills it off. Who gets the credit?Forboding Angel wrote:I would like a total score based upon metal value of the units you've killed.
Re: stats logging.
in my mind, that is a killsteal and Iamokwiththis. I am not writing a perfect solution, I am writing a basic one that someone else can go nuts with.
when you get into shared xp, you get into storing %damaged per player, how long until that player's damage doesn't matter any more, and/or how much repair may negate that.
not what I am here to do. I am JUST here to get something basic done. If you want to fight kill steals that is fine but not a priority for me.
when you get into shared xp, you get into storing %damaged per player, how long until that player's damage doesn't matter any more, and/or how much repair may negate that.
not what I am here to do. I am JUST here to get something basic done. If you want to fight kill steals that is fine but not a priority for me.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: stats logging.
That's easy, just pull a guild wars and split all xp evenly among allies (if more than one ally damages a target).
Re: stats logging.
So you get players sending one unit out to hit the gundam once while the rest do all the work :3 I can see people getting pissed about that.
I may do shared 20% or something like that but I find the killsteal thing to be a lot of fun :)
I may do shared 20% or something like that but I find the killsteal thing to be a lot of fun :)
Re: stats logging.
Hey smoth, I made something similar for BA. It doesn't graph things but does keep track of a few items of interest.
The code may be a bit messy as I haven't done much of this sort of thing, but maybe you can put it to good use
http://pastebin.com/1pCnEQC2
The code may be a bit messy as I haven't done much of this sort of thing, but maybe you can put it to good use

http://pastebin.com/1pCnEQC2
Re: stats logging.
I agree with this. Don't bother to implement this parameter, it has no value at all, since it's a qualitative and not a quantitative parameter. Two bad commands are not better than one good, basically.knorke wrote:APM:
imo useless in spring, the ui is too good so it has little meaning.
Re: stats logging.
The one who kills it, the winner takes it all.CarRepairer wrote:Your ally dealt 99% damage to a large unit and your lucky bullet kills it off. Who gets the credit?Forboding Angel wrote:I would like a total score based upon metal value of the units you've killed.
This is how it works IRL at least, if you shoot me in the elbow you are not awarded a 15% kill, or something like that. Basically, the whole thing about hit points is flawed, and we should, to be realistic, instead use a statistically based approach, i.e. that each shot can kill -- with a certain probability that correlates with hit points. Because if you hit one shot in the fuel tank or something similar you kill the unit, no matter if it's the first shot or the 111th. Similarly, 50 shots that hit an unit in the armour doesnt really kill it, or take it closer to a kill.
Without remaking the whole thing with the HP, it's still better to award the kill the the unit that actually does the kill, than to split it amongst several potential ones. Because the shots that don't kill are basically misses.
Re: stats logging.
I think it really depends on the situation. I like assist points it is just hard to tell who and what was useful.
One thing I thought about was a degrading ticker.
Say you hit a unit and dealt 25% damage to it... Each second your damage dealt goes down by 5%
3 seconds later it dies..
Your ticker is at 10% you receive 10% of it's xp value as a bonus..
If you are the killer it is 110% of whatever xp he was worth.... Sound fair?
One thing I thought about was a degrading ticker.
Say you hit a unit and dealt 25% damage to it... Each second your damage dealt goes down by 5%
3 seconds later it dies..
Your ticker is at 10% you receive 10% of it's xp value as a bonus..
If you are the killer it is 110% of whatever xp he was worth.... Sound fair?