Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Launch options

Launch options are the words you add after the program name when you start NNBuild. This page lists them by purpose.

vibebuild32 --game duke --skip-menu --volume 1 --level 3

How options are read

NNBuild reads options in two steps.

  1. The launcher runs first. It is the same for every game. It picks the game, handles the options marked All below, and rewrites a few options so that every game understands them.
  2. The runtime of the chosen game reads the rest. A runtime is the part of NNBuild that runs one game or one family of games. Each runtime has its own options.

The tables use these names for the runtimes:

Name in the tablesGames
DukeDuke Nukem 3D, World Tour, Ion Fury, NAM, NAPALM, WWII GI
SWShadow Warrior
BloodBlood
RRRedneck Rampage
ExhumedExhumed / PowerSlave
AllHandled by the launcher, for every game

Writing options

  • Long names start with two dashes (--game). Short names start with one (-gm).
  • A value follows its option as the next word: --game duke. You can also write --game=duke.
  • Some short options accept the value attached: -l3, -v1, -g/path/file.grp, -res1280x720. Where this works, the table says so.
  • A value can be attached to a long name only when it is a number or a path: --level1, --grp/path/file.grp. Anything else needs a space or =.
  • Give full paths for files and folders. NNBuild changes folder before the game starts, so a path relative to where you typed the command may not be found.
  • Put -net last. Everything after -net belongs to the network setup. See The -net block.
  • Use the spelling shown in the tables. Many options have older spellings, but not all of them are understood by every game.

Help

OptionRuntimeWhat it does
-?, -help, --helpDuke, ExhumedShows the option list of that runtime. Depending on the game and the system it appears in a message box or in the log.
-?, -h, -helpSW, Blood, RRThe same, for these runtimes.
-debughelpDuke, RRShows the developer options.

NNBuild picks the game before any help is shown, so add --game <name> to get the help of a particular runtime.

Choosing the game

OptionOther spellingsArgumentRuntimeWhat it does
--game-gm, -gamegame nameAllChooses the game. Names are listed in Supported games. The value may be attached to -gm (-gmduke).
--skip-menu-smAllSkips the game picker and the startup window.
--no-game-menu-ngm, -nogamemenuAllSkips only the game picker. The first installed game is used.
--menu-m, -setupAllShows the startup window even when it would be skipped.
-nosetupAllSkips the startup window. --skip-menu adds this for you.
--skip-cinema-sc, -nologoAllSkips the logos and intro movie.
-quickSW, Blood, ExhumedSkips the intro screens.

What these do step by step is described in First launch.

Game data and mods

OptionOther spellingsArgumentRuntimeWhat it does
--gamegrp-gamegrpfileDuke, SW, RR, ExhumedNames the main data file of the game. Also used to pick the game.
--grp-grp, -gfileAllLoads a data file. Also used to pick the game. The value may be attached to -g. See the notes below.
--game-dir-game_dirfolderDuke, SW, Blood, RRNames the game’s data folder. Also used to pick the game. In Duke, Blood and RR it becomes the folder for custom content.
--search-path--path, -jfolderAllAdds a folder to search for files. Also used to pick the game. The value may be attached to -j.
--rff-rfffileBloodUses another main .rff archive.
--ini-inifileBloodUses another episode .ini file.
-sndfileBloodUses another sound .rff archive.
-artfileBloodUses another base art file name.
--con-xfileDuke, RRLoads another main CON script. CON is the script language of these games.
-mxfileDuke, RRLoads an additional CON script module.
--deffileDuke, RRLoads another definitions (.def) file.
-h<file>attachedDuke, SW, RRThe same as --def, with the file name attached: -hmy.def.
-hfileExhumedLoads another definitions file.
-mhfileBlood, RR, ExhumedLoads an additional definitions module. In SW attach the name: -mhextra.def.
-rtsfileDuke, RRLoads another Remote Ridicule (.rts) sound bank.
-noautoloadDuke, Blood, RR, ExhumedDoes not load files from the autoload folder.
-addon0, -addon1, -addon2SWStarts Shadow Warrior, Wanton Destruction or Twin Dragon.
-addonnumberRRSelects a numbered add-on.
-kexfolderExhumedTurns on KEX mode and names the PowerSlave Exhumed install folder.
-nam, -napalm, -ww2giDukeOlder way to switch the runtime to NAM, NAPALM or WWII GI. Prefer --game.

