For Master of Magic players, this guide explains the steps to mod your own 2D images for spells, units, wizards and adventure events.
Introduction and General Information
——————————-
At the time of writing this guide (21st Dec 2022), a few things don’t yet work as expected – these bugs will be rectified in the next patch:
- filenames need to be in lowercase in both the XML and AdditionalImages folder – examples delivered with the game will not work until renamed;
- unit icons – full body portraits are not loading correctly;
- resource icons – missing the field for optional 3d model – if the resource uses a custom image name, it will not display a 3d model in the game. After the next patch it will be possible to specify a 3d model (out of those delivered with the base game).
——————————-
This short guide aims to explain how to add your own images to the game, to either replace or extend those included in the base game.
No additional tools are necessary, but having a good XML editor (such as Notepad++) makes it easier.
All 2D images that are referenced in the XML database files can be replaced.
These XMLs are located in \ExternalAssets\Database which sits in your game folder.
The game will only accept images in .jpg and .png format.
When entering the filename in the XML database, do NOT include the extension in the filename.
Make sure that each file has a unique name – it is NOT permitted to have files with the same name even if they have a different extension (i.e. myhero.jpg and myhero.png).
Images will have various dimensions – if the ones you add have a different size, they will be stretched to match the container they need to be displayed in inside the game.
Place the images you want to add inside \ExternalAssets\AdditionalImages folder.
Skills, enchantments, buildings, resources, artefacts
Enchantments are in DB_ENCHANTMENT.xml
Buildings are in DB_BUILDING.xml
Terrain resources are in DB_TERRAIN_RESOURCE.xml
Artefacts are in DB_ARTEFACT.xmlThe artwork for their icons is a single square texture, recommended size is 256 x 256px.For each of the above assets, you can change the icon by modifying the value in the Graphic entry, like in the examples below:
If you decide to expand the list of available buildings, they will appear on the production options in construction manager, but it is not possible to add new icons to the town map.
Resources have a field called OptionalModel3dName. It used to enter a name of 3d model that is delivered with the base game – adding new 3d models is not possible at this time. If this entry does not exist or the VALUE field is empty, the game will be looking for a 3d model with the same name as found in the Graphic field.
Spells
Spell images are referenced in DB_SPELL.xml
The icon artwork is a single square texture. It is used on the spell selection screen, spellbook, research, notifications, and during trade. Its recommended size is 256 x 256px.
Some spells also have another field called AdditionalGraphic – it is used for bigger images displayed when a global spell is being cast. These images have a recommended size of 1250 x 1500px.
For each of the above assets, you can change the value in the Graphic entry, like in the example below, to modify the icon:
Race and Units
Units are in DB_SUBRACE.xmlRace icon is used on the race selection screen (small icons) and city manager screen.
Big portrait for the race representation is taken from a selected unit indicated in the RepresentativeUnit field (mind that this is a reference to the DB_UNIT database, not an image file!). To modify the small icon, change the value of the Graphic field:
Units need three images:
– small portrait icon – displayed in various grids. Recommended size is 256 x 256 px,
– full body icon – shown on the Unit Info screen and construction manager. Recommended size is
1024 x 1024 px,
– marker – shown on the unit’s banner on the battlefield. Recommended size is 128 x 128 px with transparency.
The icon name goes into the Graphic field.
IMPORTANT:
Full body icon does not have its own field – instead, the game will look for the filename specified in the Graphic field with a ‘_FULL’ suffix. So you will need to put in two images into the AdditionalImages folder, i.e. NewUnit.png and NewUnit_FULL.png
In the OptionalModel3dName enter a name of 3d model that is delivered with the base game – adding new 3d models is not possible at this time. If this entry does not exist or the VALUE field is empty, the game will be looking for a 3d model with the same name as found in the Graphic field.
Wizards
Wizard images are referenced in DB_WIZARD.xml
Artwork for wizards requires two images:
– small (Icon) – used for wizard portrait icons, diplomacy, wizard information screen and cutscenes (640 x 640px),
– big (Background) – used on the wizard selection and loading screens (14089 x 3456px, to handle 4k and ultra-wide resolutions).
Change the values in Graphic, Icon and Background entries to the desired ones, like in the example below:
Events (Adventures)
There is no need to modify any databases – simply add your custom .jpg or .png image into that folder and they will be listed when you are selecting an image for your node in the Editor.
The recommended size of the artwork is 1250 x 1500 px.