A quick tutorial to get started into adding icons and images in the game, I've not been able to test it enough to get one working for a civ, but maybe it was because of my test image
test image :
.modinfo
The mod ID here will be used in the path creation
The .png is imported in the file system, the Icons DB is updated with <UpdateIcons>
XML example to replace an existing icon, note how the mod ID ("ged-ynamp") is used in the file path
Result:
test image :
.modinfo
Spoiler full ynamp.modinfo as example :
XML:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="ged-ynamp" version="1"
xmlns="ModInfo">
<Properties>
<Name>LOC_MODULE_YNAMP_NAME</Name>
<Description>LOC_MODULE_YNAMP_DESCRIPTION</Description>
<Authors>Gedemon</Authors>
<Package>MOD</Package>
</Properties>
<Dependencies>
<Mod id="base-standard" title="LOC_MODULE_BASE_STANDARD_NAME"/>
</Dependencies>
<ActionCriteria>
<Criteria id="always">
<AlwaysMet></AlwaysMet>
</Criteria>
</ActionCriteria>
<ActionGroups>
<ActionGroup id="base-game-main-ynamp" scope="game" criteria="always">
<Actions>
<UpdateDatabase>
<Item>data/maps.xml</Item>
</UpdateDatabase>
<UpdateText>
<Item>text/en_us/MapText.xml</Item>
</UpdateText>
<ImportFiles>
<Item>maps/ynamp-utilities.js</Item>
<Item>icons/happy_cat.png</Item>
</ImportFiles>
<UpdateIcons>
<Item>icons/ynamp-icons.xml</Item>
</UpdateIcons>
<ScenarioScripts>
<Item>scenario/test.js</Item>
</ScenarioScripts>
</Actions>
</ActionGroup>
<ActionGroup id="shell-ynamp" scope="shell" criteria="always">
<Actions>
<UpdateDatabase>
<Item>config/config.xml</Item>
</UpdateDatabase>
<UpdateText>
<Item>text/en_us/MapText.xml</Item>
</UpdateText>
<ImportFiles>
<Item>icons/happy_cat.png</Item>
</ImportFiles>
<UpdateIcons>
<Item>icons/ynamp-icons.xml</Item>
</UpdateIcons>
</Actions>
</ActionGroup>
</ActionGroups>
<LocalizedText>
<File>text/en_us/ModuleText.xml</File>
</LocalizedText>
</Mod>
The mod ID here will be used in the path creation
XML:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="ged-ynamp" version="1"
xmlns="ModInfo">
The .png is imported in the file system, the Icons DB is updated with <UpdateIcons>
XML:
<ImportFiles>
<Item>icons/happy_cat.png</Item>
</ImportFiles>
<UpdateIcons>
<Item>icons/ynamp-icons.xml</Item>
</UpdateIcons>
XML example to replace an existing icon, note how the mod ID ("ged-ynamp") is used in the file path
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Database>
<IconDefinitions>
<Replace>
<ID>ADVISOR_CULTURE</ID>
<Path>fs://game/ged-ynamp/icons/happy_cat.png</Path>
<Context>CIRCLE_MASK</Context>
</Replace>
</IconDefinitions>
</Database>
Result:
Last edited: