Console Useful Controls: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
 
(4 intermediate revisions by 4 users not shown)
Line 10: Line 10:
* The current value of a cvar can be shown by entering its name without a value.
* The current value of a cvar can be shown by entering its name without a value.
* Parameters can be toggled between values by preceding the control with 'toggle' and following it with eg, 1 0. Example : toggle r_showtris 3 0
* Parameters can be toggled between values by preceding the control with 'toggle' and following it with eg, 1 0. Example : toggle r_showtris 3 0
* Controls can be bound to keys to be used in-game, including the toggle command, eg, <tt>bind "v" "toggle r_showportals 1 0"</tt>
* Controls can be bound to keys to be used in-game, including the toggle command, eg, <tt>bind "v" "toggle r_showportals 1 0"</tt> . See also [[Bindings and User Settings]].
* Many controls can be included in the file '''Doomconfig.cfg''' in the darkmod folder so they are automatically effective.
* Many controls can be included in the file <s>Doomconfig.cfg</s>  '''Darkmod.cfg''' in the darkmod folder so they are automatically effective.
* Some controls are disabled on exit from a map; others are permanent until manually changed.
* Some controls are disabled on exit from a map; others are permanent until manually changed.


Line 96: Line 96:
!align=left|con_noprint 0
!align=left|con_noprint 0
|Prints console messages to the screen as an overlay.
|Prints console messages to the screen as an overlay.
|-
!align=left|r_showSurfaceInfo 1
|Show info about closest rendered surface under crosshair: model name, index of surface in model, material name


|-
|-
Line 165: Line 169:
!align=left|setviewpos X Y Z [P Y R]
!align=left|setviewpos X Y Z [P Y R]
|teleports the player to the coordinates and optionally sets camera orientation.
|teleports the player to the coordinates and optionally sets camera orientation.
|-
!align=left|tdm_show_viewpos
|show/hide the viewpos on the player HUD, which can be set to the following: 0 (hide), 1 (gray font color), 2 (cyan font color)
|-
!align=left|screenshot_viewpos <gamma>
|takes a screenshot with the viewpos added to it. The <gamma> argument is optional and defaults to the r_ambientGamma value.


|}
|}

Latest revision as of 19:00, 22 April 2024

Introduction

This is a list of common console commands and cvars that are of use to Dark Mod mappers and developers for testing etc. It is in order of key words and meaning. The console can be called by hitting "CTRL+ALT+~" ("CTRL+ALT+Key left of number 1" in general, e.g. "CTRL+ALT+^" on a German keyboard).

This will open the console to cover the upper 50% of the screen. To cover more (80%), also hold down the SHIFT key.

Notes

  • Where a cvar or command is followed by a 1 (parameter) it can be taken that it is enabled by 1 and disabled by 0 unless otherwise stated. N indicates a range of values.
  • The current value of a cvar can be shown by entering its name without a value.
  • Parameters can be toggled between values by preceding the control with 'toggle' and following it with eg, 1 0. Example : toggle r_showtris 3 0
  • Controls can be bound to keys to be used in-game, including the toggle command, eg, bind "v" "toggle r_showportals 1 0" . See also Bindings and User Settings.
  • Many controls can be included in the file Doomconfig.cfg Darkmod.cfg in the darkmod folder so they are automatically effective.
  • Some controls are disabled on exit from a map; others are permanent until manually changed.