Notes on --grp:

  • When the file is the main data file of World Tour, Ion Fury, NAM, NAPALM, WWII GI, Redneck Rampage or Exhumed, the launcher treats it like --gamegrp.
  • When the file belongs to a different game than the one running, it is not loaded as game data. It is kept as a source of levels and art. See Playing one game’s levels in another.
  • In Blood, a .rff file is passed on as --rff and a .ini file as --ini.
  • In the Duke runtime, a file given with --grp that is not recognised game data is a mod pack. In multiplayer it is offered to the players who join. Recognised game data, such as DUKE3D.GRP or an official add-on, is never offered: every player needs their own copy.
  • To start an official add-on, name its data file with --gamegrp.

Playing one game’s levels in another

OptionOther spellingsArgumentRuntimeWhat it does
--game.levels-gm.lvlsgame nameAllThe game the levels come from. Used by the Duke and SW runtimes.
--game.items-gm.itsgame nameAllThe game whose item pickups to use.
--game.weapons-gm.wpnsgame nameAllThe game whose weapon and ammo pickups to use.

Video

OptionOther spellingsArgumentRuntimeWhat it does
--window-wndDukeStarts in a window.
--fullscreen-fscrDukeStarts full screen.
--resolution-resWIDTHxHEIGHTDukeSets the resolution, from 320x200 to 8192x4320. The value may be attached: -res1280x720.

These options override the saved video settings for this run. In the other games, set the video mode in the game’s own options menu.

Starting a level

OptionOther spellingsArgumentRuntimeWhat it does
--level-lnumberDuke, SW, RRStarts at that level. The value may be attached: -l3.
--volume-v, --episode, -enumberDuke, RRStarts in that episode. The value may be attached: -v1.
-levelepisode and levelBloodStarts at that level: -level 1 3.
-<n>ExhumedJumps to level n: -3.
-<n>DukeLoads the saved game in slot n (0 to 9). Single player only.
-mapfileDuke, SW, Blood, RR, ExhumedLoads a map file. Not available with shareware data in Duke and SW.
--skill-s<n>numberDuke, RRSets the skill level.
-s<n>attachedSWSkill, 1 to 4.
-snumberBloodDifficulty, 0 to 4.
--monsters-mnstnumberDuke, Blood0 turns monsters off. 1 or more turns them on and sets the skill to that number minus one. In RR only --monsters 0 is supported.
-monstSWNo monsters.
-nodudesBloodNo monsters.
-nocreaturesExhumedNo enemies.
-namenameDuke, SW, Blood, RR, ExhumedYour player name. Blood also accepts -pname.

Game rules (Duke runtime)

OptionOther spellingsArgumentWhat it does
-c<n>--coopnumberMultiplayer game mode: 1 Dukematch, 2 Co-op, 3 Team Dukematch. Attach the number: -c2.
-t<n>--respawn1, 2, 3 or xRespawn: 1 monsters, 2 items, 3 inventory, x all. Attach the value: -t2.
-y<n>numberFrag limit. Attach the number: -y20.
-u<digits>--weaponsdigitsYour preferred weapon order: -u3425689071.
-wstayWeapons stay after pickup.
-noffireFriendly fire off.
-allowvisibilityAllows visibility adjustment in multiplayer.

-c on its own is a different option: see --cmd below. RR accepts -c<n>, -t<n> and -u<digits> as well.

Sound, settings and startup commands

