CCMDs:Debug

From ZDoom Wiki
Jump to navigation Jump to search

These console commands can be used for cheating or testing new maps.

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


Abilities and Items

These commands can allow the player to gain abilities or items they wouldn't normally have, or access areas of the map more quickly or by a different route than intended.

  • anubis
Toggles monster fear on and off. Scared monsters will run away from you and attack less frequently.
  • buddha
Gives you an indestructible hit point: no normal attack can remove that last hit point from you (certain death effects such as telefragging will still kill you). This is a more useful cheat than god mode for testing monsters or levels.
  • buddha2
Similar to buddha above, except that absolutely nothing can take away that one hit point, not even telefrag.
  • drop <item> [amount]
Drops the given item, if there is at least that much in the player's inventory. Items with the INVENTORY.UNDROPPABLE or INVENTORY.UNTOSSABLE flags cannot be dropped. amount specifies the number of samples the dropped item contains. The command cannot drop more than what is available in the inventory.
  • fly
Toggles fly mode on and off.
  • freeze
Use this command once to freeze gameplay (while still allowing you to move around). Use it again to unfreeze gameplay. This will not work in multiplayer.
  • give <item>
Gives an item to the player. Give understands the following special items:
  • all - gives you everything
  • everything - gives you everything, including weapons flagged with WEAPON.CHEATNOTWEAPON.
  • backpack - gives you a backpack in Doom, a bag of holding in Heretic and Hexen, and an ammo satchel in Strife.
  • health - gives you full health
  • weapons - gives you every weapon
  • ammo - gives you full ammo
  • armor - gives you full armor
  • keys - gives you every key that is assigned to a lock.
  • It also understands the names of individual inventory items. Use the command dumpclasses inventory for a complete list of these.
  • god
Toggles God (Degreelessness) mode on/off. While active, you cannot be hurt by normal attacks (although some things such as telefragging will still kill you). Also known as iddqd.
  • god2
Similar to god above, except that the player is given absolute invulnerability; nothing can damage them, not even telefrag.
  • iddqd
The same as god, except it also gives you 100 health.
  • morphme [class]
Transforms you into a chicken in Heretic and a pig in Hexen and Doom (The latter only happens if you have the relevant graphics present). Additionally, if "class" is specified, it will attempt to morph you into the supplied class. This will only work if the target class is inherited from PlayerPawn, and you are not in a state that cannot otherwise morph (i.e. death).
  • noclip
Toggles noclipping mode on/off. With this mode, you can walk through walls and solid actors, and are able to step up by an infinite amount. Basically your horizontal movement will never be restricted. This can be useful for passing through locked doors or quickly accessing later parts of a map.
  • noclip2
Toggles noclipping mode 2 on/off. This is similar to the noclip command above, except it also toggles the NOGRAVITY flag on and gives the ability to fly through 3D floors.
  • notarget
Toggles notarget mode on/off. While active, monsters will not target you unless you hurt them first. In "modern FPS", monsters "can't find you" when in notarget mode. This is not the case with ZDoom.
  • resurrect
When dead, resurrects the player (brings him back alive and to 100% health). Note - cannot be used when the player is "broken apart" e.g. shattered to pieces after being frozen.
  • powerup
Powers you up in Heretic as if you had used a Tome of Power.
  • printinv
Lists your current inventory to the console.
  • take <item> <amount>
Takes an item away from the player. Amount specifies how many to take away (if applicable). Can be used to damage the player by using "take health X", where X is the amount of damage to do. If the player reaches 0 health this way, he will die. Use the command printinv for a full list of what is in the player's inventory.
  • targetinv
Executes "printinv" at current crosshair target, listing their inventory items.
  • thaw
Clears the PROP_FROZEN and PROP_TOTALLYFROZEN properties from the player. This is considered a cheat.
  • warp <x-coord> <y-coord> [z-coord]
Sends you to the specified coordinates immediately. This can be used with idmypos to debug problems in a specific area of a map.

Actor control

  • summon <class> [angle [TID [special [args... ]]]]
Spawns a new actor in front of you. A complete list of actors can be obtained with the dumpclasses actor command. For a list of actors limited to those you can place in an editor, use the dumpmapthings command. It is possible to spawn actors from another game with this command, but they will not be visible unless you provide the missing graphics for them.
By default, the actor spawns facing East. If the optional angle parameter is provided, the actor is spawned at an angle relative to the player's current facing instead. (0 faces away from the player, while 180 faces towards him).
Additional optional parameters can be used to set the summoned actor's TID, special, and arguments.
  • summonfriend <class> [angle [TID [special [args... ]]]]
Same as summon, but causes monsters created using this command to attack non-friendly monsters instead of you.
  • summonfoe <class> [angle [TID [special [args... ]]]]
Same as summon, but forces monsters created using this command to be hostile to the player, regardless of the actor's FRIENDLY.
  • summonmbf <class> [angle]
