Complete Command-Line Arguments Guide

MindWorX

Tool Moderator
Level 17
Joined
Aug 3, 2004
Messages
681
These are the commands that are currently supported by Warcraft III, based on known information and some clever reverse engineering of the executables.

Commands
Video Mode
Changing the video mode can sometimes be used to increase performance or make Warcraft III run better in other environments like Wine.

  • d3d (Starts the game using Direct3D. This is the default.). DEPRECATED AS OF 1.29 SEE BELOW
  • opengl (Starts the game using Open Graphics Library.) DEPRECATED AS OF 1.29 SEE BELOW
  • swtnl (Starts the game using Software Transform and Lighting). DEPRECATED AS OF 1.29 SEE BELOW
  • graphicsapi <option> (This replaced d3d and opengl, and should be used with one of the options below)
    • OpenGL2 (Works as the old opengl)
    • OpenGL4 (CRASHES THE GAME)
    • Direct3D9 (Works as the old d3d, still the default)
    • Direct3D11 (CRASHES THE GAME)
    • Direct3D12 (CRASHES THE GAME)
    • Metal2 (CRASHES THE GAME)
    • Null (CRASHES THE GAME)
Window State
This controls if the game is in fullscreen or windowed mode.
  • fullscreen (Starts the game in fake fullscreen mode. - default)
  • window (Starts the game in windowed mode.)
  • nativefullscr (Starts the game in normal fullscreen mode.)
  • nowfpause (Stops the game from pausing when the window loses focus, useful for testing)
Reign of Chaos
This simply controls whether the game runs as Reign of Chaos (classic) or The Frozen Throne.

  • classic
Quick Start
This allows you to instantly start a replay or a map without going through the menu.
  • loadfile <path> (Specifies which file to load, the file must be in a subdirectory of your Warcraft III installation. This also works with the editor.)
Modding
This is a single command that allows you to load all resources from a different directory. Useful for things like total conversions.[/SIZE]
  • datadir <path>
Undocumented
  • gametype <string> (It is unknown what this command does, but it works with loadfile and must be a number.)
  • crash (Instantly crashes the game, maybe used to test the error reporter)
  • assert
  • locale <locale> (Appears to change the game from English to another language)
  • rockey <key> (Possibly sets the Reign of Chaos CD-Key)
  • tftkey <key> (Possible sets the The Frozen Throne CD-Key)
  • plugindir <path?> (Are we getting plugins)
  • routerconfig <string>
  • routerapp

Examples
To use this, simply create a shortcut to War3.exe and in Properties->Shortcut, modify the Target.

  • "C:\Games\Warcraft III\Warcraft III.exe" -window (Starts the game in windowed mode.)
  • "C:\Games\Warcraft III\Warcraft III.exe" -window -graphicsapi OpenGL2 (Starts the game in windowed mode with OpenGL rendering.)
  • "C:\Games\Warcraft III\Warcraft III.exe" -loadfile "C:\Games\Warcraft III\Maps\(2)BootyBay.w3m"
 
Last edited:
Level 7
Joined
Mar 10, 2013
Messages
365
Can someone explain the "quick start" to me a little more? I'm not sure I get it.
You can call it as a command-line (or as he suggests, creating a shortcut) as, for example:
"C:\Games\Warcraft III\War3.exe" -loadfile "C:\Games\Warcraft III\Replays\LastReplay.w3g"
 
Last edited:
Level 7
Joined
Mar 10, 2013
Messages
365
Ah, so (ignoring replays because I don't care), I can take any arbitrary map & either make a shortcut to run it from, say, the desktop... Or run it from the command line?
Not map, the path must point to a replay file, but yes, it is.
 

MindWorX

Tool Moderator
Level 17
Joined
Aug 3, 2004
Messages
681
It doesn't have to be a replay, works with maps as well. Worldedit uses -loadfile to start testmaps. The only caveat is that maps have to be in the same directory or a subdirectory of war3.exe. I'm guessing some testing will be needed now that everything has changed with the recent patches.
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
Thanks a lot. Much appreciated.
:thumbs_up:

Examples
To use this, simply create a shortcut to War3.exe and in Properties->Shortcut, modify the Target.

  • "C:\Games\Warcraft III\War3.exe" -window (Starts the game in windowed mode.)
  • "C:\Games\Warcraft III\War3.exe" -window -opengl (Starts the game in windowed mode with OpenGL rendering.)
Maybe this paragraph could also be updated / expanded for v1.29+?
 

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,945
Holy cow, I'm just now reading all of this, and this caught my eye:

Modding
This is a single command that allows you to load all resources from a different directory. Useful for things like total conversions.[/SIZE]
  • datadir <path>
*What?* Am I reading this right? "Resources" as in "custom imported resources"??
 

MindWorX

Tool Moderator
Level 17
Joined
Aug 3, 2004
Messages
681
*What?* Am I reading this right? "Resources" as in "custom imported resources"??
More like, you supply your own war3.mpq, war3x.mpq, etc and the game uses that to load instead of the files in the installation dir. It's a very big task to actually use it. I'm guessing it has been used internally for testing.
The new plugindir stuff might be interesting though. It appeared in 1.29, but is undocumented still. Might mean we get some way to add plugins in the future.
 

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,945
More like, you supply your own war3.mpq, war3x.mpq, etc and the game uses that to load instead of the files in the installation dir. It's a very big task to actually use it. I'm guessing it has been used internally for testing.
The new plugindir stuff might be interesting though. It appeared in 1.29, but is undocumented still. Might mean we get some way to add plugins in the future.
I don't know what plugins are, really, or what they could be used for. But I'm *very* interested in that bit about custom MPQs, since that's a big part of what I'm using for my projects (which, if I'm not mistaken (??) was deprecated with a recent Patch)... Is *that* a method to avoid getting in the way of the Battle.net verifier? Or to replace SEMPQs?

And even if not, I suppose it could still be really great for testing my custom MPQs myself, dynamically, without needing to physically replace my standard MPQs.

Am I reading that right? (Can't test now, at work)
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
Command Line and In-Game Options for Classic Games


Now I am soooooo confused:

command.jpg

:eekani:
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
Level 9
Joined
Feb 25, 2013
Messages
105
There are other command line arguments, and there have been other ones left undocumented from the 2016 era too, like all the commands used when running a map from the command line, and the very important -launch to launch the game through the exe directly in 1.32.x. Other than this there are some miscellaneous arguments that are unlikely to be very useful to us. A probably outdated but more complete list I have is as follows (I also don't guarantee my values for the arguments nor the arguments themselves are fully correct, but the map testing ones should be and you can instead see the HiveWE code for it for a guaranteed to be correct reference):
2018-08-13:
d3d
swtnl
assert
datadir
buildinfo
loadfile
gametype
locale
rockey
tftkey
nowfpause
plugin
worldeditplugindir
graphicsapi
routerconfig
routerapp
enablenagle
automation
errordir

2020-05-05
launch
crash
sso
loadfile
gametype (none/versus/custom/replays/campaign)
region (us/eu/kr/tw/cn/sg/xx)
locale
audiolocale
teen (0/1)
hd (0/1)
windowmode (windowed/windowedfullscreen/fullscreen)
width
height
vsync
nowfpause
plugin
graphicsapi
soundapi
csdk-aurora-dnsname
csdk-gameutil-filter
enablenagle
audioquality
routerconfig
routerapp
automation
errordir
mapdiff (difficulty number)
testmapprofile (profile name)
fixedseed
scriptingenginevm
 
Level 9
Joined
Feb 25, 2013
Messages
105
When using arguments, be sure to watch out for those that require additional values for them, like loadfile, mapdiff, and testmapprofile.

"E:\Warcraft III 1.26.0 backup\War3.exe" -window -loadfile "Maps\Test\WorldEditTestMap.w3m" would be what 1.26 would use to start up a map located under "E:\Warcraft III 1.26.0 backup\Maps\Test\WorldEditTestMap.w3m". As 1.26 is an ancient version it doesn't allow for testmapprofile, mapdiff and many other arguments to be passed on the command line and the value passed to -loadfile must be under the game's install directory and has to be a relative path.
 
Level 21
Joined
Feb 27, 2015
Messages
258
@Bogdan3 i tried using -window -nowfpause and the first command worked but the second one didn't
i swapped them around and they both didn't work
then i tried using the -graphicsapi Null just to see if it crashes and it didn't
now i tried -window -loadfile with a relative path and both of those lines worked
i'm only interested in -nowfpause and it looks like it doesn't work on 1.26, oh well
 

pyf

pyf

Level 31
Joined
Mar 21, 2016
Messages
2,989
[...] and the very important -launch to launch the game through the exe directly in 1.32.x [...]
@Bogdan3: Yeah, I am myself using that one with StarCraft. It is very useful and fit for that game, because its free content never expires, and also because I do not play online. This is why I am still at v1.23.6

[...] i'm only interested in -nowfpause and it looks like it doesn't work on 1.26, oh well
Nowfpause is one of the commands that do not work in 1.26, that is correct. The Window focus pause toggle probably wasn't even a thing back then - I'd not suppose it existed before 1.29.
@tillinghast: please see if it has been implemented in Warcraft Feature Extender. If not, then maybe you can post something about -nowfpause in its support thread, in the hopes the author might be interested in it?
 
Top