Games
Dota 2 custom games
How to connect Dota 2 custom games to valkyr: install the bridge, configure it and see which events and actions it supports.
- Method
- Custom game VScript (Lua)
- Status
- untested example
- Events
frameabilityspawn- Actions
kickrestrictban
Status: untested example. Not run (no Dota 2 Workshop Tools were available).
Scope, read first
- Custom games only. The script runs in the server VScript VM of a custom game made with the Dota 2 Workshop Tools. Regular matchmaking games run on servers that no community operator controls, so this cannot be used for normal matches, and it must not be.
- It reads only state the custom game's server already has and sends it to a valkyr-server the custom game author runs. Nothing runs on players' machines, and it does not interact with the game's own anti-cheat.
- Follow the platform's rules for custom games, including whatever they say about HTTP requests and data sent to external servers.
What it does
- every 0.1 s: a
frameper living hero (position and facing; pitch 0); npc_for real heroes:spawned spawnwith the team;dota_: anplayer_ used_ ability abilityevent for abilities listed inability_, so valkyr-server cooldown checks apply;ids - batches to
POST /v1/withmatches/ {match_ id}/ events CreateHTTPRequestScriptVM, pollsGET /v1/and disconnects players foractions kick,restrictandban.
Dota is top down: aim, view and information checks have little to work with. Useful checks are movement speed and teleports (declare hero speeds in the valkyr-server movement config, converted with 0.0254 m per unit) and ability cooldowns. Player ids are 32 bit Steam account ids.
Install
Copy scripts/ into your custom game's scripts/ and start it from addon_:
local Valkyr = require("valkyr")function Activate() Valkyr:Start({ url = "http://your-valkyr-host:7420", key = "ingest-key", prefix = "mygame", ability_ids = { my_custom_blink = 1 } })end
To verify: the JSON library available in your VScript VM, the exact dota_ fields, and DisconnectClient.
Game and platform names belong to their owners and are used only to describe compatibility. valkyr is not affiliated with them.