Same as summonfriend, but also gives the summoned actor the NOBLOCKMONST flag, allowing them to cross monster-blocking lines like MBF friendly monsters do.
  • kill [class]
Used by itself, this kills the player. Alternatively, you can specify "kill monsters" to kill every monster in the level or "kill baddies" to kill every unfriendly monster in the level. Note that this command also prevents actors which normally spawn other actors on death (e.g. the Pain Elemental) from doing so.
If a class is specified, this kills all actors of that type in the map.
NOTE: This command cannot destroy actors which have NODAMAGE flag. However, this can be worked around by giving it PainChance "Massacre", 256. Simply have the monster perform A_ChangeFlag to remove the flag, and call A_Die("Extreme") after a one tic delay passes.
  • mdk [damagetype]
This cheat will deal 1000000 damage to whatever is in the center of the screen, using a hitscan attack. Use a crosshair to get the exact point of what to kill. Optionally, a damage type for the attack can be specified. This is not available in deathmatch mode, even if sv_cheats is true.
NOTE: Similar to the kill command above, this command cannot destroy actors which have NODAMAGE flag, or LAXTELEFRAGDMG with a reduced enough damagefactor property.
  • remove <class>
Removes all entities of the type specified from the current map, except for live players.
WARNING: Removing voodoo dolls may break maps which rely upon triggering line specials, and should be avoided.
NOTE: This command does not have any categories, and only corresponds with actor names. I.e. 'remove monsters' will not remove all monsters, though expansion of this command is planned to include some categories.

Level control

  • changemus [<music> [track]]
Changes the currently playing music. Music should be the name of a music lump, a file on disk (which need not have been specified with the -file command line parameter), or a website address for a specific music file. If a music lump contains several tracks (MIDI type 2, certain XMI song, and miscellaneous other music formats support this), then optionally a second parameter can be used to specify the track number.
If no parameters are given, the command will instead log the name of the currently-played lump or file to the console.
  • changesky <texture>
Replaces the default sky texture. This corresponds to the texture defined as sky1 in a MAPINFO map definition.
  • idmus <slotnumber>
Changes the music to that associated with the specified level slot. This emulates the idmus cheat.

Map changes

  • changemap <lumpname>
Shows the intermission screen and then warps the player to the specified map, (e.g. "changemap e2m3" or "changemap map27") retaining the player's inventory and health value in the process. The following can be used instead of a map's name:
  • *: warps to the current map.
  • +: warps to the next map as defined in MAPINFO.
  • +$: warps to the next secret map as defined in MAPINFO.
  • endgame
Quits the current game and go back to the title screen.
  • finishgame
This command simulates an end-of-game action and exists to end mods that never exit their last level.
  • hxvisit <warptrans>
Changes to the level specified by warptrans. Unlike idclev, hxvisit determines the map to go to by finding a map defined in MAPINFO with a matching warptrans. Hence, it emulates the Hexen visit cheat.
  • idclev <slotnumber>
Changes to the level specified by slotnumber. This emulates the idclev cheat.
  • map <lumpname> [dm|coop]
Immediately warps the player to the specified map, skipping the intermission screen. (e.g. "map e2m3" or "map map27") Also resets the player's inventory and health to their starting values, as if they had started a new game. Use changemap to change to a new map without starting the game over. Passing * instead of a map name warps the player to the current map. Optionally the dm or coop keyword can be added to set the game mode to emulated multiplayer. Without this keyword the game mode defaults to single-player.
  • nextmap
Warps the player to the next map as specified by MAPINFO. Also resets the player's inventory and health as if a new game had been started.
  • nextsecret
Warps the player to the current secret map as specified by MAPINFO, just as if he had found the secret exit in this map. Also resets the player's inventory and health as if a new game had been started.
  • open <path & filename> [dm|coop]
Opens the given file and loads the first map found in it. The rest of the loaded file is ignored — custom graphics and sounds, MAPINFO and actor definitions, maps beyond the first, etc., all that are ignored. The map name and slot will be the provided file name, rather than the map's actual slot within the file. Inventory and health are reset as if starting a new game. This command cannot be used in multiplayer mode. Like with map, the dm or coop keyword can be added to set the game mode to emulated multiplayer. Without this keyword the game mode defaults to single-player.

Testing

These commands can be used to test various ZDoom features directly.

  • acsprofile [clear | [<sort-function>] [<limit>]]
Provides ACS profiling information. Optional arguments can be passed to it:
  • sort-function specifies which column to sort on (total, min, max, avg, or runs). The default is total.
  • limit specifies how many rows to limit the output to. The default is 10. 0 or less will print every script or function that has at least one run.
  • clear resets all profiling statistics to 0. It cannot be used with either of the other two optional arguments.
  • clearscancycles
Resets the count of minimum wall scanning cycles. Used for profiling the wallscan function.
  • clearwallcycles
Resets the count of minimum wall drawing cycles. Used for profiling the wall drawer.
  • crashout
