R2API Rulebook
API for registering rules to the Rule Catalog
模組介紹 作者原文
R2API.Rules - Creation and Management of custom Rules for the Rule Catalog
About
R2API.Rules is a submodule assembly for R2API that simplifies and augments the process of interacting with the game's RuleDef system. The RuleDef system is what the game uses in the lobby for deciding what Artifacts, Expansions, and Difficulty will be chosen in the run.
Use Cases / Features
R2API.Rules can be used for mods to add their own RuleDefs to existing RuleCategoryDefs, or to new RuleCategoryDefs that can be created from code.
The main feature of the Rules submodule is the addition of the ExtendedRuleChoiceDef, an extension of RuleChoiceDef that allows mod creators to specify multiple requirements for a RuleDef to be selectable/enabled in the game. (Such as having multiple ExpansionDefs or UnlockableDef requirements.)
Related Pages
A Wiki page explaining how the Rule system works and how to create new rules will be added to the R2Wiki Soon(tm)
Changelog
'1.0.1'
Fix wrong logger being used
'1.0.0'
Initial Release
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: