Arcana/node-dota2: A node-steam plugin for Dota 2.
Be careful, you’ll need SVN if you want to work on the project! Executing an
npm install inside the project directory has node-steam fetch the most recent node-steam-resources, which needs SVN to obtain the protobufs.
Installation and setup
npm install dota2in your repository root
config.jsin your project root and edit appropriately
node_modules/dota2/examples/example.jsin your project root and change line 5 to
dota2 = require("dota2"),
- Run the example script:
- If you receive Error 63 you need to provide a Steam Guard code by setting the Steam Guard code in
config.jsand launching again.
- Make sure to use at least version 4.4.5 of node js
At the moment the serverlist that is kept internally by node-steam contains IP addresses which are no longer responsive. This causes timeouts and makes node-dota2 seem unresponsive. The examples contain a fix for this behaviour. In short, node-steam emits a servers event that will always contain the latest version of the server list. You need to make sure that your bot handles this event and saves its contents so that upon next startup you can initialize node-steam with a more up to date list. The examples folder contains a (as of the beginning of October 2018) working list that is read by the example bots. You can use this list to bootstrap your bot until node-steam updates their embedded list.
We do not in any way encourage people to use their own accounts when using this library. This library tries to mimic the behavior of the Dota 2 client to allow people to programmatically interact with the Dota 2 GC, however we make no efforts to hide this fact and it’s pretty easy for Valve to detect clients using this library based on the generated traffic. While Valve has not yet expressed a dislike regarding reverse engineering projects like this one, it’s not unimaginable that this might one day change and result in VAC bans.
examples directory contains two Dota2 bots as an example. One contains commented-out dota2 methods, the other has boolean activated methods. Both examples show how to interact with the library.
There is a partial automated test suite for node-dota2, which is located in the test directory. You need to configure the
STEAM_PASSWORD environment variables to be able to run it. You can launch the tests by running the file with mocha.
You signed in with another tab or window. to refresh your session.You signed out in another tab or window. to refresh your session.