Skip to content

Console commands

Commands below are entered in the engine console. To pass a command at launch, place it after -- and prefix its name with +.

zig build play -- +set cl_renderer opengl2 +map e1m1a

set assigns a console variable. Settings marked latched take effect after the relevant restart, such as vid_restart for renderer settings.

Game and persistence

Command Meaning
map <name> Load a converted map
map_restart 0 Restart the current map
save <slot> Save to a named native slot
load <slot> Load the current copy of a slot
load <slot> previous Load the previous recovery copy
weapon <id> Select a weapon by its registered ID
viewpos Print the current view position and angles
dk3_look <yaw> <pitch> Set the view orientation used by the next normal input command
quit Exit the engine

Slot names use lowercase letters, digits, underscores and hyphens. See Save format for storage and compatibility.

Graphics and capture

Command or variable Meaning
cl_renderer vulkan Select Vulkan
cl_renderer opengl2 Select OpenGL2
cl_renderer opengl1 Select OpenGL1
vid_restart Restart the renderer
screenshotJPEG <name> Write a JPEG capture to the game's screenshot directory
r_imageDecodeCacheMegs CPU cache limit for large decoded PNGs and their source bytes; default 256 MiB, 0 disables, maximum 1024
r_vkPreparedAssets Use source/settings-matched prepared mip, geometry and HDR sidecars when installed; default 1, ordinary source fallback. See prepared assets.
r_vkGpuTexturePrep Exact integer GPU mip/color preparation; default 1, bounded scratch and CPU fallback. Physical-GPU engine timing remains unverified.
r_vkGpuWorldDraws Static-world GPU surface visibility, stable index compaction and indirect drawing; default 1, CPU PVS/material sorting retained.
r_modelImagePrefetch Vulkan initial model PNG preparation: default 1 enables bounded CPU slots; 0 uses ordinary registration
r_modelImagePrefetchSlots Model preparation slot limit, clamped 1–4; default 4 for unset configurations (acceptance sequence 509). Saved limits still apply. Lower values reduce temporary PNG memory without changing image quality; four slots raise the approximate worst preparation bound from 1248 to 1664 MiB, although measured save-load RSS was mostly lower.

Renderer settings lists resolution, upscaling and lighting variables.

The PNG cache reuses already-decoded large images across map loads. Its limit includes both source bytes and decoded pixels, and images retain their resolution and alpha. It fills as images first load; a full renderer restart releases it. Lowering the limit releases the retained working set on the next PNG request.

Multiplayer

Command or variable Meaning
connect <address[:port]> Connect to a server
disconnect Leave the current server
g_gametype 0 Deathmatch
g_gametype 4 Capture the flag
g_gametype 8 Deathtag
team red, team blue, team spectator Select a team or spectate
addbot Add a bot
bot_minplayers Minimum player population maintained with bots
dk3_bot_skill Bot skill, from 1 through 10
bot_pause Pause bot commands
fraglimit, capturelimit, timelimit Match limits

Set the game type before loading the map. See Host or join a game.

Runtime workers

dk3_jobs selects the runtime worker count, from 0 through 8. The default is one less than the available CPU count, capped at eight; 0 runs jobs inline. This is a latched setting.

Commands beginning dk3_runtime_ are developer diagnostics. Some change world, player or actor state and are intended for controlled fixtures rather than normal play.