Command Description
noclip Player flies through everything.
notarget AI will not know the player is there.
invisible AI will not see the player, but can still hear him.
inaudible AI will not hear the player, but can still see him.
god Player cannot be harmed.
killmonsters Removes all AI from a map.
tdm_open_doors Opens all doors on map: even locked and unpickable ones!
tdm_close_doors Closes all doors on map
tdm_show_loot Shows loot items through walls for a short time.
tdm_show_keys Shows keys through walls for a short time.
g_dragentity 1 Aim at entity and hold attack control then pull back.
pm_noclipspeed N Changes the speed of player noclip movement.
g_fov N N=angle of field of view, eg, g_fov 30 = zoom in to restrict field of view to 30 degrees. Default = 90.
g_showEntityInfo 1 Show info about near entities (as box with classname).
com_showfps 1 Show fps to test performance.
com_numQuickSaves N How many quicksaves to retain. Reducing the number won't delete any that you already have.
g_frametime 1 Timing info for each frame, see Profiling.
r_showPrimitives 1 Show info about number of drawcalls and tris/shadow tris rendered.
con_noprint 0 Prints console messages to the screen as an overlay.
r_showSurfaceInfo 1 Show info about closest rendered surface under crosshair: model name, index of surface in model, material name
r_showskel 1 Shows skeleton in-game with joint names.
g_showCollisionModels 1 Shows collision models. Use g_maxShowDistance N to increase the distance where they are shown to.
r_showtris N (1) Shows triangles being rendered directly.
(2) Shows overdrawn tri's.
(3) Shows all tri's in scene, direct and indirect.
r_showportals N (1) Shows all portals in scene (red=closed, green=open). If your portals don't show up they are most likely not sealing. Yellow indicates a portal that is effectively closed but which connects to a visleaf visible through another portal.

(2) Also prints area numbers, mainly where player's eye is right now.

r_showlightcount 1 Using colours, shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc.
seta tdm_showsprop 1 Shows the volume of sounds heard by AI.
tdm_ai_showbark 1 Gives the def name (not the soundshader) of barks used by AI.
tdm_ai_showalert 1 Shows the AI's current alert total and alert state.
tdm_ai_showdest 1 Shows the AI's current path destination.
bind "f1" "_impulse27" Pressing F1 shows the AAS regions.
timescale 2 Double speed, good for testing pathing, 1 = normal speed, 2 = double, 0.5 = half speed. To have an effect, the "Uncapped FPS" setting must be Off.
g_timeModifier 2 Same as timescale 2 but somewhat different
g_stopTime 1 Stops gameplay time, but player can move normally.
teleport "entity name" teleports the player to the named entity
teleportArea N teleports the player into the area with number N
getviewpos get player's position and orientation coordinates
setviewpos X Y Z [P Y R] teleports the player to the coordinates and optionally sets camera orientation.
tdm_show_viewpos show/hide the viewpos on the player HUD, which can be set to the following: 0 (hide), 1 (gray font color), 2 (cyan font color)
screenshot_viewpos <gamma> takes a screenshot with the viewpos added to it. The <gamma> argument is optional and defaults to the r_ambientGamma value.

Spawning entities

Spawns entity in front of the player. Look up if entity gets spawned under the floor.

Command Description
spawn atdm:weapon_blackjack Spawns blackjack.
spawn atdm:weapon_shortsword Spawns a sword.
spawn atdm:ammo_broadhead Spawns one arrow.
spawn atdm:ammo_broadhead inv_ammo_amount 50 Spawns 50 arrows (one entity with 50 ammo). Similar technique can be used for other ammo types.
spawn atdm:ammo_firearrow
spawn atdm:ammo_gasarrow
spawn atdm:ammo_mossarrow
spawn atdm:ammo_noisemaker
spawn atdm:ammo_ropearrow
spawn atdm:ammo_waterarrow

With the TDM console you can press tab after typing something to autocomplete. For example spawn atdm:<tab> will cycle through the various spawnables. You can also add additional spawnargs using the following syntax: spawn classname [key value] [key value] ....

Diagnostic information

Command Description
listEntities lists all current entities followed by a count.
listEntities GLOB lists all alive entities whose names match given glob/wildcard (e.g. use asterisks like *func_static* to search for substring).
countEntities displays a count of entities by class. TDM 2.03+
listCvars GLOB lists all cvars matching the given glob/wildcard (no argument = lists everything).
listCmds GLOB lists all console commands matching the given glob/wildcard (no argument = lists everything).
condump [unwrap] filename.txt Writes the text content of the console to text file filename.txt (you can use any file name). If optional keyword unwrap is used, full lines from the console will be stitched together with the following line. Useful when exporting long file paths from the console, that have been broken up by its width limit. TDM 2.03+

See Also

Cvars in The Dark Mod