Jogos
Dota 2 custom games
Como conectar Dota 2 custom games ao valkyr: instale a bridge, configure e veja quais eventos e ações ela suporta.
- Método
- Custom game VScript (Lua)
- Status
- exemplo não testado
- Eventos
frameabilityspawn- Ações
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.
Os nomes de jogos e plataformas pertencem aos seus donos e são usados apenas para descrever compatibilidade. O valkyr não tem vínculo com eles.