MekEngine mods replace the original game's data with files of your own. You don't need any tools or need to repack anything. A mod is a folder of loose files laid out like the game's data files, and MekEngine uses your file wherever the game would have used its own.
Mods work in every edition of MechWarrior 2 (DOS, Pentium, 3Dfx, Matrox, S3 Virge, ATI Rage, PowerVR, BattlePack…). You don't need to make a separate version for each one.
What can be modded today:
CEL textures (section 5).
Other kinds of data (sounds, menu pictures, …) will follow the same folder and naming rules as support is added.
Coming soon: models. Models can't be replaced yet, but you can already dump the originals to a standard 3D format and start working (section 6).
Two small mods to try, or to pull apart and see how a mod is made:
| Mod | What it does | Download |
|---|---|---|
| MoonMusic | The menu music, recorded from the original MIDI scores on a late-1990s Roland Edirol sound module (96 kHz, 24-bit FLAC), looped where the original loops. | MoonMusic.zip (226 MB) |
| GhostBear 2 MoonBunny | Replaces the Ghost Bear clan emblem with the MoonBunny emblem, a high-resolution image with transparency. | GhostBear2MoonBunny.zip (439 KB) |
Each zip contains a Mods folder. Extract it into the folder that holds MekEngine, so the mod lands in Mods next to the MekEngine folder. Then turn it on from Mods on the Choose Edition screen.
Mods live in a folder named Mods that sits next to the folder MekEngine is in:
SomeFolder/
MekEngine/ <- the game (MekEngine.exe)
Mods/ <- mods go here
MyFirstMod/
AnotherMod/
loadorder.txt <- written by the game; you don't need to touch it
Each mod is one folder inside Mods. The folder's name is the mod's ID.
On the Choose Edition screen (the first screen at launch), click Mods.
mod.txt below).
Your choices are saved in Mods/loadorder.txt.
MyFirstMod/
mod.txt <- optional: title and description
DATABASE.MW2/ <- replacements for things in DATABASE.MW2
43.flac
43.loop.txt
MW2.PRJ/ <- replacements for things in MW2.PRJ
CEL/
L1GOSTBR.png
This file is optional. The first line is the mod's title and everything after it is the description shown in the Mods screen. If there's no mod.txt, the folder name is used as the title.
GhostBear 2 MoonBunny
Replaces the Ghost Bear clan emblem with the MoonBunny emblem.
The game keeps its data in a few big files. Inside your mod, each data file becomes a folder with the same name, and things inside it are laid out the way the data file organizes them:
| Game data file | Folder in your mod | What's inside it |
|---|---|---|
MW2.PRJ | MW2.PRJ/ | one sub-folder per resource type (CEL, …), files named after the resource |
DATABASE.MW2 | DATABASE.MW2/ | files named by item number (decimal) |
Name a replacement after the original, then add your file's real extension. For example:
| Original | Your replacement |
|---|---|
MW2.PRJ → CEL → L1GOSTBR.555 | MW2.PRJ/CEL/L1GOSTBR.555.png |
DATABASE.MW2 item 43 (has no name) | DATABASE.MW2/43.flac |
Items in DATABASE.MW2 have no names, so they're named by their item number in plain decimal (43, not 0x2B).
MekEngine checks that your file is a format it can use for that thing. A file in a format it can't use is skipped, and a warning is written to the log.
Don't put two replacements for the same thing in one mod (e.g. both 43.flac and 43.wav). If you do, MekEngine uses whichever file it finds first. The load order decides between different mods, not within one.
A file named exactly like the original, with no extra extension, is a pointer. It's a plain text file holding a relative path to the real file:
MW2.PRJ/CEL/L2GOSTBR <- text file containing: L1GOSTBR.png
MW2.PRJ/CEL/L1GOSTBR.png <- the real image
Mods are refused.
For things with no name (database items), the pointer is the bare number: a text file called 43.
Some replacements can have a small companion file named <original>.<something>.txt, such as 43.loop.txt. Companions are never mistaken for replacements. A companion is only read from the same mod that supplied the replacement it belongs to.
The music in the menus (the "shell") is MIDI stored in DATABASE.MW2. You can replace each song with a recording.
Formats: FLAC, WAV, OGG, MP3. Any sample rate or bit depth works. FLAC is recommended because it's lossless and about half the size of WAV.
Songs:
| Item | Used for |
|---|---|
43 | every campaign, including Trials |
44, 45, 46 | Clan Wolf |
47, 48, 49 | Clan Jade Falcon |
MyMusicMod/
DATABASE.MW2/
43.flac
43.loop.txt <- optional
The song behaves like the original: it loops forever, follows the music volume setting, and pauses when you switch to another program.
<item>.loop.txtIf there's no loop file, the whole recording loops, with a short 50 ms crossfade from its end back into its start.
For a seamless loop, add a loop file next to the song:
start=11.975
end=117.108
# or ; are comments.
start is where each repeat begins (default: the start of the file).
end is where each pass ends and the next one begins (default: the end of the file).
end is the "tail".** When a pass reaches end, the next pass starts from start right on time, while the old pass keeps playing its tail (the reverb and decay of the last notes) underneath, fading out at the end of the file. This way the reverb carries over into the repeat instead of cutting off.
So the best recording is: the song from the very first note, played through past its loop point, with a few seconds of tail at the end. Then put the loop point in loop.txt.
Original loop points (in seconds from the first MIDI event):
| Song | start | end |
|---|---|---|
| 43 | 0 | 91.492 |
| 44 | 0 | 124.667 |
| 45 | 0 | 119.308 |
| 46 | 11.975 | 117.108 |
| 47 | 0 | 93.600 |
| 48 | 0 | 93.892 |
| 49 | 0 | 86.400 |
These only apply if your recording follows the original MIDI timing exactly, starting the instant the first MIDI event plays. If you recorded a different arrangement, a different tempo or your own song, use your own times.
World, mech and building textures are CEL resources in MW2.PRJ. You can replace them with images.
Formats: PNG or TGA (raw or RLE; true-colour, greyscale or colour-mapped).
Where: MW2.PRJ/CEL/
Every edition names the same texture with a different extension:
| Editions | Original name |
|---|---|
| DOS, Pentium, BattlePack | A9BLAH01.XEL |
| 3Dfx, Matrox, S3, ATI | A9BLAH01.555 |
| PowerVR | A9BLAH01.SGL |
You can name your replacement any of these ways. It's used in every edition whichever one you pick:
A9BLAH01.png: by its stem. This is the usual choice.
A9BLAH01.555.png or A9BLAH01.SGL.png: by a full name.
A9BLAH01.XEL.png: a paletted texture (see below).
A replacement is a drop-in: it always fills exactly the area the original covered on the model, whatever its size. A 1024×1024 image replacing a 64×32 texture is stretched to fill that 64×32 area, keeping its 2:1 shape on the model. It doesn't take a 64×32 corner out of your image.
So draw your image to the same aspect ratio as the original, at whatever resolution you like.
Replacements are drawn with smooth filtering (mipmaps, trilinear, anisotropic). The originals are drawn blocky.
Your image's alpha channel is used as transparency. The engine dithers partial alpha, so soft edges come out as dithered coverage. Save as RGBA if you want any transparency. An image without alpha is fully opaque.
.XEL.png)If you name the file <name>.XEL.png (or .XEL.tga), the image is treated as paletted, the way the DOS editions' textures are:
MekEngine colours it with the same palette the original texture would get, including the darker palettes of night missions. A paletted replacement follows the mission's time of day; a full-colour one looks the same day and night.
Start MekEngine with the -dumptextures switch to get every texture as a PNG:
bin\MekEngine.exe -dumptextures
(Or add -dumptextures to the target of a shortcut to MekEngine.exe.)
Pick an edition as usual. Before the intro plays, MekEngine writes all of that edition's textures to a TextureDump folder next to Mods. Then the game carries on normally. TextureDump is laid out exactly like a mod:
TextureDump/
MW2.PRJ/
CEL/
L1GOSTBR.555.png
L1GOSTBR.555.alpha.png
...
<name>.png is how opaque faces show it, and <name>.alpha.png is the version with alpha that transparent faces use. On PowerVR, small textures that sit in the corner of a bigger map are cut down to just the art.
<name>.XEL.png: grey level = palette index, and index 255 is transparent. Its name already makes it a paletted replacement (see above), so you can edit it and drop it back in.
To use a dumped texture, copy it into your mod's MW2.PRJ/CEL/ folder and edit it. Paint at any resolution you like, as long as you keep the aspect ratio. Rename a .alpha.png file to drop the .alpha (for example L1GOSTBR.555.png, or just L1GOSTBR.png). Delete TextureDump when you're done; MekEngine doesn't read it.
The easiest way is to dump the textures (above) and look through them. Otherwise:
Texture names are 8 characters, and many follow a pattern. For example, the clan emblems:
| Texture | Clan |
|---|---|
L1GOSTBR, L2GOSTBR | Ghost Bear (small, large) |
L1WOLFCL, L2WOLFCL | Wolf |
L1JADEFN, L2JADEFN | Jade Falcon |
L1SMOJAG, L2SMOJAG | Smoke Jaguar |
L1STEELV, L2STEELV | Steel Viper |
L1NOVCAT, L2NOVCAT | Nova Cat |
L1DSHRK1 | Diamond Shark |
L1INRSFR, L2INRSFR | Inner Sphere |
Not yet replaceable: menu pictures, the mouse cursor, fonts, cockpit HUD art and videos.
Model replacement mods aren't supported yet. The -dumpmeshes switch is available now so that artists can get to work early, and help shape how model support is built. If you start on a model, come talk about what you need from the importer on the Discord.
Start MekEngine with the -dumpmeshes switch:
bin\MekEngine.exe -dumpmeshes
(Or add -dumpmeshes to the target of a shortcut to MekEngine.exe. It can be used together with -dumptextures.)
Pick an edition as usual. Before the intro plays, MekEngine writes all of that edition's models to a MeshDump folder next to Mods. Then the game carries on normally. Like TextureDump, it's laid out like a mod:
MeshDump/
DUPLICATES.txt <- pieces shared by more than one model
MW2.PRJ/
BWD/
<name>.glb <- mechs, vehicles, turrets, doors, ...
POLY/
<name>.glb <- buildings, props and other single shapes
CEL/
<name>.png <- the textures the models use
<name>.alpha.png
The models are glTF 2.0 (.glb), which most 3D programs can open. In Blender, use File → Import → glTF 2.0. The textures are separate PNGs that the models find through the CEL folder next to theirs, so keep the folders together when you copy them.
BWD/ holds the game's objects: things built from several pieces that move against each other, such as mechs (legs, torso, arms…), vehicles and turrets. Each piece is its own node, named after its shape and placed at its joint under the piece it hangs from, so the hierarchy is the one the game animates. Empty attachment points come out as nodes named DUMMY_<number>.
POLY/ holds every shape that isn't part of an object: buildings, props and so on, each as a single mesh.
-dumptextures writes.
DUPLICATES.txtMany models share pieces. For example, several mechs can use the same shape for a part. Each dumped .glb has its own copy, but in the original game it's one shape. DUPLICATES.txt lists each group of models and the pieces they all share.
Delete MeshDump when you're done; MekEngine doesn't read it.
Mods/
GhostBear2MoonBunny/
mod.txt
MW2.PRJ/
CEL/
L1GOSTBR.png <- RGBA image, any size, square
L2GOSTBR <- pointer file containing: L1GOSTBR.png
mod.txt:
GhostBear 2 MoonBunny
Replaces the Ghost Bear clan emblem with the MoonBunny emblem.
Turn it on from Mods on the Choose Edition screen and start a Ghost Bear mission.
Mods/
MoonMusic/
mod.txt
DATABASE.MW2/
43.flac 43.loop.txt
44.flac 44.loop.txt
...
46.flac 46.loop.txt <- start=11.975 / end=117.108
...
Mods, next to the MekEngine folder. If the Mods screen finds no mods at all, it shows the folder it looked in.
43.flac, L1GOSTBR.png), or the original name and then your extension (L1GOSTBR.555.png).
Mods:, TextureMods: or ShellAudioSequence:.
loop.txt: the times are in seconds from the very start of your file, and end must be after start.