Making Might and Magic maps with Trenchbroom: Difference between revisions
From MM6 Wiki
(Created page with "====Outdated / Advanced==== ====Altering MTL file to work with MMEditor==== For now Trenchbroom exports .MTL files without texture entries. Without them MMEditor will not be...") |
(→Exporting textures from the game: new section) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Outdated / Advanced== | |||
====Altering MTL file to work with MMEditor==== | ====Altering MTL file to work with MMEditor==== | ||
Line 33: | Line 33: | ||
''If a map compiled by the editor crashes the solution is [https://www.celestialheavens.com/forum/10/10423?hilit=crashes&start=580 here].'' | ''If a map compiled by the editor crashes the solution is [https://www.celestialheavens.com/forum/10/10423?hilit=crashes&start=580 here].'' | ||
== Exporting textures from the game == | |||
To extract the textures [https://grayface.github.io/mm/#MMArchive MMArchive] can be used. The textures are stored in the '''/data/bitmaps.lod''' archive. | |||
''PAL or palette files are not required and can be deleted after extraction.'' | |||
====Project structure==== | |||
Now for Trenchbroom to find the textures a specific folder structure needs to be created | |||
It needs to look like that: | |||
<br /> | |||
- ''Project name'' | |||
- Bitmaps | |||
- ''Any folder name'' | |||
... (textures) ... | |||
- ''Any folder name'' | |||
... (textures) ... | |||
- ''Any folder name'' | |||
... (textures) ... | |||
''Trenchbroom uses texture collections / packs / groups to manage sets of textures, that is why there is a need to create and additional folder in the '''Bitmaps''' directory. Structure like that allows to enable or disable folders on the maps when needed.'' | |||
As an example the following structure will be used: | |||
<pre> | |||
- Might and Magic Trenchbroom | |||
- Bitmaps | |||
- MM6 | |||
...(textures)... | |||
</pre> | |||
Now the textures can be placed in the MM6 directory to be further visible by the editor. | |||
However, by default it seems that BMP image support is not enabled. That can be solved by creating custom configuration file for a game that needs it. |
Latest revision as of 17:57, 13 June 2020
Outdated / Advanced
Altering MTL file to work with MMEditor
For now Trenchbroom exports .MTL files without texture entries. Without them MMEditor will not be able to find the textures required by a model.
Ways to fix that:
Manual
Open .MTL file and you will see a lot of lines similar to this:
newmtl MM6/CsBr128
Note the name after slash, that is a texture name. A texture entry looks like that:
map_Kd CsBr128
map_Kd is an attribute and doesn't change, CsBr128 is a texture name. Line like that needs to be added after each newmtl entry. So the final material definition would look like:
newmtl MM6/CsBr128 map_Kd CsBr128
Bash script
Automates the process described above.
If a map compiled by the editor crashes the solution is here.
Exporting textures from the game
To extract the textures MMArchive can be used. The textures are stored in the /data/bitmaps.lod archive.
PAL or palette files are not required and can be deleted after extraction.
Project structure
Now for Trenchbroom to find the textures a specific folder structure needs to be created
It needs to look like that:
- Project name - Bitmaps - Any folder name ... (textures) ... - Any folder name ... (textures) ... - Any folder name ... (textures) ...
Trenchbroom uses texture collections / packs / groups to manage sets of textures, that is why there is a need to create and additional folder in the Bitmaps directory. Structure like that allows to enable or disable folders on the maps when needed.
As an example the following structure will be used:
- Might and Magic Trenchbroom - Bitmaps - MM6 ...(textures)...
Now the textures can be placed in the MM6 directory to be further visible by the editor.
However, by default it seems that BMP image support is not enabled. That can be solved by creating custom configuration file for a game that needs it.