2021-09-30 01:48:47 +00:00
# include "options.hpp"
# include <components/fallback/validate.hpp>
2021-10-17 22:40:34 +00:00
# include <components/files/configurationmanager.hpp>
2021-09-30 01:48:47 +00:00
# include <components/misc/rng.hpp>
namespace
{
namespace bpo = boost : : program_options ;
2021-10-10 22:50:50 +00:00
typedef std : : vector < std : : string > StringsVector ;
2021-09-30 01:48:47 +00:00
}
namespace OpenMW
{
bpo : : options_description makeOptionsDescription ( )
{
bpo : : options_description desc ( " Syntax: openmw <options> \n Allowed options " ) ;
desc . add_options ( )
( " help " , " print help message " )
( " version " , " print version information and quit " )
2021-10-10 22:50:50 +00:00
( " replace " , bpo : : value < StringsVector > ( ) - > default_value ( StringsVector ( ) , " " )
2021-09-30 01:48:47 +00:00
- > multitoken ( ) - > composing ( ) , " settings where the values from the current source should replace those from lower-priority sources instead of being appended " )
2021-11-21 19:51:02 +00:00
( " data " , bpo : : value < Files : : MaybeQuotedPathContainer > ( ) - > default_value ( Files : : MaybeQuotedPathContainer ( ) , " data " )
2021-09-30 01:48:47 +00:00
- > multitoken ( ) - > composing ( ) , " set data directories (later directories have higher priority) " )
2022-02-06 20:07:14 +00:00
( " data-local " , bpo : : value < Files : : MaybeQuotedPath > ( ) - > default_value ( Files : : MaybeQuotedPath ( ) , " " ) ,
2021-09-30 01:48:47 +00:00
" set local data directory (highest priority) " )
2021-10-10 22:50:50 +00:00
( " fallback-archive " , bpo : : value < StringsVector > ( ) - > default_value ( StringsVector ( ) , " fallback-archive " )
2021-09-30 01:48:47 +00:00
- > multitoken ( ) - > composing ( ) , " set fallback BSA archives (later archives have higher priority) " )
2021-11-21 19:51:02 +00:00
( " resources " , bpo : : value < Files : : MaybeQuotedPath > ( ) - > default_value ( Files : : MaybeQuotedPath ( ) , " resources " ) ,
2021-09-30 01:48:47 +00:00
" set resources directory " )
2021-10-10 22:50:50 +00:00
( " start " , bpo : : value < std : : string > ( ) - > default_value ( " " ) ,
2021-09-30 01:48:47 +00:00
" set initial cell " )
2021-10-10 22:50:50 +00:00
( " content " , bpo : : value < StringsVector > ( ) - > default_value ( StringsVector ( ) , " " )
2021-09-26 13:21:46 +00:00
- > multitoken ( ) - > composing ( ) , " content file(s): esm/esp, or omwgame/omwaddon/omwscripts " )
2021-09-30 01:48:47 +00:00
2021-10-10 22:50:50 +00:00
( " groundcover " , bpo : : value < StringsVector > ( ) - > default_value ( StringsVector ( ) , " " )
2021-09-30 01:48:47 +00:00
- > multitoken ( ) - > composing ( ) , " groundcover content file(s): esm/esp, or omwgame/omwaddon " )
( " no-sound " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " disable all sounds " )
( " script-all " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " compile all scripts (excluding dialogue scripts) at startup " )
( " script-all-dialogue " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " compile all dialogue scripts at startup " )
( " script-console " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " enable console-only script functionality " )
2021-10-10 22:50:50 +00:00
( " script-run " , bpo : : value < std : : string > ( ) - > default_value ( " " ) ,
2021-09-30 01:48:47 +00:00
" select a file containing a list of console commands that is executed on startup " )
( " script-warn " , bpo : : value < int > ( ) - > implicit_value ( 1 )
- > default_value ( 1 ) ,
" handling of warnings when compiling scripts \n "
" \t 0 - ignore warning \n "
" \t 1 - show warning but consider script as correctly compiled anyway \n "
" \t 2 - treat warnings as errors " )
2021-10-10 22:50:50 +00:00
( " script-blacklist " , bpo : : value < StringsVector > ( ) - > default_value ( StringsVector ( ) , " " )
2021-09-30 01:48:47 +00:00
- > multitoken ( ) - > composing ( ) , " ignore the specified script (if the use of the blacklist is enabled) " )
( " script-blacklist-use " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( true ) , " enable script blacklisting " )
2021-11-21 19:51:02 +00:00
( " load-savegame " , bpo : : value < Files : : MaybeQuotedPath > ( ) - > default_value ( Files : : MaybeQuotedPath ( ) , " " ) ,
2021-09-30 01:48:47 +00:00
" load a save game file on game startup (specify an absolute filename or a filename relative to the current working directory) " )
( " skip-menu " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " skip main menu on game startup " )
( " new-game " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " run new game sequence (ignored if skip-menu=0) " )
( " fs-strict " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " strict file system handling (no case folding) " )
2021-10-10 22:50:50 +00:00
( " encoding " , bpo : : value < std : : string > ( ) - >
2021-09-30 01:48:47 +00:00
default_value ( " win1252 " ) ,
" Character encoding used in OpenMW game messages: \n "
" \n \t win1250 - Central and Eastern European such as Polish, Czech, Slovak, Hungarian, Slovene, Bosnian, Croatian, Serbian (Latin script), Romanian and Albanian languages \n "
" \n \t win1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages \n "
" \n \t win1252 - Western European (Latin) alphabet, used by default " )
( " fallback " , bpo : : value < Fallback : : FallbackMap > ( ) - > default_value ( Fallback : : FallbackMap ( ) , " " )
- > multitoken ( ) - > composing ( ) , " fallback values " )
( " no-grab " , bpo : : value < bool > ( ) - > implicit_value ( true ) - > default_value ( false ) , " Don't grab mouse cursor " )
( " export-fonts " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " Export Morrowind .fnt fonts to PNG image and XML file in current directory " )
( " activate-dist " , bpo : : value < int > ( ) - > default_value ( - 1 ) , " activation distance override " )
( " random-seed " , bpo : : value < unsigned int > ( )
- > default_value ( Misc : : Rng : : generateDefaultSeed ( ) ) ,
" seed value for random number generator " )
;
return desc ;
}
}