Duke Nukem 3D: Megaton Edition

Duke Nukem 3D: Megaton Edition

Not enough ratings
Duke3D art modding tutorial.
By Skyware
This is a basic tutorial for editing and importing art into Duke3D using free third party software without the use of EditArt.
Only the bare basics of importing and exporting will be covered with links that will in detail describe limitations and requirements of the old engine for the best results when adding or editing artwork.
   
Award
Favorite
Favorited
Unfavorite
Software required
Note: To clarify since someone asked to avoid future confusion you can use this to edit any art within the .GRP files that includes aliens, weapons, player art and all tiles, items, sprites and etc. Anything outside of that for megaton edition to edit such as the bar down at the bottom you need to explore you gameroot folder, to find it navigate to:

Update: Due to a question asked about this you can use this method for any copy of the game. All versions of duke rely on .GRP files and .ART files so if you're using this to work with Eduke32 or GOG version this should work perfectly fine. ART files are independant from GRP files so you can plop ART files in your game folder and the game should read the ART files first so if you ever edit stuff and want to go vanilla again just delete or move the ART file to another location.

(Hardrive letter)>Program files(86x)>Steam>Steamapps>common>Duke Nukem 3D>gameroot

For everything else to do with the .GRP files follow the rest of this tutorial.

Disclaimer: While this software is free you should always scan any software you get off the internet for viruses before installing or using. I don't take responsibility if something goes wrong or something doesn't work right.

First you'll need an image editing program more advanced than ms paint. Either photoshop or gimp will do the trick. Since i don't have photoshop i'll only cover the process in gimp.

First you'll need to get gimp if you don't have it. Grab it here: http://www.gimp.org/

In order to even access the art from duke3d we'll have to get some software to do that. We're doing that with a program called DukeRes. We will be using a hacked version by Scott_AW that fixes the features we need as well as make it run on 64 bit. WARNING: Although it only fixes some issues with the software this is still a hack and you use it at your own risk. Please scan and verify it yourself before using.

If that scares you to much then you should stop here and check out my other tutorial that explains importing and exporting art into duke3d the long way although some of the links are old and no longer work. Otherwise we'll be grabbing DukeRes hacked version here:

http://dukertcm.com/knowledge-base/downloads-rtcm/duke3d-tools-editart/DukeResHack.zip

What you'll need to do now is install gimp any way you like and unzip DukeRes into it's own folder in any place you like. Before you do though i highly suggest you scan it.

Once that's done you should try running gimp at least once.
Getting started
Okay now that you have your software you're going to want to run DukeRes. If you're on windows 8 and it says it stopped it from running just click more info and you should then see the option to hit run anyway.

Once it starts up you'll see a window open as well as a mini window that is asking you what kind of file it want's you to start with.



Click okay and it should be fine. Next you'll want to hit File and then hit Open. Another window will open and now you'll navigate to your Duke3D classic folder from steam which should be:

program files>Steam>Steamapps>Common>Duke3D>gameroot>Classic.

You should probably copy that folder elsewhere into another part of your hard drive then dowloading and extracting Eduke32 into it which you can get here:

http://dukeworld.duke4.net/eduke32/synthesis/eduke32_latest.7z

Download and save it then move it into the same folder you copied the contents of your classic folder into. Extract it. We'll be using this later as a bit of a test.

Going back to DukeRes once you navigate to your classic folder or where ever you copied your classic folder over to you'll need to open the duke3d.GRP file. Open it and a bunch of stuff should show up on the little box near the top left.



You'll see where it says Art with a little + symbol in a box on the left of it. Click it to expand it and see all of the .ART files contained within the .GRP file. The .GRP file acts sort of like a big zip file in the simplest of explanations and it contains multiple files for various things. You can also extract other things out of the .GRP file aside from just art but that's all we'll focus on for now.

Now you'll want to click the first in the list TILES0000.ART is the file you want. If you want you can take the time to click each one and explore the art from the game and navigate it by scrolling horizontally with the little scroll bar underneath the tiles. Once you're done exploring though go back to TILES0000.ART and you'll see the first tile is some ugly grey brick. Bleh.



Now you'll want to right click it in the tile spread beneath the preview box and hit "Save file as". To make it easier on us we'll save the file to the desktop. The file will be 000-000.bmp, there is no need to change the name or the extension. Just save it then open it with gimp. If it asks to change colors tell it no since Duke3D's color pallette is very finnicky we need it in tact.
Template and Import.
Now that you have it in gimp it's a good idea to go ahead and make a template file so we can always just open gimps native .XCF file for later use.

First you should see two windows that open up with gimp automatically. For me the one we want is on the right but for you it might be on the left by default.



