1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

(Double Check) RT missing Unit Flags

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

  1. lilgamefreek

    lilgamefreek Chieftain

    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 Chieftain

    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