StatusCore
Developer API for authoritative timed player statuses, synchronization, and native HUD presentation.
模組介紹 作者原文
Status Core
Status Core is a developer library for registering and applying authoritative timed player statuses. It owns duration, refresh, expiration, server ticks, owner synchronization, and integration with Native Status UI. It does not add gameplay statuses by itself.
Developer API
Register a StatusDefinition once, then apply it from authoritative server code with StatusApi.Apply(...). Reapplying the same status to the same player refreshes its duration and replaces its source. Providers implement status-specific behavior through callbacks or by querying StatusApi.IsActive(...) from their game hooks.
StatusApi.Register(new StatusDefinition(
id: "YourTeam.YourMod.Bleeding",
displayName: "Bleeding",
iconPng: iconBytes,
color: new Color(0.5f, 0.08f, 0.18f),
tickInterval: 1f,
onTick: context => Damage(context.Target, context.Source)));
// Call from validated server-authoritative gameplay code.
StatusApi.Apply(victim, "YourTeam.YourMod.Bleeding", 6f, attacker);
StatusApi.Remove(...), IsActive(...), and TryGet(...) provide lifecycle and query access. Status Core synchronizes only presentation and timing to the affected player's client; gameplay callbacks execute on the server. Native Status UI remains the rendering layer.
In multiplayer, every participant using a dependent status provider must install Status Core, Native Status UI, and that provider. Status IDs and definitions must match across the lobby.
The initial API intentionally supports one active instance per player and status. Stack and charge policies are deferred until a real status requires them.
AI Disclosure
This mod was developed with assistance from generative AI for programming, documentation, and promotional artwork. The author reviewed, tested, and approved the final implementation and assets.
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: