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 variable. 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.

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 bAdds a and b.
- a bSubtracts b from a.
* a bMultiplies a and b.
/ a bDivides a by b.
% a bCalculates the remainder of a/b.
^ a bRaises a to the b-th power.
< a bProduces 1 if a is less than b and 0 if not.
<= a bProduces 1 if a is less than or equal to b and 0 if not.
> a bProduces 1 if a is greater than b and 0 if not.
>= a bProduces 1 if a is greater than or equal to b and 0 if not.
= a bProduces 1 if a is equal to b and 0 if not.
== a bProduces 1 if a is equal to b and 0 if not.
!= a bProduces 1 if a is not equal to b and 0 if it is.
<> a bProduces 1 if a is not equal to b and 0 if is.
xor a bCalculates the bit-wise exclusive-or of a and b.
& a bCalculates the bit-wise and of a and b.
| a bCalculates the bit-wise or of a and b.
&& a bCalculates the logical and of a and b.
|| a bCalculates the logical or of a and b.

Actors and Maps

  • 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.
Lists debugging information about all of the currently-defined actor's states. Probably not useful to the average user.
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.

Players

  • 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.

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.
  • 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

  • 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.
  • 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.

See Also

Personal tools