OptionOther spellingsArgumentRuntimeWhat it does
-nosound-nsDukeSound effects off. RR accepts -ns. Exhumed accepts -nosound.
-nomusic-nmDukeMusic off. RR accepts -nm. Exhumed accepts -nomusic.
-cfgfileDuke, Blood, RR, ExhumedUses another settings file.
-usecwdAll runtimesKeeps settings in the folder the game runs from and skips the search for installed copies.
--cmd-ctextDukeRuns console commands when the game is ready. Put several commands in one quoted argument, one per line, or repeat the option.
--cmd-file-cffileDukeReads startup console commands from a text file, one per line. Lines that start with # are ignored.
-cachesizesize in kBDuke, Blood, RR, ExhumedSets the size of the file cache.
vibebuild32 --game duke --cmd "skin 6" --cmd "echo Ready"

Console commands are listed in Console commands.

Recording and playing demos

OptionOther spellingsArgumentRuntimeWhat it does
--record-rDuke, RRRecords a demo.
--playback-pbfile, optionalDukePlays a demo file. .dmo is added when the name has no extension.
-d<file>--demofileDuke, RRPlays a demo file.
--record, --playbackfile for playbackSWRecords or plays a demo. -dr<file> and -dp<file> do the same with the file name attached.
-record, -playbackExhumedRecords to or plays from the file DATA.VCR.

Multiplayer with -net

The Duke, SW and Exhumed runtimes start network games with -net.

OptionOther spellingsArgumentRuntimeWhat it does
-net--netnetwork wordsDuke, SW, ExhumedStarts a network game. See The -net block.
--startnow-sn, -nowaitDukeHost: start at once with whoever is present, even alone. The other slots stay open and players can join at any time.
--startnow-snExhumedHost: start with the players who are present.
--latejoin-ljDuke, ExhumedHost: let players join while the match is running.
--async-asDukeHost: never make everyone wait for one slow player. Only that player feels the delay. Without it, all players wait for each other.
--zeropingDukeShows your own shots at once instead of waiting for the server. Each player sets this for themselves.
--nplayers-npnumberExhumed, RRNumber of players to wait for before the match starts. The default is 2.
--netfile-nffileExhumed, RRHost: send this file to players who join. Blood accepts --netfile only.

Rules for the Duke runtime:

  • --startnow includes --latejoin.
  • A host that only gives -net waits until every slot is filled.
  • Mod packs given with --grp and map files are sent to joining players automatically. There is no --netfile in this runtime.

The -net block

Everything after -net describes the connection. The words can start with / or -.

WordMeaning
/n0Host-and-clients mode: one computer is the host and the others connect to it.
/n0:<count>Host in that mode with count player slots, for example /n0:4.
/n1Peer-to-peer mode: every computer connects to every other.
/n1:<count>Peer-to-peer with count slots, leaving room for late joiners.
/p<port>The UDP port this computer uses, for example /p23513. It must be between 1025 and 65534. The default is 23513.
addressA computer to connect to. Any word that is not one of the above is an address.

An address can be written as:

  • 192.0.2.10 or 192.0.2.10:23513 (IPv4, with or without port),
  • [2001:db8::1]:23513 (IPv6 with port) or 2001:db8::1 (IPv6 alone),
  • host.example.org or host.example.org:23513 (a name).

Without a port, 23513 is used. An address with no /n word means /n0.

# Host four slots on the default port and start at once
vibebuild32 --game duke --startnow -net /n0:4

# Host on another port
vibebuild32 --game duke --startnow -net /p23600 /n0:4

# Join a host
vibebuild32 --game duke -net /n0 192.0.2.10:23513

# Join when your own port has to differ from the host's (same computer)
vibebuild32 --game duke -net /p23514 /n0 127.0.0.1:23513

In host-and-clients mode the host lists no addresses, and each client lists the host.

In peer-to-peer mode each player lists the addresses of the other players. All players use the same player order, and the place where /n1 stands among the addresses is your own place in that order. With three players at 192.0.2.2, 192.0.2.100 and 192.0.2.4:

first player:    -net /n1 192.0.2.100 192.0.2.4
second player:   -net 192.0.2.2 /n1 192.0.2.4
third player:    -net 192.0.2.2 192.0.2.100 /n1

