Actions

Editing Bitmaps: Difference between revisions

From MM6 Wiki

mNo edit summary
mNo edit summary
Line 1: Line 1:
[[category: modding]]
[[category: modding]]
=Editing Existing Bitmap=
Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD.  
Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD.  



Revision as of 16:21, 6 April 2019

Editing Existing Bitmap

Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD.

This page will show how to modify and add new bitmaps with the help of MMArchive and GIMP.

Editing and exporting

In this example we will take the grass tile image and make some changes.

First of all make sure your image is in RGB mode.

Image → Mode → RGB

That will allow you to use whatever colors you want instead of a limited range of the original image.

Now make any changes to the image you want.

For example:

After you finished making changes to the image convert it to indexed mode:

Image → Mode → Indexed

You will be brought to the following menu:

Here you will need to set the Maximum number of colors to 256

Optionally if 256 colors is not enough you can set Color Dithering to Positioned

Afterwards click on Convert to get the result.

Here's what we've got:

You might have noticed a visual difference, that is because we've got much less colors right now and the image is following the specific palette that we've just generated. That helps to reduce the size of the image greatly and is the only mode the game's engine accepts.

Now export your image in .BMP format.

It should have the same name as the bitmap you are replacing if you are not intending to add an entirely new bitmap.

Importing the new bitmap into the game

Open BITMAPS.LOD of the game you are importing the bitmap to with MMArchive.

Find the files that begin with "pal". You need to find the last one, in our case it is 721.

Now make a copy of the bitmap and rename the duplicate. Basically you need to name the file so that it starts with "pal" and in the same time has a unique index in the end. So we just add 1 to the last "pal" file and get "pal722". Make sure it has no extension (remove the .bmp part from the filename).

We do that because the engine requires the palette to be stored among the bitmaps in the archive. The MMArchive will convert the marked bitmap to a palette file after adding it to the archive.

Use the add command -

Edit → Add

- to add the "pal" file and then the bitmap in the following order.

Make sure that the index in the bottom left corner corresponds to the "pal" file you've just imported.

And the last step: admire the beauty of the thing you have created:

Extra Notes

Each bitmap has to have a palette (be an indexed image) and the palette that it uses must be stored along it in the archive.

If you are modifying the bitmaps for the vanilla version of the game (1.0 — Mok's patch) make sure to reuse the palettes. The limit is 50 for the entire map. However the further patched games which contain MMExtension can have up to 200 on one map (the cap can be raised even higher).