Closed dsjoerg closed 11 years ago
As part of this implementation we'll need to set a player.frames_in_game
field when loading context for player leave events. I'm not liking frames_in_game
as an attribute name though, suggestions?
frames_alive frames_active frames_before_leaving
Rather than the player leave event, is there an event that tells us when a player no longer has any forces? If so that would be better to use, for NvN games when a player's stuff is all gone but they don't leave right away. If the event doesnt exist then don't worry about it.
frames_active
sounds good to me.
There aren't any "out of forces" events, that's more of a game notification than a player action. Also, a player that is out of forces can instead help out a team mate if they have shared control enabled.
We could key off of the last ability command issued though! How about that?
Very good
Note to self: with this logic we need to modify the APM plugin to only count actions taken up to the frames_active
frame. A guy with no units can still move his screen around and select stuff.
This uses the number of seconds the player is in the game as the denominator.
As mentioned above, it may be even better to only use the number of seconds in which the player issuing commands to units. Currently a player with no units can have their APM tanked by sitting around and watching the rest of the game.
In https://github.com/GraylinKim/sc2reader/blob/hots/sc2reader/plugins/replay.py#L94 we have:
the denominator is the number of minutes, which is an integer (casted to a float, but logically an integer).
It would be more correct to use the actual length of time (in seconds or frames) that player was in the game.