How are special unit abilities associated with unique units?

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,753
Location
Calgary, Canada
I am working at creating some UUs for my civilizations. I am looking at the game UUs for inspiration, however, I cannot determine how their special abilities are associated with the units. For example, the berserker is +7 att/-7 defending... where is that outlined? Or the phalanx flanking benefit? I cannot determine from the unit files, and leader/civilization entries for the units don't have that either. There does not seem to be anything under promotions or otherwise.

So, if I want to give a unit a special ability, where can I find examples?

Thank-you.
 
As an example of granting a unit a basic ability. MOAR Units has more advanced units/unit abilities for you to look at.
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 11/25/2016 12:13:46 PM -->
<GameData>
   <UnitAiInfos>
       <Row UnitType="UNIT_STARTING_SETTLER" AiType="UNITAI_SETTLE"/>
       <Row UnitType="UNIT_STARTING_SETTLER" AiType="UNITTYPE_CIVILIAN"/>
   </UnitAiInfos>
   <Tags>
       <Row Tag="CLASS_STARTING_SETTLER" Vocabulary="ABILITY_CLASS"/>
   </Tags>
   <TypeTags>
       <!-- Unit Classes -->
       <Row Type="UNIT_STARTING_SETTLER" Tag="CLASS_STARTING_SETTLER"/>
       <!-- Abilities -->
       <Row Type="ABILITY_STARTING_SETTLER" Tag="CLASS_STARTING_SETTLER"/>
   </TypeTags>
   <UnitAbilities>
       <Row UnitAbilityType="ABILITY_STARTING_SETTLER" Name="LOC_ABILITY_STARTING_SETTLER" Description="LOC_ABILITY_STARTING_SETTLER_DESCRIPTION"/>
   </UnitAbilities>
   <UnitAbilityModifiers>
       <Row>
           <UnitAbilityType>ABILITY_STARTING_SETTLER</UnitAbilityType>
           <ModifierId>SETTLER_IGNORE_FEATURES</ModifierId>
       </Row>
   </UnitAbilityModifiers>
   <Modifiers>
       <Row>
           <ModifierId>SETTLER_IGNORE_FEATURES</ModifierId>
           <ModifierType>MODIFIER_PLAYER_UNIT_ADJUST_SEE_THROUGH_FEATURES</ModifierType>
       </Row>
   </Modifiers>
   <ModifierStrings>
       <Row ModifierId="SETTLER_IGNORE_FEATURES" Context="Preview" Text="LOC_ABILITY_STARTING_SETTLER_DESCRIPTION"/>
   </ModifierStrings>
   <ModifierArguments>
       <Row>
           <ModifierId>SETTLER_IGNORE_FEATURES</ModifierId>
           <Name>CanSee</Name>
           <Value>true</Value>
       </Row>
   </ModifierArguments>
   <Units>
       <Row UnitType="UNIT_STARTING_SETTLER" BaseMoves="5" Cost="1" AdvisorType="ADVISOR_GENERIC" BaseSightRange="5" ZoneOfControl="false" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_CIVILIAN" FoundCity="true" PopulationCost="1" PrereqPopulation="2" Name="LOC_UNIT_STARTING_SETTLER_NAME" Description="LOC_UNIT_STARTING_SETTLER_DESCRIPTION" CanCapture="False" CostProgressionModel="COST_PROGRESSION_PREVIOUS_COPIES" CostProgressionParam1="20" PurchaseYield="YIELD_GOLD" PseudoYieldType="PSEUDOYIELD_UNIT_SETTLER" PrereqTech="TECH_Dawn_of_Civilization" MandatoryObsoleteTech="TECH_Dawn_of_Civilization"/>
   </Units>
</GameData>
 
Top Bottom