ForgeKit
Dependency-free dev-tooling for Outward BepInEx mods: file-driven dev command loop, self-test harness, on-screen toasts, player-ready lifecycle wait, embedded/override table loaders, and a shared dev-
模組介紹 作者原文
ForgeKit
📖 Full documentation: ForgeKit wiki page
Dependency-free dev-tooling library for people writing BepInEx 5 mods for Outward: Definitive
Edition. It doesn't add anything a player sees on its own — it's the plumbing several other mods
(CompanionKit, SpawnKit, and more) build on, and other modders are welcome to build on it too.
Requires: BepInEx 5 (Outward's Mono branch — see Compatibility below). No SideLoader, no
Harmony, no other mod dependency.
What's in it
| Piece | What it gives you |
|---|---|
| CommandChannel + CommandRegistry | A file-driven dev command loop: write a verb into BepInEx/config/_cmd.txt, it runs on the next poll (unscaled time, so it still fires while the game is paused). Unknown verb or help lists everything registered. It runs on unscaled time, so it still fires while the game is paused. |
| SelfTestHarness | The [SELFTEST] BEGIN / PASS: / FAIL: / SKIP: / DONE pass= fail= skip= report shape — wire up Check(name, condition) / CheckIf(canRun, …) calls and get one consistent, greppable self-test report (skips are unrunnable-here, not failures). |
| Notify | An on-screen info toast for the player, mirrored to the log. |
| Lifecycle | WhenPlayerReady — a coroutine that waits past the game's void/staging coordinates before your mod starts touching the player, plus IsSanePosition for the same check inline. |
| TableLoader / EmbeddedRes | Embedded-default-plus-config-override text/texture tables: ship a sane default inside your DLL, let players override it by dropping a file in BepInEx/config. |
| CommonVerbs | The shared dev-verb pack — one CommonVerbs.RegisterAll(registry, Log, opts) call and ~36 verbs answer on your channel. See the table below. |
| ScriptRunner | script / scriptcancel / scriptstatus — run a file of verbs as a sequence. Auto-registered into every channel. |
| Keybinds | The cross-mod keybind registry. A mod cannot see another mod's config, so this is the only place a key collision is knowable — Claim your keys at boot and a clash gets reported instead of firing both mods. |
| IdPool | The generated id constants for this workspace's allocated range (see docs/id-pool.md). Never type a numeric id. |
| Suggest / StatusApplyGate | Nearest-match hints for a mistyped verb / a guard around status-effect application. |
| ScriptedBody / ScriptedBodies | "This Character belongs to a script — do not adopt it." Stamp a body you spawn and drive with ScriptedBodies.Mark(go, "YourMod", "why"); any mod that goes looking for a body to clone/recruit/tame checks ScriptedBodies.IsScripted(character) and skips it, with Describe for the refusal log. It lives here because ForgeKit is the one assembly everybody already depends on, so the stamper and the reader never need a dependency on each other. |
The shared verb pack (CommonVerbs)
CommonVerbs.RegisterAll(registry, Log, opts) in your RegisterVerbs gives your mod's own
_cmd.txt this set — no new channel, no relay change, and registries are per-mod so there's no
collision (CommandRegistry warns on a twice-registered verb). opts excludes any your mod
supersedes.
| Domain | Verbs |
|---|---|
| Give | give · drop · useitem · givewater · equip · unequip · givemoney |
| Stage | teleport (raw height) · walkto · standoff (ground-safe) · goto · moveto · face · pos · settime |
| Player | sethp · combatclear · killnearest · swing · lockon · lockoff |
| Skills | learnskill · unlearnskill · resetcooldowns · castspell |
| Status | grantstatus · removestatus · statusdump |
| Diag | scenedump · skydump · groundprobe · combatmgrdump · keybinds · ragdolldump · psdump · containerdump · containerroll · reloadcfg |
Log tags are a byte-stable grep contract — don't rename them.
Installing (for players)
Drop the ForgeKit folder into BepInEx/plugins. It has no effect by itself — install it
because another mod you're using declares it as a dependency.
Using it (for modders)
[BepInPlugin(GUID, NAME, VERSION)]
[BepInDependency(ForgeKit.Plugin.GUID)]
public class Plugin: Bas
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: