SBGItemFramework

版本 v0.1.0·更新於 2026-07-21

Shared backbone for custom item mods. Register an ItemType and a use-handler; it owns the Harmony plumbing for inventory injection, localized names, hotkey labels, tooltips, and pool-spawn injection.

模組介紹 作者原文

SBGItemFramework

Shared backbone for Super Battle Golf custom-item mods. Each consumer mod hands the

framework a RegisteredItem description and an IItemHandler that owns the gameplay; the

framework deals with everything that would otherwise force every item mod to write the same

~300 lines of ItemCollection / PlayerInventory / LocalizedString / HotkeyUi plumbing

and to coordinate that plumbing pairwise with every other custom-item mod the user has

installed.

Not a gameplay mod. It does nothing on its own — install it because something else lists it

as a dependency.

Consumer flow

public sealed class MyItemPlugin: BaseUnityPlugin

{

private void Awake()

{

ItemKit.Register(RegisteredItem.Define((ItemType)1234, "My Item").WithHandler(new MyItemHandler()).WithIconFromVanillaItem(ItemType.OrbitalLaser).WithIconTint(new Color(0.65f, 0.85f, 1.0f)).WithMaxUses(2).WithTooltip("One-line description shown in the pause-menu probability grid.").WithConfigBindings(Config, bindMaxUses: true, bindSpawnWeights: true).Done());

}

}

public sealed class MyItemHandler: ItemHandlerBase

{

public override void OnUse(PlayerInventory inventory)

{

// Server-authoritative work goes through a Mirror Cmd; client-only fizz can run here.

}

}

The framework picks a non-conflicting integer for the ItemType is the consumer's

responsibility. Use anything >= 1000 to stay clear of the vanilla enum range; the

framework rejects ids `.zip --notes-file CHANGELOG.md

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

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

BepInEx-BepInExPack

檔案與校驗

檔案名稱
SBGItemFramework-0.1.0.zip
檔案大小
16.5 KiB