Garry's Mod

Garry's Mod

28 ratings
Launch parameters
By Zelloyn
Startup parameters for the game's launcher, and their explanations
   
Award
Favorite
Favorited
Unfavorite
Introduction
Readiness progress 25%/100%

Designations
// -Means NOT official information that is not on Valve Wiki, and also my comments.

** - Means information taken from Valve Wiki
Setting the game startup parameters
    Open your Steam library, right-click on Garry's Mod and select “Properties”













    Write all the necessary commands in the startup parameters













    The second option:
    Create a file with the .bat extension and put the following text in it:

@echo off
start "" "C:\Program Files (x86)\Steam\steam.exe" -applaunch 4000
exit

After -applaunch ****, enter the launch parameters with -or + after a space

    Or
@echo off
start D:\SteamLibrary\steamapps\common\GarrysMod\bin\gmod.exe ^
-console ^
-high

After ^ enter parameters from a new line

    Third option:
    Create a file with the extension .ps1 and put the following text in it:
Start-Process -Verb RunAs -FilePath "D:\SteamLibrary\steamapps\common\GarrysMod\bin\gmod.exe" -ArgumentList `
"-console",
"-high"
~~~Graphics/GPU~~~
-no_texture_stream
// Disables texture streaming. Completely disables loading of blurred textures without losing MIP maps
// Useful if you are using a powerful system that is not short on video memory.
-no_compressed_vvds
** Enables thin VVD data, even if the client is not an Xbox 360

// There will be increased utilization of ram and vram
VVD Valve Wiki
-shadersondemand
** Creates shaders on access, helps reduce D3D memory for tools, but causes I/O hitches.
-nouserclip
** Uses software clipping instead of hardware user clip planes

// FPS increase or decrease depends on your CPU + GPU and graphics API
// May cause problems when rendering some objects
-dxlevel
** Forces the game to start using specified DirectX feature levels
// Officially supported values: 60, 70, 80, 80, 81, 90, 91, 95 (recommended), 98 (Xbox 360 only).
-vulkan
** Enables the use of the DXVK library to translate Direct3D graphics calls to the Vulkan API.
-particles
** Sets the number of beam trails to allow (2048 by default, minimum is 512).
// You can use the value -1
-softparticlesdefaultoff
** Sets particles to be rendered without feathering (scene depth blending) by default.
-limitvsconst
** Limits the number of vertex shaders to a maximum of 256.
-refresh
** Force a specific refresh rate when running in fullscreen AND your monitor supports the frequency in question.
-force_vendor_id
There's information on Reddit
//Related to solving the problem:
ShaderAPIDX8::CreateD3DTexture: Invalid color format!
-force_device_id
There's information on Reddit
Related to solving the problem:
ShaderAPIDX8::CreateD3DTexture: Invalid color format!
-adapter:<adapter number>
** Sets the GL graphics adapter. Default is 0.

// Do not use this command, but instead use the menu of your graphics driver or install it by right-clicking the shortcut and choosing to run the game with the graphics card highlighted. e.g. --adapter:0 selects the first adapter
~~~Network~~~
-usetcp
** Disable TCP support
-reuse
** Reuse network sockets
~~~Memory/Ram~~~
-noasync
** Disables asynchronous filesystem access.

// Do not load resources at startup and disable background load threads. Completely disables asynchronous boot changes. Disables asynchronous file system access.

There's information on Reddit
-precachefontchars
// Xbox360 Pre-caches font rendering for common characters
-noforcemspd
** Forces the engine to use operating system mouse speed.

// Only works if the -useforcedmparms parameter is set
-noforcemaccel
** Use the Windows mouse acceleration settings. Only works if -useforcedmparms is set.
-nojoy
** Disables joystick support.

// Will remove joystick support from the game, which can free up RAM
-precachefontintlchars
// Descender from size metrics was too low for fonts with no lower case characters.
-preload
** Does the same as the sv_forcepreload Cvar. If -nopreload or -nopreloadmodels, this behaviour is disabled
-useforcedmparms
** Allows the use of -noforcemspd and -noforcemaccel.
-forcenovsync
** Forces vsync to be disabled
~~~Processor/CPU~~~
-swapcores
** Swaps threads for the particle and material systems each init
-threads
** Number of threads to allocate for the thread pool, default is 3
~~~Debug~~~
-vguifocus
** Enables debug VGUI messages related to input focus.

-vguimessages
** Enables debug VGUI messages.

-vproject
** Manually sets the VProject directory to load game content for tools.
-nominidumps
** Dont write minidumps
-nocrashdialog
** Stop some windows crash message boxes from showing up
-nosteamcontroller
** Disables Steam controller system

// Disables Steam controller, faster startup, less memory usage and fewer input conflicts
~~~Sound~~~
-primarysound
** If surround sound isn't enabled, forces the use of the primary sound buffer
// Tells the game to always use the direct hardware sound buffer (only works with 2 speakers or headphones). Reduces stuttering.
-snoforceformat
** Skips sound buffer creation

// Tells the game not to set the hardware format of the sound buffer. Reduces stuttering and solves some minor problems with the main sound.
-wavonly
** Disables DirectSound and makes the engine attempt to play all sounds in PCM format.
Gmod window settings
-windowed
** Forces the engine to start in Windowed mode.

-fullscreen
** The game will start in full-screen mode

-noborder
** When used with the game set to windowed mode, will make the game act as if in fullscreen mode (no window border), commonly refers to Borderless Windowed mode.
This will allows you to switching between application and the game (Alt+Tabbing) without a 2-3 seconds delay.

-width
** Forces the engine to start with resolution set to <width>. Ex: -w 1024

-height
** Forces the engine to start with resolution

-x <x position>
** In borderless windowed mode, determines where the window should be horizontally. Ex: -x 0. Note: Setting this to 0 will make it align with the left side of your main monitor, rather than its center. Negative values also aren't accepted.

-y <y position>
** In borderless windowed mode, determines where the window should be vertically. Ex: -y 0. Note: Setting this to 0 will make it align with the top side of your main monitor, rather than its center. Negative values also aren't accepted.
Parameters from Facepunch
-high
** Sets the game's priority to High

// This can unbalance resource utilization and reduce productivity. Use Steam Priority Launcher[github.com], to automatically set the game to the desired priority.
-disableluarefresh
** Disables Auto Refresh[wiki.facepunch.com]
-noaddons
** Temporarily disables folder/legacy addons
-noworkshop
** Temporarily disables Steam Workshop addons
-multirun
** Allows you to launch multiple instances of the game. You will not be able to connect to the same multiplayer server from both instances, unless the server has sv_lan set to 1.

Please note that the sv_lan 1 command must be set before the server is started or a changelevel is required.
server.cfg will not work, as it is ran too late!
-nochromium
** If on a Beta branch that runs Chromium, disables Chromium.
-allowlocalhttp
** Allows local IP links ( 192.168.x.x ) to be used with the http functions. This only works on the server.
-fullwindowsdump
** Generates more detailed crash dumps on Windows.
-language
** Overrides Steam's language setting for the primary game language, which controls captions and engine panels.
-nogammaramp
Override the in-game gamut with desktop settings.
// If you have an .icc calibration profile for your monitor, you will need it
~~~Xbox~~~
-xnet_bypass_security
** Disables Xbox 360 secure networking, to allow cross-platform testing.

-vxconsole
** Waits for Valve Xbox console to initialise. Xbox 360 only.

-norfs
** Forces Remote Filesystem disabled. Xbox 360 only.
List of parameters not working
-32bit
// Doesn't make the gmod in 32 bit


-r_emulate_gl
** Emulates OpenGL on Windows, provides a framerate boost for most GPUs
** Doesn't seems to work at all. RTSS and other overlays applications still report it as DirectX 9

// It used to work, now it doesn't, -gl doesn't work either
Others
-adapter // not tested
// Sets the GL graphics adapter. Default is 0.

-all_languages // not tested
** Loads all language files.

-allowdebug
** Allows for debug modules to be loaded in games that disable them and fakes a debugger for phonehome, and is the same as -dev, unless -nodev is specified.

-allowstalezip
** Suppresses console warnings from stale.txt existing.

-autoconfig
** Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed.

-basedir
** Sets the base directory for the game files. On Xbox 360 RFS, this is forced to smb://hostname/game.

-bi
** Defines the build identifier ID which is used in phonehome

-bugbait
** Used internally to tell the game it is loading a Bugbait (the name of the bug reporting system) bug report.

-bugreporterdll
** Name of the bug reporter DLL to use

-buildcubemaps
** Builds cubemaps when fully loaded into a map, then quits the game.

-ccsyntax
** Spew details about the localized strings we load.

-clientport
** Sets the client port. Default is 27002.

-collate
** Skips everything, just merges the reslist from temp folders to the final folder again.

-conclearlog
** Clears the console.log text file on start. Only works if -condebug set.

-condebug
** Logs all console output into the console.log text file.

-console
** Starts the game with the developer console enabled. Same as having con_enable enabled.

-deathsonly
** Supposed to only count deaths while parsing tf2 gamestats, but actually pointless because there is only code for deaths.

-debugdxsupport
** Writes debug DirectX information as keyvalues to the console as shader devices are loading configuration.

-defaultgamedir
** Fallback directory if "-game" is not set. Default is "hl2".

-dev
** Enables developer mode. Also disables the automatic loading of menu background maps and stops the quit dialog from appearing on exit.

-disallowhwmorph
** Same as mat_disablehwmorph 1. Disables HW morphing for particular mods.

-dti
** Prints the datatable when being sent

-dumpvidmemstats
** Spews video memory statistics to vidmemstats.txt. This forces CModelLoader to quit.

-dvd
** Enables strict DVD mode. Allows loading files from DVD only. Xbox 360 only.

-dvddev
** Enables developer DVD mode. Allows loading files from a remote path as a fallback as well as the DVD. Xbox 360 only.

-edit
** According to comments, intended to replace -tools. Does nothing except disable all file logging for building reslists.

-endgamevid
** If specified startup videos will not be skipped, and EndGameVids.txt will be used instead of StartupVids.txt. This can also be invoked by the command "startupmenu playendgamevid", which bails back to the menu and plays the end game video.

-exit
** Quits the game after fully loading into a map.

-filmgrain
** Enables the filmgrain screen space effect.

-floathdr
** Forces HDR to use float values
// DX10 settings

-flushlog
** Causes log files to be flushed to disk once per second (rather than after every 4kbytes of log data)

-forceallmips
** Always load mipmaps below 32x32, regardless of if the "no minimum mipmap" VTF flag is enabled.

-forcenovsync
** Forces vsync to be disabled.

-forcestartupmenu
** Forces the background menu map to always load, even if developer mode is active or the game is loading straight to a level.

-forcexboxreconfig
** Forces default config settings to be loaded on Xbox 360

-forever
** When you get to the end of the maplist, start over from the top

-fs_log
** Starts creating a batch file to copy files at the specified filename. This works on the latest engine branch.

-fs_logbins
** Logs binaries to the batch file from -fs_log.

-fs_nopreloaddata
** Loads in the precompiled keyvalues data for each type. Works only with dedicated servers.

-fs_target
** Sets the target game directory to copy files to, used with -fs_log.

-full_memory_dumps


-fullscreen or -full
** Forces the engine to start in fullscreen mode.

-g15
** Enables Logitech G15 support

-game
** Sets game or mod directory to load the game from. Usually is set by default if not user specified. Default is "-defaultgamedir"'s setting. If -defaultgamedir is not set, "hl2" is used.

-gamepadui


-gamestatslogging
** Enables game stats logging.

-gamestatsloggingtofile
** Enables game stats logging out to a file, gamestats.log. Passing this parameter automatically forces -gamestatslogging.

-gl_enablesamplerobjects
** (Linux) Use OpenGL Sampler Objects for better texture preloading

-gl_texclientstorage
** (MacOS) Reduce memory usage by relying on GPU memory instead of a host copy

-heapcheck
** (Windows only) Check if the heap isn't damaged or empty at the initiation of the game and every frame

-heapsize <kilobytes>
** Specifies the heapsize (in kilobyte) the game will use.

-hideconsole
** Forces the console hidden, whatever parameters are passed. This overrides -console, -dev, and all others.

-hijack
** Take control of an existing instance of the game, if any, instead of complaining about already running.
// The -hijack command prevents the launcher from objecting that there is already an instance of the game

-host
** Sets hostname. On Xbox 360, this sets the host computer name to be used for RFS. Xbox name must be <HostPC>_360.

-hushasserts
** Disables a number of asserts in core Source libraries, skipping some error checks and messages.

-hushsteam
**

-ignoredxsupportcfg
** Skips reading DirectX support file, dxsupport.cfg

-insecure
** Disable Valve Anti-Cheat (VAC).

-internalbuild
** Causes the bug reporter panel to be drawn as internal

-ip
** Does the same as the ipname Cvar

-language <language>
** Sets the game language to the one specified. (Examples: "english", "german").

-leakcheck
** Dumps statistics about memory leaks.

-log_opened_files
** Logs all opened files to opened_files.txt file. (useful for debugging which files are failing to load)

-low
** Sets the game's priority to Low

-makedevshots
** Used for taking screenshots, causing entities to not fade. Enables the use of the devshots_nextmap concommand

-makereslists
** Makes reslists. Need to run with -textmode. Passing a parameter here uses a script file to control more complex makereslists operations (multiple passes, etc.)

-mat_softwaretl
** Enables software vertex processing.

-mat_vsync
**Enables Vertical Sync

-maxdxlevel
** Limits the maximum dxlevel to use. Default is 0.

-maxplayers
** Set the maximum players allowed to join the server. This does the same as the maxplayers convar, the maximum you can set it to is limited by the game/mod.

-minmemory
** Set startup memory to mem_min_heapsize ?*1024 * 1024?

-navanalyze
** Used for developer purposes when launching a map. Immediately analyzes the navigation map of the loaded map to provide data about hiding spots and other data. Nav Mesh Commands

-navforceanalyze
** Used for developer purposes when launching a map. Forces an immediate navigation analyze even if the action is not necessary to perform.

-netspike
** Sets the trace threshold to the specified value (the limit of the number of records that will be written to netspike.txt before all records are removed).

-newdialogs
** Forces new Steam dialog to be used.

-noassert
** Allows attaching to a debugger instead of directly asserting.

-noasync
** Disables asynchronous filesystem access.

-noborder


-nobots
** Allows server hosts to force bots disabled to enforce CPU limits.
// If they pass in -nobots, don't allow bots. This is for people who host servers, to
// allow them to disallow bots to enforce CPU limits.

-nobreakpad
** Disable the Breakpad crash handler.

-noclearsave
** Skips clearing the save directory after restoring a save.

-nocrashdialog
** Stop some windows crash message boxes from showing up.

-nodev
** Disables -dev and -allowdebug during startup so sv_cheats and
Others 2
-nodns
** Disable DNS requests and resolving DNS adresses.

-nodttest
** Skips datatable testing

-noff
** Disables force feedback for controllers.
// Abort startup if user requests no joystick

-nogamedll
** Do not load the Game DLL, this most likely will cause your game/server to crash

-nogamepadui
** Overrides -gamepadui

-nogamestats
**
// If user has disabled stats tracking, do nothing

-nohltv
** Disable SourceTV

-noip
** Do not bind to an ip and disables all multiplayer support

-nojoy
** Disables joystick support.

-nomaster
** Hides server from master serverlist.

-nomessagebox
** Stop various windows error message boxes from showing up

-nominidumps
** Dont write minidumps

-nomouse
** Disables in-game mouse support

-NoLoadPluginsForClient
**

-nop4
** Forces the Engine to bypass Perforce Integration

-nopreload
** Forces models to not be preloaded. Takes priority over cl_forcepreload and -preload.

-nopreloadmodels
** Same as -nopreload

-nops2b
** Disables Pixel Shader 2b support.

-noqueuedload
** Disables queued loading of map resources.

-NoQueuedPacketThread
** (Linux) No queued packet thread will be created.

-norebuildaudio
** Opposite of and overrides -rebuildaudio for the map reslist generator.
// Never rebuild caches by default, inly do it in STATE_GENERATINGCACHES

-noshaderapi
** Loads a non-existent shader API dll, shaderapiempty.dll. Effectively disables shader and texture loading completely. May be useful with -textmode to load the game quickly since a GUI is not required.

-nosound
** Disables sound support

-nosrgb
** Disables support for SRGB.

-nostartupsound
** Disables menu music (sound/ui/gamestartup*.mp3) to play on startup.

-nosteamcontroller
Disables Steam controller system

-novid
** When loading a game with this parameter, the intro video will not play.

-NoVConfig
** Prevents the filesystem you nexem library from running VConfig if it encounters a filesystem error where it cannot find the game content.

-olddialogs
** Forces old Windows dialogs instead of new Steam ones.

-phonehome
** If debug mode is also enabled, forces the init of phonehome? which handles some build information and sends them via netmessages to steam?

-pidfile
** Use the specified <pidfile> to store the server pid. Default is srcds.pid[confirm] (Unix/Linux only).

-pixel_offset_x
** Sets the pixel offset to translate on the X axis in MatSystemSurface.

-pixel_offset_y
** Sets the pixel offset to translate on the Y axis in MatSystemSurface.

-playtest
** Tells the engine to record the names of all sounds played via S_StartSound call without any of the sound flags SND_CHANGE_PITCH, SND_CHANGE_VOL, and SND_STOP.

-pme
** Activate the performance monitoring events code, this again only works on Intel processors newer then PENTIUM4

-port
** Sets port for a listen server. Default is 27015

-preload
** Does the same as the sv_forcepreload Cvar. If -nopreload or -nopreloadmodels, this behaviour is disabled

-primarysound
** If surround sound isn't enabled, forces the use of the primary sound buffer

-profile
** If using Xbox360 or enabling this, additional debugging information are logged like the map startup time and similar

-publicbuild
** Is this build a public one? If not, phonehome will not post information of this build to steam

-r_emulate_gl
** Emulates OpenGL on Windows, provides a framerate boost for most GPUs

-random_invariant
** Forces the game's random number generator value to be invariant.
// Can't use COM_CheckParm here because it hasn't been set up yet

-rebuildaudio
** Forces rebuild of _other_rebuild.cache (metacache) file at exit for the map reslist generator.

-recapvid
** RecapVids.txt will be used instead of EndGameVids.txt. This can also be invoked by the command "startupmenu playrecapvid", which bails to the mainmenu and plays the recap video.
// This is a temp addition until the movie playback is centralized

-ref
** Sets MATERIAL_INIT_REFERENCE_RASTERIZER on the shader material adapter.

-remote
** Sets the remote file path to be used with -dvddev.

-replay
** Increases maxplayers by 1 at startup and automatically executes replay.cfg for the server.

-requirecubemaps
** If a map dosen't have cubemaps, the game will promt up with "Map X does not have cubemaps!"

-resizing
** Allows resizing the window lower than a specific resolution.

-reslistdir
** Default is "reslists", use this to override. Reslist generator only

-reuse
** Reuse network sockets

-rpt
** Remote perf testing. Same as having -condebug, -conclearlog, and -console enabled

-safe
** Enables video safe mode, which sets the game to windowed, the width to 640, the height to 480, refresh rate to default, and disables antialiasing.

-shader
** Loads a specific shader library instead of depending on hardware. Debug only.

-shaderdll
** Loads a different shader dll. Default is shaderapidx9.dll.

-shadersondemand
** Creates shaders on access, helps reduce D3D memory for tools, but causes I/O hitches.

-small
** Allow window sizing smaller than 640x480

-sndcachedebug
** Prints sound cache debug messages (developer must be enabled to see)

-snoforceformat
** Skips sound buffer creation

-soft
** Enables Software hardware rendering mode.

-softparticlesdefaultoff
** Sets particles to be rendered without feathering (scene depth blending) by default.

-softparticlesdefaulton
** Opposite of -softparticlesdefaultoff.

-spewsentences
** Spew out vox sentence names during reslist generation

-startmap
** Restarts devshot generation at the specified map if resuming from a crash.

-startstage
** When running from script file, this starts at specified stage, and sets current work item (default is 0). Reslist generator only.

-steam
** Enables Steam support (if the game is launched from Steam, this is enabled by default). Working directory must be Steam directory. Works only for singleplayer games.

-steamlocal
** Similar to -steam. Runs Steam in local filesystem mode (all content off HDD), as opposed to remote filesystem mode (requiring Steam backend).

-steamport
** Master server updater port. Steam authentication port is this port + 1. (default is 26900)

-strictportbind
** If you launch the game with this option it will quit with an error message if it can't bind to the default or specified port.

-sv_benchmark
** Enables benchmarking through sv_benchmark_force_start.

-tempcontent
** Searches for game content in a folder called "_tempcontent" relative to the absolute game path. This option is enabled by default for Portal 1

-testscript
** Loads a .vtest file.

-testshaders
** Loads the shader_test library. Debug only.

-textmessagedebug
** Spews client text messages to console.

-textmode
** Runs the game without graphics

-tickrate
** Sets the game tick interval.

-timedemoloop
**

-toconsole
** Starts the engine directly in the console, unless a map is specified with +map.

-tools
** Enables engine tools.

-trackdeletions
** Logs what files are marked for deletion in Reslist Generator.

-tvmasteronly
** Only one person allowed in HLTV.

-usedevshotsfile
** Get map list from specified file, default is to build for maps/*.bsp

-usegh
** Loads ghostinj.dll to allow support for third party dlls (gamehost)

-uselogdir
** Logs various data to logs/(mapname)/*

-usercon
** Enable RCON for Counter-Strike: Global Offensive servers

-usereslistfile
** Get map list from specified file, default is to build for maps/*.bsp. Reslist generator only.

-usetcp
** Disable TCP support

-vcrplayback
** Plays back a VCR recording. Nothing is simulated on the server, but all server packets are recorded. Note: VCR recording and playback only fully working on a leaked HLS build, other games and versions crash

-vcrrecord
** Records a client's game and allows you to play it back and reproduce it exactly. Requires -nosound
3 Comments
virgil 12 May, 2023 @ 9:15am 
Очень подробная и просто написанная информация, которую я нигде больше не видел, спасибо огромное автору.
KXMXIS #tweek 19 Apr, 2023 @ 10:14am 
постарался хорошенько
SRALKER 18 Mar, 2023 @ 4:07pm 
не работает команда -multirun ну или я делаю, что то не так