You should see a small arrow underneath the X on the window. click it and navigate to: Add tab>Pallettes.



Click it and you should see a new tab appear. in that window. Click it and then you should see the upper half of the window change to show a different bunch of selections. Navigate to the top of the list and you should see one listed as "Colormap of image #1 [untitled]".

I want you to right click it and press "Duplicate pallette" and it will save the pallette to the program so we can use it again later. Rename it to Duke3D so you know which one it is.



Now that it's in there left click it and a small window should pop up with a bunch of different colors on it that you can click through. Click the very bottom right one to select it. Select the paint bucket tool under the window on the left and then in the image itself while holding shift i want you to click in it while using the paint bucket tool. This color is the transparency color for Duke3D and should always be our default so if we put something in there that needs transparency it will have it.

Next i want you to navigate up to the top and navigate to: Image>Scale image. Click this and it should bring up another window where you can change the dimensions of the image where it says width and height and numbers beside it.



You should see a simple little chain icon right next to those numbers. Press it and the chains should break apart. This means that when you change the image size by whatever means you want either by pixels, inches, percentage or whatever it will no longer keep its original proportions and now you can freely change both heigh and width without it trying to keep it's original shape. Change the dimensions of both height and width to 512 and hit the scale button.

Now Duke3D images need to be by the power of 2. It can be otherwise but it might be a bit screwy if you apply it to a floor or ceiling in a map but it'll render fine in game but in build it'll look weird and like colorful static. So 512x512 is probably as big as you should get but i think it can support up to 1024x512. but you can change up the dimensions so long as the dimensions are by the power of two. In example the original size of the image we changed was 64x32 and worked perfectly fine in the game and the map editor. For more in depth detail refer to this link:

http://dukertcm.com/knowledge-base/documents-online/art-editart-guide2.htm

Scroll down to "Import ready images" and read there for more info.

Now that we have this all set up lets go ahead and save it so we can use it again later. In Gimp go to File>Save as. Save it any file name and any place you like so long as you can remember what it's for.

Now you'll want to grab any art you want to try and bring in. Grab anything you want. If you need a quick example piece of art to work with i will supply you with some of my own work a simple stylized rocky tile i made myself with a 64x64 dimension i made in pyxel edit.



http://i.imgur.com/I6YW75q.png

Save that anywhere and open it in gimp. Another window should open for the new image. Copy this image over and paste it into the file we had been working with. Now paste it in with CTRL+V and it should appear on a floating layer in the center of the image. Now go to the top and navigate Image>Autocrop image. This will crop the image around the selection and it will automatically be converted to the duke pallette since we just pasted it in. Neat huh?

Now go to: File>Export as. Then a window should open and navigate to your desktop and save it as a .PCX file. Now that it's exported go back to DukeRes and scroll to the right until you see a blank spot in the tile spread. Right click in that place and hit Import. A new window should show up and go to your desktop and change the file type from .BMP to .PCX and locate your file that you had just saved to your desktop and open it. Once it shows up, in DukeRes you'll go to File>Save as single art file.



Click it and navigate to the folder you copied the classic folder contents over to and save it there. Don't change the name! Just save it as is. Duke3D will only recognize the files if they follow a certain numeral naming system. If you save it as a single .ART file Duke3D will open that by default and if you want to undo your changes just delete the .ART file and duke will use the internal file within the .GRP file.
Testing your art!
Now that you have your files saved in the .ART file you should be able to see it in game. But for me i'd prefer to test it by using it as a texture in a map made with mapster32 just to see if working with it in the map editing software will be alright.

First you'll want to go to the folder you copied the contents from the classic folder into and find mapster32.exe. A window should pop up but just hit okay when it's ready to go, no need to change any settings.



When it starts up you should see a white grid on a black background with a white arrow in the middle. That white arrow is basically an indicator of where you are represented in the 3d view. But there is no 3d view yet since there's no world to see yet!

first you'll notice that your cursor has been turned into a little red cross. Move it to one of the corners of the screen and press space. now you'll notice there's a point and there's a line between your cursor and that point. Move your mouse to the nearest corner and press space again and keep doing this until it loops back around and meets with the original spot you started and press space over that to connect that. Those lines represent walls and now you created a box to start out in. In order to see it you'll need to go to your number key pad on your keyboard and press enter, if you don't have one then you'll need to find an alternative way to do it by going to the Eduke32 website and going through their documentation how to change it.

Once you do that you should see that you're in a box with grey dull bricks if you hadn't change out the first tile. First point your cursor to any surface and press the V key. Now press V again and you should see a bunch of tiles come up. navigate them with the arrow keys until you find your tile. place the white box over it with the arrow keys and press the normal enter key to apply it and tadaaaa you should see your new art in the game hassle free!



