POG Config

版本 v1.0.10·更新於 2026-07-30

In-game MOD SETTINGS panel for Pit of Goblin mods. Provides toggles, sliders with numeric input, options lists, and keybind entries. Dependency for other POG mods.

模組介紹 作者原文

POGConfig

In-game config UI framework for Pit of Goblin mods.

POGConfig provides a shared MOD SETTINGS panel that any mod can register entries into. It handles rendering, persistence, scrolling, and input — mod authors only write entry declarations.

Install: Mod Manager / r2modman, or place POGConfig.dll in the game Mods folder. Mods that depend on POGConfig should load after it (MelonLoader respects alphabetical order by default).

Source & Wiki: github.com/LargoScript/POGConfig — full developer Wiki at /Wiki.: package page · Wiki.

Features

  • MODS button injected into both the main menu and pause menu.
  • Scrollable panel — mouse wheel and clickable scrollbar. Scrollbar appears only when content overflows.
  • Four entry types: toggle, slider (with inline numeric text input), options list, keybind.
  • MelonPreferences persistence — per-entry opt-in, auto-saved on change.
  • Hotkey suppression — POGConfig.PanelOpen lets other mods pause their hotkeys while the panel is open.
  • Marquee animation — label and value text scroll on hover when they overflow their column.
  • Bidirectional slider fill — fill bar grows from a configurable origin point, not just the left edge.
  • Step tick marks — optional evenly-spaced markers on a slider.

For Developers

Click To Expand

Project reference

Add to your.csproj:..\..\Mods\POGConfig.dll

false

Add using POGMods.Config; to your plugin file.

Registration pattern

Wrap registration in a [MethodImpl(MethodImplOptions.NoInlining)] helper so the IL2Cpp JIT only resolves POGConfig types when the method is actually called. This makes POGConfig an optional dependency — your mod loads cleanly even if POGConfig is absent.

using System.Collections.Generic;

using System.Runtime.CompilerServices;

using POGMods.Config;

public override void OnInitializeMelon()

{

try { TryRegisterConfig(); } catch { }

MelonLogger.Msg("My Mod loaded.");

}

[MethodImpl(MethodImplOptions.NoInlining)]

private static void TryRegisterConfig()

{

POGConfig.Register("My Mod", new List

{

new ToggleEntry("Enable Feature", () => _enabled, v => _enabled = v),

new SliderEntry("Speed", () => _speed, v => _speed = v, 0f, 10f),

new KeyEntry("Hotkey", () => _key, v => _key = v),

});

}

Register also creates a MelonPreferences category named after your mod (spaces → underscores). Entries with a prefKey load and save automatically within that category.

POGConfig.PanelOpen

public static bool PanelOpen { get; }

true while the MOD SETTINGS panel is visible. Check it before processing any in-game hotkey so keypresses inside the panel don't trigger game actions:

void Update()

{

if (!POGConfig.PanelOpen && Input.GetKeyDown(_toggleKey))

Toggle();

}

Entry types

ToggleEntry

Renders as a 40×24 yellow checkbox on the right side of the row.

new ToggleEntry(string label, Func get, Action set)

new ToggleEntry(string label, Func get, Action set, string prefKey)

  • The toggle calls set immediately when the user clicks it.
  • OnUpdate polls get() every frame and silently syncs the visual state if the value changed externally.
  • prefKey auto-saves to MelonPreferences on every change.

new ToggleEntry("God Mode", () => _god, v => _god = v, "GodMode")

SliderEntry

Row layout: 26 % label | 26 % value input | 48 % slider

Label and value columns clip with RectMask2D and animate a marquee on hover when the text overflows.

Full constructor (all parameters after max are optional):

new SliderEntry(

string label,

Func get,

Action set,

float min,

float max,

Func fmt = null, // display formatter; default: v => v.ToString("F1")

string prefKey = null, // MelonPreferences key; null = no persistence

float originValue = 0f, // where the yellow fill bar anchors from

bool showFill = true, // false hides the fill bar entirely

bool wholeNumbers = false, // true snaps the handle to integers

int stepPointsCount = 0) // ≥2 draws evenly-spaced tick dots along the track

Value input field — click the yellow number

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

LavaGang-MelonLoader

檔案與校驗

檔案名稱
POG_Config-1.0.10.zip
檔案大小
142.1 KiB