Debugging routine for testing the crash logger. This deliberately triggers a crash by MiniWikipediaLogoIcon.pngattempting to write at MiniWikipediaLogoIcon.pngaddress 0.
  • error <message>
Simulates an error by killing the current game and falling back to the fullscreen console with the specified message.
  • error_fatal <message>
Simulates a fatal error by exiting the game completely and showing the error-message.
  • fpuke <script>
Executes a FraggleScript script.
  • gl_flush
Flushes out all textures from video memory.
  • gl_portalinfo
Triggers logging of portal information.
  • gl_resetmap
Resets various internal variables used by the OpenGL renderer to the values from their associated CVARs. Concerned variables are: gl_lightmode, gl_nocoloredspritelighting, gl_notexturefill, and gl_brightfog.
  • initpolymosttest [<value>]
Used to proceed to tests in the uncompleted Polymost renderer. An optional value between 1 and 5 can be given (1: shorter top edge; 2: shorter bottom edge; 3: shorter left edge; 4: shorter right edge; 5: predefined values). In any case, the command has no obvious effect.
  • listsnapshots
Displays a list of which maps have savedata stored (for hub travel purposes) in the current game.
  • listsoundchannels
Displays the current amount of sounds being played, along with their positions, followed by the total amount at the end.
  • loopsound <sound>
Spawns a SpeakerIcon at the player's position and makes it loop constantly the given sound. Like all other sounds in the game, sound must be properly defined in a SNDINFO lump before you can use it.
  • playsequence <sequence> [<number>]
Plays a sound sequence on the local machine. If a number is not given, 0 is used. The sequence must be defined in SNDSEQ.
  • playsound <sound>
Plays a sound on the local machine. Like all other sounds in the game, sound must be properly defined in a SNDINFO lump before you can use it.
  • spray <decal>
Sprays a decal on a nearby wall so you can see what it looks like.
  • puke <script> [arg1 [arg2 [arg3]]]
Executes an ACS script on the current map, optionally passing it up to three numerical arguments. If you try this on multiplayer, sv_cheats must normally be enabled. However, if the script has the "net" keyword, it can be activated by anyone in a multiplayer game.
If the "script" argument is a negative value, the script will be executed as if it had been called by ACS_ExecuteAlways; otherwise it will be executed as if called by ACS_Execute. Script 0 is reserved for Strife support and cannot be puked.
  • pukename <script> [always] [arg1 [arg2 [arg3]]]
Executes a named script on the current map, optionally passing it up to three numerical arguments. If you try this on multiplayer, sv_cheats must normally be enabled. However, if the script has the "net" keyword, it can be activated by anyone in a multiplayer game.
If the always keyword is placed after the script name (and before any optional argument), the script will be executed as if it had been called by ACS_NamedExecuteAlways; otherwise it will be executed as if called by ACS_NamedExecute.
  • skyfog <value>
Changes the density of the fog that affects the sky plane. This allows to test sky fog sheets.
  • special <special> [arg1 [arg2 [arg3 [arg4 [arg5]]]]]
Executes an action special on the current map, optionally passing it up to five numerical arguments.
  • testblend <color> <amount>
Sets the palette blend to a specified color and amount. color can be either a color name defined in the X11R6RGB lump or a color string.amount can be a number between 0.0 and 1.0 inclusive and specifies how much of <color> should be mixed with the palette, with 0.0 being no mixing and 1.0 being full mixing.
  • testcolor <color>
Sets the light color of any sectors using the default light to color. color can be either a color defined in the X11R6RGB lump or a color string.
  • testfade <color>
Temporarily sets the fade color of the current level to color. Most levels fade to black by default, but this can be changed with the MAPINFO lump. color can be either a color defined in the X11R6RGB lump or a color string.
  • testmusicvol [<volume>]
Allows to change the relative music volume of the current song without changing snd_musicvolume. The baseline is 1.0. This can be used to test the effect that a $musicvolume entry for the current song in SNDINFO would have.

Display

These commands can be used to alter or test various aspects of the game's renderer or game display.

  • bumpgamma
Increases the current gamma level by 0.1. If the new gamma level would be greater than 3.0, it wraps the gamma around to 1.0.
  • chase
Toggles the chasecam on and off. This is considered a cheat.
  • fov
Modifies the FOV.
  • r_visibility [amount]
Without any parameters, displays the current visibility. With a parameter, the visibility is set. Standard visibility for the Doom engine is 8. Visibility determines how quickly light drops off with distance from the viewer. At 0 visibility, there is no change in lighting with depth.
  • screenshot [file]
Dumps a copy of the screen to disk as a PNG or PCX file. If file is not specified, the screenshot filename will be in a set format which include the name of the IWAD being used and the time the shot was taken.
  • vid_listmodes
Lists all resolutions supported by the current display driver.
  • vid_setmode <width> <height> [depth]
Sets the screen mode to width x height with an optional color depth (if your video hardware supports it). Only a depth of 8 is supported. (Verification needed)
  • vid_currentmode
Displays the resolution of the current video mode.

See Also