OneLastLibPt2
Core mod for my mods to reduce code duplication.
模組介紹 作者原文
One Last Lib Pt.2
Personal core mod.
Literally serves to just make me not have to have duplicate code in all my mods, as all of my mods use the same console, preferences, and userdata code.
This intended to be universal. While there is game-specific code, it prevents itself from running if it is not in the intended game environment via Helpers.CheckGame().
Why I Made This
Logging
In all my mods, there's an option to enable debug logging.
Some logs will not show up in console unless debug mode is enabled.
To prevent having a ton of "Debug Mode" preferences in every mod, I tried to make them global.
Each mod would first read if the global preference existed, then just use that, and if it didn't, it'd write it.
Instead, with this mod, all the mods create their own LoggerInstance that goes through this mod's singular "Debug Mode" preference.
The mods still get to use their own MelonLogger instance so the log message comes from the right mod.
Preferences
Implemented as part of the LoggerInstance system, the global preference.
Also includes a string I can access that just gives the path to the pref file all my mods write to.
UserData
Much easier UserData management, when needed.
A mod creates its own UserData instance which will automatically create or read a folder from the mod's provided name, including some methods to load files/folders.
Game-Specific - BONELAB
BoneMenu
All my mods use one root BoneMenu category, so instead of all of them creating a menu of the same name, they just add on to this mod's menu.
Also has some extension methods that allow for easier preference button creation.
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: