Command Line Arguments

Overview

Sandbox accepts most of the same command line arguments as Launcher.exe, and also has the additional ability of loading .cry files parsed in the first parameter.

Command Line Arguments Example

The following input:

Launcher.exe -Arg1 -Arg2 ParamOfArg2 +Arg3 Param1OfArg3 Param2OfArg3 +Arg4 "ParamOfArg4" +Arg5 4-3+2 -Arg6

... will result in the following pre-commands (starting with a minus symbol (-); modify the startup behavior):

Arg1 Arg2 ParamOfArg2 Arg6

... and the following post-commands (starting with plus symbol (+); executed as console commands after initialization; all in the same frame):

Arg3 Param1OfArg3 Param2OfArg3
Arg4 "ParamOfArg4"
Arg5 4-3+2

Recognized Pre and Post Commands

Below you'll find a list of command-line arguments. If you have Engine and Game code, searching for "eCLAT_Pre" and "eCLAT-Post" should give you all of the available arguments.

PRE Commands

Usage (Prefixed with "-")

Description

DEVMODE

Editor.exe -DEVMODE

DEPRECATED - Devmode is enabled by default in all modes except for Release Pure-Game.
In DEVMODE, the lua debugger is disabled and the pak file system now prefers files outside the pak files.
The LUA command execution in the console is now allowed (by using the # prefix). CVars marked with the Cheat flag can be changed.

nodevmode

GameSDK -nodevmode

Disable devmode in pure-game mode, even in non-release builds.

DX9

Editor.exe -DX9

DEPRECATED - Use Direct3D 9 renderer (override the system.cfg setting).

DX11

Editor.exe -DX11

Use Direct3D 11 renderer (override the system.cfg setting).

MOD

Editor.exe -MOD MyMod

Loads a MOD DLL, instead of the standard game code. Adds the folder of the MOD to the data directories to search in.
MODs must be located in the <root>\Mods directory.

root

Editor.exe -root RootFolder

Overrides the default folder for log files (also, LogBackups), cfg files (for the exec command), and level rotation files.
This command line option is mostly used for 3rd party hosting, with multiple instances on the same machine support.

nomouse

Editor -nomouse

Disable mouse input.

lua_storedebug

Editor -lua_storedebug

noprompt

Editor -noprompt

Disable the message box.

autodetect

Editor -autodetect

Auto-detect system spec (overrides profile settings).

anygpu

Editor -anygpu

If CRYENGINE detects an unsupported GPU, you can specify whether to allow continued use or not.

LvlRes

Editor -LvlRes

All assets since executable start are recorded.

pakalias

Editor -pakalias

dedicated

dedicatedarbitrator

daemon

simple_console

logfile

ResetProfile

useamblecfg

Loads amble.cfg file for Stats Agent.

nodlc

Don't load DLC content.

g_multiplayerDefault

Set Multiplayer as the default game mode.

sv_bind

lt_pipename

Create pipe for Stats Agent.

skip_unit_tests

use_unit_test_excel_reporter

POST Commands

Usage (prefixed with "+")

Description

sys_no_crash_dialog

Dedicated +sys_no_crash_dialog

map

GameSDK +map Forest

Load a level automatically after system finishes initializing.

connect

GameSDK +connect <IP>

Connect to an IP address for multiplayer use.

client

Typical Use Cases

  • Set a console variable and load a map: Launcher.exe +r_displayinfo 1 +map Forest

  • Call a lua command: Launcher.exe +#System.DumpMemStats()

  • Run the game in a specific spec and set a CVar (console variables and commands are not case sensitive): Launcher.exe +loadconfig lowspec +r_displayinfo 1

Useful Console Variables

hud_startPaused

The game starts paused, waiting for user input.

fg_abortOnLoadError

Abort on load error of flowgraphs
2:abort, 1:dialog, 0:log only