Level selection screen

FIXME this article needs pictures! And more information.

The level selection screen is where you choose each level you play. New levels are displayed on the screen as they become available.


The relevant files are defined in the world.ini file which is located in \DATA\ (original UA) or in the active env folder (Metropolis Dawn) under the begin_bg section. This section contains definitions for menu interface graphics. The following parts are related to the level selection screen:

background_map = bg/normal.iff
rollover_map = bg/white.iff
finished_map = bg/done.iff
enabled_map = bg/en.iff
mask_map = bg/maske.iff

This is the default configuration for the original UA campaign. The bg folder is located in the level folder.

The files are ILBM/IFF bitmaps. A recommended way to edit them is to convert them into BMP using XnView and to use Gimp to edit the converted BMP files. Edited files can be converted back to ILBM using XnView. The files must be in indexed 256-color mode. Even though UA should support RLE compression FIXME it's recommended to save the files without compression.

FIXME FIXME The interface files contain their own color palette (CMAP chunk in the file) so using the correct palette is not as important as it is with some other files. FIXME —> is the CMAP chunk used or just ignored in favor of a common palette?

However, the palette is very important when editing the mask file (default: maske.iff).

The level mask

The level mask (default: maske.iff) is the core of the level selection screen. It determines the regions corresponding to each level. These regions are picked from one of the other files depending on the status of the level - open (en.iff), open and rolled over with mouse (white.iff) or finished (done.iff). Other regions, and regions of not yet opened levels show the background (normal.iff).

Each pixel of the mask is technically defined by one-byte value between 0(hex 00) to 255(hex FF) which is the index of the corresponding color in the color palette. The value of each pixel determines the corresponding level number. For example, the region of Hamburger Hill (level 52) is defined by setting its pixels to 52(34 hex). Regions that do not belong to any level should be set to 0.

It's important to note that the visible colors do not really matter - only the values of the pixels do. But the colors are needed when editing the mask in an image editor.

To edit the mask, open it in an image editor and open the color palette. Choose which level you want to add into the mask. Pick the corresponding color from the palette and paint a region in the mask. Note that the first value is 0! For example, for Hamburger Hill (level 52) you would choose the 53rd color from the mask so that the values of the pixels would become 52.

Remember that all regions not corresponding to any level should be filled with the first color in the palette (index 0). FIXME It's not known if this is necessary, but it's a good guideline.

The original palette of the mask file may contain a limited number of colors. If you add more levels, you may have to add new colors to the palette so that the new levels can be easily painted into the mask.

It's very important that the color palette is not changed when saving the file! Otherwise the regions may get messed up.


modding/level_mask.txt · Last modified: 2018/03/01 15:29 by ormu
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0