Documentation
¶
Overview ¶
CSV export dedicated to the application CS Demo Manager.
It's similar to the classic CSV export - the main difference is that there are no headers and some columns differ. CS:DM doesn't use the traditional CSV export because column order is crucial as it inserts demos into a database from CSV files. If CS:DM was using the classic CSV export, any changes to the traditional CSV export would break the application.
Index ¶
- func AnalyzeAndExportDemo(demoPath string, outputPath string, options AnalyzeAndExportDemoOptions) error
- func FormatValidDemoSources() string
- func FormatValidExportFormats() string
- func ValidateDemoSource(source constants.DemoSource) error
- func ValidateExportFormat(format constants.ExportFormat) error
- type AnalyzeAndExportDemoOptions
- type AnalyzeDemoOptions
- type Analyzer
- type BombDefuseStart
- type BombDefused
- type BombExploded
- type BombPlantStart
- type BombPlanted
- type ChatMessage
- type ChickenDeath
- type ChickenPosition
- type Clutch
- type Damage
- type DecoyStart
- type FlashbangExplode
- type GrenadeBounce
- type GrenadePosition
- type GrenadeProjectileDestroy
- type HeGrenadeExplode
- type HostagePickUpStart
- type HostagePickedUp
- type HostagePosition
- type HostageRescued
- type InfernoPosition
- type Kill
- type Match
- func (match Match) AssistCount() int
- func (match Match) DeathCount() int
- func (match Match) GameModeStr() constants.GameModeStr
- func (match *Match) GetPlayerEconomyAtRound(playerName string, steamID64 uint64, roundNumber int) *PlayerEconomy
- func (match Match) KillCount() int
- func (match *Match) KillsByRound() map[int][]*Kill
- func (match *Match) MarshalJSON() ([]byte, error)
- func (match Match) Players() []*Player
- func (match Match) ShotCount() int
- func (match Match) Team(team common.Team) *Team
- type MatchAlias
- type MatchJSON
- type Player
- func (player *Player) ArmorDamage() int
- func (player *Player) AssistCount() int
- func (player *Player) AverageAssistPerRound() float32
- func (player *Player) AverageDamagePerRound() float32
- func (player *Player) AverageDeathPerRound() float32
- func (player *Player) AverageKillPerRound() float32
- func (player *Player) BombDefusedCount() int
- func (player *Player) BombPlantedCount() int
- func (player *Player) Clutches() []*Clutch
- func (player *Player) DeathCount() int
- func (player *Player) Deaths() []*Kill
- func (player *Player) FirstDeathCount() int
- func (player *Player) FirstKillCount() int
- func (player *Player) FirstTradeDeathCount() int
- func (player *Player) FirstTradeKillCount() int
- func (player *Player) FiveKillCount() int
- func (player *Player) FourKillCount() int
- func (player *Player) HeadshotCount() int
- func (player *Player) HeadshotPercent() int
- func (player *Player) HealthDamage() int
- func (player *Player) HltvRating() float32
- func (player *Player) HltvRating2() float32
- func (player *Player) HostageRescuedCount() int
- func (player *Player) KAST() float32
- func (player *Player) KillCount() int
- func (player *Player) KillDeathRatio() float32
- func (player *Player) MarshalJSON() ([]byte, error)
- func (player *Player) OneKillCount() int
- func (player *Player) OneVsFiveCount() int
- func (player *Player) OneVsFiveLostCount() int
- func (player *Player) OneVsFiveWonCount() int
- func (player *Player) OneVsFourCount() int
- func (player *Player) OneVsFourLostCount() int
- func (player *Player) OneVsFourWonCount() int
- func (player *Player) OneVsOneCount() int
- func (player *Player) OneVsOneLostCount() int
- func (player *Player) OneVsOneWonCount() int
- func (player *Player) OneVsThreeCount() int
- func (player *Player) OneVsThreeLostCount() int
- func (player *Player) OneVsThreeWonCount() int
- func (player *Player) OneVsTwoCount() int
- func (player *Player) OneVsTwoLostCount() int
- func (player *Player) OneVsTwoWonCount() int
- func (player *Player) String() string
- func (player *Player) TeamName() string
- func (player *Player) ThreeKillCount() int
- func (player *Player) TradeDeathCount() int
- func (player *Player) TradeKillCount() int
- func (player *Player) TwoKillCount() int
- func (player *Player) UtilityDamage() int
- func (player *Player) UtilityDamagePerRound() float32
- type PlayerAlias
- type PlayerBuy
- type PlayerEconomy
- type PlayerFlashed
- type PlayerJSON
- type PlayerPosition
- type Round
- type RoundAlias
- type RoundJSON
- type Shot
- type SmokeStart
- type Team
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeAndExportDemo ¶
func AnalyzeAndExportDemo(demoPath string, outputPath string, options AnalyzeAndExportDemoOptions) error
func FormatValidDemoSources ¶
func FormatValidDemoSources() string
func FormatValidExportFormats ¶
func FormatValidExportFormats() string
func ValidateDemoSource ¶
func ValidateDemoSource(source constants.DemoSource) error
func ValidateExportFormat ¶
func ValidateExportFormat(format constants.ExportFormat) error
Types ¶
type AnalyzeAndExportDemoOptions ¶
type AnalyzeAndExportDemoOptions struct { IncludePositions bool Source constants.DemoSource Format constants.ExportFormat MinifyJSON bool }
type AnalyzeDemoOptions ¶
type AnalyzeDemoOptions struct { IncludePositions bool Source constants.DemoSource }
type BombDefuseStart ¶
type BombDefuseStart struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` PlanterSteamID64 uint64 `json:"defuserSteamId"` PlanterName string `json:"defuserName"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type BombDefused ¶
type BombDefused struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Site string `json:"site"` DefuserSteamID64 uint64 `json:"defuserSteamId"` DefuserName string `json:"defuserName"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` CounterTerroristAliveCount int `json:"counterTerroristAliveCount"` TerroristAliveCount int `json:"terroristAliveCount"` }
type BombExploded ¶
type BombExploded struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Site string `json:"site"` PlanterSteamID64 uint64 `json:"defuserSteamId"` PlanterName string `json:"defuserName"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type BombPlantStart ¶
type BombPlantStart struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Site string `json:"site"` PlanterSteamID64 uint64 `json:"defuserSteamId"` PlanterName string `json:"defuserName"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type BombPlanted ¶
type BombPlanted struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Site string `json:"site"` PlanterSteamID64 uint64 `json:"planterSteamId"` PlanterName string `json:"planterName"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type ChatMessage ¶
type ChatMessage struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Message string `json:"message"` SenderSteamID64 uint64 `json:"senderSteamId"` SenderName string `json:"senderName"` SenderSide common.Team `json:"senderSide"` IsSenderAlive bool `json:"isSenderAlive"` }
type ChickenDeath ¶
type ChickenPosition ¶
type Clutch ¶
type Clutch struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` OpponentCount int `json:"opponentCount"` Side common.Team `json:"side"` HasWon bool `json:"hasWon"` ClutcherSteamID64 uint64 `json:"clutcherSteamId"` ClutcherName string `json:"clutcherName"` ClutcherSurvived bool `json:"clutcherSurvived"` ClutcherKillCount int `json:"clutcherKillCount"` }
type Damage ¶
type Damage struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` HealthDamage int `json:"healthDamage"` ArmorDamage int `json:"armorDamage"` AttackerSteamID64 uint64 `json:"attackerSteamId"` AttackerSide common.Team `json:"attackerSide"` AttackerTeamName string `json:"attackerTeamName"` IsAttackerControllingBot bool `json:"isAttackerControllingBot"` VictimHealth int `json:"victimHealth"` VictimNewHealth int `json:"victimNewHealth"` VictimArmor int `json:"victimArmor"` VictimNewArmor int `json:"victimNewArmor"` VictimSteamID64 uint64 `json:"victimSteamId"` VictimSide common.Team `json:"victimSide"` VictimTeamName string `json:"victimTeamName"` IsVictimControllingBot bool `json:"isVictimControllingBot"` HitGroup events.HitGroup `json:"hitgroup"` WeaponName constants.WeaponName `json:"weaponName"` WeaponType constants.WeaponType `json:"weaponType"` WeaponUniqueID string `json:"weaponUniqueId"` }
func (*Damage) IsGrenadeWeapon ¶
type DecoyStart ¶
type DecoyStart struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
type FlashbangExplode ¶
type FlashbangExplode struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
type GrenadeBounce ¶
type GrenadeBounce struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` GrenadeName constants.WeaponName `json:"grenadeName"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
type GrenadePosition ¶
type GrenadePosition struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` GrenadeName constants.WeaponName `json:"grenadeName"` }
type GrenadeProjectileDestroy ¶
type GrenadeProjectileDestroy struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` GrenadeName constants.WeaponName `json:"grenadeName"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
type HeGrenadeExplode ¶
type HeGrenadeExplode struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
type HostagePickUpStart ¶
type HostagePickUpStart struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` PlayerSteamID64 uint64 `json:"playerSteamId"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` HostageEntityId int `json:"hostageEntityId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type HostagePickedUp ¶
type HostagePickedUp struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` HostageEntityId int `json:"hostageEntityId"` PlayerSteamID64 uint64 `json:"playerSteamId"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type HostagePosition ¶
type HostageRescued ¶
type HostageRescued struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` PlayerSteamID64 uint64 `json:"playerSteamId"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` HostageEntityId int `json:"hostageEntityId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` }
type InfernoPosition ¶
type InfernoPosition struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` UniqueID int64 `json:"uniqueId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ConvexHull2D []r2.Point `json:"convexHull2D"` }
type Kill ¶
type Kill struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` WeaponType constants.WeaponType `json:"weaponType"` WeaponName constants.WeaponName `json:"weaponName"` KillerName string `json:"killerName"` KillerSteamID64 uint64 `json:"killerSteamId"` KillerSide common.Team `json:"killerSide"` KillerTeamName string `json:"killerTeamName"` KillerX float64 `json:"killerX"` KillerY float64 `json:"killerY"` KillerZ float64 `json:"killerZ"` IsKillerAirborne bool `json:"is_killer_airborne"` IsKillerBlinded bool `json:"is_killer_blinded"` IsKillerControllingBot bool `json:"isKillerControllingBot"` VictimName string `json:"victimName"` VictimSteamID64 uint64 `json:"victimSteamId"` VictimSide common.Team `json:"victimSide"` VictimTeamName string `json:"victimTeamName"` VictimX float64 `json:"victimX"` VictimY float64 `json:"victimY"` VictimZ float64 `json:"victimZ"` IsVictimAirborne bool `json:"is_victim_airborne"` IsVictimBlinded bool `json:"is_victim_blinded"` IsVictimControllingBot bool `json:"isVictimControllingBot"` IsVictimInspectingWeapon bool `json:"isVictimInspectingWeapon"` AssisterName string `json:"assisterName"` AssisterSteamID64 uint64 `json:"assisterSteamId"` AssisterSide common.Team `json:"assisterSide"` AssisterTeamName string `json:"assisterTeamName"` AssisterX float64 `json:"assisterX"` AssisterY float64 `json:"assisterY"` AssisterZ float64 `json:"assisterZ"` IsAssisterControllingBot bool `json:"isAssisterControllingBot"` IsHeadshot bool `json:"isHeadshot"` PenetratedObjects int `json:"penetratedObjects"` IsAssistedFlash bool `json:"isAssistedFlash"` IsThroughSmoke bool `json:"isThroughSmoke"` IsNoScope bool `json:"isNoScope"` IsTradeKill bool `json:"isTradeKill"` // The attacker did a trade kill IsTradeDeath bool `json:"isTradeDeath"` // The victim did a trade death Distance float32 `json:"distance"` }
func (*Kill) IsTeamKill ¶
type Match ¶
type Match struct { Checksum string `json:"checksum"` Game constants.Game `json:"game"` DemoFilePath string `json:"demoFilePath"` DemoFileName string `json:"demoFileName"` Source constants.DemoSource `json:"source"` Type constants.DemoType `json:"type"` MapName string `json:"mapName"` TickCount int `json:"tickCount"` TickRate float64 `json:"tickrate"` FrameRate float64 `json:"framerate"` Date time.Time `json:"date"` Duration time.Duration `json:"duration"` ServerName string `json:"serverName"` ClientName string `json:"clientName"` NetworkProtocol int `json:"networkProtocol"` BuildNumber int `json:"buildNumber"` // CS2 only GameType constants.GameType `json:"gameType"` GameMode constants.GameMode `json:"gameMode"` IsRanked bool `json:"isRanked"` MaxRounds int `json:"maxRounds"` // mp_maxrounds if detected or based on final scores OvertimeCount int `json:"overtimeCount"` HasVacLiveBan bool `json:"hasVacLiveBan"` TeamA *Team `json:"teamA"` // Team A is the Team that started as CT TeamB *Team `json:"teamB"` // Team B is the Team that started as T Winner *Team `json:"winner"` PlayersBySteamID map[uint64]*Player `json:"players"` Kills []*Kill `json:"kills"` // Includes suicides and bomb explosions too Shots []*Shot `json:"shots"` Rounds []*Round `json:"rounds"` Clutches []*Clutch `json:"clutches"` BombsPlanted []*BombPlanted `json:"bombsPlanted"` BombsDefused []*BombDefused `json:"bombsDefused"` BombsExploded []*BombExploded `json:"bombsExploded"` BombsPlantStart []*BombPlantStart `json:"bombsPlantStart"` BombsDefuseStart []*BombDefuseStart `json:"bombsDefuseStart"` PlayersFlashed []*PlayerFlashed `json:"playersFlashed"` GrenadePositions []*GrenadePosition `json:"grenadePositions"` InfernoPositions []*InfernoPosition `json:"infernoPositions"` HostagePickUpStart []*HostagePickUpStart `json:"hostagePickUpStart"` HostagePickedUp []*HostagePickedUp `json:"hostagePickedUp"` HostageRescued []*HostageRescued `json:"hostageRescued"` HostagePositions []*HostagePosition `json:"hostagePositions"` SmokesStart []*SmokeStart `json:"smokesStart"` DecoysStart []*DecoyStart `json:"decoysStart"` HeGrenadesExplode []*HeGrenadeExplode `json:"heGrenadesExplode"` FlashbangsExplode []*FlashbangExplode `json:"flashbangsExplode"` GrenadeBounces []*GrenadeBounce `json:"grenadeBounces"` GrenadeProjectilesDestroy []*GrenadeProjectileDestroy `json:"grenadeProjectilesDestroy"` ChickenPositions []*ChickenPosition `json:"chickenPositions"` ChickenDeaths []*ChickenDeath `json:"chickenDeaths"` Damages []*Damage `json:"damages"` PlayerPositions []*PlayerPosition `json:"playerPositions"` PlayersBuy []*PlayerBuy `json:"playersBuy"` PlayerEconomies []*PlayerEconomy `json:"playerEconomies"` ChatMessages []*ChatMessage `json:"chatMessages"` // contains filtered or unexported fields }
Match is the root struct that contains relevant data from a demo. It excludes data from warmup / halftime / after match.
func AnalyzeDemo ¶
func AnalyzeDemo(demoPath string, options AnalyzeDemoOptions) (*Match, error)
func (Match) AssistCount ¶
This returns the number of assists excluding BOT assists.
func (Match) DeathCount ¶
This returns the number of player deaths in the match. Unlike KillCount, it takes into account ALL deaths whatever the reason is (weapon, suicide, bomb explosion...).
func (Match) GameModeStr ¶
func (match Match) GameModeStr() constants.GameModeStr
func (*Match) GetPlayerEconomyAtRound ¶
func (match *Match) GetPlayerEconomyAtRound(playerName string, steamID64 uint64, roundNumber int) *PlayerEconomy
func (Match) KillCount ¶
This returns the number of kills in the match. It doesn't include suicides and deaths by bomb explosion.
func (*Match) KillsByRound ¶
func (*Match) MarshalJSON ¶
type MatchAlias ¶
type MatchAlias Match
type MatchJSON ¶
type MatchJSON struct { *MatchAlias GameModeStr string `json:"gameModeStr"` }
type Player ¶
type Player struct { SteamID64 uint64 `json:"steamId"` UserID int `json:"userId"` // +1 to get the player's slot Name string `json:"name"` Score int `json:"score"` Team *Team `json:"team"` MvpCount int `json:"mvpCount"` RankType int `json:"rankType"` Rank int `json:"rank"` OldRank int `json:"oldRank"` WinCount int `json:"winCount"` Color common.Color `json:"color"` InspectWeaponCount int `json:"inspectWeaponCount"` // contains filtered or unexported fields }
func (*Player) ArmorDamage ¶
func (*Player) AssistCount ¶
func (*Player) AverageAssistPerRound ¶
func (*Player) AverageDamagePerRound ¶
func (*Player) AverageDeathPerRound ¶
func (*Player) AverageKillPerRound ¶
func (*Player) BombDefusedCount ¶
func (*Player) BombPlantedCount ¶
func (*Player) DeathCount ¶
func (*Player) FirstDeathCount ¶
func (*Player) FirstKillCount ¶
func (*Player) FirstTradeDeathCount ¶
func (*Player) FirstTradeKillCount ¶
func (*Player) FiveKillCount ¶
func (*Player) FourKillCount ¶
func (*Player) HeadshotCount ¶
func (*Player) HeadshotPercent ¶
func (*Player) HealthDamage ¶
func (*Player) HltvRating ¶
This returns the player's HLTV rating 1.0. Formula: https://web.archive.org/web/20170427062206/http://www.hltv.org/?pageid=242&eventid=0
func (*Player) HltvRating2 ¶
This returns the player's HLTV rating 2.0. https://flashed.gg/posts/reverse-engineering-hltv-rating/ 0.0073*KAST + 0.3591*KPR + -0.5329*DPR + 0.2372*Impact + 0.0032*ADR + 0.1587 ≈ Rating 2.0
func (*Player) HostageRescuedCount ¶
func (*Player) KAST ¶
This returns the percentage of rounds in which the player either had a kill, assist, survived or was traded.
func (*Player) KillDeathRatio ¶
func (*Player) MarshalJSON ¶
func (*Player) OneKillCount ¶
func (*Player) OneVsFiveCount ¶
func (*Player) OneVsFiveLostCount ¶
func (*Player) OneVsFiveWonCount ¶
func (*Player) OneVsFourCount ¶
func (*Player) OneVsFourLostCount ¶
func (*Player) OneVsFourWonCount ¶
func (*Player) OneVsOneCount ¶
func (*Player) OneVsOneLostCount ¶
func (*Player) OneVsOneWonCount ¶
func (*Player) OneVsThreeCount ¶
func (*Player) OneVsThreeLostCount ¶
func (*Player) OneVsThreeWonCount ¶
func (*Player) OneVsTwoCount ¶
func (*Player) OneVsTwoLostCount ¶
func (*Player) OneVsTwoWonCount ¶
func (*Player) ThreeKillCount ¶
func (*Player) TradeDeathCount ¶
func (*Player) TradeKillCount ¶
func (*Player) TwoKillCount ¶
func (*Player) UtilityDamage ¶
func (*Player) UtilityDamagePerRound ¶
type PlayerAlias ¶
type PlayerAlias Player
type PlayerBuy ¶
type PlayerBuy struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` PlayerSteamID64 uint64 `json:"playerSteamId"` PlayerSide common.Team `json:"playerSide"` PlayerName string `json:"playerName"` WeaponName constants.WeaponName `json:"weaponName"` WeaponType constants.WeaponType `json:"weaponType"` WeaponUniqueID string `json:"weaponUniqueId"` HasRefunded bool `json:"hasRefunded"` }
type PlayerEconomy ¶
type PlayerEconomy struct { RoundNumber int `json:"roundNumber"` Name string `json:"name"` SteamID64 uint64 `json:"steamId"` StartMoney int `json:"startMoney"` MoneySpent int `json:"moneySpent"` EquipmentValue int `json:"equipmentValue"` Type constants.EconomyType `json:"type"` PlayerSide common.Team `json:"playerSide"` }
type PlayerFlashed ¶
type PlayerFlashed struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` Duration float32 `json:"duration"` FlashedSteamID64 uint64 `json:"flashedSteamId"` FlashedName string `json:"flashedName"` FlashedSide common.Team `json:"flashedSide"` IsFlashedControllingBot bool `json:"isFlashedControllingBot"` FlasherSteamID64 uint64 `json:"flasherSteamId"` FlasherName string `json:"flasherName"` FlasherSide common.Team `json:"flasherSide"` IsFlasherControllingBot bool `json:"isFlasherControllingBot"` }
type PlayerJSON ¶
type PlayerJSON struct { *PlayerAlias KillCount int `json:"killCount"` DeathCount int `json:"deathCount"` AssistCount int `json:"assistCount"` KillDeathRatio float32 `json:"killDeathRatio"` KAST float32 `json:"kast"` BombDefusedCount int `json:"bombDefusedCount"` BombPlantedCount int `json:"bombPlantedCount"` HealthDamage int `json:"healthDamage"` ArmorDamage int `json:"armorDamage"` UtilityDamage int `json:"utilityDamage"` HeadshotCount int `json:"headshotCount"` HeadshotPercent int `json:"headshotPercent"` OneVsOneCount int `json:"oneVsOneCount"` OneVsOneWonCount int `json:"oneVsOneWonCount"` OneVsOneLostCount int `json:"oneVsOneLostCount"` OneVsTwoCount int `json:"oneVsTwoCount"` OneVsTwoWonCount int `json:"oneVsTwoWonCount"` OneVsTwoLostCount int `json:"oneVsTwoLostCount"` OneVsThreeCount int `json:"oneVsThreeCount"` OneVsThreeWonCount int `json:"oneVsThreeWonCount"` OneVsThreeLostCount int `json:"oneVsThreeLostCount"` OneVsFourCount int `json:"oneVsFourCount"` OneVsFourWonCount int `json:"oneVsFourWonCount"` OneVsFourLostCount int `json:"oneVsFourLostCount"` OneVsFiveCount int `json:"oneVsFiveCount"` OneVsFiveWonCount int `json:"oneVsFiveWonCount"` OneVsFiveLostCount int `json:"oneVsFiveLostCount"` HostageRescuedCount int `json:"hostageRescuedCount"` AverageKillPerRound float32 `json:"averageKillPerRound"` AverageDeathPerRound float32 `json:"averageDeathPerRound"` AverageDamagePerRound float32 `json:"averageDamagePerRound"` UtilityDamagePerRound float32 `json:"utilityDamagePerRound"` FirstKillCount int `json:"firstKillCount"` FirstDeathCount int `json:"firstDeathCount"` FirstTradeDeathCount int `json:"firstTradeDeathCount"` TradeDeathCount int `json:"tradeDeathCount"` TradeKillCount int `json:"tradeKillCount"` FirstTradeKillCount int `json:"firstTradeKillCount"` OneKillCount int `json:"oneKillCount"` TwoKillCount int `json:"twoKillCount"` ThreeKillCount int `json:"threeKillCount"` FourKillCount int `json:"fourKillCount"` FiveKillCount int `json:"fiveKillCount"` HltvRating float32 `json:"hltvRating"` HltvRating2 float32 `json:"hltvRating2"` }
type PlayerPosition ¶
type PlayerPosition struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` IsAlive bool `json:"isAlive"` Name string `json:"name"` SteamID64 uint64 `json:"steamId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` Yaw float32 `json:"yaw"` FlashDurationRemaining float64 `json:"flashDurationRemaining"` Side common.Team `json:"side"` Money int `json:"money"` Health int `json:"health"` Armor int `json:"armor"` HasHelmet bool `json:"hasHelmet"` HasBomb bool `json:"hasBomb"` HasDefuseKit bool `json:"hasDefuseKit"` IsDucking bool `json:"isDucking"` IsAirborne bool `json:"isAirborne"` IsScoping bool `json:"isScoping"` IsDefusing bool `json:"isDefusing"` IsPlanting bool `json:"isPlanting"` IsGrabbingHostage bool `json:"isGrabbingHostage"` ActiveWeaponName constants.WeaponName `json:"activeWeaponName"` Equipments []constants.WeaponName `json:"equipments"` Grenades []constants.WeaponName `json:"grenades"` Pistols []constants.WeaponName `json:"pistols"` SMGs []constants.WeaponName `json:"smgs"` Rifles []constants.WeaponName `json:"rifles"` Heavy []constants.WeaponName `json:"heavy"` }
type Round ¶
type Round struct { Number int `json:"number"` StartTick int `json:"startTick"` StartFrame int `json:"startFrame"` FreezeTimeEndTick int `json:"freezeTimeEndTick"` FreezeTimeEndFrame int `json:"freezeTimeEndFrame"` EndTick int `json:"endTick"` EndFrame int `json:"endFrame"` EndOfficiallyTick int `json:"endOfficiallyTick"` EndOfficiallyFrame int `json:"endOfficiallyFrame"` OvertimeNumber int `json:"overtimeNumber"` TeamAName string `json:"teamAName"` TeamBName string `json:"teamBName"` TeamAScore int `json:"teamAScore"` TeamBScore int `json:"teamBScore"` TeamASide common.Team `json:"teamASide"` TeamBSide common.Team `json:"teamBSide"` TeamAEquipmentValue int `json:"teamAEquipmentValue"` TeamBEquipmentValue int `json:"teamBEquipmentValue"` TeamAMoneySpent int `json:"teamAMoneySpent"` TeamBMoneySpent int `json:"teamBmoneySpent"` TeamAEconomyType constants.EconomyType `json:"teamAEconomyType"` TeamBEconomyType constants.EconomyType `json:"teamBEconomyType"` Duration int64 `json:"duration"` EndReason events.RoundEndReason `json:"endReason"` WinnerName string `json:"winnerName"` WinnerSide common.Team `json:"winnerSide"` // contains filtered or unexported fields }
func (*Round) MarshalJSON ¶
func (*Round) StartMoneyTeamA ¶
func (*Round) StartMoneyTeamB ¶
type RoundAlias ¶
type RoundAlias Round
type RoundJSON ¶
type RoundJSON struct { *RoundAlias StartMoneyTeamA int `json:"teamAStartMoney"` StartMoneyTeamB int `json:"teamBStartMoney"` }
type Shot ¶
type Shot struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` WeaponName constants.WeaponName `json:"weaponName"` WeaponID string `json:"weaponId"` ProjectileID int64 `json:"projectileId"` // Available only for grenades X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` PlayerName string `json:"playerName"` PlayerSteamID64 uint64 `json:"playerSteamId"` PlayerTeamName string `json:"playerTeamName"` PlayerSide common.Team `json:"playerSide"` IsPlayerControllingBot bool `json:"isPlayerControllingBot"` PlayerVelocityX float64 `json:"playerVelocityX"` PlayerVelocityY float64 `json:"playerVelocityY"` PlayerVelocityZ float64 `json:"playerVelocityZ"` Yaw float32 `json:"yaw"` Pitch float32 `json:"pitch"` RecoilIndex float32 `json:"recoilIndex"` AimPunchAngleX float64 `json:"aimPunchAngleX"` AimPunchAngleY float64 `json:"aimPunchAngleY"` ViewPunchAngleX float64 `json:"viewPunchAngleX"` ViewPunchAngleY float64 `json:"viewPunchAngleY"` }
type SmokeStart ¶
type SmokeStart struct { Frame int `json:"frame"` Tick int `json:"tick"` RoundNumber int `json:"roundNumber"` GrenadeID string `json:"grenadeId"` ProjectileID int64 `json:"projectileId"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` ThrowerSteamID64 uint64 `json:"throwerSteamId"` ThrowerName string `json:"throwerName"` ThrowerSide common.Team `json:"throwerSide"` ThrowerTeamName string `json:"throwerTeamName"` ThrowerVelocityX float64 `json:"throwerVelocityX"` ThrowerVelocityY float64 `json:"throwerVelocityY"` ThrowerVelocityZ float64 `json:"throwerVelocityZ"` ThrowerPitch float32 `json:"throwerPitch"` ThrowerYaw float32 `json:"throwerYaw"` }
Source Files
¶
- 5eplay.go
- analyzer.go
- bomb_defuse_start.go
- bomb_defused.go
- bomb_exploded.go
- bomb_plant_start.go
- bomb_planted.go
- challengermode.go
- chat_message.go
- chicken_death.go
- chicken_position.go
- clutch.go
- damage.go
- decoy_start.go
- demo_source.go
- ebot.go
- economy.go
- esea.go
- esportal.go
- export_csdm.go
- export_csv.go
- export_format.go
- export_json.go
- faceit.go
- fastcup.go
- flashbang_explode.go
- grenade_bounce.go
- grenade_position.go
- grenade_projectile_destroy.go
- he_grenade_explode.go
- hostage_pick_up_start.go
- hostage_picked_up.go
- hostage_position.go
- hostage_rescued.go
- inferno_position.go
- kill.go
- match.go
- matchzy.go
- player.go
- player_buy.go
- player_economy.go
- player_flashed.go
- player_position.go
- round.go
- shot.go
- smoke_start.go
- team.go
- valve.go
- weapon.go