Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Duke Nukem
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 03-06-2011, 04:28 AM   #1
King Duke

King Duke's Avatar
Duke Nukem II Level Editor
This is probably the second Duke Nukem II level editor ever created (but the first to be released to the public):

Duke2Edit v0.9 BETA

This is still a beta, but most things should work just fine. This is how to get this thing running:

Step 1: extract the contents of your NUKEM2.CMP file (drag them onto the exe to do that)
Step 2: load one of the extracted levels or create a new level. When you create a new level, you must select the folder with the extracted data files or you won't be able to select a tileset for the new level.

It's a Win32 program, but you might get it to work through WINE, too.

Have some fun with this. If you find any bugs, let me know!
King Duke is offline  
Old 03-06-2011, 10:00 PM   #2
Latimus
 
Re: Duke Nukem II Level Editor
I'm so glad to see you release this.
Infinite thanks.

Right now I'm working on quite possibly the first complete level pack for DN2.
Latimus is offline  
Old 03-07-2011, 08:12 PM   #3
Nacho

Nacho's Avatar
Re: Duke Nukem II Level Editor
Good stuff. It's things like this that help keep the old gaming community going.
Nacho is offline  
Old 03-09-2011, 03:59 AM   #4
Darkman 4
Re: Duke Nukem II Level Editor
Nice! I was hoping that someone would make a level editor for DN2 one day!
Darkman 4 is offline  
Old 03-09-2011, 10:03 AM   #5
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
CCCOOL! A Duke II level editor has always been an interesting topic to me, and now I can make some own levels and see what user levels look like. Thanks a lot!
Rigelatin is offline  
Old 03-09-2011, 05:50 PM   #6
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
How can I play a userlevel?
Rigelatin is offline  
Old 03-10-2011, 01:03 AM   #7
Latimus
 
Re: Duke Nukem II Level Editor
Save the user level as L1.MNI and fire up the game.
Latimus is offline  
Old 03-10-2011, 02:41 AM   #8
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
You have to put all the files you extracted from NUKEM2.CMP into your Duke2 folder and remove or rename the NUKEM2.CMP, so that the game is forced to use the extracted files, not the ones from NUKEM2.CMP.
King Duke is offline  
Old 03-12-2011, 04:55 PM   #9
ixfd64

ixfd64's Avatar
Re: Duke Nukem II Level Editor
Very nice!

By the way, will you ever consider releasing the source code, though?
__________________
*fires Devastator at next poster*

Visit my forums!
ixfd64 is offline  
Old 03-13-2011, 11:55 AM   #10
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
Quote:
Originally Posted by ixfd64 View Post
By the way, will you ever consider releasing the source code, though?
I might release the source for the editor someday. Or were you talking about the game's source code?
King Duke is offline  
Old 03-14-2011, 10:41 AM   #11
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
Here's a new version of the editor: Version 0.9a

New Stuff:
* You can now edit and create CZone files with the editor.
* Mouse now works on menus, too.
* Provided actor icons for the level editor.
King Duke is offline  
Old 03-15-2011, 07:33 AM   #12
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
I have a problem in a czone4 -map: I can't climb on chain ''ladders''. They're from masked tiles. It looks like this:
Attached Images
File Type: png nukem2_002.png (5.4 KB, 33 views)
Rigelatin is offline  
Old 03-15-2011, 08:42 AM   #13
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
@Rigelatin: Seems like the game will only use the tile attributes of masked tiles if no solid tile is present at the given location (solid tile is 0).

My suggestion: either erase the background tiles in the level or modify the CZone file and add solid tiles for the chain ladders.
King Duke is offline  
Old 03-15-2011, 11:36 AM   #14
IceColdDuke
Re: Duke Nukem II Level Editor
It really is good to still see people doing stuff like this, and I think anyway its a really good way to get into programming.
IceColdDuke is offline  
Old 03-20-2011, 11:10 AM   #15
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
http://www.youtube.com/watch?v=DenOquEm7vA
There's my first level. I'll make more levels soon, but don't expect them for a while because level making takes lot of time. This one took me a 1,5 week to create. I'll release a level pack when I have 8-32 levels created.
Rigelatin is offline  
Old 03-20-2011, 08:03 PM   #16
MrBlackCat

MrBlackCat's Avatar
Re: Duke Nukem II Level Editor
Quote:
Originally Posted by Rigelatin View Post
http://www.youtube.com/watch?v=DenOquEm7vA
There's my first level. I'll make more levels soon, but don't expect them for a while because level making takes lot of time. This one took me a 1,5 week to create. I'll release a level pack when I have 8-32 levels created.
I watched it... that was a lot of work.
I am SO busy right now, but watching this makes me want to try it out... too many projects already though.

Thank you King Duke for releasing this editor.

MrBlackCat
__________________
YES! I do wear my Duke Xtreme t-shirt every day!* :)

