Master of Magic – 2D Images Modding Guide

    0
    180



    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 note

    At the time of writing this guide, some things still don’t work as expected – these bugs will be fixed later:

    • File names in both the XML and Additional Images folders need to be in lowercase – the examples delivered with the game will not work unless renamed.
    • Unit Icons – Full body portraits are not loading correctly.
    • Resource icons – field for optional 3d model is missing – if the resource uses a custom image name, it will not display the 3d model in game. After the next patch it will be possible to specify 3d models (of those delivered with the base game).

    The purpose of this short guide is to explain how to add your own images to the game, modify or enhance the images included in the base game.

    No additional tools are required, but having a good XML editor (like Notepad++) makes it easy.

    All 2D images referenced in XML database files can be converted.

    These are located in XMLs. \External Assets\Database which sits in your game folder.

    The game will only accept images in .jpg and .png format.

    When entering a file name in an XML database, do not include an extension in the file name.

    Make sure each file has a unique name – it is not allowed to have files with the same name even if they have different extensions (ie myhero.jpg and myhero.png).

    Images will have different dimensions – If the images you’ve added are of different sizes, they’ll fit into the container they need to be displayed in-game.

    Place the images you want to add to the \ExternalAssets\AdditionalImages folder.

    Skills, Magic, Buildings, Resources, Artifacts

    • The skill images are located in DB_SKILL.xml.
    • Enchantments are in DB_ENCHANTMENT.xml.
    • The buildings are in DB_BUILDING.xml.
    • Terrain resources are in DB_TERRAIN_RESOURCE.xml.
    • The artifacts are in DB_ARTEFACT.xml.

    The artwork for their icons is a square texture, the recommended size is 256 x 256px.

    For each of the above assets, you can change the icon by editing the value in the graphic entry, as 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 in the production options in the construction manager, but it is not possible to add new icons to the city map.

    The resource has a field called OptionalModel3dName. This is used to enter the name of the 3d model that is supplied with the base game – adding new 3d models is not possible at this time. If this entry does not exist, the game will search for a 3d model with the same name as the one found in the graphics field.

    Mantra

    Spell images are referenced in DB_SPELL.xml.

    The icon artwork is a square structure. It is used during the spell selection screen, spellbook, research, notifications, and trading. Its recommended size is 256 x 256px.

    Some spells also have another field called an additional graphic – this is used for larger images when a global spell is being cast. The recommended size of these images is 1250 x 1500px.

    For each of the above assets, you can change the value in the graphic entry, as 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>

    Races and units

    • Race entries are located in DB_RACE.xml.
    • The units are in DB_SUBRACE.xml.

    The race icon is used on the race selection screen (small icons) and on the city manager screen.

    The large portrait to represent the race is taken from the selected unit identified in the RepresentativeUnit field (note that this is a reference to the DB_UNIT database, not the image file!) To edit the small icon, the graphic Change the field value:

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

    Units require three images:

    • Small portrait icon – appears in different grids. The recommended size is 256 x 256 px.
    • Full Body Icon – Displayed on the Unit Information screen and Construction Manager. The recommended size is 1024 x 1024 px.
    • Marker – Shown on a unit’s banner on the battlefield. Recommended size is 128 x 128 px with transparency.

    The icon name goes in the graphic field.

    Important

    The full body icon does not have its own field – instead the game will look for the specified file name with the ‘_FULL’ suffix in the graphics field. So you will need to put two images in the Additional Images folder, namely NewUnit.png and NewUnit_FULL.png.

    OptionalModel3dName Enter a name for the 3d model delivered with the base game – adding new 3d models is not possible at this time. If this entry does not exist, the game will search for a 3d model with the same name as the one found in the graphics 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>

    Wizard

    Helper 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).
    • large (background) – used on wizard selection and loading screens (to handle 14089 x 3456px, 4k and ultrawide resolutions).

    Change the values ​​in the graphic, icon and background entries to the desired ones, as 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 (adventure)

    Adventure photos are taken from a different folder than the rest: \External Assets\Adventure Graphics

    No need to edit any database – just add custom .jpg or .png images to this folder and they will be listed when you select an image for your node in the editor.

    Recommended artwork size is 1250 x 1500 px.

    Recommended for you

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here