UE4 Command-Line Arguments

来源:互联网 发布:谷歌学术镜像 知乎 编辑:程序博客网 时间:2024/04/29 19:00
On this page:
  • Modes
  • URL Parameters
    • General Options
    • Server Options
  • Switches
    • Developer
    • Rendering
    • Network
    • User
    • Server Switches
    • Game Stats/Database
    • INI/Config Files
    • Debugging
    • Misc.

Command-Line Arguments are strings of keywords that you can pass when running the executable via the command line or a shortcut to the executable. Their purpose is to customize the manner in which the engine runs to suit the needs of the developer or user. This can be as simple as causing the editor to run instead of the game, or it can be much more involved such as starting up the game with a certain map running at a specified resolution and framerate while dumping out each frame to individual image files.

Modes

These arguments are used to force the main editor executable (UE4Editor.exe) to run as the game or a server using uncooked content.

These commands are not case sensitive.

Example:

UE4Editor.exe -game
ArgumentDescription-gameLaunch the game using uncooked content.-serverRun the game as a server using uncooked content.

URL Parameters

URLs can be passed to the executable to force the game to load a specific map upon startup. These can also be used in conjunction with the SERVER or EDITOR modes to run the editor or a server with a specific map. Passing a URL is optional, but must immediately follow the executable name or any mode switch if one is present.

A URL consists of two parts: a map name or server IP address and a series of optional additional parameters. A map name can be any map located within the Maps directory. The inclusion of a file extension (i.e., .umap) here is optional. To load a map not found in the Maps directory, an absolute path or a relative path from the Maps directory can be used. In this case, the inclusion of the file extension is mandatory. The server IP address is a standard 4-part IP address consisting of 4 values between 0 and 255 separated by periods. The additional options are specified by appending them to the map name or server IP address. Each option is prefaced by a '?', and can set a value with '='. Starting an option with '-' will remove that option from the cached URL options.

Examples:

MyGame.exe /Game/Maps/MyMapUE4Editor.exe MyGame.uproject /Game/Maps/MyMap?game=MyGameInfo -gameUE4Editor.exe MyGame.uproject /Game/Maps/MyMap?listen -serverMyGame.exe 127.0.0.1

General Options

ArgumentDescriptiongameTells the engine what GameInfo class to use (overriding default).namePlayer name to use.

Server Options

ArgumentDescriptionlistenSpecify server as a listen server.bIsLanMatchSet whether multiplayer game is on the local network (e.g. bIsLanMatch=0).bIsFromInviteSpecifies that the player joining was invited.spectatoronlyStart the game in spectator mode.

Switches

These arguments can be passed to either the game or the editor, depending on the specific keyword and its intended usage. Some arguments are plain switches (i.e., -UNATTENDED) while others are setting switches which are "key=value" pairs (i.e., -LOG=MyLog.txt). These commands are not case sensitive. The syntax for passing plain switches is to preface each argument with a minus '-' and then the argument immediately afterward. Setting switches need no leading '-', with the exception of the server switches.

Example:

UE4Editor.exe -silent LOG=MyLog.txt

