Link to NodeCG documentation for reference.
CSGO Data
- game
- matchStats
- allPlayers
- observingPlayer
- bomb
- phase
- mapGrenades
- mapPlayers
- teamOne / teamTwo
- round30Winner
- playerData
HLAE
Map data
Matches
Tournaments
Team/Player assets
Bundle Data/Settings
Example code
const csgoReplicant = nodecg.Replicant('game', 'nodecg-csgo-manager');
csgoReplicant.on('change', (newVal, oldVal) => {
...
});
Types available in ./src/types/csgo-gsi.d.ts
object
Each property inside the game object is detailed in replicants below
Go to csgo-example.json
This the raw untouched value that is obtained from the CSGO Game State Integration.
Types available in ./src/types/csgo-gsi.d.ts
object
mode
[string] Type of match the game is. Most likely "competitive".name
[string] Map namephase
[string] Phase the match is inround
[number] Current roundteam_ct
[object] Counter Terroristsscore
[number] Team scoreconsecutive_round_losses
[number] Amount of rounds lost in a row. Used for loss bonustimeouts_remaining
[number] Amount of timeouts the team has remainingmatches_won_this_series
[number] Matches won for this series
team_ct
[object] Terrorists- Same as
team_ct
- Same as
num_matches_to_win_series
[number] Matches need to win. Would dictate Bo3 or Bo5, etc.current_spectators
[number] Number of people spectating the gamesouvenirs_total
[number] Souvenirs given out in the current matchround_wins
[key value pair]key
[string] of round numbervalue
How the round was won ("ct_win_defuse", "ct_win_time", "ct_win_elimination", "t_win_elimination", "t_win_bomb")
{
"mode": "competitive",
"name": "de_dust2",
"phase": "live",
"round": 4,
"team_ct": {
"score": 0,
"consecutive_round_losses": 5,
"timeouts_remaining": 1,
"matches_won_this_series": 0
},
"team_t": {
"score": 4,
"consecutive_round_losses": 0,
"timeouts_remaining": 1,
"matches_won_this_series": 0
},
"num_matches_to_win_series": 0,
"current_spectators": 0,
"souvenirs_total": 0,
"round_wins": {
"1": "t_win_bomb",
"2": "t_win_bomb",
"3": "t_win_elimination",
"4": "t_win_elimination"
}
}
The map property of the raw CSGO Game State Integration.
Array of all players from the allplayers
property. Made into an array with a new steamId property and if observer slot is 0 it is changed to 10.
Types available in ./src/types/csgo-gsi.d.ts
array
object
steamid
[string] Steam ID of the playername
[string] Name of the playerobserver_slot
[number] 0-9 of the observer IDteam
[string] Which side the player is on ("T" or "CT")activity
[string] What the player is currently doingposition
[string] X, Y and Z location of playerrotation
[string] X, Y and Z rotation of playermatch_stats
[object] Information about the player's total match statisticskills
[number] Number of killsassists
[number] Number of assistsdeaths
[number] Number of deathsmvps
[number] Number of MVPsscore
[number] Total score
weapons
[object] Dictionary of weapons the player hasstring
Key ID of weapon ("weapon_0", "weapon_1")name
[string] Name of weaponpaintkit
[string] Weapon skintype
[string] Type of weapon, ("C4", "Grenade", "Knife", "Pistol", "Rifle", "SniperRifle", "Shotgun", "Submachine Gun", "Machine gun")state
[string] If weapon is being held or not ("active", "holstered")ammo_clip
Amount of ammo currently in the gunammo_clip_max
Amount of ammo the gun can have per clipammo_reserve
Amount of ammo the player has left
state
Player game datahealth
[number] Player's healtharmor
[number] Amount of armour lefthelmet
[boolean] If armour has a helmetflashed
[number] If player is flashed. (Unknown if 0-1 or a percentage)smoked
[number] If player is in smoke. (Unknown if 0-1 or a percentage)burning
[number] If a player is burning. (Unknown if 0-1 or a percentage)money
[number] Amount of money the player hasround_kills
[number] Number of kills this roundround_killhs
[number] Number of kill this round that have been headshotsround_totaldmg
[number] Total damage done this roundequip_value
[number] Value of equipment
[
{
"name": "Kyle",
"steamId": "76561197960265729",
"observer_slot": 10,
"team": "CT",
"state": {
"health": 100,
"armor": 100,
"helmet": true,
"flashed": 0,
"burning": 0,
"money": 550,
"round_kills": 0,
"round_killhs": 0,
"round_totaldmg": 0,
"equip_value": 3400
},
"match_stats": {
"kills": 1,
"assists": 1,
"deaths": 4,
"mvps": 0,
"score": 3
},
"weapons": {
"weapon_0": {
"name": "weapon_knife",
"paintkit": "default",
"type": "Knife",
"state": "holstered"
},
"weapon_1": {
"name": "weapon_deagle",
"paintkit": "default",
"type": "Pistol",
"ammo_clip": 7,
"ammo_clip_max": 7,
"ammo_reserve": 35,
"state": "holstered"
},
"weapon_2": {
"name": "weapon_ssg08",
"paintkit": "default",
"type": "SniperRifle",
"ammo_clip": 10,
"ammo_clip_max": 10,
"ammo_reserve": 90,
"state": "active"
}
},
"position": "-362.59, 1605.67, -126.91",
"forward": "-0.60, 0.79, -0.10"
}
]
Data of the observed player
Types available in ./src/types/csgo-gsi.d.ts
object | undefined
steamid
[string] Steam ID of the playername
[string] Name of the playerobserver_slot
[number] 0-9 of the observer IDteam
[string] Which side the player is on ("T" or "CT")activity
[string] What the player is currently doingstate
Player game datahealth
[number] Player's healtharmor
[number] Amount of armour lefthelmet
[boolean] If armour has a helmetflashed
[number] If player is flashed. (Unknown if 0-1 or a percentage)smoked
[number] If player is in smoke. (Unknown if 0-1 or a percentage)burning
[number] If a player is burning. (Unknown if 0-1 or a percentage)money
[number] Amount of money the player hasround_kills
[number] Number of kills this roundround_killhs
[number] Number of kill this round that have been headshotsround_totaldmg
[number] Total damage done this roundequip_value
[number] Value of equipment
{
"steamid": "76561197960265735",
"name": "Crusher",
"observer_slot": 0,
"team": "T",
"activity": "playing",
"state": {
"health": 100,
"armor": 100,
"helmet": true,
"flashed": 0,
"smoked": 0,
"burning": 0,
"money": 8000,
"round_kills": 0,
"round_killhs": 0,
"round_totaldmg": 0,
"equip_value": 3600
}
}
Status of the bomb, whether it is dropped, being carried or planted.
Types available in ./src/types/csgo-gsi.d.ts
object
state
[string] What state the bomb is currently in. ("planted". "exploded", "carried", "planting", "dropped", "defusing", "defused")position
[string] X, Y and Z location of the bombplayer
[string] Player currently carrying or defusing the bombcountdown
[string] Bomb countdown
{
"state": "carried",
"position": "-403.47, 473.20, -4.72",
"player": "76561197960265732"
}
What state the game is currently in.
Types available in ./src/types/csgo-gsi.d.ts
object
phase
[string] What phase the game is in ("live", "bomb", "over", "freezetime", "paused", "defuse", "timeout_t", "timeout_ct", "warmup")phase_ends_in
[string] How long the phase will last
{
"phase": "live",
"phase_ends_in": "105.8"
}
List of all grenades that are active. Incendiary and Molotovs are called firebomb
and each flame is sent as a grenade.
Types available in ./src/types/csgo-gsi.d.ts
object
string
Key of grenade ID (each grenade has a unique ID)owner
[string] Steam ID of player that threw the grenadeposition
[string] X, Y and Z location of grenadevelocity
[string] Speed of grenade?lifetime
[string] How long the grenade has existedtype
[string] Type of grenade
{
"765": {
"owner": "76561197960265732",
"position": "-220.44, 245.03, -2.44",
"velocity": "-583.21, 491.35, -120.78",
"lifetime": "1.4",
"type": "smoke"
}
}
A cleaned object showing only the necessary information needed to place a player on a mini map. NOT INTERPRETED, Will be stuttery.
Types available in ./src/types/csgo-gsi.d.ts
array
object
steamId
[string] Player's Steam IDposition
[number[3]] X, Y and Z location of playerrotation
[number[3]] X, Y and Z rotation of playerct
[boolean] True if the player is a CTbeingObserved
True if the player is the one being observedobserverSlot
The observer ID the player is. Normally 0-9 but has been converted to 1-10 as the 0th player is on the wrong "side"health
The player's health. Mostly used to see if the player is dead.
[
{
"steamId": "76561197960265730",
"position": [898.85,2123.59,-20.88],
"rotation": [0.7,0.71,-0.1],
"ct": false,
"beingObserved": false,
"observerSlot": 7,
"health": 100
}
]
Types available in ./src/types/extra-data.d.ts
object
equipmentValue
[number] Total value of all equipment for a teamtotalMoney
[number] Total amount of money for a teamgrenades
Total grenades for a teamhe
[number] Total frag grenades for the teamflash
[number] Total flashbangs for the teamsmoke
[number] Total smoke grenades for the teamfire
[number] Total incendiary and molotovs for the teamdecoy
[number] Total decoy grenades for the team
players
[string[]] Array of player Steam IDsscore
[number] Current score of teamconsecutiveRoundLosses
[number] Number of losses to dictate the loss bonus. (From CSGO GSI)matchesWonThisSeries
[number] Amount of matches won in the series. (From CSGO GSI)
{
"equipmentValue": 19450,
"totalMoney": 15200,
"grenades": {
"he": 0,
"flash": 0,
"smoke": 0,
"fire": 0,
"decoy": 0
},
"players": ["2", "76561197960265730", "76561197960265732", "76561197960265734", "76561197960265735"],
"score": 4,
"consecutiveRoundLosses": 0,
"matchesWonThisSeries": 0
}
teamOne is the team who is the terrorists in the first half. teamTwo is the team who is the counter-terrorists in the first half.
Extra player data including game data and steam profile data information not given by CSGO.
Types available in ./src/types/extra-data.d.ts
object
totalDamage
[number] Damage done the entire round so far. Calculated by adding the total round damage at the end of each round.adr
[number] Average Damager per Round. Calculated by taking thetotalDamage
and dividing it by the number of rounds.name
[string] Player nameimage
[string] URL of Steam profile picturecountry
[string] Emoji of player's country
{
"76561197960265729": {
"totalDamage": 0,
"adr": 0,
"image": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/32/32dbb7d95395f12254ba2d97ff56526a5d6989eb_full.jpg",
"name": "Rich",
"country": ""
}
}
Intended for internal use. Due to a bug round wins after round 29 are not logged. This causes an off by one error in the overtime rounds calculator because of round 30. This will record who won round 30 for the internal calulation. It does not log how the round was won only who won it.
string
"T" or "CT"
"CT"
If HLAE is active/connected or not.
boolean
True if HLAE is connected
false
Array of all deaths made in match. Taken raw from HLAE events so some values I may not understand what they represent (Will be designated as "Unknown?").
Types available in ./src/types/hlae.d.ts
[object]
Arrayname
[number] Event type (should always be "player_death")clientTime
[number] Unknown?round
[number] Which round the death took place inkeys
assistedflash
[boolean] If the assister was because of a flashbangweapon
[string] The weapon/item used to kill the playedweapon_id
[string] Unknown?weapon_fauxitemid
[string] Unknown?weapon_originalowner_xuid
[string] Unknown? (Assume this is if the player picks up a weapon from another player)headshot
[boolean] True if kill was a head shotdominated
[number] 0 or 1. 1 if kill was a dominationrevenge
[number] 0 or 1. 1 if kill was a revenge killwipe
[number] 0 or 1. Unknown?penetrated
[number] 0 or 1. 1 if kill was a wallbangnoscope
[boolean] True if kill was a noscopethrusmoke
[boolean] True if kill was through a smokeattackerblind
[boolean] True if attacker killed while blind/flasheddistance
[number] Distance between attacker and playernoreplay
[boolean] Unknown? (Possibly kills in deathmatch where a player can watch a reply of the kill)userid
Player that has diedvalue
[number] Unknown?xuid
[string] Player Steam IDeyeOrigin
[number[3]] Unknown?eyeAngles
[number[3]] Unknown?
attacker
Player that has killed the other playervalue
[number] Unknown?xuid
[string] Player Steam IDeyeOrigin
[number[3]] Unknown?eyeAngles
[number[3]] Unknown?
assister
Player that has assisted in the killvalue
[number] Unknown?xuid
[string] Player Steam IDeyeOrigin
[number[3]] Unknown?eyeAngles
[number[3]] Unknown?
[
{
"name": "player_death",
"clientTime": 168.671875,
"keys": {
"userid": {
"value": 4,
"xuid": "0",
"eyeOrigin": [-373.6505126953125, 1573.7967529296875, -62.60200500488281],
"eyeAngles": [355.6109619140625, 260.3814697265625, 0]},
"attacker": {
"value": 5,
"xuid": "0",
"eyeOrigin": [-407.38153076171875, 122.61137390136719, 65.26649475097656],
"eyeAngles": [6.102906227111816, 88.37369537353516, -2.1465999111569545e-7]
},
"assister": {
"value": 0,
"xuid": "0",
"eyeOrigin": [0, 0, 0],
"eyeAngles": [0, 0, 0]
},
"assistedflash": false,
"weapon": "ak47",
"weapon_itemid": "0",
"weapon_fauxitemid": "17293822569102704647",
"weapon_originalowner_xuid": "0",
"headshot": false,
"dominated": 0,
"revenge": 0,
"wipe": 0,
"penetrated": 0,
"noreplay": true,
"noscope": false,
"thrusmoke": false,
"attackerblind": false,
"distance": 36.895103454589844
},
"round": 1
}
]
Similar to mapPlayers but the position and rotation are smoothed as the raw values are choppy.
Types available in ./src/types/map-player.d.ts
object
string
Key of player's Steam IDsteamId
[string] Player's Steam IDposition
[number[3]] X, Y and Z location of playerrotation
[number[3]] X, Y and Z rotation of playerct
[boolean] True if the player is a CTbeingObserved
True if the player is the one being observedobserverSlot
The observer ID the player is. Normally 0-9 but has been converted to 1-10 as the 0th player is on the wrong "side"health
The player's health. Mostly used to see if the player is dead.
{
"76561197960265732": {
"steamId": "76561197960265732",
"position": [1312.1199999999997, 2460.68, 53.58],
"rotation": [0.7999999999999999, -0.54, -0.27],
"ct": false,
"beingObserved": false,
"observerSlot": 8,
"health": 91
}
}
All matches scheduled, the vetos and final score.
Types available in ./src/types/matches.d.ts
[object]
Array of Match objectsid
[string] UUID of matchstatus
[string] Custom match status information (e.g. "Coming Up", "Half Time", "Technical Pause")time
[string] What time the match will be playedmatchType
[string] How many matches are being played (e.g. "bo1", "bo3", "bo5")teamA
Dictated by which team is selected first in the schedulename
[string] Full team namelogo
[string] URL of logoalias
[string] Shorthand form of team name
teamB
Dictated by which team is selected second in the schedulename
[string] Full team namelogo
[string] URL of logoalias
[string] Shorthand form of team name
maps
[Array] Array of all maps veto'd and map scoresmap
[string] Map nameteamVeto
[string] Team name that has selected the mapban
[boolean] True if the map was chosen to be bannedside
[string] Which side the other team will choose to startcomplete
[boolean] True if the match has been finishedroundWins
[string[]] String array of how rounds 1 to 29 was won. Taken from CSGO game state integration. Not beyond round 29 because GSI does not provide that data.totalScore
Final score of the mapteamA
[number] TeamA's scoreteamB
[number] TeamB's score
firstHalf
Score for the first halfteamA
[number] TeamA's scoreteamB
[number] TeamB's score
secondHalf
Score for the second halfteamA
[number] TeamA's scoreteamB
[number] TeamB's score
ot
Score from an over timeteamA
[number] TeamA's scoreteamB
[number] TeamB's score
[
{
"id": "b80a717b-2f58-4d5b-87a1-9b802303e2f3",
"maps": [{
"map": "Dust2",
"ban": false,
"teamVeto": "Avangar",
"complete": true,
"roundWins": [],
"totalScore": {
"teamA": 0,
"teamB": 0
},
"firstHalf": {
"teamA": 10,
"teamB": 5
},
"secondHalf": {
"teamA": 6,
"teamB": 2
},
"side": "CT"
},
{
"map": "Inferno",
"ban": false,
"teamVeto": "Astralis",
"complete": false,
"roundWins": [],
"totalScore": {
"teamA": 0,
"teamB": 0
},
"firstHalf": {
"teamA": 0,
"teamB": 0
},
"secondHalf": {
"teamA": 0,
"teamB": 0
},
"side": "T"
}],
"status": "Soon",
"time": "12:00",
"matchType": "bo3",
"teamA": {
"alias": "Avangar",
"name": "Avangar",
"logo": "/assets/nodecg-csgo-manager/teamimages/8e89ldxOWak25k-LB7oYH3.svg"
},
"teamB": {
"alias": "Astralis",
"name": "Astralis",
"logo": "/assets/nodecg-csgo-manager/teamimages/9bgXHp-oh1oaXr7F0mTGmd.svg"
}
}
]
The current match being played. Undefined if no match.
Types available in ./src/types/matches.d.ts
object | undefined
: Match | undefined (same as the object of Matches)
{
"id": "b80a717b-2f58-4d5b-87a1-9b802303e2f3",
"maps": [
{
"map": "Dust2",
"ban": false,
"teamVeto": "Avangar",
"complete": true,
"roundWins": [],
"totalScore": {
"teamA": 0,
"teamB": 0
},
"firstHalf": {
"teamA": 10,
"teamB": 5
},
"secondHalf": {
"teamA": 6,
"teamB": 2
},
"side": "CT"
},
{
"map": "Inferno",
"ban": false,
"teamVeto": "Astralis",
"complete": false,
"roundWins": [],
"totalScore": {
"teamA": 0,
"teamB": 0
},
"firstHalf": {
"teamA": 0,
"teamB": 0
},
"secondHalf": {
"teamA": 0,
"teamB": 0
},
"side": "T"
}
],
"status": "Soon",
"time": "12:00",
"matchType": "bo3",
"teamA": {
"alias": "Avangar",
"name": "Avangar",
"logo": "/assets/nodecg-csgo-manager/teamimages/8e89ldxOWak25k-LB7oYH3.svg"
},
"teamB": {
"alias": "Astralis",
"name": "Astralis",
"logo": "/assets/nodecg-csgo-manager/teamimages/9bgXHp-oh1oaXr7F0mTGmd.svg"
}
}
Data on all imported team and player information.
Types available in ./src/types/team-preset.d.ts
object
teams
Dictionary that holds all team meta datastring
Key using team namename
[string] Full team namelogo
[string] URL of logoalias
[string] Shorthand form of team name
players
Dictionary that holds all player meta datastring
Key using steam idsteamId
[string] Steam ID of playerrealName
[string] Player's real namecountry
[string] Emoji of player flagprofilePicture
[string] URL of profile pictureteamName
[string] Team name the player belongs to
{
"teams": {
"Astralis": {
"alias": "Astralis",
"name": "Astralis",
"logo": "/assets/nodecg-csgo-manager/teamimages/9bgXHp-oh1oaXr7F0mTGmd.svg"
},
},
"players": {
"76561198046005090": {
"steamId": "76561198046005090",
"realName": "Ewan Lyon",
"country": "🇦🇺",
"profilePicture": "/assets/nodecg-csgo-manager/playerIcons/Final_x500.png"
}
}
}
Dictionary of all tournaments.
Types available in ./src/types/tournament.d.ts
object
string
Key UUID for the tournamentid
[string] UUID for the tournamentlogo
[string] URL for the tournament logoname
[string] Name of the tournamentactive
[boolean] If the tournament is the current onefixture
[SingleElimination | DoubleElimination]
type
[string] What tournament type the fixture is (Should always be "single-elimination")matches
[string[][]] Array of string arrays to hold match ids. First depth array is rounds and inside rounds are the individual matches
type
[string] What tournament type the fixture is (Should always be "double-elimination")winnerMatches
[string[][]] Array of string arrays to hold winner bracket match ids. First depth array is rounds and inside rounds are the individual matchesloserMatches
[string[][]] Array of string arrays to hold loser bracket match ids. First depth array is rounds and inside rounds are the individual matches
{
"790e8b53-1f3e-4cfe-9913-36ab968bc741": {
"id": "790e8b53-1f3e-4cfe-9913-36ab968bc741",
"logo": "",
"name": "Example Tournament",
"fixture": {
"type":"single-elimination",
"matches": [
["a231b8b4-dbf3-46b1-8f61-1a731fc6f113","","","","","","",""],
["","","",""],
["",""],
[""]
]
}
}
}
ID of current tournament. Used as a key for the tournaments replicant
string
UUID of current tournament
"790e8b53-1f3e-4cfe-9913-36ab968bc741"
How often the server is receiving data from CSGO.
number
Messages per second
20
Data based on bundle settings. Not used much right now.
Types available in ./src/types/bundle-status.d.ts
object
isServerOn
[boolean] Indicates if the manager is listening for CSGO
{
"isServerOn": true
}
Some touraments use different timings that graphics may rely on. This can be referenced here
Types available in ./src/types/game-settings.d.ts
object
bombTime
[number] How long it takes the bomb to explode in secondsbombPlantTime
[number] How long it takes to plant the bomb in secondsnoKitDefuseTime
[number] How long it takes to defuse with no kit in secondskitDefuseTime
[number] How long it takes to defuse with a kit in seconds
{
"bombTime": 40,
"bombPlantTime": 3,
"noKitDefuseTime": 10,
"kitDefusedTime": 5,
}