Files
larp/docs/environment-variables.md

12 KiB

CLI Commands & Environment Variables Reference


1. CLI Subcommands (larp.exe)

Command Description
larp.exe run "<game_exe>" --execute [--console series-x|series-s] [--stream-budget <MB>] Runs the title (normally invoked via series-s.cmd / series-x.cmd).
larp.exe nv-profile Shows the current NVIDIA driver shader heap (0x001ABC0F) setting for larp.exe (no Admin needed).
larp.exe nv-profile --mb 2048 (or 1024) Creates/updates the "Larp (shader heap)" NVIDIA driver profile (run from Administrator PowerShell/CMD).
larp.exe nv-profile --remove Removes the "Larp (shader heap)" NVIDIA profile (requires Administrator).
larp.exe zip-logs Bundles logs/*.log, options.ini, controls.ini, crashes.log, and settings.ini into Larp\logs\larp-logs-<timestamp>.zip with your Windows username stripped out.
larp.exe config Displays active LARP_GAME_DIR, LARP_CACHE_DIR, and LARP_DATA_DIR paths.

2. Environment Variables (LARP_*)

Set these in Larp\bin\launch.ps1 (or in your shell before running larp.exe run):

Input, Mouse & DualSense

Variable Values Default Description
LARP_CONTROLS auto, mnk, pad auto mnk forces PC Mouse & Keyboard mode; pad disables Raw Input mouse capture; auto uses KB+M until a gamepad is used.
LARP_MOUSE_SENS float (e.g. 1.0, 1.5) 1.0 Mouse look sensitivity multiplier (can also be set in controls.ini).
LARP_MOUSE_INVERT_Y 0, 1 0 Inverts vertical mouse look when 1.
LARP_WHEEL_SCROLL_INVERT 0, 1 0 Inverts scroll-wheel weapon/radio cycling direction.
LARP_VEHICLE_AUTO_CENTER 0, 1 1 Set 0 to keep the vehicle camera where you left it (no auto-center; build 1.0.2.1). Also vehicle_auto_center in controls.ini.
LARP_KEYBOARD_DRIVING 0, 1 0 Set 1 for keyboard driving: at the wheel W / S are gas / brake, Shift / Ctrl lean, right / left mouse buttons are LB / RB (build 1.0.2.1). Also keyboard_driving in controls.ini.
LARP_PROMPTS auto, playstation, keys, xbox auto In-game button icon style, chosen once at start. auto = key caps with LARP_CONTROLS=mnk or when no controller is connected, PlayStation symbols if a DualSense/DS4 is connected, otherwise Xbox; keys = PC keyboard key caps.
LARP_DS_TRIGGERS 0, 1 0 (1 in launch.ps1) Enables DualSense adaptive triggers over USB & Bluetooth.
LARP_DS_TRIGGER_RUMBLE 0, 1 0 Mirrors controller rumble onto DualSense triggers.
LARP_DS_LIGHTBAR RRGGBB hex or off blue Custom DualSense LED lightbar color (e.g. FF0080) or off.

Display, HDR, Upscaling & Frame Generation

Variable Values Default Description
LARP_DISPLAY_MODE windowed, borderless, fullscreen windowed Automatically enters Borderless or Exclusive Fullscreen at startup.
LARP_DISPLAY_REFRESH <Hz> (24..500) desktop Target refresh rate when LARP_DISPLAY_MODE=fullscreen.
LARP_DARK_TITLE auto, 1, 0 auto Applies Windows 10/11 dark title bar (auto follows system theme).
LARP_EXPOSURE -2.0 .. +2.0 0.0 Live brightness offset in EV (also adjustable live in the F10 menu).
LARP_HDR 0, 1 0 Enables native HDR10 (DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) when Windows HDR is on.
LARP_HDR_MAX_NITS 200..10000 EDID Overrides display peak luminance reported to the title in HDR10 mode.
LARP_HDR_PAPER_WHITE 80..500 150 SDR HUD / UI brightness in nits when LARP_HDR=1.
LARP_MFG_UNLOCKER 0, 1 0 Loads winmm.dll from mfg\ before D3D12/NGX init to unlock DLSS Frame Gen on RTX 30-series GPUs.
LARP_MFG_UNLOCKER_DLL <path> unset Explicit path to MFGUnlocker winmm.dll.
LARP_CVV 0, 1, off, on 0 (off) Opt-in NVIDIA NVAPI CPU-Visible VRAM (CVV) for NVIDIA GPUs with Resizable BAR / expanded BAR1 (> 256 MiB) when D3D12 GPU_UPLOAD is unavailable (e.g. RTX 20 Turing or Windows 10 / pre-24H2 RTX 30/40/50; also toggleable in F10 -> nvapi_cvv, applies on next start).
LARP_FG_HUDLESS 0, off, false, no to disable on Frame generation excludes the title's interface (DLSS-G HUDLess / FSR HUDLessColor) by capturing the frame before the UI composite. Set to 0 only if that capture misbehaves; frame generation then works as before it existed.
LARP_FG_PACE_MADE 0 to disable on Frame generation paces the shown frames from when the GPU has made the first generated one, not from the title's present. Before, the generated frame reached the screen a generation's GPU time late while the title's own frame kept its slot, so the gaps alternated short and long (judder at an even frame count). 0 restores the old timing.
LARP_FG_BACKEND ngx, streamline ngx Backend of DLSS frame generation. ngx is larp's own path (Windows and Wine alike). streamline is opt-in: NVIDIA Streamline (sl.interposer.dll + sl.dlss_g/sl.reflex/sl.pcl/sl.common, nvngx_dlssg.dll) is loaded before the device, the direct queue and swap chain are made through its proxies, and DLSS-G generates and paces frames at each present; Reflex then goes through Streamline. Without it, nothing of Streamline is loaded. Anything missing: a warning and the plain present.
LARP_STREAMLINE_DIR <path> first holding sl.interposer.dll of <exe>\streamline, <exe>\dlss, LARP_DLSS_PATH Streamline's folder (LARP_FG_BACKEND=streamline only).
LARP_STREAMLINE_VERIFY 0 to skip on Authenticode signature check of sl.interposer.dll before it is loaded (LARP_FG_BACKEND=streamline only).
LARP_STREAMLINE_LOG <folder> unset Streamline's own verbose log in that folder (LARP_FG_BACKEND=streamline only).
LARP_SL_BUFFERS 2..8 4 Back buffers of the swap chain while Streamline owns it (LARP_FG_BACKEND=streamline only).
LARP_DITTOSR_PATH <folder> dittosr\ beside larp.exe Folder holding DittoSR's amd_fidelityfx_dx12.dll (and its dittosr.ini): the upscaler dittosr and the frame generator ditto in the F10 menu. DittoSR's frame generation is given the frame without the interface and the interface is put back over its frames unmoved (off with LARP_FG_HUDLESS=0).
LARP_MOUSE_CAMERA direct, 1, native unset (right stick) Opt-in direct 1:1 mouse camera (no stick deadzone/smoothing) ported from Darner; LARP_MOUSE_CAMERA_SENS sets radians per mouse count (default 0.0015).
LARP_MAP_MOUSE 0 to disable on (mouse & keyboard) Mouse on the world map: click = waypoint, drag = pan, wheel = zoom, right click = back.
LARP_FIRST_PERSON 0, 1 0 The title's own first-person view (also the F10 first_person row and F7 in game). Game build 1.0.2.1 only.

Mods, AMD Workarounds, Performance & Diagnostics

Variable Values Default Description
LARP_NO_MODS 0, 1 0 Skips loading .dll/.asi files from mods\ when 1.
LARP_HOST_NAME <file name> (e.g. host.exe) unset From the start of run --execute until the mods are loaded (a winmm.dll proxy beside larp.exe, MFG Unlocker, mods\; a library loaded early, such as NVIDIA's, can pull the proxy in on its own), the process' main module goes by this file name, in the same folder, for mods that only start in a host program they know (GetModuleFileNameW(NULL) in their DllMain). Put back right after, so larp's own path is unchanged. winmm.dll is delay-loaded, so a proxy beside larp.exe is loaded by full path at that point instead of at process start; the log and the run summary name the winmm.dll in use.
LARP_TRAINER 0, 1 0 Maps Z-ROX shared controller-hold page at 0x5A52_4F58_0000.
LARP_AMD_GLASS_PREPASS 0, 1 0 Keeps breakable-glass shader cad3ecfdcdcf2a7d on AMD GPUs when 1 (skipped by default on AMD to prevent amdxc64 crash).
LARP_LEAVE_OUT <hash1>,<hash2> unset Comma-separated 16-hex-char shader hashes whose pipelines should be skipped.
LARP_PRELOAD_THREADS low, medium, high, max, <1..32> high (75%) Worker thread count for background shader/pipeline compilation.
LARP_PRELOAD 0, 1 0 Pipeline preload run: makes the pipelines earlier runs listed, saves the list and blobs, then exits before any input, so the next start's menu hold is short. LARP_PRELOAD_FLUSH_S (default 10) is the wait for the blob writer before exiting.
LARP_WORKER_STACK_MB 0, <1..1024> 64 under Wine, Rust default elsewhere Stack size of the pipeline worker threads. Under Wine, vkd3d-proton's DXIL to SPIR-V translation can recurse past the 2 MiB default. Reserved, not committed. 0 = Rust default (2 MiB).
LARP_GUARD_HOT <ms>, 0 20 under Wine, 0 elsewhere A guarded memory block the title writes again within this time of its guarding stays unguarded that long and is re-copied at each refresh instead. Fewer write faults and protection changes, which are far more costly under Wine. 0 = off.
LARP_WINE_NO_SPARSE 0, 1 1 under Wine, 0 elsewhere No reserved (tiled) buffers: ray tracing structure memory, the positions pool and streamed geometry buffers are made whole. Works around an NVIDIA driver GPU VA mapping failure under Proton + vkd3d-proton (intermapRegisterDmaMapping: Failed to insert new mapping node) that took the whole PC down. 0 = keep reserved buffers.
LARP_PIPELINE_WAIT_MS <ms> (e.g. 8) 0 (off) Opt-in per-frame wait budget (ms) for non-lasting graphics pipelines to eliminate shader-compilation hitches while driving.
LARP_LANGUAGE auto, en, de, fr, es, pl, pt-BR, tr, zh-CN, zh-TW auto (OS UI) UI/overlay/CLI language (also switchable live in the F10 menu or via --lang).
LARP_DSTORAGE_WORKERS <1..64> logical cores Worker thread count for DirectStorage decompression.
LARP_DSTORAGE_STAGING_MB <16..512> 32 DirectStorage staging buffer size in MiB for fast NVMe drives.
LARP_NO_ADVISOR 0, 1 0 Silences startup NVIDIA shader heap and XMP/EXPO RAM speed warnings.
LARP_D3D12_DEBUG 0, 1 0 Enables the Windows D3D12 debug layer (requires Graphics Tools optional feature).
LARP_D3D12_DRED set / unset unset Device-removed data: on a device removal the log names the command each list stopped at and the faulting GPU address. Small CPU cost.
LARP_BYTE_VIEWS 0 unset (on where supported) 0 makes every buffer view by element instead of ID3D12Device15::TryCreateShaderResourceView byte-offset views. For bisecting 0x887A0005.
LARP_SHADER_REPLACE <folder>, 0 bin\shader-replace Folder of replacement shaders; 0 runs every shader as translated (no folder needed). For bisecting 0x887A0005.
LARP_FAST_HEAP_TABLES 0/off to disable (takes effect on restart) on Fast-path (list.id(), heaps) cache check in draw::State::heap_buffers and view_shifts.
LARP_OPT_COPY_BATCH 0/off to disable (takes effect on restart) on Unifies disjoint pieces_send + small_send + heapfeed copies into one copy_send, sorts/coalesces contiguous copies, and orders overlapping runs on one ID3D12GraphicsCommandList7 with a COPY_DEST global enhanced barrier.
LARP_OPT_VIEW_MIRROR 0/off to disable (takes effect on restart) on Skips redundant null_for D3D12 calls via per-slot null_kind, shadows strides to avoid no-op WC GPU memory flushes, and uses a lock-free is_buffer bitset in HostHeap::note_buffer (on top of 64-stripe HostHeap::made).
LARP_OPT_LIST_REUSE 0/off to disable (takes effect on restart) on Skips redundant HostList::clear() in HostList::reset() on already-released lists, guards empty own_back(), and batches SPARE_STATES/IDLE locks in list::recycle().
LARP_OPT_RELEASE_HELD 0/off to disable (takes effect on restart) on Skips contending on RELEASING during speculative queue::release_held calls (try_lock + RECHECK handoff), and drops completed release-only COM uploads/shadows on a bounded low-priority larp-reaper thread.