Icon Maps

Icon UUIDs: XML

Icon maps defined for CML should follow this simplified template:

To make life easier for modders who are creating CML compatibility, a typical icon map XML can also be used. The one thing of note is that points will always define the corner of a **96x96** area, regardless of what is defined in the `size` property. This XML will give the same result as the one above:

One last thing of mention here - you can indeed overwrite icons of already existing UUIDs. If you use the UUID of the sledgehammer, for example, CML will change its icon to whatever you've defined. This is a special feature of icon maps *only*. It does not apply to inventory descriptions or crafting recipes.

Icon Images: PNG

Any icons in this icon set should be placed in a single image. Each icon should take up a 96x96 area. The location of the top left corner of the icon can then be plugged into the Frame Point in the associated XML.

Defining in CML

Defining an icon map is insanely simple in CML. All you need to do is open or create `iconmaps.txt` inside of `Mod Directory/Objects/Database`, and give the paths to your two files (separated by "` : `") relative to the `Mod Directory` (`Mod Directory` → `$THIS_MOD`). Note: The linked files *must* be somewhere inside of the `Mod Directory`. ``` $THIS_MOD/Path/To/Your/XML/File.xml : $THIS_MOD/Path/To/Your/IconMap/RightHere.png ``` You can define a new correlation of paths on each new line. However - do not add __any__ blank lines, or else CML will read it as an invalid definition (`NullPointerException`).

An Example

The following files have been directly copied from the Example Mod.



$THIS_MOD/Objects/Database/IconMaps/examplemodiconmapWithaVEryRandomNAME.xml : $THIS_MOD/Objects/Database/IconMaps/nowImJustComingupWithaRandomName_yeah____woohoo.png

And there you have it! Two new icons added to the game!