Developer

  • ABSLOG: Same as LOG= but without a filename length check.

  • ALLUSERS: Add the game for all users when INSTALLGE is specified.

  • AUTO: Assume yes on all questions. (for example during compile)

  • AUTOCHECKOUTPACKAGES: Automatically checkout packages that need to be saved.

  • AutomatedMapBuild: Perform an automated build of a specified map.

  • BIASCOMPRESSIONFORSIZE: Override compression settings with respect to size.

  • BUILDMACHINE: Set as build machine. Used for deciding if debug output is enabled.

  • BULKIMPORTINGSOUNDS: Use when importing sounds in bulk. (Content Browser specific)

  • CHECK_NATIVE_CLASS_SIZES: Enable checking of native class sizes. Note: Native classes on console platforms will cause native class size checks to fail even though they are assumed to be correct.

  • CODERMODE: Enables Coder mode.

  • COMPATSCALE: Set compatibility settings manually to override PCCompat tool settings.

  • CONFORMDIR: Directory to use when conforming packages.

  • COOKFORDEMO: Specify as cooking packages for the demo.

  • COOKPACKAGES: Tag to specify cooking packages.

  • CRASHREPORTS: Always report crashes of the engine.

  • D3DDEBUG: Use a d3d debug device.

  • DEBUG: Tells the engine to send debug info to the debugger, or build debug packages during script compile.

  • DEVCON: Disable secure connections for developers. (uses unencrypted sockets)

  • DUMPFILEIOSTATS: Track and log File IO statistics.

  • DUMPUDKSURVEY: Simply dump UDK hardware survey. No upload.

  • FATALSCRIPTWARNINGS: Treat script warnings from debugging as fatal.

  • FINAL_RELEASE: Set the FINAL_RELEASE macro for script compiling.

  • FIXEDSEED: Initialize the random number generator with a fixed value, 0.

  • FIXUPTANGENTS: Fix legacy tangents in distributions automatically.

  • FORCELOGFLUSH: Force a log flush after each line.

  • FORCEPVRTC: Force pvrtc texture compression for mobile platform.

  • FORCESOUNDRECOOK: Force a complete re-cook of all sounds.

  • GENERICBROWSER: Use the Generic Browser.

  • INCLUDEUTGAMECONTENT: Set UTGameContent packages to be loaded.

  • INSTALLED: For development purposes, run the game as if installed.

  • INSTALLFW / UNINSTALLFW: Set whether the handling of the firewall integration should be performed.

  • INSTALLGE: Add the game to the Game Explorer.

  • CULTUREFORCOOKING: Set language to be used for cooking.

  • LIGHTMASSDEBUG: Launch lightmass manually with -debug and allows lightmass to be executed multiple times.

  • LIGHTMASSSTATS: Force all lightmass agents to report detailed stats to the log.

  • LOG: When used as a switch (-log), opens a seperate window to display the contents of the log in real time. When used as a setting (LOG=filename.log), tells the engine to use the log filename of the string which immediately follows.

  • LOGTIMES: Print time with log output. (Default, same as setting LogTimes=True in the [LogFiles] section of *Engine.ini)

  • NOCONFORM: Tells the engine not to conform packages as they are compiled.

  • NOCONTENTBROWSER: Disable the Content Browser.

  • NOINNEREXCEPTION: Disables the exception handler within native C++.

  • NOLOADSTARTUPPACKAGES: Force startup packages not to be loaded. You can use this if objects in a startup package must be deleted from within the editor.

  • NOLOGTIMES: Do not print time with log output. (Same as setting LogTimes=False in the [LogFiles] section of *Engine.ini)

  • NOMODAUTOLOAD: Do not automatically load mod classes.

  • NOPAUSE: Close the log window automatically on exit.

  • NOPAUSEONSUCCESS: Close the log window automatically on exit as long as no errors were present.

  • NORC: Disable the remote control. Used for dedicated servers.

  • NOVERIFYGC: Do not verify garbage compiler assumptions.

  • NOWRITE: Disable output to log.

  • OUTPUTHEADERS: Force output of headers on script patch export.

  • SEEKFREELOADING: Only use cooked data.

  • SEEKFREEPACKAGEMAP: Override the package map with the seekfree (cooked) version.

  • SEEKFREELOADINGPCCONSOLE: Only use cooked data for PC console mode.

  • SEEKFREELOADINGSERVER: Only use cooked data for server.

  • SETTHREADNAMES: (Xbox only) Force thread names to be set. This can mess up the XDK COM API which is why it must be explicitly set to be performed if desired.

  • SHOWMISSINGLOC: If missing localized text, return error string instead of English text.

  • SILENT: Disable output and feedback.

  • TRACEANIMUSAGE: Trace animation usage.

  • TREATLOADWARNINGSASERRORS: Force load warnings to be treated as errors.

  • UNATTENDED: Set as unattended. Disable anything requiring feedback from user.

  • UNINSTALLGE: Remove the game from the Game Explorer.

  • USEUNPUBLISHED: Force packages in the Unpublished folder to be used. (deprecated?)

  • VADEBUG: Use the Visual Studio debugger interface.

  • VERBOSE: Set script compiler to use verbose output.

  • VERIFYGC: Force garbage compiler assumptions to be verified.

  • WARNINGSASERRORS: Treat warnings as errors

