Skip to content

DevConsole Commands

Firebreak-2 edited this page Aug 11, 2023 · 2 revisions

Duck Game DevConsole Commands

This is a list of most of the DUCK HACK (DevConsole) commands. Both vanilla commands and DGR-exclusive commands are listed here, sorted by importance/usefulness.

This list excludes commands that do nothing or do something useless.

DGR-Exclusive

bind

Binds a command to a hotkey to be executed when pressed

Parameters:

  • action
    • add <hotkey> <command>
      • Adds the keybind to run <command> when <hotkey> is pressed
    • remove <index>
      • Removes the keybind who's index is <index>. Find the indexes from the bind list subcommand
    • list
      • Lists out all the currently active keybinds, their indexes, and their command

exit

Exits the game

clear

Clears the console's text

Parameters:

  • [Optional] verbose
    • (true|false) - Whether or not to say that the console was cleared

checkcheats

Checks if you qualify as a cheater for the developer console

res

Modifies the game window's resolution and ScreenMode

Parameters:

  • width
  • height
  • screenmode
    • 1: Windowed
    • 2: Fullscreen
    • 3: Borderless
    • 4: Max

windowtoggle

Toggles windowed mode

config

Get or Modify config fields from the console

Parameters:

  • fieldId
    • The ID of the AutoConfig field
  • [Optional] serializedValue
    • If set, then changes the value of the specified field to the <serializedValue>
    • If ignored, shows the value of the specified field

skipmap

Skips the current map

search

Displays a list of all open Duck Game lobbies in the console, as well as the steam ID for the host of each lobby

steamjoin

Tries to join an online game hosted by the provided steam ID

Parameters:

  • id
    • The steam ID of the lobby

rep

Repeat a command multiple times

Parameters:

  • times
    • The amount of times the command runs
  • command

for

Like the [rep] command but allows you to declare a variable that'll be replaced with the current execution cycle

Parameters:

  • variableName
    • The string of text that will be replaced into the execution cycle. I recommend making it unique like $var or something so it doesnt eat your other text
  • times
    • The amount of times the command runs
  • command

crash

Crashes your game

lanjoin

Tries to join a LAN game hosted by the provided steam ID

Parameters:

  • id
    • The steam ID of the lobby

graphiccull

Toggles the Graphics Culling optimization

help

Gives general help about every command

Parameters:

  • [Optional] includeDescriptions
    • (true|false) - Whether or not to include the description for the command
  • [Optional] verboseParameters
    • (true|false) - Whether or not to show the Type of the parameters, which helps in knowing what kind of value should be used

Parameters:

  • duck
    • The name of the player to kill

advancedconfig

Opens the AdvancedConfig folder

echo

Repeats the given input in the console

Parameters:

  • argument
    • The text to repeat (doesn't execute commands)

dodraw

Toggle the activity of a Drawing Context from it's ID.

Parameters:

  • id
    • The ID of the drawing context, or if none is specified for the method, the name of the method

windowpos

Changes the position of the Duck Game window on your screen

Parameters:

  • x
  • y

rlevel

Debugging command that prints out the number of random level "chunks" you have in your files, as well as their file paths

testdg

Debugging command that launches another instance of Duck Game that will automatically try to connect to your LAN game. Your original instance needs to be hosting a LAN game for the new instance to join, though. Otherwise the new instance gets stuck trying to join a lobby that does not exist

savegraphic

Debugging command that prints out what sprites were not in the sprite atlas

filter

Filters the DevConsole's lines based on their section(s)

Parameters:

  • filter
    • The name of the DCSection (the colored bit behind every command) to filter by
    • Can aggregate filters with | as a separator

Vanilla

give

Gives the specified player a specified item

Parameters:

  • Player
    • The name or profile-index of the person to give the item to
  • Item
    • The code name of the item to give. This can be anything a duck can hold
  • [Optional] Arguments
    • i - If the item is a gun, makes it infinite
    • h - If the item is a gun, equips it in a holster
    • ph - If the item is a gun, equips it in a powered holster
    • e - If the item is a piece of equipment, equips it
    • NOTE: These arguments can be used together in DGR, but not in vanilla

spawn

Spawns a Thing at the given position

Parameters:

  • x
  • y
  • thing
    • The code name for the thing to spawn. Can be anything from items to blocks

close

Closes the console

console

Configures some things about the console

Parameters:

  • subcommand
    • width <new width>
    • height <new height>
    • scale <new scale>
    • font
      • size <new font size>
      • <new font name>
      • clear

team

Sets the team of the specified player

Parameters:

  • Player
    • The name or profile-index of the player
  • TeamName
    • The name of the hat of the team

call

Executes a method of the Duck.cs class on the specified player

Parameters:

  • Player
    • The name or profile-index of the player
  • MethodName
  • [Optional] MethodArguments

set

Sets the value of a field or property of the Duck.cs class on the specified player

Parameters:

  • Player
    • The name or profile-index of the player
  • FieldName
  • NewValue

xpskip

Gives you a Voodoo Vincent furniture item, which skips the XP thing if placed in your room

kill

Kills a player

Parameters:

  • Player
    • The player name or profile-index of the player to kill

fps

Displays your current Frames Per Second for Duck Game

level

Changes the current level

Parameters:

  • level
    • The name of the level to change to

eight

Fills all empty profile slots with a player

savedir

Opens the save directory in your file explorer

userdir

Opens the save directory in your file explorer

copy

Copies the console's last 750 lines of output to your clipboard

mem

Prints Duck Game's current memory usage

localid

Prints your local Duck Game build ID

modhash

Prints your mod hash

steamid

Prints your Steam ID

constantsync

Toggles constant sync

fancymode

Toggles fancy mode. You spawn with FancyShoes every round

wagnus

Toggles guides in editor for Wagnus teleport ranges

qwopmode

Toggles QWOP mode, similar to the modifier of the same name

shieldmode

Toggles shield mode. You now have health in Duck Game

randomedit

Toggles the random level editor in the editor

toggle

Toggles whether or not a layer is visible. Some options include 'game', 'background', 'blocks' and 'parallax'

Parameters:

  • layer
    • The name of the layer to toggle

johnnygrey

Gives you a cool hat

showorigin

Visualizes the center-point of the current map

showcollision

Visualizes the hitboxes of things in the level

showbounds

Visualizes the outer bounds of the current map

clearmainprofile

Wipes your main Duck Game profile of all data

poweruser

Makes the current profile a "Power User", which gives you access to a new set of items in the editor

oldangles

Toggles whether or not angling works as it did before 1.5 or not

sing

Plays a music track

Parameters:

  • song
    • The name of the music file in the game

downpour

Makes it rain random things from the sky