On Linux and macOS you can instead give every player the same list, with all addresses including their own, in any order. NNBuild finds its own address in the list.

In the Duke runtime the slot count includes a dedicated server. A dedicated server started with /n0:4 has room for three players.

Multiplayer in Blood and Redneck Rampage

These two games do not use -net.

Blood

OptionArgumentWhat it does
-serverplayersStarts a server for that many players (1 to 8).
-clienthostConnects to a server.
-portnumberThe server’s port. The default is 23513.
-clientportnumberThe local port a client uses.
-netretryClient: keep trying to connect. Hold Escape to stop.
-autoStarts the network game automatically. Also skips the intro.
-broadcast, -masterslaveSelects the packet mode.
-mp_mode0 to 2Game mode: 0 co-op, 1 Bloodbath, 2 teams.
-mp_levelepisode and levelLevel for the match: -mp_level 1 3.
-mp_mapfileMap file for the match.
-mp_mapclientfileClient: use another map file than the one the server names.
-mp_diff0 to 4Difficulty.
-mp_dudes0 to 2Monsters: 0 none, 1 spawn, 2 respawn.
-mp_weaps0 to 3Weapons: 0 do not respawn, 1 permanent, 2 respawn, 3 respawn with markers.
-mp_items0 to 2Items: 0 do not respawn, 1 respawn, 2 respawn with markers.
-mp_spawn0 to 2Spawn location: 0 random, 1 smart random, 2 by distance.
-mp_protect0 to 3Length of spawn protection.
-mp_secwind0 or 1Second wind.
-mp_score1 to 255Score or lives limit.
-mp_time1 to 60Time limit.
-mp_noexitDisables the exit button.
-mp_noflagRemoves the flag in teams mode.
-mp_chaseviewAllows chase view.
-mp_holsteringAllows holstering.
-mp_spectatingAllows spectating.

Blood stops with an “Invalid argument” error when it is given an option it does not know. Only use options listed for Blood on this page.

Redneck Rampage

OptionArgumentWhat it does
-serverStarts a server.
-connecthost or host:portConnects to a server.
-portnumberThe port to host on or connect to. The default is 23513.
-passwordtextThe server password.
--startnowServer with a window: start the match automatically when enough players are in.
--waitServer without a window: do not start the match automatically.

Dedicated server

A dedicated server is a copy of the game that only hosts. It has no window, graphics or sound.

OptionOther spellingsRuntimeWhat it does
--dedicated-ddDuke, RR, ExhumedRuns as a server without a window.
--headless-hl, --consoleDuke, RR, ExhumedThe same.
--wait-wRR, ExhumedDo not start the match automatically.
  • Duke. The server reads console commands typed in its terminal. It takes one of the player slots but does not appear in the match. Combine it with --startnow and -net. See Dedicated server.
  • Exhumed. The server starts the match by itself. On Linux and macOS it reads console commands typed in its terminal.
  • RR. The server waits for players and starts the match by itself. It has no console in the terminal.
vibebuild32 --game duke --dedicated --startnow -name Server -net /p23513 /n0:8

Lobby server

A lobby server keeps a list of games that players can join. NNBuild can list a game on a lobby server, read the list, and be the lobby server.

OptionOther spellingsArgumentRuntimeWhat it does
-masterserverport, optionalAllRuns NNBuild as a lobby server and nothing else. No game is chosen and no game data is needed. The default UDP port is 23519.
--advertise-adaddressDuke, SW, RR, ExhumedHost: list this game on the lobby server at that address. Blood accepts --advertise only. In RR it also starts a server.
--lobbylist-lladdressSW, Blood, RR, ExhumedWrites the games listed on that lobby server to the log, then continues starting. Blood accepts --lobbylist only.
--joinlobby-jladdressSW, Blood, RR, ExhumedJoins the first game listed on that lobby server. SW and Blood accept --joinlobby only.
-masteraddraddressSW, ExhumedThe lobby server to use for connection help and, in SW, for the server list in the menu.
-punchtoaddressSW, ExhumedClient: the host to ask the lobby server for connection help with.