Rendering

  • ConsoleX: Horizontal position for console output window.

  • ConsoleY: Vertical position for console output window.

  • WinX: Set the horizontal position of the game window on the screen.

  • WinY: Set the vertical position of the game window on the screen.

  • ResX: Set horizontal resolution for game window.

  • ResY: Set vertical resolution for game window.

  • VSync: Activate the VSYNC via command line. (prevents tearing of the image but costs fps and causes input latency)

  • NoVSync: Deactivate the VSYNC via command line

  • BENCHMARK: Run game at fixed-step in order to process each frame without skipping any frames. This is useful in conjunction with DUMPMOVIE options.

  • DUMPMOVIE: Dump rendered frames to files using current resolution of game.

  • DUMPMOVIE_TILEDSHOT: Dump rendered frames to files using the specified resolution multiplier. Uses tiled shots for high resolution frames (e.g. DUMPMOVIE_TILEDSHOT=4).

  • EXEC: Executes the specified exec file.

  • FPS: Set the frames per second for benchmarking.

  • FULLSCREEN: Set game to run in fullscreen mode.

  • SECONDS: Set the maximum tick time.

  • WINDOWED: Set game to run in windowed mode.

Network

  • LANPLAY: Tells the engine to not cap client bandwidth when connecting to servers. Causes double the amount of server updates and can saturate client's bandwidth.

  • Limitclientticks: Force throttling of network updates.

  • MULTIHOME: Tells the engine to use a multihome address for networking.

  • NETWORKPROFILER: Enable network profiler tracking.

  • NOSTEAM: Set steamworks to not be used.

  • PORT: Tells the engine to use a specific port number.

  • PRIMARYNET: Affects how the engine handles network binding.

User

  • NOHOMEDIR: Override use of My Documents folder as home directory.

  • NOFORCEFEEDBACK: Disable force feedback in the engine.

  • NOSOUND: Disable any sound output from the engine.

  • NOSPLASH: Disable use of splash image when loading game.

  • NOTEXTURESTREAMING: Disable texture streaming. Highest quality textures are always loaded.

  • ONETHREAD: Run the engine using a single thread instead of multi-threading.

  • PATHS: Set what paths to use for testing wrangled content. Not used for shipping releases.

  • PREFERREDPROCESSOR: Set the thread affinity for a specific processor.

  • USEALLAVAILABLECORES: Force the use of all available cores on the target platform.

Server Switches

  • LOGIN: set username to use when logging in.

  • PASSWORD: set password to use when logging in.

Game Stats/Database

  • NODATABASE: Do not use database. Ignore database connection errors.

  • NOLIVETAGS: Skip loading unverified tag changes from SQL database. Only load for current user.

INI/Config Files

  • ENGLISHCOALESCED: Revert to the default (English) coalesced .ini if the language-localized version cannot be found.

  • NOAUTOINIUPDATE: Suppress prompts to update .ini files.

  • NOINI: Do not update the .ini files.

  • REGENERATEINIS: forces .ini files to be regenerated.

Another command line argument may be used to temporarily override which INIs are loaded by the game or editor. For example, if a custom 'MyGame.ini' is to be used instead of 'UDKGame.ini', the argument would be (i.e., -GAMEINI=MyGame.ini). This table lists the arguments used to override the different INI files used in UE4:

Commandline ArgumentINI OverrideDEFEDITORINI=Default EditorEDITORINI=EditorDEFEDITORUSERSETTINGSINI=Default EditorUserSettingsEDITORUSERSETTINGSINI=EditorUserSettingsDEFCOMPATINI=Default CompatCOMPATINI=CompatDEFLIGHTMASSINI=Default LightmassLIGHTMASSINI=LightmassDEFENGINEINI=Default EngineENGINEINI=EngineDEFGAMEINI=Default GameGAMEINI=GameDEFINPUTINI=Default InputINPUTINI=InputDEFUIINI=Default UIUIINI=UI

Debugging

  • BugLoc (e.g. BugLoc=(X=1798.8569,Y=475.9513,Z=-8.8500))

  • BugRot (e.g. BugRot=(Pitch=-1978,Yaw=-7197,Roll=0))

Misc.

  • timelimit (e.g. timelimit=[time])

  • goalscore (e.g. goalscore=[score])

  • numbots (e.g. numbots=[num])

0 0
原创粉丝点击