public interface IRepProcessor
IReplay
.IRepParserEngine
,
IReplay
,
IRepParserEngine.getRepProc(Path)
,
IRepParserEngine.parseAndWrapReplay(Path)
Modifier and Type | Method and Description |
---|---|
double |
calculatePerMinute(double count,
int loops)
Calculates a Per Minute value as a
double type (e.g. |
int |
calculatePerMinute(long count,
int loops)
Calculates a Per Minute value as a
int type (e.g. |
int |
calculateSQ(int unspentResources,
int income)
Calculates the SQ (Spending Quotient).
|
long |
convertToGameTime(long realMs)
This method converts real-time to game time based on the user's preference at construction time (the value is cached and used so no inconsistent
time values are produced if the setting is modified later).
|
long |
convertToRealTime(long gameMs)
This method converts game-time to real-time based on the user's preference at construction time (the value is cached and used so no inconsistent
time values are produced if the setting is modified later).
|
java.lang.String |
formatLoopTime(int gameloop)
Returns a formatted time string converted from the specified game loop.
|
int |
getAvgAPM()
Returns the weighted average player APM.
|
ILeague |
getAvgLeague()
Returns the average player league.
|
int |
getAvgLevels()
Returns the average player levels.
|
double |
getAvgSPM()
Returns the weighted average player SPM.
|
int |
getAvgSQ()
Returns the weighted average player SQ.
|
double |
getAvgSupplyCappedPercent()
Returns the average supply-capped percent.
|
int |
getChatMessagesCount()
Returns the number of chat messages.
|
IGameSpeed |
getConverterGameSpeed()
Returns the game speed to be used to convert between game-time and real-time.
|
java.nio.file.Path |
getFile()
Returns the processed replay file.
|
IFormat |
getFormat()
Returns the game format.
|
IGameSpeed |
getGameSpeed()
Returns the game speed.
|
int |
getInitialPerMinCalcExclTime()
Returns the initial time to exclude from per-minute calculations in game-time seconds.
|
java.lang.String |
getLeagueMatchup()
Returns the league match-up, for example: "DPvPG".
|
long |
getLengthMs()
Returns the game length in milliseconds.
|
java.lang.String |
getLosersString()
Returns a comma separated list of loser player names.
|
ICacheHandle |
getMapCacheHandle()
Returns the cache handle of the map file.
|
IMapInfo |
getMapInfo()
Returns the map info.
|
IMapObjects |
getMapObjects()
Returns the map objects.
|
IUser[] |
getOriginalUsers()
Returns the original users, this array is never reordered.
|
java.lang.String |
getPlayersGrouped()
Returns a comma separated list of player names grouped by team.
|
java.lang.String |
getPlayersString()
Returns a comma separated list of player names.
|
java.lang.String |
getPlayersStringOfResult(IResult result)
Returns a comma separated list of player names whose result is the specified optional result.
|
IUser[] |
getPlayerUsers()
Returns the users that have a player object (participants of the game).
|
java.lang.String |
getRaceMatchup()
Returns the race match-up, for example: "ZTvPP"
|
IReplay |
getReplay()
Returns the
IReplay model object. |
ITagTransformation |
getTagTransformation()
Returns the unit tag transformation strategy that is used when unit tags are displayed.
|
IUser |
getUser(int userId)
Returns the user for the specified user id.
|
IUser[] |
getUsers()
Returns the users (players, observers etc.).
|
IUser[] |
getUsersByPlayerId()
Returns the users indexed by player id.
|
IUser[] |
getUsersByUserId()
Returns the users indexed by user id, might contain
null values. |
java.lang.String |
getWinnersString()
Returns a comma separated list of winner player names.
|
IFormat |
guessFormat()
Guesses the format from the race match-up.
|
boolean |
isArchon()
Tells if the replay is an Archon mode game.
|
boolean |
isLargestRemainingTeamWins()
Tells if largest remaining team is to be declared winner if result info is missing.
|
boolean |
isOverrideFormatBasedOnMatchup()
Tells if detected format is to be overridden based on matchup.
|
boolean |
isRealTime()
Tells if real-time time measurement is to be used.
|
long |
loopToTime(int gameloop)
Converts the specified game loop to time (milliseconds).
|
java.nio.file.Path getFile()
boolean isRealTime()
int getInitialPerMinCalcExclTime()
boolean isOverrideFormatBasedOnMatchup()
boolean isLargestRemainingTeamWins()
ITagTransformation getTagTransformation()
IGameSpeed getGameSpeed()
getConverterGameSpeed()
IGameSpeed getConverterGameSpeed()
Game speeds instances support converting time values between game time and real time. This game speed is used by convertToRealTime(long)
and
convertToRealTime(long)
.
Note: since Legacy of the Void expansion is using real-time, IGameSpeed.NORMAL
is returned always in case of LotV replays.
getConverterGameSpeed()
IUser[] getUsers()
null
values.IUser[] getOriginalUsers()
IUser[] getUsersByUserId()
null
values.IUser[] getUsersByPlayerId()
null
(player id is 1-based)IUser[] getPlayerUsers()
null
values.int calculateSQ(int unspentResources, int income)
Algorithm:
SQ = 35 * ( 0.00137 * I - ln( U ) ) + 240
Where U
is the average unspent resources and I
is the average income; and and samples are taken up to the loop of the last cmd
game event of the user.
Source: Do you macro like a pro?
unspentResources
- unspent resources (Resources Current; including minerals and vespene)income
- income (Resource Collection Rate; including minerals and vespene)int calculatePerMinute(long count, int loops)
int
type (e.g. Actions Per Minute, Screens Per minute).count
- number of anything, e.g. number of actions or screensloops
- time in loops where the count (e.g. actions) spreadcalculatePerMinute(double, int)
double calculatePerMinute(double count, int loops)
double
type (e.g. Actions Per Minute, Screens Per minute).count
- number anything, e.g. number of actions or screensloops
- time in loops where the count (e.g. actions) spreadcalculatePerMinute(long, int)
IUser getUser(int userId)
userId
- user id to return the user forjava.lang.String getRaceMatchup()
java.lang.String getLeagueMatchup()
IFormat getFormat()
IFormat guessFormat()
IFormat.CUSTOM
if format cannot be guessedboolean isArchon()
A game is Archon mode if the IFormat
(as returned by getFormat()
is IFormat.ARCHON
.
long convertToRealTime(long gameMs)
gameMs
- game time to be convertedconvertToGameTime(long)
long convertToGameTime(long realMs)
On a game speed conversion from game-time to real-time is multiplication by a constant, converting back means to multiply with the reciprocal of the
constant:
realMs = gameMs * c
gameMs = realMs / c
Converting values in which time is a divisor must be reversed, for example:
APM = actions / time
game APM = actions / game time
real APM = actions / real time = actions / ( game time * c) = ( actions / game time ) / c = game APM / c
So basically this method can be used to convert APM values from game-time to real-time!
realMs
- real time to be convertedconvertToRealTime(long)
long loopToTime(int gameloop)
This method also converts game-time to real-time based on the user's preference at construction time (the value is cached and used so no inconsistent time values are produced if the setting is modified later).
gameloop
- game loop to be convertedlong getLengthMs()
java.lang.String formatLoopTime(int gameloop)
gameloop
- game loop to convert and formatjava.lang.String getPlayersGrouped()
java.lang.String getPlayersStringOfResult(IResult result)
result
- optional result filter; if specified, only players having this result will be includedjava.lang.String getPlayersString()
java.lang.String getWinnersString()
java.lang.String getLosersString()
int getAvgAPM()
The weights are the times used to calculate a player APM value. Only human players are included.
double getAvgSPM()
The weights are the times used to calculate a player SPM value. Only human players are included.
int getAvgSQ()
The weights are the times used to calculate a player SQ value.
int getAvgLevels()
double getAvgSupplyCappedPercent()
ILeague getAvgLeague()
The algorithm rounds up, for example if there are 2 players having 2 different subsequent leagues, then the average will be the higher league.
ICacheHandle getMapCacheHandle()
int getChatMessagesCount()
IMapInfo getMapInfo()
IMapObjects getMapObjects()
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.