CCMDs:Informational

From ZDoom Wiki
Jump to: navigation, search

These console commands are available to provide the user with information. These can come in handy when used in conjunction with certain CVARs or other CCMDs.

See the CCMDs article for general information on how to use commands.


Contents


Eval

The eval command is a powerful function that can be used to perform various calculations and then either display the results to the console or store them in a variable. This can be used to change a CVAR's setting based on a calculation performed on itself or other CVARs.

  • eval <Expression> [Variable]
Evaluates a mathematical expression and either prints it to the console or stores it in a CVAR. Expressions are written using prefix notation instead of the more common infix notation. Basically, you first specify what you want to do (the operator) and then what you want to do it to (the operands). You must separate operators and operands with spaces.
When accessing CVARs from within the Expression, you must prefix them with a dollar sign ($).

Examples of using eval:

To compute 2+2: eval + 2 2
To compute 5-3: eval - 5 3
To compute 2+(5*6): eval + 2 * 5 6
To decrease the number of screenblocks: eval - $screenblocks 1 screenblocks

The supported operators are:

+ a b Adds a and b.
- a b Subtracts b from a.
* a b Multiplies a and b.
/ a b Divides a by b.
% a b Calculates the remainder of a/b.
^ a b Raises a to the b-th power.
< a b Produces 1 if a is less than b and 0 if not.
<= a b Produces 1 if a is less than or equal to b and 0 if not.
> a b Produces 1 if a is greater than b and 0 if not.
>= a b Produces 1 if a is greater than or equal to b and 0 if not.
= a b Produces 1 if a is equal to b and 0 if not.
== a b Produces 1 if a is equal to b and 0 if not.
!= a b Produces 1 if a is not equal to b and 0 if it is.
<> a b Produces 1 if a is not equal to b and 0 if is.
xor a b Calculates the bit-wise exclusive-or of a and b.
& a b Calculates the bit-wise and of a and b.
! a b Calculates the bit-wise or of a and b.
&& a b Calculates the logical and of a and b.
|| a b Calculates the logical or of a and b.

Actors and maps

  • dumpactors (New from 2.5.0)
Outputs a list of all object classes, along with their editor number, SpawnID, game filter and the file and lump in which they were declared. This command is useful to help resolve conflicts in large scale collaborative projects. Because of the mass of information (ZDoom alone contains more than 1300 actors), this should be used along with the logfile command to capture the output and then copy and paste it into a program such as a spreadsheet. The command may take a few seconds to process all the data.
  • dumpclasses [base class]
Displays a list of all classes in the game. You can use base class to limit the list to only those classes that derive from base class. For example, dumpclasses actor will only show those classes that can be spawned in a level (including actors from all supported games). If you only want a list of weapons, you can use dumpclasses weapon. This list can be quite long and exceed the length of the console buffer, so it is a good idea to capture its output to a file using the logfile command.
  • dumpmap <wadname> [mapname]
Saves the current state of the level (minus actors) to a new wad called wadname. If you don't specify a mapname, it will be saved as MAP01. This was mainly used while testing the internal node builder. Because ZDoom can now load Build maps, you can use this as a simple Build->Doom converter (although limitations in the Doom map format will likely force you to make several edits to produce a usable map).
  • dumpmapthings
Lists all the map editor numbers for actors in the current game.
  • dumpspawnables
Lists all the spawn numbers for actors in the current game.
  • dumpstates
Lists debugging information about all of the currently-defined actor's states. Probably not useful to the average user.
  • listmaps
Dumps a list of all maps defined in MAPINFO to the console, along with their lump names. This can make locating a map that uses a non-standard lump name easier.
Also lists which file contains the map. (development version r3196+ only)
If a SECRETS lump is provided and covers the current map, prints a list of hints meant to help the player find the secrets.

Players and inventory

  • playerinfo [player]
Without parameters, lists the numbers for each player in the game. If you specify a player, then details about that player's user info will be listed.
  • playersounds
Lists the player sounds defined by each player class and skin.
  • skins
Lists the names of the skins that were loaded when the game was started.
  • invquery
Displays information about the currently-selected inventory item.

Graphics and sound

  • countdecals
Returns the internal count of automatically generated decals.
  • countdecalsreal
Iterates through every automatically generated decal in the level and returns how many are present. Compare this value with what countdecals returns to ensure that the internal count is accurate.
  • snd_listdrivers
Lists the drivers supported by the current snd_output setting.
  • snd_listmididevices
This command lists the MIDI devices available in the system. Devices in this list can be used in the snd_mididevice cvar to select which device plays music. Devices with negative numbers are provided by ZDoom itself.
  • soundlinks
Lists the links between different sounds that use the same sound data. Links are generated dynamically while you play, so it is possible for this command to give different results in different games and even at different times during the same game.
  • soundlist
Lists all the sounds defined and the lumps that they alias to. Unlike regular Doom, ZDoom refers to sounds using a long name and uses a SNDINFO lump to map those to the lumps in a WAD file that contain the actual sounds. Logical sounds that refer to the same sound data will have links generated as necessary to avoid actually loading multiple copies of the same sound into memory.

Miscellaneous

  • currentpos (New from 2.5.0)
Prints the player's current position: X, Y and Z coordinates, angle, floor height, sector number, and sector light level.
  • dir [[path/][pattern]]
This command lists the contents of a directory. It supports wildcards (but will not recurse into multiple directories). If path is not specified, it will display the contents of the directory the game was run from.
  • gameversion
Prints the version number and compile date of ZDoom.
  • info
Prints a lot of information about the actor the player is looking at. It is however unable to detect actors which have a radius or height of 0, or actors with the NOBLOCKMAP flag.
  • logfile [file]
If file is not specified, console logging will be stopped (if active). Otherwise, a file named file will be created on disk, and all console output will be recorded in it as well as on the screen.
  • linetarget
Will make the game display the actor name, health, and starting health of the monster the player is looking directly at.
  • pings
This lists a very rough estimate of the speed of the connection between your machine and any others in the game. In reality, the values printed by this command aren't even pings; they're just the number of milliseconds that have passed since the last time you received a network packet from the other machines.
  • scriptstat
Lists the scripts running on the current level.
  • stat [page]
Displays profiling information. When used alone, displays a list of available displays. Use one of those as the page parameter to toggle the display on and off.
  • key <value1> [value2]
Translates all parameters to the command into their corresponding key values which are used internally for command and alias lookup. Probably not very useful for the average user.
  • vid_listadapters
Prints a list of all video adapters available. This command only works with either the ZDoom Direct3D renderer or the GZDoom/Skulltag OpenGL renderer. Choosing which adapter to use can be done by setting the value of the vid_adapter console variable.
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox