User settings
Decision #67. What a player chooses and keeps between runs (graphics
quality for now), as opposed to the command-line Settings of a single run.
Code: crates/uo-client/src/settings.rs.
File
A TOML file, loaded at startup and rewritten whenever a value changes:
| platform | path |
|---|---|
| macOS | ~/Library/Application Support/UO Remastered/settings.toml |
| Linux | $XDG_CONFIG_HOME/uo-remastered/settings.toml (or ~/.config/…) |
| Windows | %APPDATA%\UO Remastered\settings.toml |
UO_SETTINGS=<file> or --settings <file> uses another file. Every value
has a default, so a partial or older file loads; a broken file falls back to
the defaults with a warning and is left alone until a value changes.
[graphics]
preset = "custom"
sun_shadows = true
ssao = false
bloom = true
vignette = true
outline = true
toon = true
see_through = true # dithered circle through sprites in front of characters
crowns = "auto" # auto | always | never: hide tree crowns, keep the trunk
debris = "fall" # physics | fall | off
particles = "reduced" # full | reduced | off
max_debris = 1200
max_particles = 1200
break_budget_ms = 3.0
Presets
low, medium and high (the default) fill every graphics value; changing
any value afterwards makes the preset custom.
| low | medium | high | |
|---|---|---|---|
| sun shadows | off | on | on |
| ambient occlusion | off | off | on |
| bloom, vignette | off | on | on |
| outlines, toon lighting, see-through circles | on | on | on |
| tree crowns | auto | auto | auto |
| debris | fall | physics | physics |
| particles | off | reduced | full |
| max debris / particles | 400 / 0 | 1200 / 1200 | 3000 / 4000 |
| break budget | 2 ms | 3 ms | 4 ms |
What the destruction values do: docs/destruction.md › Quality settings.
In the client
- O opens the settings window: quality preset, the effect switches,
tree crowns (
auto: crowns near the player or covering them fade out to the trunk;always: every crown hidden;never), debris and particle modes, the debris budget, and where the file is. Changes apply at once and are saved.UO_SETTINGS_WINDOW=1starts with it open. - There are no effect hotkeys any more (decision #70: the number keys are
combat hotkeys; see-through has no key either).
--disable/--enableoverride the settings for one run; debug views are chosen with--debug-view. --set key=value,...overrides settings for one run and turns saving off, e.g.--set preset=low,debris=off. Keys:preset,sun_shadows(shadows),ssao,bloom,vignette,outline,toon,see_through,crowns,debris,particles,max_debris,max_particles,break_budget_ms; switches take on/off.- Reproducible runs (
--screenshot,--headless) ignore the player's file and never save: they start from the high preset (plus--set) unless--settingsnames a file, so captures and benchmarks don't depend on what someone picked in the game.
Next steps
This is a prototype: one graphics section, a debug-styled window. More
sections (audio, controls, interface), resolution/zoom/vsync, and a proper
window in the game's UI style (decision #59) come later; the file format
stays compatible as long as new fields have defaults.