Repository navigation
Debug Options
The game's retail build keeps a table of about 540 developer command-line options, registered as inactive stubs. LARecomp reactivates them: a text file lists the ones to turn on, and some performance cvars drive a few of them. Source: src/mc_engine/hooks/dev_options.cpp, src/mc_engine/menus/debug_options_table.inc.
These options belong to the game, not to LARecomp, and the repository has no description for almost any of them. Names are listed below for completeness; effects are "undocumented" except where the code states one.
Put the file in the process working directory. The code reads it from the current directory; the header comment of the source file says the executable folder, and the two are the same when the game is started from its own folder. It is read at startup.
Format:
- One option per line:
nameorname=value. A bare name means the value1. -
#and;start a comment, anywhere on the line. Blank lines are ignored. - Whitespace around the name and value is trimmed.
- If the same option appears twice, the last one wins.
# example
unlockall
showframerate
Names are matched exactly (case-sensitive) against the table below. An unknown name is logged and skipped:
[DbgOpt] unknown option 'name'
Log lines for a good run:
[DbgOpt] queued <name> = <value> (node+4 @ 0x........)
[DbgOpt] queued N option(s) from file, M unknown
[DbgOpt] applied node+4 @ 0x........ = <value>
Options are applied when the game registers them, before anything reads them. They are load-time settings; the source says a value written after boot would be too late. If the scratch memory cannot be made writable, all options are disabled: [DbgOpt] cannot make scratch ... writable; dev options disabled. If it fills up: [DbgOpt] scratch full, dropping ....
These performance cvars are backed by a developer option. When the cvar is true the option is set to 1. A file value for the same option is left alone while the cvar is off.
| Cvar | Option | Menu row |
|---|---|---|
perf_no_race_shadows |
noraceshadows |
none |
perf_fast_vehicle_shadows |
fastVehShadows |
DEBUG > PERFORMANCE > CHEAP CAR SHADOW |
perf_no_impostors |
noimpostors |
none (launch argument) |
perf_no_trees |
notrees |
DEBUG > PERFORMANCE > FOLIAGE |
perf_no_fullscreen_blur |
nofsblur |
none (launch argument) |
The rows are on the hidden DEBUG menu (see Settings Reference); the switches that are only read at start are launch arguments, for example larecomp.exe --perf_no_impostors=true.
Notes from the code:
-
noimpostorsandnotreesare load-time: they skip creating render targets and the whole prop parse. The cvar value is kept in sync every frame, so a change applies the next time that system loads (a district change or a world reload) rather than needing a process restart. -
perf_no_shadowsis not in this list: it edits a render phase mask directly each frame and takes hold without a restart. - The option
rearviewis forced on for the whole session so the rear view mirror's meshes load; showing and hiding the mirror is the job of therearviewcvar. See Settings Reference.
Builds made with the CMake option LARECOMP_DEV_TOOLS=ON (off by default, so not in a release) have two keys for judging a graphics effect at the same spot. F1 (bind_mcla_compare) flips the selected effect the other way than your setting has it; F12 (bind_mcla_compare_next) selects the next effect: bounce light, contact shadows, sun shafts, ambient occlusion, shadow filter, self-reflections, then the first again. A label at the top of the screen says what the picture shows. Nothing is saved: the flip is dropped when the setting it flips is changed or another effect is selected.
The selection is the cvar mcla_compare_effect (debug only; F4 and the command line set it too, and only they can select bloom, the glow size fix). mcla_compare_label_seconds is how long the label stays up. Without the option there is no key, no setting and no code, and the pause menu has no row for any of it. Source: src/mc_engine/display/effect_compare.cpp, CMakeLists.txt; the cvars are in Settings Renderer Advanced.
The [gpu] scene (interval) log line breaks GPU wait time into present call, frame fence, image acquisition and present slot time, in milliseconds per frame. For D3D12 testing in a locked or screenless session, start with --debug_menu --mcla_test_present_nowait=true and frame generation off. This debug switch defaults to OFF and is read at startup. When DXGI cannot present immediately, the display skips that image and the renderer keeps the frame's fence. The log reports dropped_present_count and dropped_present_total.
On Windows with separate rendering and display GPUs, the native renderer can skip a busy display update with VSync, present wait and frame generation off. For A/B testing use DEBUG > PERFORMANCE > CROSS-ADAPTER PRESENT FIX. The log reports [gpu] present topology and [gpu] present path. Vulkan can still wait inside the display driver.
When the graphics device is lost, the log can include Direct3D 12 or Vulkan fault details and the last named graphics passes. DEBUG > LOGGING > GPU CRASH DIAG (RESTART) defaults to AUTO, which collects extra detail on the launch after device loss. Include the main log when reporting a GPU crash.
A graphics pipeline failure can also report the Direct3D 12 or Vulkan error code. Keep the nearby validation messages with the failure line.
Set mcla_capture_buffers before starting a take to write raw renderer buffers under buffers/ in the take folder. Use all or a selection of final,hdr,ao,refl,gi,class,motion,reflhit,roadrefl,vol,shafts. By default it is off. Set mcla_capture_buffer_every to sample frame 0 and every Nth frame after it. Set mcla_capture_buffer_region=rects to crop to the bounding rectangle of the scene capture key's rectangles. The default captures each selected buffer in full. A take with sink none can still write the buffers. See the capture formats.
Use reflhit for reflection hit types and roadrefl for the game's road reflection. Use vol or shafts to capture light beams or sunbeams separately.
For PNG takes used in noise comparisons, mcla_capture_luma=full or mcla_capture_luma=x,y,width,height writes a lossless luma stream with up to three colour previews. All four settings are read at the start of a take.
For x64 Windows source builds with clang-cl, configure with -DLARECOMP_ASAN=ON to check host code and Plume for memory errors. The option defaults to OFF. The generated game code and SDK are outside its scope. The build copies the sanitizer runtime and llvm-symbolizer.exe beside the executable. Reports use asan.<pid> in the working directory by default. See the project's build instructions.
540 unique names, from src/mc_engine/menus/debug_options_table.inc. The comment in that file says 541 stubs. All are undocumented in this repository apart from the six named above.
addplayerwidgets aimodvalue aimodvalue1 aimodvalue2 aimodvalue3 aimodvalue4 aimodvalue5
aimodvalue6 aimodvalue7 aimodvalue8 AIOverrideTuning aivperf allagro allambientcars
allambientpeds allgrip allroar allsignalsgreen allvirtual allzone ambientcarspawncenter
ambientlayerthread ambientpedspawncenter ambienttype animmachineprint animplayerasopponent
ao appname archive assumelosonspawning assumelosonunspawning assumenolosonspawning
assumenolosonunspawning ati audio audioocclusion audiooutputchannels audiorpfdir
audiotestslot autokick autoprogress autorunpasses bikefakehispeed bikeforcelowturnsweep
blockuntilidle bootscript breakonaddr breakonalloc breakonbucket bypasscutscenecam
camfocus campos capturestart capturestop car car1 careerDebugLvl carname carName
carname1 cheapaudioeffects cinefixedframe cinerealtime city cleardiskcache clearhddcache
collapsechild colorexpbias commandbuffer controlcfg1 controlcfg2 cop countscriptthreads
createchild ctfAllBombs ctfFlagLimit ctfTimeLimit cutsceneindex cutsceneshadows
cyclegamefe cyclelods d3dsinglestep damagespew debugcamcuts debugcharactercuts
debugcruisingroutes debugoccluders debugrailnet debugshaders deletesave demo
devautotrans devmanualtrans devmenus devonlycars devonlyraces disablebreakingimpulses
disablecarcommandbuffers disablefemdriveranim disableopponenthires disablepreracetaunt
disablereadahead disablesave disableStatUpload displaystreamingqueue dongle
drawablecontainersize drawcheckpoints drawcorridor drawdistance drawfollow drawobstacles
drawraceline drawwindowclipplane dumpleaks dynmixerwidgets ekg emulatevehvis
enablehqrender eventdebuginfo extracarname extrad3dmem extraheapmem extraoversample
ezdamage fakedlcreboot fakerez fastdraw fastrez fastVehShadows fixedSizeCarConfigExport
fixedtrafficboxlength fixedtrafficboxwidth flashdesignertraffic force_aclass force_bclass
force_cclass force_dclass forcebigsession forcebootcd forcecaminterest forcediskcache
forcefemdriver forceheadless forceidentityface forceidentitypose forceplayeraudioocclusion
forcePowerupsOn forcepreracetaunt forcereadahead forcesubtitles forcezeropose fpz
fragcachewarn fragdebug fragdebug2 fraggeo fragresdir fragtune framelock framerate
frametime fullscreen fullsoundhierarchy fullstreamingspew gfxcapturestart gfxcapturestop
globalroaddensity hdr height hidewindow hudflash hydraulics ignoreazimuth keepTelem
lang latestaudio layerDebug layerHeapSanity layout layoutmode leaktest level
LoadAllCityPages loadcustomcontrols loadmaterials loadreplay localbank localCtfTune
localexplosiontuning localhost locallighttuning localMcNetTune localpoweruptuning
localshaders localsubtitles localuimeshes localuitune logallocstack logmemory logopen
logstart logstop lowrescity makeswf manualtrans marketing maskneck maxarcadeopponents
maxtexturesize measure memtunearchive minimach missingfilesarefatal mission modvalue
money multisample musicmanager netAllowOneRacerRaces netAutoConnect netCxnMgrWarning
netDebug netDebugPolicies netdemo netDisableAutoJoinOwnRace netFakeDrop netFakeLatency
nethost netjoin netLog netLogHDD netmaxpeers netMaxPlayers netNoDeltaComp netPort
netPowerupsInRaces netRandomHostMigrations netRequestRaceDelay netShowDebug netTightLogon
netVersion netwait netWaitTimeForLoad noaa noai noaiburnout noainitro noairevving
noalloccharinstondemand noambientdamage noambientlayer noambientspawn noambientunspawn
noao noaudio noaudioocclusion noaudiorpfs noaudiothread noautomatictraffic
nobasecategory nobikeshifting noblendshapes noburnout nocamwidgets nocardrivers nocareer
nocarparts noCharCloth nocineanimpacks nocinematics nocitypaging nocommandbuffers nocpv
nocpvs nocsprobeslope nocutscenes nodamage nodevmenus nodownloadablecontent
nodrawablecontainer noeclecticmusic noelectronicmusic noEnvCloth nofeedback
nofragarticulation nofragbreak nofreewayoptimization nofsblur nogaragewidgets nogfxonly
nographics nohangoutpeds nohardrockmusic nohdcaching nohddcache noheadless nohiphopmusic
nohwtnl noimpostors noloadaudio noloadmovie nolod nolookatoverlay nomaskcameratrans
nomenutocam nomixface nomotionblur nomousepointer nomtstreamingqueue nomusic noocclusion
noparkedcars noparticles nopeds nopoliceradio nopowerup noprops nopvs noraceshadows
noracestarter noragdoll norockmusic nort norubberband nosave noscripts noshaderpatching
noshadows nosharingrendertargetmem nospecialabilities nospeechmissingasset nospuaudio
nospucollide nossttrail nostringBAM noswapearly notechnomusic nothreadai notitlestorage
notraffic notrafficaudio notrafficclearing notrafficssd notrees notreeshadows
notriggeredintersections notriggeredroaddensity notriggeredtraffic notuneparticles
notutorials noumbra novblank nowaveslots nowestrapmusic nowind nullhardware
numcontactgroups numcontacts numcontactspergroup numlaps numopponents numviews
oneambient oneofeachambient oneprop onlyproxyambients oppcarname oppcarname1 oppcarname2
oppcarname3 oppcarname4 oppcarname5 oppcarname6 oppdifficulty opponent opponentaudio
opponentcharname1 opponentcharname2 opponentcharname3 opponentcharname4 opponentcharname5
opponentcharname6 opponentdamage opponentmod orthoheight outputLogFile particleaudiospew
partLoadWait path pedaudioname peds pedsonline physicsupdates pixannotation
playercharname1 playercharname2 playercharname3 playercharname4 playercharname5
playercharname6 playercharname7 playercharname8 players pneumatics
policespeechfullroadspew powerconsole preracecutscene presentflags pretendwheel
printmissioninfo printracenames prop propaudiospew props ptxtexdict purchasedflags pvs
quitonleak quitonload racecopchase raceeditor racename rag ragAddr ragviewer
randomseed rawanimpack rawcartype rawlayout rawlighting rawMcUiClassTune rawparticles
rawprops rawrailnet realtime rearview recordrace recordracedir recordracetimes
redeliver regenfragdistricts regenfrags remotebank rlDebug rmptfxpath rtspew rubberband
savereplay savevinyls script separatedevcams shadows shortreplay showframerate
showmemory showpickups showstreammem showstreamq simplesimonly snuCpu spawnaroundcamera
spewhandlebardebug spewsongnames spuCityCull spucollide srgb startPos stateLoadEcho
staticTOD stoponclosedroads stringid stringspew subtitles swapearly synchronous
teammode test16 test4xAA testprop testragdoll testroute testspeedculldriveranim
testtrailers timeofday topmost tracesize tuneagro tunecharshaders tunecheckpointcolors
tunegrip tunelicenseplates tunelocalcheckpoints tuneprops tunepulse tunerims tuneroar
tunexml tunezone twenty uispew umbra unlimitedainitrous unlimiteddamage
UnlimitedNitrous unlimitednitrous unlimitedspecial unlockabilities unlockall unlockcareer
unlockcities unlockcustomization unlockdifficulty unlockgarage unlockinsanity unlockparts
unlockperformance unlockperfupgrades unlockraces unlockspecialabilities unlockvehicles
usenightlod useoldstreaming useragecache validatephysics verifyallanimtracks verifyanim
verifyblendshapes verifyfaceanimtracks vhsmspew voicecapture warnonbadrefs weather width
windowed xaudiothreads xlspenumbaseattempts xlspenumdelayms xlspenumgrowattempts
xlspsgfilter
LARecomp
Settings
Game Features
Mods
Content Modding
Development
Online
Server Hosting