Git Product home page Git Product logo

Comments (8)

Sharken03 avatar Sharken03 commented on July 3, 2024

To get a useful answer you should provide useful input.
First off which .json are you referring to ?

And filling out info like this will also help you get a good answer:

Expected behavior

Actual behavior

Steps to reproduce the behavior

from cs-go-observer-custom-hud.

realS3BI avatar realS3BI commented on July 3, 2024

Where cs:go is sending the game data.
For example this kind of things:

{
"player": {
	"weapons": {
		"weapon_0": {
			"name": "weapon_knife_t",
			"paintkit": "default",
			"type": "Knife",
			"state": "holstered"
		},
		"weapon_1": {
			"name": "weapon_deagle",
			"paintkit": "cu_desert_eagle_corroden",
			"type": "Pistol",
			"ammo_clip": 7,
			"ammo_clip_max": 7,
			"ammo_reserve": 35,
			"state": "holstered"
		},
		"weapon_2": {
			"name": "weapon_m4a1_silencer",
			"paintkit": "cu_m4a1-s_elegant",
			"type": "Rifle",
			"ammo_clip": 25,
			"ammo_clip_max": 25,
			"ammo_reserve": 64,
			"state": "active"
		},
		"weapon_3": {
			"name": "weapon_flashbang",
			"paintkit": "default",
			"type": "Grenade",
			"ammo_reserve": 1,
			"state": "holstered"
		},
		"weapon_4": {
			"name": "weapon_smokegrenade",
			"paintkit": "default",
			"type": "Grenade",
			"ammo_reserve": 1,
			"state": "holstered"
		},
		"weapon_5": {
			"name": "weapon_hegrenade",
			"paintkit": "default",
			"type": "Grenade",
			"ammo_reserve": 1,
			"state": "holstered"
		}
	}
}

from cs-go-observer-custom-hud.

Sharken03 avatar Sharken03 commented on July 3, 2024

These are the Game State Integration (GSI) data sent by the CSGO server to the client you start with Run. The file that enables CSGO to send GSI data is in the file public/files/cfg/gamestate_integration_observerspectator.cfg.
This file must be copied to your cfg/ folder such as C:\Program Files (x86)\Steam\userdata\STEAMID\730\local\cfg, where STEAMID is your userid and 730 is for CSGO.
Then you can start CSGO, load up a demo for instance and the CSGO server will start transmitting data.

A more complete example of the config file is below:

"Observer All Players v.1"
{
 "uri" "http://localhost:1337"
 "timeout" "5.0"
 "buffer"  "0.1"
 "throttle" "0.1"
 "heartbeat" "0.1"
 "auth"
 {
   "token" "120987"
 }
 "data"
 {
  "allgrenades"             "1"
  "allplayers_id"           "1"
  "allplayers_match_stats"  "1"
  "allplayers_position"     "1"
  "allplayers_state"        "1"
  "allplayers_weapons"      "1"
  "bomb"                    "1"
  "map_round_wins"          "1"
  "map"                     "1"
  "phase_countdowns"        "1"
  "provider"                "1"
  "round"                   "1"
 }
}

You can also send the data to another pc by changing the uri.

from cs-go-observer-custom-hud.

Sharken03 avatar Sharken03 commented on July 3, 2024

You can see a sample logfile in the file below:
log2.zip

from cs-go-observer-custom-hud.

realS3BI avatar realS3BI commented on July 3, 2024

You can see a sample logfile in the file below:
log2.zip

But where is this file on my PC?

The other things you wrote I knew already, but thank you for your time, explaining it.

from cs-go-observer-custom-hud.

Sharken03 avatar Sharken03 commented on July 3, 2024

I see now what you are asking. As far as I know the data from the CSGO is consumed without an option to save it to disk also. For that I used another project I found here on Github.

It would be very useful if this project could:

1: Store received data in a file.
2: Play that data back without needing CSGO at all.

from cs-go-observer-custom-hud.

realS3BI avatar realS3BI commented on July 3, 2024

Okay... But look at this Project:
https://github.com/tsuriga/csgo-gsi-qsguide/blob/master/README.md

He/She @(tsuriga) is writing:

To learn more about what kind of data the CS:GO client sends out run node outputpayloads.js > out.txt using all of the components from the list above in your gamestate integration configuration file. Then run the game and try to play out different scenarios: different maps, different side winning in different situations, spectate players that are using different guns with different skins, play different modes, etc. It'll write everything into out.txt file.

In this code he says, that you can have a look in this file.
I don't know, maybe you have a clue.

I tried to run the node, but i failed.

from cs-go-observer-custom-hud.

Sharken03 avatar Sharken03 commented on July 3, 2024

I don't know about that project, but you can try this one instead:
https://github.com/jdemeo/cs_game_analysis

After modifying mysample.js to match the port in the gamestate cfg file, you run it like this:

node .\mysample.js > log.txt

from cs-go-observer-custom-hud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.