Level editing

From EDukeWiki
Revision as of 03:05, 6 September 2006 by Mblackwell (talk | contribs)
Jump to navigation Jump to search
Build/Mapster32 Map Editing

NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.

Information About Maps

What is a map?

A "map" is a general term used to describe the levels in Duke Nukem 3D (or just about any other game for that matter). Maps include all the level information (effect parameters, wall placement, sprite placement, etc.).

What can I do to maps?

Unlike games such as Doom or Unreal, maps are solely the layout of a level, the effects used in that level, etc. Enemy coding, sounds, and art textures can be found in the .grp and .con files.

Can I look at the game maps?

Yes. The file "kextract" is used to extract map files into your game directory, where they then can be viewed.

You also can view the maps without extracting them. Use the command line parameter -map <mapname>.

What do I use to make maps?

The editor available for creating your own maps are the Build program (used to create the levels found in Duke Nukem 3D), Makemap (distributed with Eduke 2.0), JFBuild (distributed with JFDuke), and Mapster32, which is included with Eduke32. This FAQ currently only discusses features of Build and Mapster32 specifically, although the other editors may (and generally do) function the same way.

Can I make maps for other games?

Yes. The Build editor that came with Duke Nukem 3D was made specifically for Duke Nukem 3D, but it can also be used to make levels for NAM.

How do I run user maps?

Running user maps that you create and/or download is can be run within Eduke32 by selecting "User Map" under the "New Game" menu. The command line parameter -map <mapname> also may be used to execute user maps.

What exactly is the Build engine?

The Build engine is the graphics engine that games such as Duke Nukem 3D, Shadow Warrior, Blood, and NAM run on. Although it isn't truly 3-D, it does give a nice feel for the environment that has been presented, and it gives the player a never before seen level of interactivity in this environment.

Things You Should Know Before Starting


There are quite a few things that you will need to know prior to making your first level. Read this section completely, and you will have everything you need to know to start making levels!

2D and 3D Modes

There are two different editing modes in Build. The 2D mode, which shows the layout of the map, sprites, and other goodies, and the 3D mode, which looks like the game itself. To switch between these two modes, press the [ENTER] key on the numberpad. The regular [ENTER] key does not switch modes, so this must be noted!

In 2D mode, you lay out the map itself. Here you draw walls, place sprites, change tags of walls, sprites, and floors, and save your work. In 3D mode, you change the textures of the walls, change how high or low the floor, ceiling, sprites, and other objects are, and you change the shade here as well.

Hitags And Lotags

