How to select a models variant skin?

Martinov

Chieftain
Joined
May 9, 2018
Messages
16
When I define a new unit, I can't figure out how to tell civ which skin to use for that unit.

For example Snafusmith's T-72 unit mod has the following files, which provide 5 different skins, if only I could use them...
T72.dds
T72.fxsxml
T72.gr2
T72 Algeria.dds
T72 India.dds
T72 Iraq.dds
T72 Iran.dds
T72 USSR.dds
 
You can make them UUs with the same stats, but then there will be issues with civs with UBs because on, e.g., the dawn of man screen you'll see your UU as the second unique instead of the UB.

The other way is to use the same technique as settlers, i.e. enable UnitArtInfoCulturalVariation in the Units table. This is the method Ethnic Units, R.E.D. Modpack, and Ethnic Diversity (among others) use. This causes the engine to check for an art define for that unit with an added suffix the civ was assigned in the Civilizations table. If that art define with suffix exists, it will use that art define instead.

The problem with the latter method is that you need a suffix for each civ that you want to include, e.g., _RUSSIA for the USSR unit, _PERSIA for the Iran unit, etc. This means you have to make copies of the appropriate settler art defines or you end up with vanilla settler for those civs. You're also going to potentially conflict with the mods already using this system (and besides, they already use those T72 models).

The third method is make untrainable units and replace newly trained units with Lua as appropriate.
 
Last edited:
Top Bottom