Modifying core elements

Greetings

simple question:

I want to restrict certain core elements (spells, items, abilities, etc) to custom factions. I know how to do this, What I don't know is:

Is it best to copy the core element into my mods xmls in its entirety or or just the identifier and the elements I want to add, change or remove?

 

example:

 

    <AbilityBonus InternalName="AcrobatAbility">

     <AbilityBonusType>Unit_Design</AbilityBonusType>

      <AbilityBonusOption InternalName="Acrobat">

            <DisplayName>Acrobat</DisplayName>

             <Description>+1 Dodge per Level</Description>

             <Icon>Ability_Acrobat_Icon.png</Icon>

         <Prereq>     

 <Type>RestrictedAbilityBonusOption</Type>        

<Target>Player</Target>              

 <Attribute>my_custom_junk_here</Attribute>        

 </Prereq>            

<GameModifier>                

<ModType>Unit</ModType>                

 <Attribute>AdjustUnitStat</Attribute>                

 <StrVal>UnitStat_Dodge</StrVal>                

 <Value>1</Value>                

 <PerLevel>1</PerLevel>                

<Provides>+1 Dodge per Level</Provides>            

 </GameModifier>            

<AdditionalTrainingTurns>6</AdditionalTrainingTurns>            

 <HideWhenUpgraded>0</HideWhenUpgraded>            

 <Type>Defensive</Type>            

<AIData AIPersonality="AI_General">                

 <AIPriority>5</AIPriority>            

</AIData>        

 </AbilityBonusOption>    

</AbilityBonus>

 

 

Or this:

 

 

    <AbilityBonus InternalName="AcrobatAbility">

         <AbilityBonusType>Unit_Design</AbilityBonusType>

         <AbilityBonusOption InternalName="Acrobat">

         <Prereq>

      <Type>RestrictedAbilityBonusOption</Type>

         <Target>Player</Target>

               <Attribute>my_custom_junk_here</Attribute>

         </Prereq>

        </AbilityBonusOption>

     </AbilityBonus>

 

 

Or maybe both are wrong?

 

Edit:

Is there a risk of doubling gamemodifiers? From the above example; getting +2 dodge when it should be +1, +1 twice?

10,963 views 5 replies
Reply #2 Top

The answer is it differs on what you are attempting to overwrite. For Abilitybonus and Abilitybonusoption you can use the second way from /mods/.

+1 Loading…
Reply #5 Top

Quoting idontcareaboutyou, reply 5
Got another one.

Is there any place where what prereqs work where is discussed?

I know you can base prereqs off of techs, races, levels, traits, and allegiances. If you can't find an example of it in the xml it probably won't work.  What are you trying to do?