This guide explains the steps to mod your own 2D images for spells, units, wizards and adventure events.
How to Mod 2D Images
Introduction and General Information
Important notes
At the time of writing this guide, a few things don’t yet work as expected – these bugs will be rectified later:
- 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
- Skills images are located in DB_SKILL.xml
- 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.xml
The 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:
<ENCH-STASIS AllowDispel="TRUE" RemoveWhenParentIDChange="TRUE">
<DescriptionInfo Name="DES_STASIS" Description="DES_STASIS_DES" Graphic="customenchicon"/>
...
</ENCH-STASIS>
<BUILDING-BARRACKS>
<DescriptionInfo Name="DES_BUILDING_BARRACKS" Description="DES_BUILDING_BARRACKS_DES" Graphic="custombuildingicon"/>
...
...
...
</BUILDING-BARRACKS>
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, 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:
<SPELL-HERB_MASTERY WorldCost="1000">
<DescriptionInfo Name="DES_HERB_MASTERY" Description="DES_HERB_MASTERY_DES" Graphic="customspellicon"/>
...
<AdditionalGraphic VALUE="customspellglobalicon"/>
...
</SPELL-HERB_MASTERY>
Race and Units
- Race entries are located in DB_RACE.xml
- Units are in DB_SUBRACE.xml
Race 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:
<RACE-GNOLLS BaseRace="TRUE" ArcanusRace="TRUE">
<DescriptionInfo Name="DES_GNOLLS" Description="DES_GNOLLS_DES" Graphic="raceicon"/>
...
<RepresentativeUnit VALUE="UNIT-GNO_BOWMEN"/>
</RACE-GNOLLS>
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, the game will be looking for a 3d model with the same name as found 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"/>
...
</UNIT-CATAPULT>
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:
<WIZARD-MERLIN>
<DescriptionInfo Name="DES_MERLIN" Description="DES_MERLIN_DES" Graphic="customwizardportrait"/>
...
<Icon VALUE="customwizardportrait" />
<Background VALUE="customwizardbackground" />
...
</WIZARD-MERLIN>
Events (Adventures)
Adventure images are taken from a different folder than the rest: \ExternalAssets\AdventureGraphics
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.
I agree, thank you for taking time out of your life to try and help other MoM fans. I truly appreciate folks like you.
After making a custom portrait and editing DB_wizard XML, my icons (or BG) turn white in game – no graphics come through. On another thread, a helpful fellow told me deleting powerTrainingData.bin out of the ExternalAssets folder would fix it, but doing so kept my game from loading.
Now, I am just trying to replace Ariel’s picture currently… does your guide only apply to making your own custom wizard, maybe? I’m hoping not,the one time I tried doing that, I get a “Serious error” message and the game won’t work, even though it makes it to the main screen.
powerTrainingData.bin only needs to be deleted if you change the subrace database (add or remove units or change their skills). The game regenerates this file during loading, this is why it’s taking sooo long to load – during the generation, the game simulates fights between units to establish how powerful they are against each other and place them in a hierarchy that is then used to decide ruin guardians etc. So you just need to let it run for as long as it needs (low end computers will take longer to finish).
As to why your new icons are not loaded correctly – there can be many reasons:
– check if the new portrait is in the correct folder (\ExternalAssets\AdditionalImages)
– check if it is saved as either png (if you need transparency) or jpg
– check if the database and filename are the same (and lowercase, before the fix is posted) and that there is no file extension in the database
Making a custom wizard is possible too, just copy another wizard’s entry and replace the image names with names of files you have added to AdditionalImages folder. To change name and description, you will need to add strings to the language database (DB_LOCALIZATION_DES.xml). As for the traits and books – as long as their total cost adds up to 11 you should be fine.