********************************************* Importing your own artwork for Duke Nukem 3D v1.01 by Joe Barta ********************************************* * This piece was written when I had Duke v1.3d. If you have the * Atomic Edition v1.4/1.5, you will notice a few minor discrep- * ancies but for the most part the directions are the same. First of all I use EDITART. EDITART is just dandy for importing graphics into the art files. Be patient and I will explain exactly how to use it. One note about EDITART though, I wouldn't try using it for actual graphics editing. Just use it for importing. Use Paint Shop Pro or Photoshop or whatever to make your graphic. Then save it as a GIF (any kind of GIF will do, just keep the size under 256x256 for now). I think that EDITART also recognizes BMPs and PCXs, but I only use GIFs and have had no problems, so that's what we'll use for this excercise. Also know that the information here is just enough to get you going. There is more and there are multiple ways of doing things. Just follow my lead and I'll get you to point B. Later you can experiment and play around. You need an image. For this example, use the one that's attached (joedaman.gif). Also available at http:// I'll also place this essay at http:// This is a simple 16 color gif file. It can be 256 color or anything in between. You don't need to worry about transparency in the gif image. In other words it doesn't matter if its 87a or 89a. Any gif as long as it's a gif. Make sure that the contents of your goodies\build folder are in your duke folder. To explain this a little further... I'll assume you have Windows90something. I'll assume that your Duke game is installed in C:\DUKE3D I'll further assume your CD-ROM drive is drive D. And I'll be optimistic enough to assume that your Duke CD hasn't been stolen by renegade Arabs or destroyed by a freak meteorshower. (I know, ass out of u and me and all that. But hey, I'm already covering a lot of bases here.) Anyway, the BUILD "tools" you want are in D:\GOODIES\BUILD. There you will find (among other things) BUILD.EXE, KEXTRACT.EXE AND EDITART.EXE. Copy the contents of that folder into your Duke folder (C:\DUKE3D). Don't copy the folder itself into C:\DUKE3D, just the contents. This is important. Make a sub-directory (New Folder) in your Duke folder named MYPICS. (C:\DUKE3D\MYPICS). Place joedaman.gif into this new folder. Actually you can place your images anywhere... many, I'm sure, put them right into C:\DUKE3D. I use subdirectories for new art to keep my work area neat and organized. For this excercise, make the MYPICS folder. Now we're ready to roll. You have the build tools in your Duke folder and an image to play with. It's downhill from here. Next order of business is to extract the ART files. In your Duke folder you will find a file named DUKE3D.GRP. This is a group file. It contains a bunch of smaller files. (Not unlike the common zip file). This is where Duke stores the guts of the game. One of the types of files it contains are ART files. They are just that... art. There are 15 of them TILES000.ART, TILES001.ART, TILES002.ART all the way up through TILES014.ART. We will use KEXTRACT to extract them out of DUKE3D.GRP Get yourself in a DOS window. In your Start Menu (assuming win9X, remember?) there should be a shortcut called "MS-DOS prompt". This will get you the black DOS window. Once in a DOS window type: cd\duke3d This will put you in your Duke folder. First a test. Type: kextract It should spit back some info: DOS/4GW Professional Protected Mode ...yada yada yada. This stuff tells you about KEXTRACT and how to use KEXTRACT but for the time being, don't worry about what it says. If you get the message: Bad command or file name Then KEXTRACT is not in your Duke folder where it's supposed to be. Back up and get the build tools into your Duke folder or you're dead in the water. Now we will extract all the ART files from DUKE3D.GRP. We can easily extract just TILES014.ART, but then EDITART won't work right. So, we'll extract all. Type: kextract duke3d.grp tiles*.art After a bit of chugging, the art files will come out. It is important to note that the files were not actually "extracted". DUKE3D.GRP is still intact. The files were actually COPIED. Your Duke game will look in the duke folder first for art and sounds. If Duke finds art files there it will use those rather than what's in DUKE3D.GRP. I hope you still have your DOS window. Type: editart You'll get a "splash screen" of sorts. Hit Enter, !!BUT BEFORE YOU DO!!... know that you will go into full screen DOS mode. No more Windows. (at least not visible). To pop back into Windows from full screen DOS hit ALT+ENTER. Editart won't work in a Window so this is how you'll pop back and forth. If the ALT+ENTER key combination won't work for you, you'll have to print this document. You may want to print it either way. It might be easier. ======== If ALT-ENTER won't work for you, try this: At the top of your DOS window there is a toolbar. One of the buttons is for Properties. Click this. Choose the Misc tab. At the bottom of the dialog box make sure Alt+Enter is checked. ======== All right, you've typed editart. You'll then see in red letters, EDITART by Ken Silverman, Loading Tiles000.art or something like that. Once they load you'll see tile 0. The ugly gray brick stuff. From here, as I said before, you should be able to pop back and forth between Windows and Editart using the ALT+ENTER key combination. I'll assume you can do this. The first time you pop out of full screen DOS mode you'll get a warning. Something about 'this program can't be run in a window'. Just hit OK. When you pop back into Windows, Editart will go black or scrambled. The only way you can use it is in full screen. When you ALT+ENTER back into Editart you may find that the bottom of the screen is scrambled. Just hit the ESC key. When it asks you if you want to quit, type n. ** I know this is dragging but I want to be thorough. Better to OVERexplain than UNDERexplain. And trust me, after a few whirls at this you'll FLY through it. OK. You're in EDITART (and you've typed ESC then n to get your screen unscrambled if necessary). You are looking at tile 0. Now type: g It axes you for a tile number. Type: 3584 ... and hit Enter. This will take you to tile number 3584 (duh). This is (officially) where the user art section begins. The kind folks at 3DRealms alloted this spot for your stuff. It keeps it all in one spot so if you want to share your creation with the world, you only have one art file to distribute. Note that tile #3584 is the first tile in TILES014.ART. Each art file has 256 "slots". Now advance to tile #3585 by pressing the Page Down key. Page down and Page Up moves you back and forth within the tiles. This is an empty slot just waiting for an image. We'll import joedaman.gif. First we must "make a space". Our image is 0 x 0 otherwise known as blank. The image joedaman.gif is 64x64. We need to resize the slot to 64x64. In EDITART type: s It will ask you for the X dimension (width). Type: 64 It will then ask you for the Y dimension (height). Type: 64 And magically, a purple square will appear. The purple is the transparent color. This is technically an image you could use in Duke. The only problem is it would be invisible. (Actually that's not a bad idea for an invisible barrier of sorts... make it blockable. I digress.. again). To import OUR image, type: u This will give us a list of files and folders in the Duke directory. Using the arrow keys scroll down to MYPICS and hit Enter. Scroll down to JOEDAMAN.GIF and hit Enter. The image will appear in the top left corner of the screen with a little sparkly thing around it. Here it is unaltered. Hit Enter. Now it's imported. EDITART has chosen the closest colors from the Duke pallete for the image. Be advised that since Duke substitutes his closest colors for your image, your graphics may change slightly on importing. Now at the center of your screen is JOEDAMAN in all his glory. It's a gray square with a red circle with black lettering. If we saved it now, it would appear exactly as is in Duke. Let's make the gray part transparent though. Hit the Backspace key. This sets the color to #255 which is the transparent color. Now place the cursor somewhere in the gray area. No cursor you say? Look closely. It's just a wee little dot. Cursor in a gray area? Type: c This will turn all gray areas to purple (the transparent color). Hit ESC. You will be asked if you want to QUIT. Type: y Then you'll be asked if you want to save the current tile. Type: y Done! You just extracted the art files and imported an image with EDITART! The first time around it seems like a chore, but with a tiny bit of practice, you will be able to import an image in just a few seconds. Now go to BUILD. I'll move faster because I'll assume you have a little bit of BUILDING experience. Start BUILD and make a small sector. In 3D mode place a sprite. Place the cursor on the sprite and hit V. Then hit G 3585. Your sprite should appear. Hit Enter and BINGO! There it be! You're welcome. Below is a copy of the EDITART key list. Get more map building documents from http://mapfaq.3dportal.com There's much to learn. P.S. If you don't want to add any more images to the art file, you can delete all but TILES014.ART. If you still want to add more you'd best keep them all in there. (remember Editart needs them all to function) If you want to distribute a map wih your artistic creations, you only need distribute TILES014.ART. It's the only one with any changes. If you alter any images before #3585, you'll need to distibute those art files too. Remember they contain 256 "slots" each. TILES000.ART 0-255 TILES000.ART 256-511 TILES000.ART 512-767 etc ================================================================ Editart Key List By Jonah Bishop Version 1.0 http:// This File Is Copyright (c) 1997 by Jonah Bishop. All Rights Reserved. See license.txt, which comes with the Map Editing FAQ package, for more information. Version Information V1.0 - Everything is new. KEY STROKES DESCRIPTION OF KEYSTROKE FUNCTIONS ---------------------------------------------------- [A] Sets the animation speed of the current tile. Press the [+] and [-] keys to change the speed of animation. There are 16 speeds to cycle through, and once you have selected the speed you want, press [ENTER]. [C] Change all the pixels on the tile, having the same color under the cursor, to the color currently selected. [F] Floodfill a region with the selected color, and with the current color as a boundary. [G] Goto a tile by typing in the tile's number. [J] Randomly plots dots of current color over any pixels having the same color as the color under the cursor. [M] Back up a tile into a temporary memory buffer. [N] Name a tile. Naming the tile changes the #define statement in NAMES.H. Use this to make names for sprites you wish to find quickly (i.e. - the name of the sprite you want to use might be CANDYBAR). [O] Optimize the size of an individual piece of artwork. Use this for tiles with invisible pixels on the sides. [P] Restore the tile in the temporary memory buffer. [M] sets the tile to be backed up. [R] Rotate the tile in a specified direction. [ALT]+[R] Generate a tile frequency report by scanning all the maps in the directory. Use in "V" mode only! [S] Resize a tile. The X and Y sizes can be any unsigned short integer. X sizes range from 0 to 1024 and Y sizes from 0 to 240. [T] Turn drawing trail on or off. [U] Use this key to import a section of either a .BMP, .PCX, or .GIF file. The following keys are used with this keystroke: [ENTER] - Convert the image that is inside the rectangular selection window to the BUILD palette. [SPACE] - Convert the image that is inside the rectangular selection window without changing the palette. [P] - When selecting the parts of the picture you want to use, and you press [P], the palette of the current picture will become the palette used by BUILD. [ALT]+[U] Re-grabs the artwork from the original pictures, according to what the CAPFIL.TXT file says. Pressing [ALT]+[U] in the main screen will re-grab everything. If you press it in "V" mode, first select the boundaries with the [1] and [2] keys. [V] View and select a tile to edit. The following keys can be used with this keystroke: [SPACE] - To swap 2 tiles simply press [SPACE] on the first tile, the press [SPACE] on the second. [1,2,3] - To move a group of tiles to a new location in the current .ART file, press [1] on the first tile in the group, [2] on the last tile, and [3] at the place where you want to move the files. [1] Mark the first portion of a tile you wish to copy. [2] Mark the other portion of a tile you wish to copy. [3] Paste the portion of a tile that you copied onto another tile. [4] Flip the copied portion x-wise. [5] Flip the copied portion y-wise. [-] Change the animation setting. To change the setting, press [-] when the animation value is 0. There are four different types of animation. Here is an example of each: NoAnm=4 sequence: 0,0,0,0,0,0,0,0,0,0,0,... (no animation) Oscis=4 sequence: 0,1,2,3,2,1,0,1,2,3,2,... (oscillate) AnmFD=4 sequence: 0,1,2,3,0,1,2,3,0,1,2,... (forwards) AnmBK=4 sequence: 0,3,2,1,0,3,2,1,0,3,2,... (backwards) [+] See [-]. [DELETE] Short cut key. Sets both the X and Y sizes to 0 (thus deleting the tile). [PGUP] Select a tile to edit (scrolls through all the tiles). [PGDN] See [PGUP]. [~] Centers a sprite. Use the arrow keys to center the sprite. This key is right above the TAB key. [F12] Screen shot. Saves the current as a *.BMP file. [ESC] Quits. [ARROW KEYS] Moves the cursor. [MOUSE] [SHIFT]+[ARROWS] Changes the current color. [SPACE] Plots a pixel under the cursor with the selected color. [TAB] Select the color under the cursor. [BACKSPACE] Set the color to 255, which is the transparency color. [;] 3-Dimentionalize an image. ['] 3-Dimentionalixes the image the opposite way of [;]. ================================================================