Repository navigation
Settings
molly edited this page Nov 12, 2026
·
1 revision
A mod can add rows to the Phigros++ tab of the game's settings. Phigros++ saves what the player picks, so it's the same after a restart.
local enabled = setting("Say hello", true) -- a toggle, on by default
local times = setting("Times", 3, { 1, 10 }) -- a slider from 1 to 10
local mood = setting("Mood", "happy", { "happy", "sleepy" }) -- a choice, a tap picks the next one
button("Say it now", function()
for _ = 1, times() do toast("Hello, I'm " .. mood()) end
end)
if enabled() then toast("Hello!") endsetting gives back a function: call it to read the current value. Calling it with a value changes the setting, as
if the player had.
Give a last argument to put the rows in a tab of their own, named after your mod:
local enabled = setting("Say hello", true, "My mod")
button("Say it now", sayIt, "My mod")To react the moment the player changes something:
on("setting", function(label, value)
if label == "Say hello" then print("now", value) end
end)More kinds of rows (links, progress bars, rows that only show sometimes) are in Mod API.