1# Engine runtime options
2
3## Configuration file locations
4
5For historical reasons configuration file should be called "acsetup.cfg".
6
7The engine supports three configuration files that are read in the following order, every next overriding values from the previous one:
81. Default config file, found in the game's installation directory, applied for the game loaded from that directory;
92. Current user's global config file, applied for any AGS game.
103. Current user's game config file, applied only for the game of particular title. This config file is also the one being written to when the engine or setup application (Windows only) modifies game configuration.
11
12Locations of two latter files differ between running platforms:
13  * **Linux**:
14    * user's global config: $XDG_DATA_HOME/ags/acsetup.cfg
15    * user's game config: $XDG_DATA_HOME/ags/GAMENAME/acsetup.cfg
16    * NOTE: if $XDG_DATA_HOME is not defined, then "$HOME/.local/share" is used instead.
17  * **Windows**:
18    * user's global config: not used
19    * user's game config: %USERPROFILE%/Saved Games/GAMENAME/acsetup.cfg
20
21## Configuration file options
22
23* **\[graphics\]** - display mode and various graphics options
24  * driver = \[string\] - id of the graphics renderer to use. Supported names are:
25    * Software - software renderer.
26    * D3D9 - Direct3D9 (MS Windows version only).
27    * OGL - OpenGL (currently supported on Android, iOS and Windows).
28  * windowed = \[0; 1\] - when enabled, runs game in windowed mode.
29  * screen_def = \[string\] - determines how display mode is deduced:
30    * explicit - use screen_width and screen_height parameters;
31    * scaling - sets equal to scaled game size;
32    * max - sets equal to device/desktop size;
33  * screen_width = \[integer\] - if screen_def is 'explicit', defines display mode width; otherwise ignored.
34  * screen_height = \[integer\] - if screen_def is 'explicit', defines display mode height; otherwise ignored.
35  * match_device_ratio = \[0; 1\] - when looking for appropriate fullscreen mode, prioritise ones which have same aspect ration as current device/desktop mode.
36  * game_scale_fs = \[string | integer\] - game scaling rule for fullscreen mode, and...
37  * game_scale_win = \[string | integer\] - game scaling rule for windowed mode, where
38    * any integer number - positive number means upscale multiplier, negative number means downscale divisor;
39    * max_round - deduce maximal integer multiplier that fits in current desktop/device size;
40    * stretch - stretch to current desktop/device size;
41    * proportional - similar to stretch, but keep game's aspect ratio;
42  * filter = \[string\] - id of the scaling filter to use. Supported filter names are:
43    * none - run in native game size;
44    * stdscale - nearest-neighbour scaling;
45    * hqx - high quality scaling filter; only usable in 32-bit games with software renderer;
46    * linear - anti-aliased scaling; only usable with hardware-accelerated renderer;
47  * refresh = \[integer\] - refresh rate for the display mode.
48  * render_at_screenres = \[0; 1\] - whether the sprites are transformed and rendered in native game's or current display resolution;
49  * supersampling = \[integer\] - supersampling multiplier, default is 1, used with render_at_screenres = 0 (currently supported only by OpenGL renderer);
50  * vsync = \[0; 1\] - enable or disable vertical sync.
51* **\[sound\]** - sound options
52  * digiid = \[integer\] - digital driver id, not used on Windows.
53  * midiid = \[integer\] - MIDI driver id, not used on Windows.
54  * digiwinindx = \[integer\] - digital driver id, used only on Windows.
55  * midiwinindx = \[integer\] - MIDI driver id, used only on Windows.
56  * usespeech = \[0; 1\] - enable or disable in-game speech (voice-overs).
57  * threaded = \[0; 1\] - when enabled, engine runs audio on a separate thread; WARNING: incomplete and unsafe feature that does not work well on every platform.
58* **\[mouse\]** - mouse options
59  * auto_lock = \[0; 1\] - enables mouse autolock in window: mouse cursor locks inside the window whenever it receives input focus.
60  * control = \[string\] - determines when the mouse cursor speed control is enabled, acceptable values are:
61    * never - self-explanatory;
62    * fullscreen - only when the game is run in fullscreen (this is default);
63    * always - both in fullscreen and windowed mode.
64  * speed_def = \[string\] - determines how the cursor speed value is interpreted, possible modes are:
65    * absolute - use precisely the speed value provided by config;
66    * current_display - keep cursor's speed by screen size relation by increasing actual cursor speed when running game in low resolution and decreasing when running in higher than the current user's dekstop resolution (this is default).
67  * speed = \[real\] - mouse cursor speed (default is 1.0).
68* **\[language\]** - language options
69  * translation = \[string\] - name of the translation to use. A \<name\>.tra file should be present in the game directory.
70* **\[misc\]** - various options
71  * log = \[0; 1\] - enable or disable writing debug messages to the log file.
72  * datafile = \[string\] - path to the game file.
73  * datadir = \[string\] - path to the game directory.
74  * user_data_dir = \[string\] - custom path to savedgames location.
75  * shared_data_dir = \[string\] - custom path to shared appdata location.
76  * antialias = \[0; 1\] - anti-alias scaled sprites.
77  * notruecolor = \[0; 1\] - run 32-bit games in 16-bit mode. This option may only be useful on old low-end machines.
78  * cachemax = \[integer\] - size of the engine's sprite cache, in kilobytes. Default is 131072 (128 MB).
79* **\[override\]** - special options, overriding game behavior.
80  * multitasking = \[0; 1\] - lock the game in the "single-tasking" or "multitasking" mode. In the nutshell, "multitasking" here means that the game will continue running when player switched away from game window; otherwise it will freeze until player switches back.
81  * os = \[string\] - trick the game to think that it runs on a particular operating system. This may come handy if the game is scripted to play differently depending on OS. Possible choices are:
82    * dos - MS DOS;
83    * win - Windows;
84    * linux - Linux;
85    * mac - MacOS;
86  * upscale = \[0; 1\] - run game in the "upscale mode". The earlier versions of AGS provided support for "upscaling" low-res games to hi-res. The script API has means for detecting if the game is running upscaled, and game developer could use this opportunity to setup game accordingly (e.g. assign hi-res fonts, etc). This options works **only** for games created before AGS 3.1.0 with low-res native resolution, such as 320x200 or 320x240, and it may somewhat improve
87  game looks.
88* **\[disabled\]** - special instructions for the setup program hinting to disable particular options or lock some in the certain state. Ignored by the engine.
89  * render_at_screenres = \[0; 1\] - tells to lock "Render sprites in screen resolution" in a default state;
90  * speechvox = \[0; 1\] - tells to lock "Use digital speech pack" in a default state;
91  * filters = \[0; 1\] - tells to lock "Graphics filter" selection in a default state;
92  * \<filter id\> - tells to remove particular graphics filter from the selection list;
93
94
95## Command line
96
97General usage: ags \[OPTIONS\] \[GAMEFILE PATH or GAME DIRECTORY\]
98(Where "ags" is executable name)
99
100Following OPTIONS are supported when running from command line:
101
102* -? / --help - prints most useful command line arguments and quits.
103* -v / --version - prints engine version and quits.
104* --setup - run setup dialog. Currently only supported by Windows version.
105* --log - write debug messages to log file.
106* --no-log - prevent from writing to log file.
107* --fullscreen - run in fullscreen mode.
108* --windowed - run in windowed mode.
109* --gfxfilter \<name\> [ \<game_scaling\> ] - use specified graphics filter and scaling factor (see explanation above).
110* --hicolor - force hicolor (16-bit) mode when running 32-bit games. This option may only be useful on old low-end machines.
111* --fps - display fps counter.
112
113Command line arguments override options from configuration file where applicable.
114