This topic is complicated, yet simple at the same time. Tags can be given to walls, sprites, or sectors, and they tell the wall, sprite, or sector what to do. There are two numbers that any of these objects can be given. The first number is called a hitag. Hitags usually identify the object, so that other objects can be paired with it (I'll give an example in one moment). Lotags are generally a fixed number that tells the game exactly what to do.

Here is an example:

I make two sectors, and I want them to be teleporters (i.e. - I step into one sector, and teleport to the other sector). I place a sector effector sprite in both sectors, and give them tags to identify them. I first give *both* sprites a lotag of 7. This number is preset, and it tells the game that when the player enters this sector, he is to "teleport" to the other teleporting sector. I then give *both* sprites the *same* hitag. This number must be unique, as it gives an identity to both sprites. Here is what the program is probably thinking when I'm playing this level:

Hmmm. The player has just entered a sector with a special sector effector sprite in it (lotag of 7). Let me see if I can find another teleporting sector with the same identity (unique hitag), so that I can "teleport" him there. Hey - There's the other sector! WOO-HOO!

All the hitags do are link various effect sprites together. If you only gave one sprite a hitag, the program would not be able to find another, matching teleporting sector, and then would not be able to teleport you anywhere, because it can't find this sprite's "mate". Here are the key strokes that you need to do in order to place these tags (in 2D mode):

   * Sector Hitag : Press [H] in the desired sector
   * Sector Lotag : Press [T] in the desired sector
   * Sprite Hitag : Press [ALT]+[H] on the desired sprite
   * Sprite Lotag : Press [ALT]+[T] on the desired sprite
   * Wall Hitag : Press [ALT]+[H] on the desired wall
   * Wall Lotag : Press [ALT]+[T] on the desired wall

These same tag assignments can be made in 3D mode as well. Here are the key strokes for use in 3D mode:

   * Sector Hitag : Press [']+[H] in the desired sector
   * Sector Lotag : Press [']+[T] in the desired sector
   * Sprite Hitag : Press [']+[H] on the desired sprite
   * Sprite Lotag : Press [']+[T] on the desired sprite
   * Wall Hitag : Press [']+[H] on the desired wall
   * Wall Lotag : Press [']+[T] on the desired wall

NOTE: To set wall tags in 2D mode, it is advised to turn off the grid, so that you are not selecting sprites. Press [G] several times to turn the grid off.

Placing Sprites

NOTE: When I say that you should press the [V] key (or any other key for that matter) on a sprite, I mean that you should move the cursor over that sprite with the mouse, and then press the key.

Without sprites, levels in Duke Nukem 3D would be nothing. Sprites make up all the "eye candy" in the level and are the root of all effects in Duke 3D. To place a sprite in the level, press the [S] key in either 2D or 3D mode. It is advised to place them in 2D mode, as you have the grid as a guide for placement.

There are several different modes sprites can be in (3 of them to be exact). Sprites can lie flat on the floor, be "pasted" to the wall, or they can be in the "normal" mode (guns and other goodies are usually in this mode). Normal mode is the default setting, and to switch the current mode of a sprite, enter 3D mode, and press the [R] key on it. It will go from normal to being pasted on the wall (according to which direction the sprite is facing). Pressing [R] on it again will paste it to the floor, and again will make it normal.

NOTE: If you place a sprite on a wall in 3D mode (using the [S] key), the sprite will automatically be "pasted" flat to the wall that you placed it on.

NOTE: Only "square" sprites can be made to lie flat on the floor. Sprites that fit this condition are ones that have the same x-axis height as the y-axis height.

Sprites can face in different directions as well. In 2D mode, you will notice a "tail" coming out of the circle which represents the sprite. This tail points in the direction that the sprite is currently facing, and it also denotes the "front" side of the sprite. To change this, press the [,] or [.] keys on the sprite in 3D mode.

To change the texture of a sprite (changing what the sprite actually is), enter 3D mode and press [V] on it. This will bring up a screen of all the current sprites used in the level you currently are working on (This is useful as you start to need the same sprite over and over). Press [V] again, and you will proceed to the tile selection screen. Here, you can press [PGUP] and [PGDN] to scroll through the many textures used in Duke. When you have found a suitable texture, press [ENTER].

To raise or lower the sprite, press the [PGUP] or [PGDN] keys on the sprite in 3D mode. This changes the altitude of the sprite.

Here is an example of placing a sprite in a room:

I want to place a calendar on the wall in my room. In 2D mode, I would press the [S] key ON THE WALL where I want the sprite to be, and I would then enter 3D mode, pressing the [V] key on it twice. I would select the calendar sprite, raise it up to the height I want it on my wall (with the [PGUP] and [PGDN] keys) and then press [R] on it *once*. But now that I look at it, the sprite is turned to the side, or it is backwards! You must remember to set the sprite direction with the [,] and [.] keys. The tail should face *away from the wall, so that it lies flat on the wall. Check out some of the levels that came with the game if you don't understand.

The Special Sprites

There are a few special sprites that need to be explained. The most important ones are as follows:

Sector Effectors

Sprite #1 - The sector effector sprite is the most used sprite in the entire game. It does just about what the name says: effects a sector. These sprite are used to create game effects and manipulate sector attributes. These sprites are the main tool used to create all effects in Duke Nukem 3D. Place the sprite in the sector to effect. The lotags for these are preset, and a list of the lotags for this sprite can be found in section 5.4.


Sprite #2 - Activators are used to activate a sector effector (SE) sprite when a switch or touchplate is triggered. They also can activate sector lotags.


Sprite #3 - The touchplate will activate an activator or a masterswitch sprite, when the player walks over the sector that contains it. A hitag of 0 means that the touchplate will activate every time the player walks on top of the sector. A hitag of greater than 0 means that the touchplate will only be activated that many times (whatever number you put on there). The only number I've ever seen used that is greater than 0, is 1 (to activate an effect only once). But use the value that you want to.


Sprite #4 - This sprite locks the sectors lotag function, so that it cannot take effect until the player unlocks it with a switch or touchplate. This is used to make locked doors and other such effects.


Sprite #5 - This sprite is used to create all the sound effects in the game. It can be used in 3 ways:
* 1. Activation Sound
* 2. Ambient Sound
* 3. Echo Effect
We will go into this sprite in much more detail later on.


Sprite #6 - These are used to define a path that moving sectors and certain enemies (the Pigcop Recon Cars) will follow. Both moving sectors and the Pigcop Recon Cars cannot be used in the same map. They are also used as the endpoints of a two-way train.


Sprite #7 - This sprite is used to make the sector floor, walls, and ceiling pulsate in brightness. Section 4.20 goes into great detail about this sprite.


Sprite #8 - This sprite is the exact same as the activator, but it has the ability to use a time delay. The hitag is the time delay that the effect should wait to be carried out. I think that a value of 32 is one second.


Sprite #9 - This sprite is used to spawn enemies or other items after activated by a touchplate or switch. An example of this is entering a room, and a bad guy spawns behind you.


Sprite #10 - This sprite is used to define rates of effects. The lotag is the only thing that is needed here, and the value for it is how fast the effect should go (i.e. - smaller means slower). These cannot be used on all effects, but they can be used on some.