Master of Magic – Modding 2D Images Tutorial

Master of Magic – Modding 2D Images Tutorial 1 -
Master of Magic – Modding 2D Images Tutorial 1 -

Welcome to Master of Magic – Modding 2D Images Tutorial Guide.

This guide will demonstrate that you can create spells, units, and wizards by modifying 2D images. This tutorial will demonstrate how to add new images to the game to supplement or expand existing ones.

Introduction and General Information


Important Notes for ver. 1.06.10:

There are still a few bugs that require attention.

  • Filenames must be in lowercase in the XML and AdditionalImages folders – examples supplied with the game won’t work unless renamed
  • Unit icons – Full body portraits are not loading correctly
  • Resource icons – missing the field to optionally 3d model. If the resource uses a custom name, it will not display any 3d models in the game. It will be possible to specify a third-party model after the next patch (outside of those included with the base game)).


Although no additional tools are required, having an XML editor (like Notepad++) is helpful.

All 2D images referenced in XML database files may be replaced.

These XMLs can be found in \ExternalAssets\Database, which is located in your game folder.

The game will accept only images in.jpg or.png formats.

Please do not include the extension in your filename when you enter it in the XML Database.

Each file must have a unique name. It is not allowed to have the same file name, even if it has a different extension (. myhero.jpg).

Images can have different dimensions. If you add images not the right size, they will be stretched to fit the container inside the game.

Place the images that you wish to add in the \ExternalAssets\AdditionalImages folder.

Skills, enchantments, buildings, resources, artifacts

Images of skills are found in DB_SKILL.xml

Enchantments can be found in DB_ENCHANTMENT.xml

Buildings are located in DB_BUILDING.xml

Terrain resources are in DB_TERRAIN_RESOURCE.xml

Artifacts can be found in DB_ARTEFACT.xml

A single square texture best represents their icons. The recommended size is 256x256px.

You can modify the icon for each asset by changing the value in the entry Graphic, as shown in the examples below.

<ENCH-STASIS AllowDispel="TRUE" RemoveWhenParentIDChange="TRUE">
 <DescriptionInfo Name="DES_STASIS" Description="DES_STASIS_DES" Graphic="customenchicon"/>


 <DescriptionInfo Name="DES_BUILDING_BARRACKS" Description="DES_BUILDING_BARRACKS_DES" Graphic="custombuildingicon"/>

If you choose to expand the available buildings, they will appear in the production options in the construction manager. However, new icons can’t be added to the town map.

The field OptionalModel3dName is for resources. It used to enter the name of the 3d model it received with the base game. Adding new 3d models is not possible at that time. If the entry is not present, the game will search for a 3d model with the same name in the Graphic field.

 <DescriptionInfo Name="DES_RES_COAL" Description="DES_RES_COAL_DES" Graphic="customresicon"/> 
 <OptionalModel3dName VALUE=""/>



Spell images can be found in DB_SPELL.xml

The icon artwork is a single, square texture. It can be used on the spell selection and spellbook screens, as well as in notifications, research, and trade. Its recommended size is 256x256px

Some spells also include a field called AdditionalGraphic. This displays larger images when a global spell has been cast. These images are recommended to be 1250x1500px.

You can modify the icon for each of these assets by changing the Graphic value, as shown in the example below.

<SPELL-HERB_MASTERY WorldCost="1000">
 <DescriptionInfo Name="DES_HERB_MASTERY" Description="DES_HERB_MASTERY_DES" Graphic="customspellicon"/>
 <AdditionalGraphic VALUE="customspellglobalicon"/>


Race and Units

Race entries can be found in DB_RACE.xml

Units are found in DB_SUBRACE.xml

The race icon is used on (‘s screen for selecting races.

The big portrait of the race representation is taken using a selected unit in the RepresentativeUnit fields (. Please note that this is a reference file to the DB_UNIT database and not an image file.). To change the small icon, modify the value of the field Graphic:

<RACE-GNOLLS BaseRace="TRUE" ArcanusRace="TRUE">
 <DescriptionInfo Name="DES_GNOLLS" Description="DES_GNOLLS_DES" Graphic="raceicon"/>
 <RepresentativeUnit VALUE="UNIT-GNO_BOWMEN"/>

Three images are required for units:

– Small portrait icon, displayed in different grids. Recommended size: 256 x256 pixels

Full body icon – displayed on the Unit Info screen and in the construction manager. Recommended size is

1024 x 1024 pixels

– Marker – Printed on the banner of the unit on the battlefield. With transparency, the recommended size is 128×128 pixels

The icon name is entered into the field Graphic.


Full-body icons do not have their field. Instead, the game will search for the filename specified by the Graphic field with a suffix of ‘_FULL. You will need to insert two images into the AdditionalImages directory, i.e. NewUnit.png or NewUnit_FULL.png

Enter a name for a 3d model in the OptionalModel3dName field. It is not possible to add new 3d models at this time. If the entry is not present, the game will search for a 3d model with the same name in the Graphic field.

<UNIT-CATAPULT Figures="1" ConstructionCost="100">
 <DescriptionInfo Name="DES_CATAPULT" Description="DES_CATAPULT_DES" Graphic="customunitimage"/>
 <OptionalModel3dName VALUE="Catapult"/>
 <Marker VALUE="custommarkericon"/>



DB_WIZARD.xml contains references to wizard images

Two images are required for artwork for wizards:

– small (Icon). Used for wizard portrait icons, diplomacy screen and cutscenes (. 640 x).

– large (Background), used on the wizard selection screens (14089x3456px, to handle 4k resolutions).

You can change the values in Graphic or Icon to the desired values, as shown in the example below.

 <DescriptionInfo Name="DES_MERLIN" Description="DES_MERLIN_DES" Graphic="customwizardportrait"/> 
 <Icon VALUE="customwizardportrait" />
 <Background VALUE="customwizardbackground" />


Events (Adventures

Adventure images are taken from a different folder than the rest: \ExternalAssets\AdventureGraphics

You don’t need to modify any databases. Simply add your custom.jpg/.png images into that folder. They will be listed when selecting an image for your Editor node.

The recommended artwork size is 1250 x 1500 px


Written by A’vee

Hope you enjoy the Guide about Master of Magic – Modding 2D Images Tutorial, if you think we should add extra information or forget something, please let us know via comment below, and we will do our best to fix or update as soon as possible!

Be the first to comment

Leave a Reply

Your email address will not be published.