1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

(Double Check) RT missing Unit Flags

Discussion in 'CivBE - Modding Help & Mod Creation' started by lilgamefreek, Jun 8, 2016.

  1. lilgamefreek

    lilgamefreek Warlord

    Joined:
    Oct 30, 2014
    Messages:
    229
    Hi everyone. I'm in the middle of updating one of my mods for RT, and I can't quite figure out why the unit flag for a custom unit is missing. Was hoping someone with more experience could help sanity check my work so far.

    Current symptoms is all other members of the artdefines is working. This means portrait atlas, ingame model and animations. The only thing missing I can tell is an absent unit flag above the unit in the world view.

    Unit Declaration:
    Code:
    		<Row>
    			<Type>UNIT_EXPLORER_PIRATES</Type>
    			<Class>UNITCLASS_EXPLORER</Class>
    			<Combat>10</Combat>
    			<Cost>60</Cost>
    			<PrereqTech>TECH_HABITATION</PrereqTech>
    			<Description>TXT_KEY_UNIT_EXPLORER_PIRATES</Description>
    			<Strategy>TXT_KEY_UNIT_EXPLORER_STRATEGY_PIRATES</Strategy>
    			<Help>TXT_KEY_UNIT_EXPLORER_HELP_PIRATES</Help>
    			<BaseSightRange>3</BaseSightRange>
    			<Moves>3</Moves>
    			<NumExpeditionCharges>2</NumExpeditionCharges>
    			<CombatClass>UNITCOMBAT_RECON</CombatClass>
    			<Domain>DOMAIN_LAND</Domain>
    			<DefaultUnitAI>UNITAI_EXPLORE</DefaultUnitAI>
    			<AdvancedStartCost>30</AdvancedStartCost>
    			<WorkRate>100</WorkRate>
    			<XPValueAttack>5</XPValueAttack>
    			<XPValueDefense>5</XPValueDefense>
    			<UnitArtInfo>ART_DEF_UNIT_EXPLORER_PIRATES</UnitArtInfo>
    			<UnitArtInfoAmphibiousVariation>true</UnitArtInfoAmphibiousVariation>
    		</Row>
    
    And accompanying art define info:

    Code:
    	<ArtDefine_UnitInfos>
    		<Row>
    			<Type>ART_DEF_UNIT_EXPLORER_PIRATES</Type>
    			<Formation>Scout</Formation>
    			<DamageStates>1</DamageStates>
    			<PortraitCamera>ART_DEF_PORTRAIT_CAMERA_EXPLORER</PortraitCamera>
    			<UnitFlagAtlas>PIRATES_UNIT_FLAG_ATLAS</UnitFlagAtlas>
    			<UnitFlagIconOffset>0</UnitFlagIconOffset>
    			<PortraitAtlas>PIRATES_UNIT_ATLAS</PortraitAtlas>
    			<PortraitIndex>0</PortraitIndex>
    		</Row>
    		<Row>
    			<Type>ART_DEF_UNIT_EXPLORER_PIRATES_SEA</Type>
    			<UnitFlagAtlas>PIRATES_UNIT_FLAG_ATLAS</UnitFlagAtlas>
    			<UnitFlagIconOffset>0</UnitFlagIconOffset>
    			<PortraitAtlas>PIRATES_UNIT_ATLAS</PortraitAtlas>
    			<PortraitIndex>0</PortraitIndex>
    			<Formation>Scout</Formation>
    			<DamageStates>1</DamageStates>
    			<PortraitCamera>ART_DEF_PORTRAIT_CAMERA_EXPLORER_WATER</PortraitCamera>		
    		</Row>
    	</ArtDefine_UnitInfos>
    
    	<ArtDefine_UnitInfoMemberInfos>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_EXPLORER_PIRATES</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_EXPLORER</UnitMemberInfoType>
    			<NumMembers>1</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_EXPLORER_PIRATES_SEA</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_EXPLORER_SEA</UnitMemberInfoType>
    			<NumMembers>1</NumMembers>
    		</Row>
    	</ArtDefine_UnitInfoMemberInfos>
    I have double checked that PIRATES_UNIT_FLAG_ATLAS exists and has the icon at the declared index. It's declaration is here:

    Code:
    		<Row>
    			<Atlas>PIRATES_UNIT_FLAG_ATLAS</Atlas>
    			<IconSize>32</IconSize>
    			<Filename>Unit_Flag_Atlas_PIRATES_32.dds</Filename>
    			<IconsPerRow>1</IconsPerRow>
    			<IconsPerColumn>1</IconsPerColumn>
    		</Row>
     
  2. lilgamefreek

    lilgamefreek Warlord

    Joined:
    Oct 30, 2014
    Messages:
    229
    Found the issue. RT introduces a new required field to the entry. As seen here:

    Code:
    			<UnitFlagAtlas>PIRATES_UNIT_FLAG_ATLAS</UnitFlagAtlas>
    			<UnitFlagIconOffset>0</UnitFlagIconOffset>
    Code:
    			<UnitFlagAtlas>PIRATES_UNIT_FLAG_ATLAS</UnitFlagAtlas>
    			<UnitFlagIconOffset>0</UnitFlagIconOffset>
    			<UnitFlagHeightAdjust>0</UnitFlagHeightAdjust>
     

Share This Page