Skip to content
S3LightFixes
reference

Command line

Every s3lightfixes option, the environment variables it reads, completions and the manual page, and the exit codes.

s3lightfixes [OPTIONS]
s3lightfixes --generate-completion <SHELL>
s3lightfixes --generate-manpage

Every option is optional. With none, a run reads the openmw.cfg it finds, the settings in lightconfig.toml, and writes the plugin. An option that also exists in lightconfig.toml overrides it for this run, and is saved into the file when the run writes it.

Where§

OptionMeaning
-c, --openmw-cfg <PATH>The folder holding the openmw.cfg to read, or the path of a file named exactly openmw.cfg. Without it the config is found
-o, --output <DIR>The folder to write S3LightFixes.omwaddon into. It must exist
-e, --auto-enableAdd content=S3LightFixes.omwaddon to the user openmw.cfg, after backing it up. See Enabling the plugin

What to change§

The multipliers take a number, such as 0.5; the switches take true or false.

OptionSettingDefault
-f, --no-flicker <BOOL>disable_flickeringtrue
-p, --no-pulse <BOOL>disable_pulsefalse
--disable-negative-lights <BOOL>disable_negative_lightstrue
--standard-hue <NUMBER>standard_hue0.62
-s, --standard-saturation <NUMBER>standard_saturation0.8
-v, --standard-value <NUMBER>standard_value0.57
-r, --standard-radius <NUMBER>standard_radius1.2
-H, --colored-hue <NUMBER>colored_hue1.0
-S, --colored-saturation <NUMBER>colored_saturation0.9
--colored-value <NUMBER>colored_value0.7
-R, --colored-radius <NUMBER>colored_radius1.1
-M, --duration-mult <NUMBER>duration_mult2.5
-7, --classicdisable_interior_sunoff

--standard-hue has no short form, because -h is help. What a run changes explains each setting, and lightconfig.toml repeats them with their keys.

s3lightfixes --no-flicker false --standard-radius 1.5 --duration-mult 1

Which lights§

OptionMeaning
-x, --excluded-ids <PATTERNS>Comma-separated patterns for light and cell ids to leave out. Added to excluded_ids
-X, --excluded-plugins <PATTERNS>Comma-separated patterns for plugin file names not to read. Added to excluded_plugins
--light <OVERRIDE>pattern=key=value,key=value: values for the lights the pattern matches. Repeat it, or separate several with :
--ambient <OVERRIDE>pattern=field=value;field=value: ambient, sunlight, fog and fog density for the interior cells the pattern matches. Repeat it, or separate several with :

Patterns are regular expressions, matched anywhere in the id and without regard to case. On the command line a -x or -X pattern cannot contain a comma, and a --light or --ambient pattern cannot contain : or =; lightconfig.toml has no such limits. Overrides and exclusions has the keys and examples:

s3lightfixes -x 'purple,glow$' --light '^torch$=radius=400,red=255,green=160,blue=80'
s3lightfixes --ambient "caius cosades' house=ambient=red=64,green=48,blue=32;fog_density=0.5"

How to run§

OptionMeaning
--dry-run [<BOOL>]Read everything, print the summary and every change, and write nothing: no plugin, log or settings
--validate-config [<BOOL>]Read lightconfig.toml and the options, compile every pattern, print Validated <path> successfully, and stop. Plugins are not read. A key lightconfig.toml does not know fails it; see Unknown keys
-U, --update-light-configSave the settings of this run into lightconfig.toml. save_config = true in the file does it on every run
-n, --no-notificationsPrint messages instead of showing dialogs
-d, --debugAlso print the settings, the OpenMW config and the plugin header to standard error
-h, --helpPrint help
-V, --versionPrint s3lightfixes and the version

--dry-run and --validate-config without a value mean true, and false turns off a dry_run or validate_config set in the file. They cannot be given together.

s3lightfixes --dry-run --standard-value 0.7 | grep '"torch"'

Messages go to a dialog box on Windows, macOS and Linux desktops, and are printed on Android. When no dialog can be shown, such as on a Linux system without zenity, kdialog or yad, they are printed too. The summary and the record lines always go to standard output; plugins that fail to load, and keys lightconfig.toml has that the program does not know, are reported on standard error.

Completions and the manual page§

s3lightfixes --generate-completion bash > ~/.local/share/bash-completion/completions/s3lightfixes
s3lightfixes --generate-manpage > ~/.local/share/man/man1/s3lightfixes.1

--generate-completion takes bash, elvish, fish, powershell or zsh. Both print to standard output and do nothing else: no config is read. They cannot be given together.

Environment§

VariableEffect
S3L_NO_NOTIFICATIONSSet to anything: as --no-notifications, but never saved into lightconfig.toml
S3L_DEBUGSet to anything: as --debug, but never saved
OPENMW_CONFIGAn openmw.cfg to read when there is no --openmw-cfg
OPENMW_CONFIG_DIRFolders to look for openmw.cfg in, separated by :, or ; on Windows
OPENMW_GLOBAL_CONFIG_PATHLinux: the folder of OpenMW's global config, instead of /etc/openmw
OPENMW_CONFIG_USING_FLATPAKLinux: set to anything to look for the Flatpak OpenMW's config
OPENMW_FLATPAK_IDLinux: the Flatpak application id, instead of org.openmw.OpenMW
XDG_CONFIG_HOMELinux: where the user config folder openmw is, instead of ~/.config

Which openmw.cfg gives the order they are tried in.

Exit codes§

CodeMeaning
0Done. Also after a dry run, a successful check, --help, --version, and the generated completions and manual page
1lightconfig.toml cannot be read, a pattern does not compile, --validate-config found a key it does not know, --output is not a folder, dry_run and validate_config are both on, or a file could not be written
2An option is wrong or unknown, or the plugin would be empty because no plugin supplied a record
3A plugin's path has no file name. It should never happen
4The load order has no content files
127The --openmw-cfg path is wrong, or no openmw.cfg could be found or read

For a pattern that does not compile, a key --validate-config does not know, or a file that could not be written, standard error has the details after Error:; the other failures show a message first.