*(Not really, sometimes I wear my Time to Kill t-shirt... like while I am washing my other Duke shirts for instance.)
:)
MrBlackCat is offline  
Old 08-31-2011, 02:37 AM   #17
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
The new version is finally available: Version 0.9b

New stuff:
- Animation Editor: lets you modify the intro "videos" (images only; sounds and speed are hard-coded in the game)
- Image Converter lets you convert backdrops and any fullscreen image to BMP and back

Have some fun with it.

Quote:
Originally Posted by MrBlackCat View Post
Thank you King Duke for releasing this editor.
You're welcome.
King Duke is offline  
Old 09-01-2011, 09:40 AM   #18
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
When I try to hide a box or falling orb inside a shootable wall they appear in the upper stage of the level instead of inside the wall, hard to explain. Any help?
Rigelatin is offline  
Old 09-03-2011, 01:09 PM   #19
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
My guess would be that the default state for any of these objects is "falling". The object appears to check if it can fall down (either by checking the tiles below or the tiles at the current position of the object). If it's blocked, it will be moved up until no blocking tiles overlap with the collision box of the object.

My suggestion would be to build a frame of blocking tiles and place the item in that frame. If you really need to "hide" the object, place some non-blocking tiles to fill your frame. The tiles should have the "foreground" property set, or you'll still be able to see the hidden object.
King Duke is offline  
Old 09-27-2011, 08:42 AM   #20
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
I wonder how the level designer put a cd, 2 sodas and a sixpack inside these shootable blocks in E1L3.
Attached Images
File Type: png edit.png (135.0 KB, 25 views)
Last edited by Rigelatin; 09-27-2011 at 08:44 AM.
Rigelatin is offline  
Old 09-29-2011, 07:01 AM   #21
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
This works just like I discribed above.

