ModSettings
Adds a Mods tab to the game's settings screen. Other mods register switches, sliders and dropdowns backed by their MelonPreferences with one call each. IL2CPP.
模組介紹 作者原文
Mod Settings
Puts mod options where players look for them: a Mods tab on the game's own settings screen,
in the main menu and the pause menu. It uses the game's switches, sliders and dropdowns, so it
looks and behaves like the rest of the menu.
On its own it does nothing. Mods that use it list their options under their own heading.
Changes apply straight away and are saved to UserData/MelonPreferences.cfg.
For mod authors
Reference ModSettings.dll, add holyfurries-ModSettings to your dependencies,
and register your existing MelonPreferences entries in OnInitializeMelon:
MelonPreferences_Category preferences = MelonPreferences.CreateCategory("MyMod");
MelonPreferences_Entry enabled = preferences.CreateEntry("enabled", true);
MelonPreferences_Entry size = preferences.CreateEntry("size", 1f);
MelonPreferences_Entry corner = preferences.CreateEntry("corner", Corner.TopRight);
Settings.toggle("My Mod", "Show overlay", enabled);
Settings.slider("My Mod", "Overlay size", size, minimum: 0.5f, maximum: 3f);
Settings.dropdown("My Mod", "Overlay corner", corner);
- The entry stays the source of truth. Read entry.Value as usual, or subscribe to
entry.OnEntryValueChanged to react.
- Changing the entry from code, such as a hotkey, updates the control.
- slider takes whole_numbers: true for integer steps. dropdown works with any enum and
lists its names as words (TopCenter shows as "Top Center").
- Up to 128 settings in total. Labels are at most 48 characters, mod names 32.
If a game update changes the settings screen, the tab is skipped with a warning in the log and
the config file keeps working.
Installation
Install with a mod manager, or copy Mods/ModSettings.dll into the game's Mods folder
with MelonLoader 0.7.3 (IL2CPP).
Development
See BUILDING.md and DEVELOPMENT.md.
License
MIT
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: