Juegos

Rust game servers (Oxide/uMod)

Cómo conectar Rust game servers (Oxide/uMod) a valkyr: instala el puente, configúralo y mira qué eventos y acciones admite.

Método
Oxide/uMod plugin (C#)
Estado
ejemplo sin probar
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.

Los nombres de juegos y plataformas pertenecen a sus dueños y se usan solo para describir la compatibilidad. valkyr no está afiliado a ellos.

Editar esta página en GitHub