Skip to content
Greenmote
reference

Command line

Every greenmote option, for the program, convert and unclip, what goes to which stream, and the exit codes.

greenmote [--openmw-cfg PATH] [--config PATH] convert [options]
greenmote [--openmw-cfg PATH] [--config PATH] unclip [options]
greenmote --generate-completion SHELL
greenmote --generate-manpage

With no arguments at all, the Windows, macOS and Linux builds open the GUI. The Android and PortMaster builds have no GUI, and with no arguments run convert with its defaults. Any argument, even --help, means the command line.

Program options#

These go before convert or unclip: greenmote --openmw-cfg profile convert, not greenmote convert --openmw-cfg profile.

OptionMeaning
-c, --openmw-cfg PATHThe openmw.cfg to read, or a folder holding one. Without it, Greenmote finds one as OpenMW does
--config PATHThe greenmote.toml to use. Default: next to your user openmw.cfg
--generate-completion SHELLPrint a completion script for bash, elvish, fish, powershell or zsh, and exit
--generate-manpagePrint the manual page, in roff, and exit
-h, --helpPrint help. greenmote convert --help and greenmote unclip --help describe each command
-V, --versionPrint greenmote and the version
greenmote --generate-completion bash > ~/.local/share/bash-completion/completions/greenmote
greenmote --generate-manpage > ~/.local/share/man/man1/greenmote.1

Finding openmw.cfg#

Without --openmw-cfg, Greenmote reads the file OpenMW would start from: the one named by OPENMW_CONFIG, else one in a folder listed in OPENMW_CONFIG_DIR, else one next to the program, else the system-wide one an OpenMW install provides, following its config= lines to yours. With none of those, it reads the default user openmw.cfg directly. Standard error says which it used when it is not your user one:

Using OpenMW configuration found next to Greenmote:
  /games/openmw/openmw.cfg

When --openmw-cfg names nothing usable, Greenmote says why and asks on standard error whether to use the default user openmw.cfg instead. Anything but y or yes stops it with an error that shows how to pass a profile.

convert#

greenmote convert [-o DIR] [--ignore REGEX,...] [--dry-run | --validate-config] [-e] [-d]
OptionMeaning
-o, --output DIRWrite the plugins and meshes to DIR. Default: data-local, else the current folder
--ignore REGEX[,REGEX...]Also skip content files whose name matches. Added to ignored_plugins
--dry-run[=BOOL]Print the plan and write nothing
--validate-config[=BOOL]Check greenmote.toml and its patterns, and write nothing. Needs the file to exist
-e, --auto-enableAdd the output to openmw.cfg after writing it
-d, --debugPrint the plan to standard error as the run goes

--dry-run and --validate-config cannot be combined. A successful validation prints Validated PATH successfully. Convert covers what each run reads and writes.

unclip#

greenmote unclip [-p PLUGIN] [--write [--output-plugin PATH]] [--verbose] [--structured] [policy options]
OptionMeaning
-p, --plugin PLUGINThe groundcover plugin to check: a path, or a name found in the data folders. Default: plugin in greenmote.toml
--write[=BOOL]Write the changes. Without it, unclip only reports
--output-plugin PATHWith --write, write the rewritten plugin to PATH and leave the source alone
--verbose[=BOOL]Add one line per reference to greenmote-unclip.log, and every reference to --structured output
--structured[=BOOL]Print the report as JSON

Policy options, each overriding its greenmote.toml setting for the run:

OptionDefaultMeaning
--actions ACTION[,ACTION...]allWhich of terrain-z, water-delete, road-delete, static-delete, static-move, orient to plan. --write-actions is the same option
--float-tolerance N1Units the mesh base may float
--max-sink N24Units the mesh base may be buried
--max-sink-fraction N0.75The same, as a fraction of the mesh’s height, 0 to 1. The larger limit applies
--sink N4Units below the surface a fixed base is placed
--relocation-step N32Units between static-move’s search rings
--relocation-steps N8Search rings, 1 to 256
--orientation-epsilon N1Degrees of tilt treated as aligned
--max-tilt N45Steepest ground, in degrees, grass is tilted to: above 0, at most 90
--include-grass-id REGEXOnly check references whose whole ID matches. Repeatable
--exclude-grass-id REGEXDo not check references whose whole ID matches. Repeatable
--include-occluder-id REGEXOnly statics whose whole ID matches block grass. Repeatable
--exclude-occluder-id REGEXtree-like staticsStatics whose whole ID matches never block grass. Adds to the list. Repeatable
--no-default-occluder-excludesStart the occluder exclusions empty
--road-texture-path REGEXroad texturesTerrain texture paths road-delete deletes on. Adds to the list. Repeatable
--no-default-road-texturesStart the road patterns empty

The [=BOOL] options also take =true or =false. Unclip explains every action and number.

Options from older versions are refused: --dry-run (reporting is the default), --in-place, --instances, --meshgenerator-ini, --origin-epsilon and --contact-epsilon. --ignore-missing-meshes is still accepted and does nothing.

Output#

CommandStandard outputStandard error
convertThe plan with --dry-run; otherwise what was written and what to enablePlugin load warnings, the plan with --debug, errors
convert --validate-configValidated PATH successfullyErrors
unclipThe report, or its JSON with --structuredWarnings about unknown settings, phase timings with GREENMOTE_PROFILE=1, errors

Both also write a log next to your user openmw.cfg: greenmote.log for a convert that writes, greenmote-unclip.log for every unclip. The unclip report describes its lines and JSON.

Errors are one message on standard error, starting error:. Some span several lines, with the command to run next.

Exit codes#

CodeWhen
0Success, including a dry run with changes to make, and a closed output pipe
1The command failed: no openmw.cfg, a missing mesh, an invalid setting, a plugin that cannot be read or written
2The command line is wrong: an unknown option, a missing or malformed value, --dry-run with --validate-config

Examples#

# Plan a conversion of a specific profile's grass, and write nothing.
greenmote --openmw-cfg ~/.config/openmw/modded convert --dry-run

# Convert, skipping two mods, into a folder OpenMW already reads, and enable the result.
greenmote convert --ignore '^Rem_,^FGM_' --output ~/.local/share/openmw/data --auto-enable

# Check a downloaded grass mod before enabling it, one log line per reference.
greenmote unclip --plugin "Downloads/Remiros Groundcover/00 Core OpenMW/Rem_AI.esp" --verbose

# Only ground floating grass; leave everything else alone.
greenmote unclip --plugin Rem_AI.esp --actions terrain-z --write

# Write the fixed plugin next to the original to compare them in game.
greenmote unclip --plugin FGM_BC.esp --write --output-plugin FGM_BC_unclipped.esp

# Treat one more family of statics as see-through.
greenmote unclip --plugin Rem_AI.esp --exclude-occluder-id 'ex_ashl_.*'

# Machine-readable counts.
greenmote unclip --plugin Rem_AI.esp --structured | jq .counts