Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get map, round and match details? #89

Open
marcotama opened this issue Dec 4, 2023 · 3 comments
Open

How to get map, round and match details? #89

marcotama opened this issue Dec 4, 2023 · 3 comments

Comments

@marcotama
Copy link

I am trying to recreate the GSI (Game State Integration; learn more: [Valve] [Reddit]) stream from a demo.
The GSI data includes details about the map and other general info about the round and match.
Is it currently possible to retrieve this information using the parser?
If not, would you consider adding the capability?

	"provider": {
		"name": "Counter-Strike: Global Offensive",
		"appid": 730,
		"version": 13973,
		"steamid": "76561198013136282",
		"timestamp": 1701325232
	},
	"map": {
		"mode": "competitive",
		"name": "de_ancient",
		"phase": "warmup",
		"round": 0,
		"team_ct": {
			"score": 0,
			"name": "Entropiq",
			"consecutive_round_losses": 1,
			"timeouts_remaining": 4,
			"matches_won_this_series": 0
		},
		"team_t": {
			"score": 0,
			"name": "IKLA",
			"consecutive_round_losses": 1,
			"timeouts_remaining": 4,
			"matches_won_this_series": 0
		},
		"num_matches_to_win_series": 0
	},
	"phase_countdowns": {
		"phase": "warmup",
		"phase_ends_in": "-538.5"
	},
	"grenades": {
		"313": {
			"owner": "76561198176422667",
			"position": "-1692.14, 997.48, 72.26",
			"velocity": "-160.75, -137.72, 66.00",
			"lifetime": "1.4",
			"type": "flashbang"
		}
	},
@LaihoE
Copy link
Owner

LaihoE commented Dec 4, 2023

I think this should be ~doable currently.

"Provider": parse_header()
"map": parse_header() + parse_event()/parse_tick() (check long list of props in readme)
"phase_countdowns": parse_event()/parse_tick()
"grenades": parse_grenades() (lifetime and velocity not available but can be calculated, velocity if just the difference in position between this tick and last)

@marcotama
Copy link
Author

marcotama commented Dec 7, 2023

I see, I am going through the fields one by one, thanks.

To give you context into why it would be useful to get the GSI data stream from a demofile:
GSI is the only data available while a game is live, so any tool that works for live games, needs it.
If the tool uses a Machine Learning model, GSI data is needed to train it.
The game will give GSI data given a demo file, but it's slow and requires user interaction. And it's buggy, from what I can tell.

So it would be great if demoparser provided the necessary data for one to programmatically generate the GSI stream.
Regardless, it's a great tool already! Thanks for the hard work!

@marcotama
Copy link
Author

@LaihoE Is it normal that I don't get X,Y,Z coordinates for he_grenade and flashbang grenade types?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants