Cheat codes give the player an advantage during the game, from invincibility to infinite ammo. Originally, cheat codes were programmed into a game so that the developers could test the game easily without having to play it properly (i.e. they could become invincible so that they could fully explore what they had created). Since then, cheat codes have become a fond favorite of many people and developers.
Sometimes game developers will insert cheat codes that actually hinder the player, or restrict them in some other way, such as providing all weapons but when the player next dies the game quits. Some cheat codes exist purely for amusement, and serve no real purpose in games. Such cheat codes may also be called Easter eggs.
During gameplay, press the following keys together:
"Backspace" and "Page Down" - Gives fully-powered weapon, full health and all keys
Start the game by typing asp after duke1 in DOS. Then at the main menu, press the following keys together:
"Alt" and "F6" - Play the demo level
And during gameplay, press the following keys together:
G+O+D - All items G+O+W - Warp you to the next level
During gameplay, press the following keys together:
N+U+K - Gives random items/weapon E+A+T - Restores health to maximum G+O+D - Displays a message
During gameplay, type in the following codes:
DNCORNHOLIO - Toggles God mode on/off DNKROZ - Toggles God mode on/off and toggles infinite Jetpack DNGOD - (World Tour only) Replaces the DNKROZ cheat DNSTUFF - Gives all weapons, all inventory items and all keys DNITEMS - Gives full armor, all inventory items and all keys DNINVENTORY - Gives all inventory items DNWEAPONS - Gives all weapons DNKEYS - Gives all keys DNHYPER - Gives Steroids DNSCOTTY#** - Warps to a level (Replace # with the episode number and the two * with the level number, e.g. DNSCOTTY203 takes you to Episode 2, level 3) DNMONSTERS - Toggles monsters on/off DNCASHMAN - When the Open button is pressed, money is thrown out (Duke is damn rich!) DNVIEW - Same as pressing F7 DNRATE - Shows the Frames Per Second (FPS) DNDEBUG - Shows some debugging information DNSKILL# - Changes the skill level to whatever you input for # (enter 0 for no monsters) DNBETA - Displays the message "Pirates Suck!" DNTODD - Displays the message "Register Cosmo" DNALLEN - Displays the message "Buy Major Stryker" DNCOORDS - Displays your coordinates DNSHOWMAP - Displays the entire map DNCLIP - Toggles Clipping Mode (If you walk into empty space, such as inside walls, you die.) (In versions 1.4/1.5, walking into empty space will not kill you.) DNUNLOCK - Unlocks all doors and opens those that are not locked
Note that cheats are disabled on the hardest difficulty setting, "Damn I'm Good." However, it is possible to use God mode in this skill level; this is done by enabling the cheat at a lower difficulty level, and then switching to "Damn I'm Good," either by starting a new game or with the "dnskill#" cheat.
The "dnclip" cheat can occasionally cause the game to crash, especially when the player walks through undefined areas. However, using the cheat during automap mode seems to prevent this from happening.
In addition, entering these cheats may also activate items you are using.
Related Achievements (Megaton Edition only) Edit
During gameplay, press the ` key (top left of keyboard) and type in the following codes:
camera camera - Camera can freely explore the level camera player - Focuses the camera on the player toggle g_debug - Toggles Debug mode r_stats - Display game statistics give life - Gives an extra life give nuke - Gives 10 nukes give all - Gives all weapons (except X-3000), key cards, 100 ego, maximum ammo, and rescues the level's babe give forcefield - Gives forcefield (meter still decreases). give jetpack - Gives Jetpack (meter still decreases). give keys - Gives keycard give Ammo - Gives maximum ammo (as much as is currently allowed - collecting sets of Nukes still increases the amount you can carry) give secret - Gives 1 Nuke secret. It is possible to get more than 10 Nukes in a level this way (but collecting more than 10 has no effect) give health - Gives 100 EGO give bomb - Assumes the level's babe has been rescued (but doesn't visibly free her - subsequently freeing her will do nothing except give 20 EGO) g_p_god - Activates God mode pause - Pauses the game kill - Kills the player g_map_info - Toggles the map info
During gameplay, press the ` key to bring up the console. Then type "exec cheats.cfg" (without the quote marks). Then, during gameplay, press the following keys:
L - Gives 1 extra life H - Gives full ammo for all weapons F - Gives forcefield G - Gives everything I - Gives invincibility J - Gives Jetpack P - Pauses the game K - Kills the player
At the start menu, enter the following codes:
Left, Left, L, L, Right, Right, Left, Left - Activate cheat mode (this allows you to enter the rest of these codes) R, R, R, R, R, R, R, Left - Activates God mode L, Left-C, Left, R, Right-C, Right, Left, Left - Removes all monsters from the game R, Right-C, Right, L, Left-C, Left, Right-C, Right - Gives all items L, L, L, Right-C, Right, Left, Left, Left-C - Level select Up, Up-C, Left, Right-C, Down, Down-C, Right, Left-C - All the above cheats
At the title screen, enter the following codes:
Enter UP,DOWN,DOWN,LEFT,RIGHT,LEFT,UP,UP - Invincibility mode (best done before doing the level select).
Enter LEFT,RIGHT,UP,UP,DOWN,UP,RIGHT,LEFT - Level Select.
Using Flawless Widescreen, enable the Log console after launching the game (don't put FlawlessWs.exe in the same directory as DukeForever.exe). Type the following commands in the log window:
OPEN [Map Name] - Load a different map. See Duke Nukem Forever#Maps for a list of maps. If the game is stuck, this will usually get it unstuck.
STAT - Gives statistics about engine variables.
MEMSTAT - Gives memory statistics.
OBJ CLASSES - List classes loaded.
OBJ LIST CLASS=<objectclass> - List all objects belonging to the class (if the class isn't specified, lists ALL objects).
OBJ DEPENDENCIES PACKAGE=<package> - Show dependencies of the package (e.g. Engine package).
FLUSH - Crashes game.
SAVEGAME - Saves the game (does not work, no CPS file is created).
EXIT - Force close the game.
SET Commands Edit
set <class> <property> <number/text/we> - Changes settings of a class. Property can be e.g. "health". Example: "set pigcop_grunt health 1" makes all pigcop_grunt in current map health 1. These commands do not persist through map loads.
set engine.playerpawn binfiniteammo true - Infinite ammo to all weapons (including weapons that overheat, like turrets, as well as HoloDuke, pipe bombs, trip mines, beer, and steroids).
set Engine.PlayerPawn bGodMode true - Infinite Health and Breath (can still die by crushing and falling out of bounds).
set dngame.playerpawn vehiclepov vpov_firstperson - Change vehicles to First Person View.
set dngame.playerpawn bbehindview <true/false> - Change view from third-person to first-person.
set dnGame.<Weapon to Change>Pickup InventoryType Class'dnGame.<Weapon You Want>' - Change all weapons from the first variable to be weapons of the second variable.
e.g. set dnGame.DevastatorPickup InventoryType Class'dnGame.Nuke' - Change all Devastator pickups to Nuclear Missile Launchers.
give dnGame.<Weapon You Want> A better way then changing the pickups. NOTICE! This command must be typed in console!
For example give dngame.nuke
Valid weapon (and item) names:jetpack
Pistol Pistol_Gold Shotgun MachineGun EnforcerGun Railgun RPG FreezeRay Devastator ATLaser ATCaptainLaser Nuke TripMine WallBomb PipeBomb Steroids Holoduke Jetpack (press J to activate)
Editing NPCs and playersEdit
editactor class=DukePlayer editactor tag=Casino_FallingElevator_Girl editactor class=stripper
- If you want to find more NPC classes and tags, open editactor window for DukePlayer while looking at some NPC, the name will be under None section in one of the Look* fields.
Binding full console to O key (so FlawlessWidescreen is no longer needed)Edit
set input O ShowLog
Enabling SOS Console in-gameEdit
Once you have the Dev Log window open, type in the following command:
set input Tilde ShowControls | Type
Press the Tilde key in-game and you get access to the SOS console.
Note: SOS console can't be enabled this way in the latest DNF versions with DLCs installed (Parody Pack and Doctor Who Cloned Me). If you find new way, post it here.
Codes exclusive to the Demo (not anymore, they work once you enable SOS console in the full game)Edit
set engine.playerpawn binstagib true - makes all weapons so powerful that they kill with one shot.
set Engine.PlayerPawn bGhostMode true - Walk through walls and fly.
set Engine.PlayerPawn DefaultFOV 120 - Change FOV.
GOD - god mode GHOST - noclip mode FLY - fly mode (clipping) WALK - walk mode (if ghosting or flying) ALLAMMO - all weapons and items PLAYERSONLY - freeze time or unfreeze it SLOMO <0.1 - INF> - slow/fast motion time (1 = normal time) BEHINDVIEW 1 - 3rd person view BEHINDVIEW 0 - 1st person view KILLALL <destroys all these in a map (like "killall pigcop_grunt" makes all pigcop_grunt vanish) KILLPAWNS - destroys all pawns (monsters, babes...) OPEN <map name> - opens a map SUMMON <class> - ) map mapXX YY - opens map named mapXX on checkpoint YY (e.g. map map04b 06)
List of summons (for SUMMON cheat, incomplete):Edit
aFinalDecoration_DoorBase aFinalDecoration_Switches AIShield AlienQueen AssaultCommander AssaultTrooper_Grunt AssaultTrooper_Captain Barrels_Generic Battery Battlelord_Boss Biology_Generic_AnusDoor Biology_Generic_AnusDoorFanged Biology_Generic_GrowPod Biology_Generic_Poop_A Biology_Generic_ShrinkPod Biology_Generic_WallBoobs Bottles_Generic_Beerbrown Bottles_Generic_Champagne Containers_GarbageCan_Medium_Round_Gold Containers_Pile_InfiniteAmmo Containers_Pile_InfiniteExplosives Cycloid DA_HUD_Replace_Locked Details_Balls_BasketBall Details_Balls_PoolBall Details_Generic_CigarettePack Details_Generic_CondomPacket Details_Generic_DrinkCan Details_Generic_DVD Details_Generic_DVDCase Details_Generic_Frisbee Details_Generic_PaperAirplane Details_Generic_Trophies_ArmWrestling Details_Generic_Trophies_BodyBuilder Details_Generic_Trophies_EarthSavior Details_Generic_VendSnack Details_Generic_Vibrator dnControl_Battery_Housing dnControl_Chair_Throne dnControl_CoinOp_Poker dnControl_CoinOp_SlotMachine dnControl_Copier dnControl_ElevatorBrake dnControl_GasTank dnControl_Ladder dnControl_NutAndBolt dnControl_TapPowered_DoorBase dnControl_VentRip_CircularGymVent dnControl_WorkoutBench dnControlHelper_WorkoutBench_Bar dnDecoration DukeClone DukePlayer DukesBiggestFan EDF_Captain EDF_Grunt EggPod Electronics_Generic_CoffeeMachine Electronics_Generic_DeskFan Electronics_Generic_DVDPlayer Electronics_Generic_EmergencyHatchRelease Electronics_Generic_Microwave Enforcer Furniture_Generic_Chair_Barstool_StripClub Furniture_Generic_Chair_MakeupChair Furniture_Generic_Chair_Office_B Furniture_Generic_Chair_StripClub Furniture_Generic_Chair_Tech_B GasCan GeneralGraves HoloActor Industrial_Generic_ConcreteBlock_A LabEquipment_Tech_HoseCoupling Lights_Generic_StudioSpotlight Lights_Generic_EmergencyLight_A Lights_Generic_FluorescentLight_InCeiling MILF OctaBaby OctaBrain OctaKing PigCop_DualPistol PigCop_Grunt PigCop_Machinegun PigCop_RPG PigCop_Shotgun PodGirl PodGirl_HolsomTwin Pregnator Rat Settings_FoodService_FloorFridge_Door Settings_LadyKiller_DestructibleVase Settings_Workout_BarWeight_100lbs Settings_Workout_HandWeights Signs_Generic_WallHanging Snack_Donut Snack_Popcorn
You can find more names for summons inside *.dnf files in duke forever\maps directory, just open them with text editor and look for anything that looks like class name. Share your findings here.
Game Save EditingEdit
Editing save game files is possible for the Xbox 360 version of the game see Here, and should be possible with the PC version. Tools do not yet exist to do this.