A lobby address is a host name or IP address, optionally followed by :port. Without a port, 23519 is used.

# Run a lobby server on the default port
vibebuild32 -masterserver

# The same on another port, on a computer without a display
vibebuild32 --headless -masterserver 24000

# Host a Duke Nukem 3D match and list it
vibebuild32 --game duke --startnow --advertise lobby.example.org -net /n0:4

Notes:

  • Write -masterserver with one dash.
  • --advertise has to come before -net.
  • In the Duke runtime, players find listed games in the Multiplayer menu or with the serverlist console command. The address the menu asks is the console setting cl_masterserver. See Console commands.
  • The name shown in the list is the host’s player name (-name).

Script mods

These options belong to the JavaScript and TypeScript mod system. Mods run in the Duke and SW runtimes. See Modding.

OptionOther spellingsArgumentRuntimeWhat it does
--js-jsfileDuke, SWLoads a script file (.js or .ts). Works anywhere on the command line.
script fileDukeA file name ending in .js, .ts, .mjs, .mts, .cjs or .cts, given without an option, is loaded as a script.
--gen-ts-gtsname, optionalAllCreates a TypeScript mod starter in autojs/<name>/ and exits. No game is started.
--gen-js-gjsname, optionalAllThe same for JavaScript.
--debug-dbgport, optionalDuke, SWTurns on the script debugger connection for VS Code. The default port is 8501. Also skips the menus. The port can be attached (-dbg8600) and is honoured by the Duke runtime.
--devtools-dtDuke, SWOpens the script DevTools window. Includes --debug. In the Duke runtime it also forces windowed mode.

Mods in autojs/<name>/index.ts or index.js are loaded automatically. The autojs folder is looked for in the folder you start NNBuild from. When a name is left out of --gen-ts or --gen-js, the next free name of the form mod-1, mod-2 is used.

The index.ts or index.js of a mod in autojs can carry extra launch options for debugging, in a comment at its top. They are used only when NNBuild is started with --debug or --devtools:

/// vbd.params="--game duke --gamegrp /home/you/games/duke3d/DUKE3D.GRP"

Map editor and projects

These options belong to the Duke runtime. See Map editor.

OptionArgumentWhat it does
--editormap file, optionalOpens the built-in map editor, with that map if one is named.
--build-editormap file, optionalOpens the classic Build editing tools.
--projectfolder or ZIPPlays a project. With --editor, opens it for editing.
--project-mapmap path inside the projectChooses which map of the project to play or edit.
--allow-project-scriptsLets the script files inside a project ZIP run. They do not run otherwise.

A project ZIP given without an option is played as a project. This is what happens when you drop the ZIP onto the program.

vibebuild32 --game duke --gamegrp ~/games/duke3d/DUKE3D.GRP --editor
vibebuild32 "/home/you/projects/My Project.zip"
vibebuild32 "/home/you/projects/My Project.zip" --project-map "Maps/Outpost.map"
vibebuild32 --game duke -j ~/games/duke3d --editor --project "/home/you/projects/My Project"

Write these options exactly as shown, with two dashes.

MCP

MCP is an open standard that lets an AI assistant control a program. These options belong to the Duke runtime. See AI assistants and MCP.

OptionArgumentWhat it does
--mcp-stdioLets an MCP client control this game, server or editor through the program’s standard input and output.
--mcp-httpportThe same through a local web address, http://127.0.0.1:<port>/mcp. Only this computer can reach it.
--editor-mcphost or host:port, optionalJoins a live map-editing session as an MCP participant instead of starting a game. No game is chosen and no game data is needed. The default host is this computer. Everything after this option belongs to it.

After --editor-mcp you can give --name <name> for the participant’s label and --mcp-http <port> to offer it over the local web address instead of standard input and output.

vibebuild32 --game duke --dedicated --startnow --mcp-http 8787 -net /n0:4
vibebuild32 --editor-mcp 127.0.0.1:23514 --name "Layout Assistant"

