openOMSI GitHub Discord

Docs / Reference / OMSI_* environment variables

Test hooks

11 min readGenerated from the sourcedocs/DEBUG_FLAGS.md

Name Type Default Read Crates Description
OMSI_API_BLESS bool off use plugin cargo test -p omsi-plugin api_manifest: write docs/plugin-api.json and the reference tables of docs/PLUGINS.md again from the plugin API registry.
OMSI_APPLE_EXIT_AFTER num - use app, app-mx iPhone/iPad: the session ends by itself after this many seconds (checks the way back to the Swift launcher without a person).
OMSI_AUDIT_LINE num - test sim bus_audit example: the line (number and letter code) the IBIS typist enters instead of the bus's own.
OMSI_AUTOPILOT num - use app, app-mx Offscreen: the player's bus follows the lanes at this speed in km/h (finds where it falls through or leaves the road).
OMSI_BACKGROUND bool off use app, app-mx A test window that does not take the keyboard focus (OMSI_INPUT drives the handlers directly); with OMSI_INPUT it ignores the real mouse too.
OMSI_BATCH num - use scene, scene-mx Offscreen: prepare the map tiles this many at a time, as the window's streaming does.
OMSI_BENCH num - use app, app-mx Offscreen: draw the final picture this many more times and log the median CPU and GPU-wait time.
OMSI_BENCH_STEREO bool off use app, app-mx With OMSI_BENCH: benchmark a stationary stereo pair without a headset; --size is per eye, symmetric 100 degree vertical FOV and 64 mm eye separation. GPU completion waits are confined to this offline benchmark.
OMSI_BLEND_AB bool off use app, app-mx Offscreen: a second picture with the blended draws in the old order, for a before/after of the draw order.
OMSI_BRIDGE_ONLY bool off use net LAN: forget our own addresses so that only what the rendezvous bridge reports is tried.
OMSI_BUDGET_FROM text - use app, app-mx Offscreen with OMSI_TEXTURE_MEMORY: x,y[,MB] - the texture budget is met as seen from that point.
OMSI_CABIN_LOG bool off use app, app-mx Offscreen --drive: print the cabin air and the film on the windscreen, sides and rear every 20 s.
OMSI_CAM_SWEEP text - use app, app-mx yaw[,jump]: the offscreen warm frames come from a camera turning yaw degrees a frame and ending in the picture's pose; with a jump (m), from a place that far to the side (a cut). For checking what reads the last frame.
OMSI_CAM_VEHICLE text - use app, app-mx Offscreen: x,y,z,yaw,pitch[,fov] - a camera in the bus's own frame.
OMSI_CHECK_ENTRIES bool off use app, app-mx Map check: is there ground to stand on where a player is put down.
OMSI_CHECK_GROUND bool off use sim Check: people on foot with a walkable surface above their heads, every two seconds.
OMSI_CHECK_OBJECTS bool off use scene, scene-mx Map check: report placed objects that float or are out of place while loading tiles.
OMSI_CHECK_OBSTACLES bool off use app, app-mx Map check: sweep a bus-sized box along every lane and list the obstacle boxes it hits.
OMSI_CHECK_OVERLAP bool off use sim Check: every AI vehicle whose body has got into another's or into an obstacle.
OMSI_CHECK_ROADS bool off use app, app-mx, scene, scene-mx Map check: lanes with no road surface drawn under them, and road points under the ground.
OMSI_CHECK_SPIKES bool off use scene, scene-mx Map check: road faces standing taller than profile, gradient and cant allow.
OMSI_CHECK_SPLINES bool off use app, app-mx, scene, scene-mx Map check: chained splines whose ends do not meet in height.
OMSI_CHECK_TPOSE bool off use app, app-mx, sim Check: people drawn in the rest (T) pose, wider than 1.3 m hand to hand.
OMSI_CHECK_TRIPS text - use app, app-mx, sim 1: build every trip's route on the loaded lanes and report breaks; a trip name: log every step of that trip.
OMSI_CHECK_TYPES bool off use scene, scene-mx Map check: list the object types per folder that loading leaves out.
OMSI_CHECK_WALLS bool off use sim Check: everybody inside a bus who stands away from its walkways.
OMSI_CHECK_WHEELS bool off use app, app-mx Map check: probe the ground along every lane's wheel tracks (invisible walls, humps, holes).
OMSI_CHURN text - use app, app-mx Offscreen: x,y - load the tiles round that point and unload/reload the start area (streaming test).
OMSI_CLICK_ALL bool off use app, app-mx Check: aim at every clickable item of the cab and report which one would actually be operated.
OMSI_CLOUDFLARED_OWN bool off use net LAN tunnel: only the game's own downloaded cloudflared, to test the download.
OMSI_CONDENSATION text - use app, app-mx Offscreen: minutes,people[,engine] - the cabin air and condensation on the glass after that long.
OMSI_DAY_AIR text - once render, render-mx haze,angstrom[,height,strat]: fix the day's air (twilight colours) instead of the varying one.
OMSI_DRIVER_HANDS text - use scene, scene-mx left,right: both driver hands held at these angles (grip close-ups).
OMSI_DRIVER_SHIFTER text - use scene, scene-mx Part of a variable or file name: force the shifter the driver's hand uses; off: both hands on the wheel.
OMSI_DRIVE_PROFILE text - use app, app-mx Offscreen: "t throttle brake [steer]/..." piecewise constant pedals (crash/kerb tests).
OMSI_DRIVE_V0 num - use app, app-mx Offscreen: the bus's speed in km/h on the first frame.
OMSI_FAKE_GPU_ERROR text - frame render, render-mx Fault injection: open, open-panic, pipeline, lost-build, build, lost, frame, mesh - the GPU error to simulate. Only in builds with omsi-render's test-hooks feature (on by default).
OMSI_FLASHLIGHT bool off use app, app-mx Offscreen: the player's flashlight is on (in the window it is Alt+F).
OMSI_FLEET_AHEAD num FLEET_AHEAD use app, app-mx Minutes ahead the timetable fleet is planned (for tests).
OMSI_FLEET_IDLE num FLEET_IDLE use app, app-mx Seconds a fleet vehicle idles (shortened for tests).
OMSI_FOLLOW_CAM text - use app, app-mx right,ahead,up,yaw,pitch: a camera in the followed car's frame.
OMSI_GLASS_WIND num - use app, app-mx Offscreen: the rain on the glass as met at this speed in m/s.
OMSI_GPU_LIMITS text - use render, render-mx default or downlevel: request only the WebGPU default (or downlevel) limits. Set by the small_chip test.
OMSI_GROUND_SAMPLE text - use app, app-mx Offscreen CSV: what the wheels stand on every metre along the lanes near the start.
OMSI_GUARD_DIALOG_FILE text - use guard The start guard writes the messages it would show the player into this file instead (scripts/guard-e2e.sh).
OMSI_GUARD_FORCE bool off use guard The start guard also watches a development build (one run from a cargo target folder).
OMSI_GUARD_TEST_BREAK bool off use guard With it, a file guard-test-break beside the program (panic, exit, hang or nothing) breaks this start before its first frames on purpose (scripts/guard-e2e.sh).
OMSI_HIDDEN_WINDOW bool off use app, app-mx The game's window is made and never shown (no Dock icon on macOS): a run of the whole game (its frame, the plugins, --exit-after) beside whoever works at the screen; its frames are drawn into a texture, for benchmarks.
OMSI_HIDE_MESH text - use scene, scene-mx a|b: leave out the meshes whose file names contain one of the parts.
OMSI_HIDE_WINDOW text - use app, app-mx from,to: treat the window as hidden between these seconds.
OMSI_HOLE_PHOTO bool off use app, app-mx With OMSI_ROAD_PHOTO: photograph from above down to 25 m under the lane (holes in the world).
OMSI_INPUT text - use app, app-mx Scripted keyboard, mouse and camera input for window runs.
OMSI_JOINT_ANGLE num - use app, app-mx Degrees: the rear section of an articulated bus held at that angle.
OMSI_LANES_NEAR text - use app, app-mx x,y,r: log the driving lanes passing there.
OMSI_LAN_AUDIO bool off use app, app-mx Offscreen LAN: with the other buses' sounds.
OMSI_LAN_SAY text - use lan "30=Hallo;45=Bye": LAN chat lines said at these seconds of the session.
OMSI_MOBILE bool off use app, app-mx The phone layout on a computer (screen cut-outs).
OMSI_MUTE bool off use audio Mix everything as usual but play nothing.
OMSI_MX_SOFTWARE bool off once app-mx Let mX Graphics draw on a software renderer (WARP, llvmpipe) on a computer; without it a computer where only one opens starts again on wgpu.
OMSI_NAV_2D bool off use app, app-mx Navigator pictures with flat houses (the nav_3d setting off).
OMSI_NAV_CONTOURS bool off use app, app-mx Offscreen: the city map in its terrain view (contour lines and their heights, when the map's package has them).
OMSI_NAV_LINES text - use app, app-mx Offscreen: open the city map's lines panel on the line with this number (a route, then a departure time, after semicolons: 5;1 or 5;1;14:07, which opens its timetable).
OMSI_NAV_MAP bool off use app, app-mx Open the navigation map.
OMSI_NAV_MAP_MPP num 2.5 use navigator, navigator-mx Navigation map zoom in metres per pixel.
OMSI_NAV_ORIENT text map use app, app-mx Offscreen: how the city map is turned: map (as it is drawn), north (real north up, where the package says it lies) or heading (the bus's heading up).
OMSI_NAV_PROBE text - use mapdraw, mapdraw-mx x,y[,r]: the network lanes that start or end within r of that point.
OMSI_NAV_SCHEDULE bool off use app, app-mx Navigation map shows the schedule.
OMSI_NO_MAP_CACHE bool off use scene, scene-mx Read the map's navigator layers (houses, ground, paving) again instead of from the cache.
OMSI_ONLY_MESH text - use scene, scene-mx a|b: draw only the meshes whose file names contain one of the parts.
OMSI_ONLY_OBJECT text - use scene, scene-mx Load only the objects whose file name contains this text.
OMSI_ONLY_SURFACES bool off frame render, render-mx Draw only the surfaces.
OMSI_ORBIT_DIST num 18 use app, app-mx Offscreen: the outside camera's distance from the vehicle in metres.
OMSI_ORIGINAL text - test sim vehicle_vars example: the original OMSI folder.
OMSI_PAX_CAM num - use app, app-mx Offscreen --view pax: the n-th passenger camera.
OMSI_PAX_CROSS text - use sim x,y: send pedestrians across the signalised crossing nearest that point.
OMSI_PAX_WAITING num - use sim Number of passengers waiting at each stop.
OMSI_PHOTO text - use app, app-mx Photo mode settings for a test, key=value by commas: orbit (dist, around, up), kmh (the bus moving), focal (mm), dof, fstop (f-number), focus (m; none: on the bus), motion, shutter (1/s), filter (0..10), vignette, grain, exposure (EV), aspect (0..7), grid (0..3), quality (0..3).
OMSI_PICK_BUSES text - use app, app-mx cargo test -p omsi-app installed_switches_stay_reachable_from_inside: more .bus files to check, by commas (under the root, or absolute).
OMSI_POPULATION_SHOTS bool off use app, app-mx Offscreen: pictures of the framed population spawns.
OMSI_PROBE text - use app, app-mx x0,y0,x1,y1[,n]: print terrain and road surface heights along a line.
OMSI_PROBE_GRID text - use app, app-mx x,y,half,step: the wheels' ground on a grid around a point.
OMSI_RECORD num - use app, app-mx Offscreen --drive: a picture every 1/this second into _frames/ and the run's mixed sound into .wav (films with sound).
OMSI_RECORD_FROM num 0 use app, app-mx With OMSI_RECORD: start the film this many seconds into the drive.
OMSI_RENDER_CLOCK num 0 use render, render-mx Seconds the animation clock starts on (offscreen pictures).
OMSI_RENDER_OCCLUDED bool off use app, app-mx Draw frames into a texture while the window is hidden (macOS gives none).
OMSI_ROAD_PHOTO bool off use app, app-mx Map check: photograph the road network from above and report grass where a carriageway should be.
OMSI_ROAD_PHOTO_N num 400 use app, app-mx With OMSI_ROAD_PHOTO: number of sample points.
OMSI_ROAD_PHOTO_SIDE num 0 use app, app-mx With OMSI_ROAD_PHOTO: metres to either side of the carriageway.
OMSI_ROAD_PHOTO_SLANT num - use app, app-mx With OMSI_ROAD_PHOTO: from a driver's eye this far back instead of from above.
OMSI_ROAD_SNOW_GRID bool off use scene, scene-mx With the roads' snow: a 4 m grid in the track field instead of the lanes' ruts (to see it lie on the world).
OMSI_ROAD_SNOW_LOG bool off use scene, scene-mx With the roads' snow: log its cover, the snow fallen, the weather and what it costs a frame (mean, worst, rut texels drawn) every ten seconds.
OMSI_SCENE_DIGEST bool off use app, app-mx Log a hash of the renderer's scene (its instances in order, their places, materials and parameters) before each offscreen picture: two runs whose renderers saw the same calls log the same digests.
OMSI_SEED num random use app, app-mx Seed of the scripts' random numbers (repeat a session).
OMSI_SHADER_HOT text - use render, render-mx Read the renderer's WGSL from this copy of a renderer crate's src folder (1: the source tree the game was built from), not the copy compiled in: trying shaders without a rebuild.
OMSI_SKIP_OBJECT text - use scene, scene-mx Leave out the objects whose file name contains this text.
OMSI_SKIP_PIPE text - frame render, render-mx Pipeline kinds to leave out of the main pass (comma-separated numbers).
OMSI_SPOT_SELECT num - use scene, scene-mx Turn on spotlight n (headlight pictures).
OMSI_TEST_AVATAR text - test sim Test only: an avatar FBX for the avatar loading test (cargo test -p omsi-sim a_rocketbox_avatar_loads -- --ignored).
OMSI_TEST_CLIPS text - test sim Test only: a folder of Rocketbox motion clips (f_walk_neutral_01.fbx, ...) for the clip test (cargo test -p omsi-sim rocketbox_clips -- --ignored, with OMSI_TEST_AVATAR).
OMSI_TEST_CONTENT text - test o3d, scene, scene-mx Content root for tests that need real OMSI content.
OMSI_TEST_LEGACY_TROLLEY_DRIVE bool off test sim Test only: set by the trolley test on the child process it starts to run itself with the realistic physics on.
OMSI_TEST_PACKAGE_MAP text - test launcher-model Test only: the global.cfg of a map that carries a package, for the launcher route map test (cargo test -p omsi-launcher-model the_package_of_a_real_map_is_exported -- --ignored).
OMSI_TEST_WINE_DIR text - test plugin Plugin demo test: folder holding omsi-plugin-host.exe for Wine.
OMSI_TOBII_RAW text - test input Tests: a file for the Tobii tracker's raw poses (record_the_tracker_here).
OMSI_TOBII_SECS num 8 test input Tests: how long the Tobii tracker is recorded.
OMSI_TOUCH bool off use app, app-mx The on-screen touch controls on a computer.
OMSI_TRIGGER_ALL bool off use app, app-mx Check: fire every [mouseevent] of the model and compare the variables before and after.
OMSI_TROLLEY_DEAD_AT text - use scene, scene-mx x,y,r;...: the overhead wire the map derives within r metres of each point carries no current (a dead section between two insulators).
OMSI_TROLLEY_HANDS text - use app, app-mx Offscreen: scripted hands on the poles' ropes, "from-to:raise|pull:poles" separated by ";" (seconds; poles 0, 1 or 01): the player aims at the wire behind the bus.
OMSI_TROLLEY_UP bool off use app, app-mx Start with the trolleybus's poles put on the wire by themselves (tests and demos).
OMSI_UI_PREVIEW text target/ui-preview.png use app, app-mx, plugin-ui, plugin-ui-mx Plugin UI preview test: the picture's path.
OMSI_VOICE_TEST_TONE text - use voice Voice chat: the microphone is a synthetic tone (1 = 440 Hz, or a pitch in Hz) and the device is never opened - tests of the whole chain without a person.
OMSI_WARM_FRAMES num 0 use app, app-mx Offscreen: frames drawn before the picture.
OMSI_WETNESS num weather use app, app-mx, scene, scene-mx Ground wetness the picture is drawn with.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open