Arcana/node-dota2: A node-steam plugin for Dota 2.

Arcana/node-dota2: A node-steam plugin for Dota 2.

    A node-steam plugin for Dota 2, consider it in alpha state. Check out blog post , for a rough overview of adding new functionality to the library. A fair warning, while the way you search for new functionality is still the same, quite a lot has changed (and been simplified) implementation wise. It is now easier to implement new functionality than it was back when this blog was written.

    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 dota2 in your repository root
    • Copy node_modules/dota2/examples/config.js.example to config.js in your project root and edit appropriately
    • Copy node_modules/dota2/examples/example.js in your project root and change line 5 to dota2 = require("dota2"),
    • Run the example script: node example.js
    • If you receive Error 63 you need to provide a Steam Guard code by setting the Steam Guard code in config.js and 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

    The 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.

    Testing

    There is a partial automated test suite for node-dota2, which is located in the test directory. You need to configure the STEAM_USERNAME and STEAM_PASSWORD environment variables to be able to run it. You can launch the tests by running the file with mocha.

    Comments

      There are no comments yet

    Leave A Reply