POG Config
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.
About this mod Author’s original text
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
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: