xzion / dota2-gsi

Dota 2 Game State Integration server for Node.JS
MIT License
114 stars 20 forks source link

as a observer,how i can get information about all players for Lan's? #3

Closed dengxiangcheng closed 6 years ago

Ampersandnz commented 7 years ago

You'll need to set up the GSI server on all ten player machines, pointing at the same server running this project

dengxiangcheng commented 7 years ago

how can i set up the GSI server? copy gamestate_integration_dota2-gsi.cfg?

dengxiangcheng commented 7 years ago

all player matchines use the same gamestate_integration_dota2-gsi.cfg

Ampersandnz commented 7 years ago

Yes, you'll need a copy of gamestate_integration_dota2-gsi.cfg on each machine, modified so that each player has a different token but is sending data to the same node.js server. Then you can specify those ten tokens to be accepted by your server.

That should get the server receiving game state updates from all ten players, and you can use that information in your application.

If you don't set the tokens then the server won't know how to tell the messages apart and each player will be overwriting the others whenever they send an update.

Ampersandnz commented 7 years ago

The other thing that might cause issues for you is that this server hasn't been updated since before dota 7.00.

It may or may not support hero talent trees and backpacks (it's been a while since I worked with this and I haven't tested it). The documentation, at least, definitely doesn't cover them and still refers to attribute levels.

dengxiangcheng commented 7 years ago

thank you @Ampersandnz Now i have been gotten information about other player .but i want to get the networth of the player , i am not sure client send this message whether or not,i know web API have a field called "net_worth"

Ampersandnz commented 7 years ago

The documentation in this project's readme.md doesn't list a net worth field, but you could test it out and see. Maybe Valve have update things on their end, but it's unlikely. If you really need net worth you might just have to calculate it yourself using the amount of gold the hero is carrying and the items in their inventory.

xzion commented 6 years ago

this is now available simply by spectating a match (or being in the caster/observer slot) with the same configuration as per usual