Skip to content

CVars (console variables)

Petr Ohlídal edited this page Feb 29, 2020 · 2 revisions

Since v0.4.7, RoR is internally driven by a set of global variables. These have certain defaults and can be set via config file (RoR.cfg), via command line switches or ingame console (work in progress). This system is inspired by Quake engine: http://www.quakeforge.net/doxygen/cvars.html

This wikipage is a draft for a http://docs.rigsofrods.org page.

The names and values refer to future release v0.4.8, see this PR which contains signifficant refactor of GVars: https://github.com/RigsOfRods/rigs-of-rods/pull/1333

For meanings of AppState, MpState and SimState, see https://github.com/only-a-ptr/rigs-of-rods/blob/master/source/main/Application.h#L35-L61

Info on GVars:

  • Active state - current effective value
  • Pending state - if different from Active, signals a request for change at a certain moment - see 'roles' below.
  • Name - the console name (lower_case), for example 'app_screenshot_format'
  • Config name - the legacy name printed to RoR.cfg by RoRConfig utility, for example 'Screenshot Format'. Not all GVars are present in config file.

Roles:

  • live - Change has immediate effect
  • trig. - Trigger; change has immediate effect
  • next - Affects next user action
  • boot - Only effective after game restart
Name (Conf. name) Type (role) Description
Application
app_state AppState (trig.) Game state trigger. Default active: BOOTSTRAP, default pending: MAIN_MENU
app_language
(Language)
string (boot) Language, default: English
app_locale
(Language Short)
string (boot) Locale, default: en_EN
app_multithread
(Multi-threading)
bool (next) Enable multithreading? Default: true
app_screenshot_format
(Screenshot Format)
string (next) Fileformat; default: jpg
Simulation
sim_terrain_name
(Preselected Map)
string (next) Terrain to use next
sim_state SimState (trig.) Simulation state trigger; default: NONE
sim_replay_enabled
(Replay mode)
bool (next) Default: false
sim_replay_length
(Replay length)
int (next) Default: 200
sim_replay_stepping
(Replay Steps per second)
int (next) Default: 1000
sim_position_storage
(Position Storage)
bool (next) Default: false
sim_gearbox_mode
(GearboxMode)
SimGearboxMode Default: AUTO
sim_no_collisions
(DisableCollisions)
bool (next) Default: false
sim_no_self_collisions
(DisableSelfCollisions)
bool (next) Default: false
Multiplayer
mp_state_active
(Network enable )
MpState (trig.) Multiplayer state trigger; Default: DISABLED
mp_server_host
(Server name )
string (next) MP server to join
mp_server_port
(Server port )
int (next) MP server port
mp_server_password
(Server password)
string (next) MP server password
mp_player_name
(Nickname )
string (live) MP player nickname; Default: Player
mp_player_token_hash
(User Token Hash)
string (live) MP player token
mp_portal_url
(MP portal URL)
string (live) Default: http://multiplayer.rigsofrods.org
System
sys_process_dir string (boot) Directory where RoR is currently running. Detected.
sys_user_dir string (boot) User directory, detected. Windows: MyDocuments/Rigs of Rods [version]; Linux: ~/.rigsofrods; OSX: ~/.RigsOfRods.
sys_config_dir string (live) Configuration files location. Default: $user/config
sys_cache_dir string (live) Mod cache read/write dir. Default: $user/cache
sys_logs_dir string (live) Logs directory. Default: $user/logs
sys_profiler_dir
(Profiler output dir)
string (live) For developers. Default: $user /profiler
sys_resources_dir string (boot) Builtin game resources Default: $workdir /resources
sys_screenshot_dir string (live) Screenshots output directory Default: $user /screenshots
Gfx
gfx_flares_mode
(Lights)
GfxFlaresMode (next) Flares and lights. Takes effect on vehicle (re)spawn. Default: GfxFlaresMode::"all vehicles, headlights"
gfx_shadow_type
(Shadow technique)
GfxShadowType (boot) Default: GfxShadowType::NONE
gfx_extcam_mode
(External Camera Mode)
GfxExtCamMode (live) Default: GfxExtCamMode::PITCHING
gfx_sky_mode
(Sky effects)
GfxSkyMode Default: GfxSkyMode::SANDSTORM
gfx_texture_filter
(Texture Filtering)
GfxTexFilter (boot) Default: GfxTexFilter::TRILINEAR
gfx_vegetation_mode
(Vegetation)
GfxVegetation Default: GfxVegetation::NONE
gfx_water_mode
(Water effects)
GfxWaterMode Default: GfxWaterMode::BASIC
gfx_water_waves
(Waves)
bool (boot) Enable Hydrax? Default: false
gfx_minimap_disabled
(disableOverViewMap)
bool Default: false
gfx_particles_mode
(Particles)
int (next) Use particles? Default: 0
gfx_enable_videocams
(gfx_enable_videocams)
bool Enable VidCams by default? Default: false
gfx_envmap_enabled
(Envmap)
bool Realtime vehicle reflection (environment map). Default: false
gfx_envmap_rate
(EnvmapUpdateRate)
int Realtime vehicle reflection (environment map). 1-6: update interleaving (1=update each frame, 2=update every 2n frame...) . Default: 2
gfx_skidmarks_mode
(Skidmarks)
int Default: 0
gfx_sight_range
(SightRange)
float (live) Sight range of 3D scene. Default: 3000.f
gfx_fov_external
(FOV External)
float (live) Field of view. Default: 60.f
gfx_fov_internal
(FOV Internal)
float (live) Field of view. Default: 75.f
gfx_fps_limit
(FPS-Limiter)
int Default: 0
gfx_speedo_digital
(DigitalSpeedo)
bool (next) Controls on-screen dashboard looks. Default: false
gfx_speedo_imperial bool (next) Controls on-screen dashboard looks. Default: 0
gfx_reduce_shadows
(Shadow optimizations)
bool (next) Disables shadows in 1st person mode, Default: true
Input/Output
io_input_grab_mode
(Input Grab )
int (boot) Input grabbing mode Default: 1
io_arcade_controls
(ArcadeControls )
bool (next) Default: false
io_ff_enabled
(Force Feedback )
bool (next) Force feedback enabled? Default: false
io_ff_camera_gain
(Force Feedback Camera )
float (live) Force feedback camera gain
io_ff_center_gain
(Force Feedback Centering)
float (live) Force feedback center gain Default: 0.5
io_ff_master_gain
(Force Feedback Gain )
float (live) Force feedback master gain Default: 1.0
io_ff_stress_gain
(Force Feedback Stress )
float (live) Force feedback stress gain Default: 1.0
io_outgauge_mode
(OutGauge Mode )
int (boot) 1=enabled Default: 0
io_outgauge_ip
(OutGauge IP )
string (boot) Default: 192.168.1.100
io_outgauge_port
(OutGauge Port )
int (boot) Default: 1337
io_outgauge_delay
(OutGauge Delay )
float (boot) Default: 10.0
io_outgauge_id
(OutGauge ID )
int (boot) Default: 0
Audio
audio_master_volume
(Sound Volume )
float (live) Default: 1.0
audio_enable_creak
(Creak Sound )
bool (boot) Beams creaking when deformed? Default: false
audio_device_name
(AudioDevice )
string (boot) Default: (detect)
audio_menu_music
(MainMenuMusic)
bool (next) Play music in main menu? Default: true
Diagnostic
diag_trace_globals bool (live) Log variable updates to RoR.log? Default:true
diag_debug_envmap
(EnvMapDebug )
bool (next) Debug environment map? default:false
diag_collisions
(Debug Collisions)
bool (boot) Default: false
diag_truck_mass
(Debug Truck Mass)
bool (live) Default: false
diag_envmap
(EnvMapDebug )
bool (next) Default: false
diag_videocameras
(VideoCameraDebug)
bool (next) Default: false
diag_rig_log_node_import
(RigImporter_Debug ._TraverseAndLogAllNodes)
bool (next) Default: false
diag_rig_log_node_stats
(RigImporter_PrintNodeStatsToLog)
bool (next) Default: false
diag_rig_log_messages
(RigImporter_PrintMessagesToLog)
bool (next) Default: false
diag_extra_resource_dir
(resourceIncludePath)
string (next) Extra media directory, evaluated each time an actor is spawned. Command line option: "-includepath". Empty by default.

More to come!

Clone this wiki locally