Those blocks are "hollow", that means you can't get into them but there is still some room for objects placed inside those blocks. Open the CZone file in with the CZone editor and press the TAB key to visualize the tile properties, then you'll see what I mean.
King Duke is offline  
Old 09-29-2011, 02:13 PM   #22
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
Ok, I see. Didn't realize that before.
Rigelatin is offline  
Old 09-30-2011, 09:07 AM   #23
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
When I use IMF music from other games (Major Stryker in this case) for levels they play like 2x slower than usual. What gives?
Btw. Is there any limitation how many CZones and images there can be? + Can I write custom hint globe text?
It's fun to make new Duke2 levels.
Rigelatin is offline  
Old 10-01-2011, 12:49 PM   #24
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
IMF files in Duke Nukem II are played at a frequency of 280 Hz. No other game uses that frequency for IMF files, which makes it difficult to add new music. Major Sryker uses a frequency of 560 Hz, which results in the music being played 2x slower. (see http://www.shikadi.net/moddingwiki/IMF_Format)

The number of CZone and Backdrop files is technically limited by the DOS file naming convantions of 8 character for the file name and 3 characters for the extension (the file names will be stored in the level file). The only other limitation is that a second backdrop is stored as a BYTE value (0..255) which will be loadad from a file called "DROPx.MNI" where x is the decimal value of that byte. Anyways, there is more than enough room for different Backdrops and CZones for each level. But be careful when working with long filenames under windows. The editor doesn't check if filenames fit in the 8.3 scheme!

Hint globe texts are stored in HELP.MNI or some other file as ASCII-text "scripts". You should be able to figure out how the script works once you see it. You can add more lines, but I think you can only have one hint per level.
Last edited by King Duke; 10-01-2011 at 01:04 PM.
King Duke is offline  
Old 10-05-2011, 07:28 AM   #25
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
Found the hint text by opening the HELP.MNI with Notepad application.
Quote:
Hints

//HELPTEXT 1 4 HINT... The access card is at the*upper right of the level.*The exit is at the upper left.
//HELPTEXT 1 5 HINT... The access card is at the*top left of the map.
//HELPTEXT 1 6 HINT... Find the cloaking device.*The key is inside the power room.*The door is at the top right*of the map.
//HELPTEXT 2 1 HINT... Kick some butt Duke,*you deserve it!!!
//HELPTEXT 2 2 HINT... To destroy this floor,*shoot the missles below.
//HELPTEXT 2 3 HINT... Destroy the Drone Generator*to the left, then make your*escape to the right.
//HELPTEXT 2 5 HINT... Shoot the wooden walls to*set them on fire.
//HELPTEXT 3 1 HINT... A key is located at the*bottom right of the map.
//HELPTEXT 3 7 HINT... If you run with a *conveyor belt, you can make it to*the exit while you are invincible.
//HELPTEXT 4 1 HINT COMPUTER FREQUENCY JAMMED!
//END
My all .MNI files got changed into notepads. Does this have any effect to editing and gameplay?

One more question: How do I add more tile art for a czone? Do I have to load it to a paint program and re-import to the editor? I'd like to utilize those blank black grids which e.g. CZone7 has like ½ of it.
Thanks for all the help.
Rigelatin is offline  
Old 10-05-2011, 04:33 PM   #26
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
Yes, that is the correct file. The command works like this:

//HELPTEXT e l s

e = Episode (1..4), l = Level (1..8), and s is the text string with the * as a "stop" marker.

Quote:
Originally Posted by Rigelatin View Post
My all .MNI files got changed into notepads. Does this have any effect to editing and gameplay?
Nope. It only affects what happens when you double-click on an MNI file in windows.

Quote:
Originally Posted by Rigelatin View Post
One more question: How do I add more tile art for a czone? Do I have to load it to a paint program and re-import to the editor? I'd like to utilize those blank black grids which e.g. CZone7 has like ½ of it.
Thanks for all the help.
The CZone files have a fixed amount of tiles. You can replace the graphics and change the tile properties, but you cannot add more tiles. You can use the CZone editor to export the tile graphics as a PNG image (with transparency) and then edit the tile graphics with a program that supports transparency. That means you cannot use MS Paint for the job, but GIMP should work just fine. When you're done, just re-import the tile graphics with the CZone editor and save it as a new CZone file.
Last edited by King Duke; 10-05-2011 at 04:39 PM.
King Duke is offline  
Old 03-05-2013, 06:49 AM   #27
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
Another update: Version 0.9c

You can now edit Sprites. With this addition, you can now change (almost) every image in the entire game!

The editor also comes with a built-in paint tool "QuickPaint", so that you can edit images without having to export them first.

Both "QuickPaint" and the level editor now have flood fill and undo/redo options.

The VOC converter allows you to convert Wave sounds into VOC files and vice versa.
King Duke is offline  
Old 03-16-2013, 05:40 PM   #28
fresch
Re: Duke Nukem II Level Editor
Thank you very much King Duke.
This has been extremely helpful in the development of Duke Nukem 2 for iOS!
Look out for your name in the credits
fresch is offline  
Old 03-19-2013, 05:09 AM   #29
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
It's nice to hear that my work is appreciated.

Version 0.9c was released to help you in the development process, though I have no idea if you actually got to use that version or if you had already gone gold when I released it and mailed you about it.
King Duke is offline  
Old 03-19-2013, 02:10 PM   #30
fresch
Re: Duke Nukem II Level Editor
Quote:
Originally Posted by King Duke View Post
It's nice to hear that my work is appreciated.

Version 0.9c was released to help you in the development process, though I have no idea if you actually got to use that version or if you had already gone gold when I released it and mailed you about it.
We did! And we even have a "Special Thanks To" Section in the credits with your name on it buddy
fresch is offline  
Old 03-20-2013, 05:07 AM   #31
MrFlibble

MrFlibble's Avatar
Re: Duke Nukem II Level Editor
Nice to see this kind of community support and contribution to give the classics a new life
__________________
It's time to go retro and play old games. Come get some!
MrFlibble is offline  
Old 04-08-2013, 07:02 AM   #32
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
There's a new version of the Editor: Version 0.9d BETA

Some of the new features are:
- improved Level Editor (can now display tile attributes)
- new AudioT Editor (edits PC Speaker and AdLib sound effects)
- new IMF Converter (converts MIDI and IMF songs into the IMF format used by Duke 2)

The new option to display tile attributes in the level editor is probably the most important update for the level editor in the last two years. It should make it a lot easier to understand the tilesets (CZones) and to create new levels.

Hell, it's been two years and no-one has released a mod or levelpack for Duke Nukem II!

This year marks the 20th anniversary of the game's release and you could become part of the Duke Nukem II History by creating the first levelpack ever.
King Duke is offline  
Old 04-08-2013, 04:48 PM   #33
Rigelatin

Rigelatin's Avatar
Re: Duke Nukem II Level Editor
I've made only 4 levels, and those were 1-2 years ago. I've been concentrating on new tiles and backdrops. V0.9d seems tempting enough to create levels again.
Rigelatin is offline  
Old 04-24-2013, 11:51 AM   #34
Nickssoft
Re: Duke Nukem II Level Editor
Rigelatin, will you ever release your levels to the public? Would love to try them out. Saw the one on youtube years ago, was cool
Nickssoft is offline  
Old 05-22-2013, 12:36 AM   #35
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
You must extract the level files from NUKEM2.CMP before you can load them. The DN* files are from Duke Nukem 1, so you can't edit them with this program.
King Duke is offline  
Old 06-10-2013, 06:15 AM   #36
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
That's odd... Please post the "log.txt" file created by the editor (or at least the last few lines from that file). Maybe that'll help me find the problem.
King Duke is offline  
Old 08-19-2013, 03:06 AM   #37
King Duke

King Duke's Avatar
Re: Duke Nukem II Level Editor
There's a new version of the Editor: Version 0.9e BETA

The level editor can now detect a lot more errors that may cause the game to crash or even freeze. It also has a new "preview level" function that allows you to view the level with the in-game viewport and HUD.

See the included readme.txt for the full list of changes.
King Duke is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:07 AM.

Page generated in 0.16819310 seconds (100.00% PHP - 0% MySQL) with 19 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.