Two environment variables protect the web address. When VIBEBUILD_MCP_TOKEN is set, a client must send that value as a bearer token. VIBEBUILD_MCP_ORIGIN names one extra web origin that is allowed to connect.

Files given without an option

A file name without an option in front of it is handled by its ending. This is also what happens when you drop a file onto the program.

The launcher looks at such a file first, to work out the game. Then the runtime uses it:

RuntimeEndingWhat happens
Duke.mapThe map is loaded.
Duke.grp, .zip, .pk3Loaded as a data file. A ZIP that is a project is played as a project.
Duke.conLoaded as the main CON script.
Duke.defLoaded as the definitions file.
Duke.rtsLoaded as the Remote Ridicule sound bank.
Duke.js, .ts, .mjs, .mts, .cjs, .ctsLoaded as a script mod.
Blood.map, or no endingThe map is loaded.
Blood.grp, .zip, .pk3, .pk4Loaded as a data file.
Blood.defLoaded as the definitions file.
RR.mapThe map is loaded.
RR.grp, .zip, .pk3, .pk4Loaded as a data file.
RR.con, .def, .rtsLoaded as the main script, definitions file or sound bank.
SW, ExhumedanyNot used by the runtime. Use -map, --grp and -j.

More options of single runtimes

Shadow Warrior

OptionArgumentWhat it does
-nodemoNo demos at the title screen.
-nometersHides the air and boss meter bars.
-nopredictTurns off network prediction.
-f2, -f4, -f8Packet duplication in network games.
-autonetten numbers separated by commasStarts a network game with preset rules: rules, level, enemies, markers, team play, hurt teammate, kill limit, time limit, colour, nuke.
--colorcolour name or #rrggbbYour player colour in a network game. Names: brown, gray, purple, red, yellow, olive, green, blue. A #rrggbb value picks the closest of these.
-movescale, -turnscalenumberMovement and turning scale. 256 means one unit.
-extcompatController compatibility mode.
-nocontrollerTurns controller support off.

Blood

OptionArgumentWhat it does
-nodemoNo demos.
-noaimTurns auto-aim off.
-skill0 to 4Player handicap. This is not the difficulty.
-setupfilefileThe same as -cfg.

Redneck Rampage

OptionArgumentWhat it does
--playersnumberFake multiplayer with that many players, for testing.
-rotatesprite-no-widescreenStretches screen drawing from scripts to the full screen.
-nocontrollerTurns controller support off.

Exhumed

OptionArgumentWhat it does
-color0 to 7Your player colour in a network game.
-t<n>attached numberTime setting for network games.

Developer options

These are for testing and for the program’s own use.

OptionRuntimeWhat it does
-q<n>, --players <n>DukeFake multiplayer with n players on one computer.
-aDukeSimple computer control for the other players in fake multiplayer.
-wDukeShows your coordinates.
-condebug, -z<n>Duke, RRCON script compile debugging.
-nDDukeWrites the default script variables to a file.
-unstableDukeTurns off the safety checks of the CON script system.
-stunDukeOlder UDP hole-punching mode for -net.
-noinstancecheckingAll runtimesWindows: do not ask when NNBuild is already running.
-punchtarget, -masteraddr, -joinerrorDukeAdded by NNBuild when it restarts itself to join a game from the menu.
--content-probe, --content-rejoin, --server-resumeDukeAdded by NNBuild when a server changes its mod pack.
-validate, -robust, -noresendBloodCompatibility test and network checking switches.
-short, -cheat, -allsync, -camSWTest switches.

Environment variables

VariableWhat it does
DUKE3DGRPDuke runtime: the main data file to use when none is named on the command line.
DUKE3DDEFDuke runtime: the definitions file to use when none is named.
SWGRPShadow Warrior: the main data file to use when none is named.
BLOODDEFBlood: the definitions file to use when none is named.
VIBEBUILD_MCP_TOKEN, VIBEBUILD_MCP_ORIGINSee MCP.
EDUKE32_LOGSTDOUTSet to TRUE to write the program’s console output to stdout.txt.