Duke Nukem 3D: Megaton Edition

Duke Nukem 3D: Megaton Edition

108 ratings
Mods and ports 101
By Aza
Learn how to load mods on Megaton Edition and how to set up your own installation with third-party ports if you want to benefit from new features such as dynamic lighting and shadows, 3D models, code improvements, etc...
   
Award
Favorite
Favorited
Unfavorite
Introduction
Modern ports offer advanced features to make Duke Nukem 3D's gameplay even more awesome. Don't worry if you prefer Megaton, you can play mods on it as well. But before getting there, you need some technical knowledge about mods. There are different possible scenarii when installing a mod. After reading this guide, you should be able to figure out how to run them.

Note: the softwares presented in this guide are third-party softwares and won't unlock any Steam achievement.
Ports to choose from
If you want to stick to Megaton Edition, skip straight to "Mod loading, how does it work?".

If you are interested in using ports, here are the most useful ports:

  • EDuke32 (supports all OSs): simply the best singleplayer port. It offers advanced mod scripting, 3D models support, Polymer renderer (dynamic lighting and shadows) and true room-over-room support (Duke Nukem 3D didn't support it fully). Net code is back but it's still in an early stage (extremely buggy). For multiplayer, I recommend you grab the old MP build[forums.duke4.net] so it doesn't get out of synch or crashes.
    Link[eduke32.com]
  • xDuke (Windows only): If a mod doesn't work on EDuke32 because of scripting errors, this one should do the trick. It is a direct port from the original DN3D. No changes, no improvements, just Duke Nukem 3D as known on DOS for 32/64 bits systems.
    Link[vision.gel.ulaval.ca]
    {LINK REMOVED} (prevents graphical glitches)
  • hDuke (Windows only): I recommend this one for Dukematching. It has anti-cheat protection, frag limit, Duke-Tag (capture the flag) improvement and it is based on xDuke (closest to the original Duke Nukem 3D).
    {LINK REMOVED}
Ports installation
It's always the same procedure: unzip the archive wherever you want and place a copy of duke3d.grp with the executable. It is located in Steam/SteamApps/common/Duke Nukem 3D/gameroot/classic. For XDuke/hDuke, run them from their batch files to prevent any graphic glitch. Basically, they will kill explorer.exe which causes these glitches on older applications. Don't worry though, it will restore the process after you are done playing. Just don't close the batch window!
Note that for the latest builds of EDuke32, you don't need to do all this as it automatically loads Duke Nukem 3D and its add-ons from the Megaton installation.
Mod loading, how does it work?
Like any game, loading a basic mod consists of replacing the original game's files.

Fine, but where are they located?
It's all in duke3d.grp but you don't need to modify it. Instead, the original content is loaded and the new one overwrites it.

Different scenarii for that:
  • You get a .grp file: put it in the root folder (Megaton's is gameroot; otherwise put it with the port's executable file). There must be a batch (.bat) file with it. In this batch file is the command line needed to load the mod's content. You normally just need to run it.
  • You get seperate files (.voc, .map, .art...): same as above. Be aware this method makes mod unistalling complicated. You will have to delete each mod file among the original ones. EDuke32 makes this method really easy: put all the files in a subfolder named after the mod and select this folder on screen startup to load all of its content.

    As for XDuke and hDuke, you have no choice but to dedicate a duplicated installation folder to run such mods if you don't want them to conflict with each others.
  • You only get a folder: it means you have downloaded an EDuke32 mod. See previous scenario about loading a subfolder. There usually is a .bat with it though.
Loading mods with Megaton
If there's a batch file included, modify it (right click --> modify) and look at the command-line parameters.

Example:
duke3d.exe /xthegate.con /gthegate.grp

Copy that. Right-click on DN3D Megaton Edition in your Steam games list and go to the properties. Then click on "Set launch parameters" and paste it in. Click OK and close the window. You can now launch the game normally to play the mod.

Concerning maps (if you don't use Workshop), you just have to drop them in the "maps" subdirectory and select them in the custom maps menu.

Please note that EDuke32 mods (apart from HRP) won't work with Megaton.
Getting old mods to work again with ports
In old mods, batch files call for the old duke3d.exe. All you need to do is to edit them with a text editor like Notepad and replace it with the port's executable file name.
Some require 1.3D version. These are incompatible with the current version (1.5) because of the way it is scripted: 1.3D forced devs to overwrite monsters while 1.5 allows them to make new ones while keeping the originals. You can only fix this problem if you have the 1.3D grp: place it in the mod's subfolder for EDuke32 or make another installation of xDuke/hDuke dedicated to 1.3D.
HRP, music packs and other enhancement mods for EDuke32
EDuke32's advanced scripting and engine changes offers the possibility to create astonishing mods that enhances Duke Nukem 3D's gameplay so much, it almost looks like a modern game.

High Resolution Pack

This includes 3D models and high resolution textures. Playing it with Polymer renderer is a must. Demonstration:
Download it in the HRP website's download section[hrp.duke4.net] and install it in autoload/duke3d.grp subfolder. To use it, tick "Use "autoload" folder" box in the lower left corner of the startup window. To use Polymer, tick the box on the upper right corner.
You could always use the SVN installation (advanced users only) to benefit from the latest updates without having to wait for the next public release. It is included in the set of scripts to install add-ons enhancements pack (check out How to Download Add-on HRP SVNs' instructions[wiki.eduke32.com]).
Please note HRP requires high computer specs.

Music packs

You can find them on the same page as the HRP's[hrp.duke4.net]. There are also console versions music packs which you can grab here[hendricks266.duke4.net]. These includes aggressive modes which load musics exactly like in original versions. Simply put them in autoload/duke3d.grp subfolder.

Enhancement mods

Official add-ons have their own enhancement packs which include their specific HRP, HD music remixes and code fixes and improvements. Check out The Official Add-on Installation Guide's instructions[wiki.eduke32.com] to learn how to install them. Add-ons grps are located in Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons.
After installing them, you will have several batch files. Their names indicate what mod they load. Here is a list of abbreviatings with their corresponding meanings:
  • DP: Duke Plus. I'll describe this mod in the next paragraph.
  • XXX: Nude pack. Available with more info in the HRP website's download section[hrp.duke4.net].
  • Edit: Level editor.
  • Debug: Debug mode. In case something goes wrong with the batch file, run it in this mode to determine what's the cause of the problem.

Duke Plus

This mod is a must-have if you want a modern gaming experience while keeping vanilla Duke. It includes new weapons, enemies variation, weather effects, new taunts, new gameplay elements and many other cool stuff. Demonstration:
It is compatible with most mods. As an example, it is used by the enhancement mods I cited above. Another good example is Duke Nukem Eternity which is entirely based on Duke Plus and the Polymer lighting.
Duke Nukem Eternity's ModDB page

To install Duke Plus, simply extract the archive in EDuke32's folder.
Duke Plus' official website[fissile.duke4.net]

LeoD's custom packs

If you want to go even further in customization, you may want to check these awesome custom packs LeoD made[forums.duke4.net].
If you experience low framerate with HRP and Polymer even at low resolution, use his Polymost HRP Override Pack. It brings back old HRP models with fake bump mapping (so you can disable Polymer) as well as some other material reverts. Drop it in autoload\duke3d.grp subfolders.
You want Duke's awesome gloves just like in DNF? Try the Z-Pack! It provides gloves to all view models (even in notorious mods like DukePlus) and alternate skins to troopers and pigcops. Also changes DukePlus' laser gun.
HRP in Megaton
THIS PACK WAS NOT DESIGNED FOR MEGATON!! DO NOT EXPECT IT TO LOAD FULLY!!

1. Download the packs of your choice.
I will cover the most recommended:
- HRP[www.duke4.org] (obviously)
- A music pack of your choice[hrp.duke4.net]. For this example we will take Mark McWane's Music Pack[www.duke4.org].
- PSX sound pack[www.duke4.org]. It is the same sounds as in the original DOS Duke but in high quality (ripped directly from the PSX CD).

2. Install these packs in Megaton's gameroot folder.
Simply dump it all (except the music pack) in Steam\SteamApps\common\Duke Nukem 3D\gameroot.
For the music pack, rename music subfolder and make a new one named "music" without quotes and put all the .ogg files from the pack in. Copy nwinter and vacation subfolders from the original music folder in as well.

3. Load it all.
You have two solutions to launch your mods.
- Using launch parameters. It's the easiest but not the most flexible solution.
Right-click on Megaton in your Steam games list, go to the properties and open the command-launch parameters window. Write this:
-gduke3d_hrp.zip -gduke3d_psx.zip -hduke3d_hrp_megaton.def
Delete this to get back to your original Duke.
- Doing it via a shorcut. This is the cleanest way to load it all since you can repeat it to create multiple configurations and you can place the shortcut(s) wherever you want with this method. Open up notepad and copy/paste this in:
start steam://rungameid/225140//-gduke3d_hrp.zip%%20-gduke3d_psx.zip%%20-hduke3d_hrp_megaton.def
Save it as a .bat file wherever you want. Note that after the game's ID everything is the same is in the first method. The only difference is that you have to replace every space with %%20, so now you know how to modify this to your liking.
However, you will be prompted by a Steam pop-up that your game will be launched with parameters. This will require you to get on the Steam client window and click OK everytime.

Don't hesitate to add more parameters to load mods.
Of course, if you update any pack that has version number in its name, change it accordingly.

And that's it.

As a proof, here are some screenshots:
http://steamcommunity.com/sharedfiles/filedetails/?id=196784659
http://steamcommunity.com/sharedfiles/filedetails/?id=196867865

It also works with Duke It Out in D.C. Get the package on this page[hrp.duke4.net]. Instructions are the same but you will have to place this def file[puu.sh] in the gameroot folder and use this new command-line:
-gduke3d_hrp.zip -gdc_hrp.zip -hdc_hrp.def

Of course, all credits are due to their respective authors (see text files in the archives).
Playing online
Loading mods online is explained in my other guide: How to play online
The command line you need is usually in the mod's batch file. Remember that you can use command line arguments that will only affect yourself like disabling the music. Useful if you don't want to bother anyone with your preferences.
Advanced understanding
Now that you know the basics, I'll explain here what's each file's purpose and how to load a mod manually by writing a command line yourself so you can try and fix problems alone.

File types

  • .grp As explained before, it regroups all the other types of files. In EDuke32, it can be replaced with a .zip file.
  • .voc Sound effect file.
  • .mid Music file. If named after a level, it will be played automatically when said level is played in EDuke32.
  • .art Graphic materials file.
  • .con Script file. This is where all the code is. Usually comes in three files: defs.con (to index quotes, level names, etc...), user.con (effects parameters) and game (main con; all the main code is in there).


Command line arguments

A command line is composed of the executable's name followed by its swtiches and parameters (e.g. EDuke32.exe /xthegate.con /gthegate.grp). Here is the list of switches you need to know:
  • /v(usually 1-4) Determines what episode will be loaded on startup.
  • /l(usually 1-11) Determines what level of the episode will be loaded on startup.
  • /s(1-4) Determines what skill level you will play on.
  • /g(file name) Loads a grp file. You can use it multiple times to load several grp files. Also loads zip files as if they were grps.
  • /x(file name) Loads a .con file. Specify the main con file (something like game.con sometimes).
  • -map (map name) Loads a map on startup.
  • /h(file name) Loads a .def file (EDuke32 only). Def files usually redirect original materials to custom ones.
  • /j(folder name) Loads specified folder content (EDuke32 only). Can be repeated to mount several folders.
  • -game_dir (folder name) Selects custom content folder on startup screen (EDuke32 only). Can only be set once.

For instance:
steam.exe -applaunch 225140 /xthegate.con /gthegate.grp
...loads thegate.con as the main configuration file and thegate.grp on Megaton.
hDuke.exe /gthegate.grp /xthegate.con
...load thegate.grp and thegate.con as the main configuration file on hDuke. This is the most common example.
Eduke32 /ga.dream.grp /ga.dream.zip /hmodels.def /xA.DRGAME.CON
...loads both a.dream.grp and a.dream.zip with models.def (which is located in the zip file) as well as the main con file of the mod on EDuke32.
EDuke32.exe -game_dir DukePlus
...simply selects DukePlus folder on EDuke32's startup screen.
EDuke32.exe -jImperium -game_dir DukePlus
...loads imperium folder's content in the background and selects DukePlus folder on EDuke32's startup screen.

The line you will come up with needs to be saved in a .bat file. Just open a text editor and save it as a .bat. It's simple as that.
Where to get custom content
Now that you're ready to kick more alien asses, here's where you can grab custom content:
  • Dukeworld: the biggest Duke Nukem 3D files database. They are split in three categories: classic dukeworld[dukeworld.duke4.net] (old stuff), 2001-current[dukeworld.duke4.net] (mainly newer stuff for modern ports) and eduke32[dukeworld.duke4.net] (for current public release and latest dev build in synthesis subfolder). If you are looking for add-ons, look into TC (as in Total Conversions) folders.
    Link[dukeworld.duke4.net]
  • Duke Nukem Repository: another impressive database that focuses on maps and add-ons. It offers reviews and exhaustive informations about maps.
    Link[www.dukerepository.com]
Troubleshooting
Q: I get custom contents that don't belong to the mod I want loaded.
A: This is probably because you have data files (check previous paragraph) in the port's root folder. Delete any .mid, .voc and especially any .con or .art file that is located with the executable.

Q: I get an error message on startup that says there are internal con errors in GAME.CON.
A: It usually means the mod requires Duke Nukem 3D 1.3D. See old mods paragraph. Otherwise, if under EDuke32, it could mean the guy who scripted the mod did a sloppy job. EDuke32 has a strict code interpreter. Try using xDuke instead.

Q: When playing online, hDuke says me and my friends have different GRP or CON files.
A: You and your friends need to have the exact same con files. This prevents cheating. As for the GRP, you need the same version as well. If you already have the same version, check if the CRCs differ. If they do, this means someone probably had a grp hosted several times through different hosting services which altered its size a bit. Buy the game, you greedy git!

Q: When starting a coop, dukematch or duke-tag game, only one player appears and the others die instantly on his position. They can't respawn and can only watch the game from spectating view.
A: This is because the map has been designed for single player so there's only one spawn entity (spawning on the same location results in a telefrag). Check the readme file supplied with the map if any. They're usually written based on the same template, thus making reading information easy.
Conclusion
I hope you guys found this guide useful and exhaustive. Drop a comment to let me know what you think of it, notify me of anything wrong in it or make a suggestion.
If you find troubles loading a mod and you can't solve your problem, post it in the comments section and I'll be more than glad to help you. :)
42 Comments
ammi Jan 21, 2022 @ 7:01am 
dont know if anyone posted before
but you guys may take a look at raze https://raze.zdoom.org/about
Legs Jun 9, 2021 @ 10:09am 
Appreciate the hefty post.
Will have to take a gander next time I fancy abit'a Duke.

Must be loads of quality stuff given how long it's been out.
Aza  [author] Sep 10, 2019 @ 7:36am 
I'd recommend taking the latest stable build [dukeworld.com] unless you are playing a mod that requires a recent dev build.
If you are still encountering issues, you can drop by the EDuke32 support forums [forums.duke4.net], or you can add me and we'll look through it together.
David Wongstein Aug 31, 2019 @ 8:50pm 
What's the best version of EDuke32 to get?
Some of them are kinda buggy...
Aza  [author] Dec 30, 2015 @ 10:28am 
That's exactly what I wrote at the end of the "Ports installation" paragraph.
Micky C Dec 29, 2015 @ 5:16pm 
You don't need to place the duke3d.grp with eduke32 to get it to work; eduke32 detects the grp remotely from the megaton install. Just download it wherever and play!
Aza  [author] Mar 23, 2015 @ 8:39am 
Just tried to replace the music just in case and it does nothing but replace audio tracks.
I'm gonna explain it again in another way just in case:
1. Make a copy of music folder and rename the original one something like "music_bak". This will be your backup folder in case you don't want the new music anymore. Make sure the new one is name "music".
2. Download the music pack of your choice.
3. Browse through the archive and go to "highres" and then "music" folder.
4. Extract all the .ogg files in the new "music" folder. Overwrite everything.
5. Launch the game.

As stated above, if you don't the new music anymore, rename the new music folder (I personally renamed Mark McWane's music pack as "music_mcwane" to know what folder contains which pack) and rename the old one "music".

Try again and see if it works.
ⅡMajor ValkerⅡ Mar 23, 2015 @ 8:03am 
nope
Aza  [author] Mar 22, 2015 @ 1:09pm 
I don't see how graphic problems are related to the audio. Are you using the HRP as well?
ⅡMajor ValkerⅡ Mar 21, 2015 @ 2:30am 
i have a problem. i just set the music folders in the pack and did the same things as in the instructions. i hear the music and the title screen shows up. but when i start a map the screen is black and nothing is shown but i can still hear the music and sfx. can someone help me with this.