ModsPlus

版本 v1.6.2·更新於 2023-01-24

Willis' amazing modding utilities

模組介紹 作者原文

Mods Plus

Status bar manager

Automatically position and scale status bars above the player's default health bar. No need to worry about other mods adding overlapping information above the player, so long as you are both using this system!

// Create and add a second health bar above the player

var statusBar = new GameObject("Status Bar", typeof(CustomHealthBar)).GetComponent();

player.AddStatusIndicator(statusBar.gameObject);

Custom Card Bar abbreviations

When registering a card you can set a custom two character abbreviation to be displayed in the card bar, simply do the following:

CustomCard.BuildCard(c => c.SetAbbreviation("Ex"));

  • An exception will be thrown if the string passed is null or only whitespace characters.
  • If the abbreviation passed is longer than 2 characters it will be truncated.

Easy access to important events with PlayerHook

Simply extend PlayerHook to define your custom behaviors then attach it to a player.

public class ExampleHooks: PlayerHook

{

override void OnJump()

{

UnityEngine.Debug.Log("Player jumped!");

}

public override IEnumerator OnBattleStart(IGameModeHandler gameModeHandler)

{

yield return new WaitForSeconds(5f);

UnityEngine.Debug.Log("The battle started 5 seconds ago!");

}

}

Cleaner card creation with SimpleCard

Make a card with fewer lines by extending SimpleCard instead of CustomCard!

using UnityEngine;

using ModsPlus;

public class ExampleCard: SimpleCard

{

public override CardDetails Details => new CardDetails

{

Title = "Example Card",

Description = "Your first effect card",

ModName = "",

Art = Assets.YourCoolArt,

Rarity = CardInfo.Rarity.Common,

Theme = CardThemeColor.CardThemeColorType.TechWhite

};

public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)

{

statModifiers.health = 0.5f;

gun.damage = 2f;

}

protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)

{

Debug.Log("Card added to the player!");

}

protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)

{

Debug.Log("Card removed from the player!");

}

}

Streamlined (and safe) CardEffect wrapper

Do you find yourself writing the same boilerplate over and over when defining cards that attach a MonoBehaviour to the player?

Are you tired of writing the same code for registering and deregistering actions (such as Block::BlockAction or Gun::ShootProjectileAction) repeatedly?

If so, then this is the library for you.

Creating an on block/attack effect

All actions will be automatically registered and deregistered when the card is added or removed, so you can focus on your cool features!

using UnityEngine;

using ModsPlus;

public class ExampleCard: CustomEffectCard

{

public override CardDetails Details => new CardDetails

{

Title = "Example Card",

Description = "Your first effect card",

ModName = "",

Art = Assets.YourCoolArt,

Rarity = CardInfo.Rarity.Common,

Theme = CardThemeColor.CardThemeColorType.TechWhite

};

}

public class ExampleEffect: CardEffect

{

public override void OnBlock(BlockTrigger.BlockTriggerType trigger)

{

Debug.Log("[ExampleEffect] Player blocked!");

}

public override void OnShoot(GameObject projectile)

{

Debug.Log("[ExampleEffect] Player fired a shot!");

}

}

Once defined you can register this card as you normally would:

CustomCard.BuildCard();

For additional overrides check your IDE's auto-complete, or view the source code

PlayerSelector tools

This interface allows you to easily create selectors on players and react when the user clicks one (think Cards+ "Adware" or "Quickhack" abilities for reference)

Creating selectors and responding to a selection event

/ make selectors on a specific player /

int playerID; // ID of any specific pl

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

willis81808-UnboundLibPykess-ModdingUtilsRoundsModding-AllThePatch

檔案與校驗

檔案名稱
ModsPlus-1.6.2.zip
檔案大小
89.3 KiB
SHA-256
ff4310c27e92595dcb053eafb6a3eddefe6710b48c9efdef77a68de28828918b
入庫時間
2026-10-06 19:13