ContentLibrary
ContentLibrary handles ID assignment, creation and replication of ContentProviders and ContentEvents for developers.
模組介紹 作者原文
ContentLibrary
Dependencies
This depends on Mycelium
How do I use this
Download the latest dll from the releases tab or clone and build the repo, then add it as a reference to the project. After adding it as a reference you can add it as a dependency:
[BepInDependency(ContentLibrary.MyPluginInfo.PLUGIN_GUID)] // Make sure to specify if it's a soft or a hard dependency! BepInEx sets dependencies to hard by default.
public class YourMod: BaseUnityPlugin { //...
And for in-depth documentation, check out the library documentation or one of the demos! Demos available are the manual replication branch and the quick replication branch
Content class documentation
If you're curious how the Content classes work, check out my wiki for them!
Credits
Steven4547466 helped to documentate the content class! If it wasn't for them I probably wouldn't have delved deeper into the code at the time that I did, they also did a lot of research themselves.
Does this add something?
By itself, no — this is a library for mod developers to avoid conflicts when making content events and optionally utilize helper methods the library provides.
Though this does patch ContentEventIDMapper, so it might conflict with other Content Event mods that don't utilize the library (there is a 1 in 63535 chance one mod without a library would conflict with other content event mods per event added!)
It doesn't work
If the mod is throwing an error use the github issues page and copy-paste the error in there, with a description of what is happening and what you expected to happen if applicable. Or just ping me at the Content Warning Modding Discord server! There's a support thread about the library currently open.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: