ohrrpgce_config.ini is a text file which contains remembered configuration settings for both Custom and Game, mainly global ones. It can also contain game-specific overrides for these global settings for Custom. On the other hand, Game stores its game-specific settings in gameconfig.ini and persist.reld.
(.ini files are still barely used, so their organisation may still be changed. Maybe we should have game-specific settings for Custom in gameconfig.ini instead of using a prefix?)
Directories are searched for a file called ohrrpgce_config.ini in the following order (highest priority first):
- directory containing the current .rpg file (Note: Game currently doesn't check here!)
- directory containing the executable (e.g. ohrrpgce-custom/ohrrpgce-game/custom.exe/game.exe)
(Warning: there's no fallback to other .ini files for settings not found in the first .ini file encountered, so placing a .ini file next to your .rpg will cause all settings to be forgotten!)
Each line is a separate setting and takes the form key = value, where whitespace is ignored. Lines in the file that aren't recognised (such as comments but also unrecognised key=value lines) will be ignored and preserved by the engine when modifying the file.
Each key may include a prefix which makes the setting only apply in certain cases:
- game. : applies only to Game
- edit. : applies only to Custom
- edit.game_<gamename>. : applies only when editing <gamename>.rpg (filename only; path ignored)
The most specific setting found is used, regardless of the order it appears in the file.
For example, a file containing the lines edit.gfx.backend=sdl and gfx.backend = directx (in either order) causes Game to run with gfx_directx and Custom to use gfx_sdl.
Settings might have extra prefixes, which are optional. For example edit.gfx.gfx_directx.backend_screenshot is a gfx_directx-specific override, while edit.gfx.backend_screenshot will affect all backends.
A bool can be any number (nonzero is true) or any of the strings yes, no, true, false, on, off (with any case).
Not all of the settings can be edited from within Game/Custom, requiring you to edit the text file manually (creating it if necessary) if you want to change them.
- show_quit_msg: bool (Default true). If false, do not pop up a warning message about saving the game when quitting.
- gfx.backend: The default graphics backend. Valid options currently include alleg, directx, fb, sdl, console
- gfx.screenshot_format: File format for F12 screenshots. One of png, bmp, or gif.
- gfx.gfx_backend.backend_screenshot: bool (Default true.) Whether to take screenshots using the backend's own capability. Only offered by gfx_directx: takes a screenshot of the window as it actually appears, rather than what the engine presented.
- mapedit.shift_speed_x: int
- mapedit.shift_speed_y: int
- mapedit.cursor_follows_mouse: bool
- mapedit.show_overhead: bool
- mapedit.wall_style: 0: ants, 1: outlined, 2: pulse
- mapedit.wall_thickness: int
- mapedit.per-tileset_current_tile: bool
- mapedit.tile_animations_enabled: bool
- mapedit.mouse_pan_multiplier: float in range 1.0 to 5.0, default 1.0.
- mapedit.shadows_when_skewing: bool
- mapedit.show_grid: bool
- mapedit.grid_color: Either RGB triple like rgb(100,255,127) or a master palette index like 14