Now if you made a sprite rather than a tile the transparent pink will turn up as black on a wall. In order to make a sprite point anywhere on the ground with your mouse and press the S key and you should see a little grey block show up. move around with your arrow keys to move and use your right mouse button to look around and you'll notice it always facing you. Point your cursor at the sprite and press V and follow the same steps as you would above and then when you press enter you should see your sprite in game!

For more build and mapster32 info please visit here:

http://infosuite.duke4.net/

Thanks for reading! I hope this helped and helps people produce some cool art, mods and custom map art in the future!
37 Comments
Skyware  [author] 13 Oct, 2022 @ 9:31pm 
Banjo Oz if you so happen to see this, the paralax mapping of some things like the skyboxes is something i never figured out. Creating images of odd sizes will create issues, only way to address this is in editart to manually adjust it using dosbox. to refer to part of the tutorial that explains this: "Now Duke3D images need to be by the power of 2. It can be otherwise but it might be a bit screwy if you apply it to a floor or ceiling in a map but it'll render fine in game but in build it'll look weird and like colorful static. So 512x512 is probably as big as you should get but i think it can support up to 1024x512. but you can change up the dimensions so long as the dimensions are by the power of two. In example the original size of the image we changed was 64x32 and worked perfectly fine in the game and the map editor."
Banjo Oz 2 Sep, 2022 @ 9:30am 
Edit: I tried replacing the ammo clip pickup with an exported and edited version by making a new art file, naming it TILES000.ART and putting my new sprite in slot 40... and it sort of works but the replacement appears "messed up" in ResHack and in the game itself (it looks like the pallette is bad, despite following the steps here exactly in Gimp) and the skybox has a hall of mirrors effect when the art file is autoloaded by eDuke32.
Banjo Oz 2 Sep, 2022 @ 9:09am 
This is a fantastic tutorial. I used to edit Duke3D back when it was "new" but haven't touched it in decades so I'm not only *really* out of practice, but all the tools (mostly DOS-based!) have changed a great deal since then!

One question about something not covered here: how do we do a texture or sprite *replacement* with these tools? That is, so that graphics our custom ART file contains *overwrites* the default ones in the original maps? I am sure you can overwrite the graphics in the original grp but that would mean redistrubuting the whole thing if you want to share it. I was thinking either a new grp addon or standalone .art files.
Arghantyl 15 Jun, 2019 @ 12:05pm 
Thanks for all.Also you should write as you stated in the comment than importing bmp files always crash the software.
As a tip , you may say as well than you can transfer directly tiles from ART to ART by opening 2 ART files in same time and using copy paste.
brazzjazz 19 May, 2019 @ 12:02pm 
Very cool tutorial, you helped me out a lot, thank you!
Skyware  [author] 14 Jan, 2017 @ 1:09pm 
Could be a virus software or something to that effect that might be closing it on you. I really don't know what to say other than what i've already said. Sorry dukeres has no support anywhere and you may never resolve this issue.

I even checked windows event logger when i had it crash and it doesn't reveal anything useful. I'm sorry but you might be stuck not being able to use it. Only other thing i can suggest is try it on another computer.
Skyware  [author] 14 Jan, 2017 @ 12:55pm 
Are you making sure to do this before you try importing? http://imgur.com/a/zQQkO

If you don't select PCX in the drop down field it will crash.
Skyware  [author] 14 Jan, 2017 @ 12:36pm 
Is your crashing issue with GIMP, Paint.net or Dukeres? If it's GIMP your image might be WAAAYYY to big if it's giving you a memory issue. If it's Paint.net i have no idea what to tell you since i don't use it. If it's Dukeres you might want to look at my previous post.
Skyware  [author] 14 Jan, 2017 @ 12:33pm 
Okay i figured out your issue, When you go to import on the bottom of the window there should be an import option BMP or PCX, click the arrow to the left of that and it will drop down and click PCX then you can safely import.

If it's still on BMP it WILL crash every time. BMP is worthless and absolutely useless but for some reason is the default. If you just make sure to select PCX it should work just fine. If you're still having issues i'm absolutely stumped.
Skyware  [author] 14 Jan, 2017 @ 12:16pm 
Try running it with compatability for windows 8, windows 7 or even vista or XP. Other than that i have no idea what to tell you. Something in your software or hardware does not like it or possible since recent windows updates it no longer works.

If that doesn't work your only other alternative is doing it the hard way with editart and dosbox. I haven't used the software in awhile, i'll give it a try and see if i get the same results or not and post what i find.