the cutting room mirror

Unused Code

This is a sub-page of Duke Nukem Forever.

The game's main code can be found the .U files stored in MegaPackage.dat. These can be decompiled into .UC scripting files or simply viewed through a program. Seeing how long Duke Nukem Forever was in development for, its not too surprising the developers would leave in a lot of obsolete code in the game.

In addition, the Windows version contains DLLs located in the System folder.

Do note that code being here doesn't necessarily mean that it is completely unused.

To do:

  • Don't actually put code here, just give an explanation of what the code you're talking about does or is meant to do.
  • The Windows version's .DLLs could use investigating, specifically:
    • 3DRDebugLib.dll - The name kinda gives it away, likely contains a lot of debug content.
    • BugHandler.dll - Has a copyright credit to 3D Realms dated to 2002.
    • DnCommon.dll
    • DnGame.dll - Has mentions of the radio stations.
  • Any methods on how to check whenever this are unused or not would be appreciated.
  • Unused text strings typically have associated script files, these could be used to find more code (especially if the text was removed from the PC version).

(Acknowledgements: Futuretime23 for much of the content here)

dnAI.u#

ScriptMetoid_X_TEST_Op#

Presumable a test script, includes the comment:

"Op to execute.  (NOTE: This is a test method only - do not use for production scripts.)"

dnGame.u#

This package handles content like weapons, game modes and the like.

dnAnimationControllerEx_Nuke#

Defines the Nuclear Warhead's animations.

dnBombMessage#

Code for printing messages about the status of the bomb from the cut "Bug Hunt - Plant/Disarm the Bomb" game mode seen in the 2001 Prototypes.

dnRadio#

Defines the initial station of the radio and the amount of time it takes to switch stations.

dnRadioTower#

Defines the station's content like songs and commercials. There also seems to have been an option for the player to create their own custom radio stations using MP3s.

There are two station definitions left in the code:

Name

ID

95.3 Ninja Radio

Ninja

106.7 HiFiNRgR4v3r

HiFiNRG

LaserMine#

The trip mines have variables that don't appear to be used such as it being able to be shielded, the color of the beam being able to be changed and the ability to make it share a beam with another trip mine.

It also contains a mention of a no longer existent texture in the files.

ArmMineMaterial=SmackerTexture'mt_skins5.TripMine.trpsmack'

dnTeamDMMessage#

Intended for message when a round is ended, remnant of when multiplayer once revolved around the EDF fighting Pigcops. Shows that there was supposed to be cheering and booing sounds effects for the teams depend on whenever they won or lost, probably akin to Team Fortress 2.

dnQA#

Judging by the name, this was most likely used during testing of the game at some point.

dnMutator_LowGrav#

An unused mutator for low gravity. Exists in the 2001 prototypes. Includes a reference to a dnqa.3drealms.com website with a server port of 5150 that was likely used for QA at 3D Realms and almost certainly doesn't exist anymore.

Nuke#

Definition for the Nuclear Warhead ammo for the RPG.

Editor.u#

Since no editor was included with the final release, all of its code and objects go unused. The list below displays all of the files found in this package.

  • BrushBuilder
  • ConeBuilder
  • CurvedStairBuilder
  • CubeBuilder
  • CylinderBuilder
  • EditorMesh
  • EditorEngine
  • LinearStairBuilder
  • Options2DShaper
  • Options2DShaperBezierDetail
  • Options2DShaperExtrude
  • Options2DShaperExtrudeToBevel
  • Options2DShaperExtrudeToPoint
  • Options2DShaperRevolve
  • Options2DShaperSheet
  • OptionsBrushScale
  • OptionsMatNewStaticMesh
  • OptionsProxy
  • OptionsTexAlign
  • OptionsTexAlignCylinder
  • OptionsTexAlignFace
  • OptionsTexAlignPlanar
  • SheetBuilder
  • SpiralStairBuilder
  • TerrianBuilder
  • TetrahedronBuilder
  • VolumetricBuilder

Unused DLL Code#

Editor#

Editor.dll was obviously meant for the game's editor, "DukeEd".

ezMAIL#

Remnants of the ezMAIL system that was able to send email in real time as seen in the 2001 prototypes can be found in Engine.dll. Much of the code for this seems to have been stripped out, with text mostly being left in.

This feature was removed from the game no later than early 2006.