Sid Meier's Civilization VI

Sid Meier's Civilization VI

Z Unit Marks
brelgo 2 May, 2020 @ 5:20pm
[SUGGESTION / HOW TO] Add settler Icon
How do you feel about adding an icon for settlers? I do not like it being only unit (?) without any icon above it.

For now, this is an easy fix for others who might like this idea:

In UnitFlagManager.xml, add these two lines from line 86:
<!-- Settler: -->
<Image ID="ZUM_SettlerIcon" Anchor="L,C" Size="18,18" Offset="0,0" IconSize="17" Icon="ICON_Citizen" ToolTip="Settler"/>

[INFO FOR BEGINNERS: the lines start from "<" and end at ">", so they might span over multiple lines in the browser here, depending on your screen]

In UnitFlagManager.lua, add these lines starting from line 2102:

-- ==========================
-- Settler icon
-- ==========================

flag.m_Instance.ZUM_SettlerIcon:SetHide( true );
if GameInfo.Units[pUnit:GetUnitType()] == GameInfo.Units["UNIT_SETTLER"] then
flag.m_Instance.ZUM_SettlerIcon:SetHide( false );
nothingShown = false;
end

[INFO FOR BEGINNERS: the lines end when there either is "then" or "end" or when there is a semicolon ";"]

With these changes, you will not be able to change the icon color, but as I do not use this function, I did not include it. It is a bit more involved to do that.

Greets
Last edited by brelgo; 2 May, 2020 @ 5:21pm