Resource icon

Addon: Unit portrait visual remaps 1.2

Before:
1745265801188.png


After:
1745265776753.png


For users:
This is a mod that works as an addon for content mods. It enables set replace/remap unit portrait.


For developers:

1. Add mod dependency to .modinfo file (Important: don't add addon source code to your mod, use it only as dependency)
XML:
<Dependencies>
    <Mod id="izica-unit-portrait-visual-remaps" title="Izica's unit portrait visual remaps"/>
</Dependencies>


2. Create ui/game.js file
JavaScript:
window.UnitPortraitVisualRemaps = {
    ...(window.UnitPortraitVisualRemaps || {}),
    'UNIT_CUSTOM': { //your unit type
        unitType: 'UNIT_ARCHER',
        background: "UnitPortraitsBG_UNIQUE", //"UnitPortraitsBG_UNIQUE" || "UnitPortraitsBG_BASE"
    }
}


3. Include game.js file into .modinfo
XML:
<ActionGroup id="..." scope="game" criteria="always">
    <Actions>
        <UIScripts>
            <Item>ui/game.js</Item>
        </UIScripts>
    </Actions>
</ActionGroup>
Author
izica
Downloads
214
Views
1,367
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from izica

Latest updates

  1. 1.2

    Added portraits for Army commanders. ------ Special thanks to The_goggles_do_nothing.
  2. 1.1

    fix

Latest reviews

You, not Xerxes, are the king of kings. I've received feedback on my mod civs to add this and now I can.
Back
Top Bottom