Jogos

Rust game servers (Oxide/uMod)

Como conectar Rust game servers (Oxide/uMod) ao valkyr: instale a bridge, configure e veja quais eventos e ações ela suporta.

Método
Oxide/uMod plugin (C#)
Status
exemplo não testado
Eventos
frame shot spawn

Status: untested example. Not compiled or run (Oxide compiles plugins at load time on the server; no Rust server was available).

Scope

A server side Oxide/uMod plugin for the operator's own Rust server. It reads player state the server already owns and sends it to a valkyr-server the operator runs. Nothing runs on players' machines, and it does not interact with the game's own anti-cheat. Server operators must follow the game's rules for server operators.

What it does

  • every FrameIntervalSeconds: a frame per active, awake player (transform.position, eyes.rotation, IsOnGround());
  • OnPlayerConnected, OnPlayerRespawned: spawn with the team id;
  • OnPlayerAttack: shot with target (player victims) and bone from the hit area; weapon ids come from the WeaponIds config table;
  • batches to POST /v1/matches/{match_id}/events with Oxide's webrequest, polls GET /v1/actions and kicks players for the actions in KickOnActions; ends the match on unload.

The game runs on Unity: meters, Y up, yaw 0 along +Z and 90 along +X like valkyr; the euler pitch is positive looking down and is negated.

Install

Copy ValkyrBridge.cs to oxide/plugins/ (or carbon/plugins/ if your framework is compatible), let it generate oxide/config/ValkyrBridge.json, set ApiKey to a valkyr-server key with the ingest role, then oxide.reload ValkyrBridge.

To verify against your Oxide version: eyes.rotation, HitInfo.boneArea and HitArea values, BaseEntity.ShortPrefabName of weapons, and the webrequest.Enqueue signature.

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.

Editar esta página no GitHub