UnboundLib

版本 v3.2.14·更新於 2025-01-13

This is a helpful utility for ROUNDS modders aimed at simplifying common tasks.

模組介紹 作者原文

Join Us!

For more mods, news, and support join us on discord here:

UnboundLib

This is a helpful utility for ROUNDS modders aimed at simplifying certain common tasks.

Usage

NetworkingManager

The NetworkingManager abstracts the default Photon networking capabilities away into an easy-to-use interface you can use for communication between clients.

Example usage:

private const string MessageEvent = "YourMod_MessageEvent";

NetworkingManager.RegisterEvent(MessageEvent, (data) =>

{

ModLoader.BuildInfoPopup("Test Event Message: " + (string)data[0]); // should print "Test Event Message: Hello World!"

});

// send event to other clients only

NetworkingManager.RaiseEventOthers(MessageEvent, "Hello World!");

// send event to other clients AND yourself

NetworkingManager.RaiseEvent(MessageEvent, "Hello World!");

CustomCard Framework

Create a class for your card, extend the CustomCard class, implement its methods, and then in your mod initialization register your card like so:

void Start()

{

CustomCard.BuildCard();

}

CustomMap Framework

First create a map in unity by using the package and export your scene to a AssetBundle. Then in your mod initialization register your map like so:

void Start()

{

LevelManager.RegisterLevels(TestAssetBundle);

}

Credits Framework

Registering credits for a mod is as simple as:

void Start()

{

Unbound.RegisterCredits(string modName, string credits, string linkText, string linkURL);

}

GameMode Framework

The GameMode framework provides a modding-friendly API for custom game modes, allowing mods to target them without having to know about their existence.

Custom game modes are defined in two layers: the actual game mode class that does all the heavy gameplay logic, and a handler class that provides an interface

between mods and the game mode.

Hooks

The framework offers a flexible hook system. With hooks, mods can trigger actions at specific points of time as a game is running, without needing to know

anything about the specific game mode or its implementation.

Triggering hooks

Game modes can trigger async hooks whenever they wish:

private IEnumerator RoundStart()

{

// Hook keys are case-insensitive

yield return GameModeManager.TriggerHook("RoundStart");

// A healthy set of predefined keys is provided to make hooking on to them easier.

// Predefined keys should be used in favour of custom ones when possible.

yield return GameModeManager.TriggerHook(GameModeHooks.HookRoundStart);

}

Registering hooks

Mods can register hook listeners wherever they wish:

private void Init()

{

// Hooks are called with the game mode that triggered the hook, which is always the currently active game mode

GameModeManager.AddHook(GameModeHooks.HookRoundStart, this.OnRoundStart);

}

private IEnumerator OnRoundStart(IGameModeHandler gm)

{

// Triggers are IEnumerators so they support yields

yield return new WaitForSeconds(2f);

UnityEngine.Debug.Log(gm.Name);

/* Since triggers are IEnumerators, they must be executed within a coroutine. This means triggers are guaranteed to

  • be able to disrupt the execution of the current game mode.

*/

gm.GameMode.StopAllCoroutines();

}

The existing game modes in ROUNDS, namely Arms Race and Sandbox, have also been patched to trigger hooks.

Settings

The framework also adds a setting system to help mods change common game mode settings easily. Settings provide an easy-to-use method for mods to change gameplay,

but they place a lot of responsibility onto game modes to provide sufficient settings.

Using settings in a game mode

private void CheckPoints()

{

if (p1Points >= (int)GameModeManager.CurrentHandler.Settings["pointsToWinRound"])

{

WinRound();

}

}

Changing settings (in a mod)

private void Init()

{

GameModeManager.AddHook(GameModeHooks.HookInitEnd, this.OnInitEnd);

}

private IEnumerator OnInitEnd(GameModeHandler gm)

{

gm.ChangeSetting("pointsToWinRound", 10);

}

See /UnboundLib/GameModes for implementation details and example GameModeHandlers.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_ROUNDSwillis81808-MMHook

檔案與校驗

檔案名稱
UnboundLib-3.2.14.zip
檔案大小
1.7 MiB
SHA-256
0c1f87cfde10a67bfb2b802ea4ae222f9bb98adfc20fd5d689d847c4c45d383f
入庫時間
2026-10-06 19:24