Changing Unit Graphics Based on Era?

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
Where can I find the settings to change unit graphics, based on the Era? In my game, the Cargo Ships stay as wooden ships all the way through until the Atomic Era, while other units, like Caravans, change once I hit the Modern Era.

I tried looking in the XML, but unless I'm looking in the wrong ones, or overlooking something, I can't find it. :confused::confused::confused:
 
In the <Units> entry, <UnitArtInfoEraVariation>true</UnitArtInfoEraVariation> and then the required entries in the ArtDefine_ tables, starting from the _LATE entry in the ArtDefine_UnitInfos table
 
I'm looking in Civ5ArtDefines_Expansion2_Units.xml, but do not see anything that suggests what Era is required to make the switch from early to late unit graphics.

For example, this is what I see:
Code:
<!-- UNIT_CARGO_SHIP_EARLY ************************************************ -->
  <UnitArtInfo>
    <Type>ART_DEF_UNIT_CARGO_SHIP</Type>
    <Formation>DefaultCavalry</Formation>
    <DamageStates>1</DamageStates>
		<PortraitIndex>4</PortraitIndex>
		<IconAtlas>EXPANSION2_UNIT_ATLAS</IconAtlas>
		<UnitMemberArt>
      <MemberType>ART_DEF_UNIT_MEMBER_CARGO_SHIP</MemberType>
      <MemberCount>1</MemberCount>
    </UnitMemberArt>
  </UnitArtInfo>
  <!-- UNIT_CARGO_SHIP_MID ************************************************ -->
  <UnitArtInfo>
    <Type>ART_DEF_UNIT_CARGO_SHIP_RENAISSANCE</Type>
    <Formation>DefaultCavalry</Formation>
    <DamageStates>1</DamageStates>
		<PortraitIndex>21</PortraitIndex>
		<IconAtlas>EXPANSION2_UNIT_ATLAS</IconAtlas>
		<UnitMemberArt>
      <MemberType>ART_DEF_UNIT_MEMBER_CARGO_SHIP_MID</MemberType>
      <MemberCount>1</MemberCount>
    </UnitMemberArt>
  </UnitArtInfo>
  <!-- UNIT_CARGO_SHIP_LATE ************************************************ -->
  <UnitArtInfo>
    <Type>ART_DEF_UNIT_CARGO_SHIP_POSTMODERN</Type>
    <Formation>DefaultCavalry</Formation>
    <DamageStates>1</DamageStates>
		<PortraitIndex>22</PortraitIndex>
		<IconAtlas>EXPANSION2_UNIT_ATLAS</IconAtlas>
		<UnitMemberArt>
      <MemberType>ART_DEF_UNIT_MEMBER_CARGO_SHIP_LATE</MemberType>
      <MemberCount>1</MemberCount>
    </UnitMemberArt>
  </UnitArtInfo>

Is there something I'm just not seeing that allows you to change what era the units change graphics with? I can see it says POSTMODERN in the tag name, but nothing that allows you to modify from POSTMODERN to MODERN.
 
The era switch is [was] hardcoded. In vanilla and G+K, you would have had to create separate units for each time period, and use Lua to allow/prevent training on era change, and to kill and replace the existing units.

BNW added a lot more era variation. I think it is probably still hardcoded, but it's possible the switch now occurs if the art define is named with the appropriate suffix... Either you can test it out, or see if the function is in the DLL.

EDIT:
I tried changing WORKER_LATE to WORKER_RENAISSANCE, and it worked.

EDIT #2:
Apparently you're not restricted to the 3 era suffixes that Firaxis uses (_RENAISSANCE, _LATE [industrial], and _POSTMODERN [atomic]); the suffix _MEDIEVAL worked for me as well!
 
Top Bottom