OK, about that new condition thingie that was added to 1.6...

By on May 3, 2014 7:14:56 PM from Elemental Forums Elemental Forums

tjashen

Join Date 03/2009
+55

So, this was added to 1.6...

Added the ability to have these conditional modifiers based on either the attacker’s or the target’s unit stats. (ie: Master Archer is based on the unit having UnitStat_IsBow value that all bows give, Death Blow is based on the target having less than 20 hit points). (for modders)

So the relevant .xml for Master Archer...

Code: xml
  1.     <AbilityBonus InternalName="MasterArcherAbility">
  2.         <AbilityBonusOption InternalName="MasterArcher">
  3.             <DisplayName>Master Archer</DisplayName>
  4.             <Description>+25 Critical Hit Chance when using a Bow</Description>
  5.             <Icon>Ability_MasterArcher_Icon.png</Icon>
  6.             <GameModifier>
  7.                 <ModType>Unit</ModType>
  8.                 <Attribute>AdjustUnitStat</Attribute>
  9.                 <BoolVal1>1</BoolVal1>
  10.                 <StrVal>UnitStat_ChanceToCrit</StrVal>
  11.                 <StrVal2>UnitStat_IsBow</StrVal2>
  12.                 <Value>25</Value>
  13.                 <BonusValue>0.5</BonusValue>
  14.                 <Provides>+25 Critical Hit Chance when using a Bow</Provides>
  15.             </GameModifier>
  16.             <IsCombatAbility>1</IsCombatAbility>
  17.             <Type>Ability</Type>
  18.             <AIData AIPersonality="AI_General">
  19.                 <AIPriority>5</AIPriority>
  20.             </AIData>
  21.         </AbilityBonusOption>
  22.     </AbilityBonus>

My question is, has anyone been using this in any other context yet?  I wouldn't mind seeing some other examples, to give me some ideas...

 

 

Locked Post 1 Reply
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
May 3, 2014 8:50:04 PM from Elemental Forums Elemental Forums

 

The below is actually based off of Deathblow not Master Archer but whatever.

Code: xml
  1.   
  2.   <AbilityBonus InternalName="VendettaAbility">
  3.         <AbilityBonusType>Champion_Talent</AbilityBonusType>    
  4.         <AbilityBonusOption InternalName="Vendetta">
  5.             <DisplayName>Vendetta</DisplayName>
  6.             <Description>Grants +33% physical attack versus a random enemy in combat.</Description>
  7.             <Icon>Ability_Vendetta_Icon.png</Icon>                
  8.             <GameModifier>
  9.                 <ModType>Unit</ModType>
  10.                 <Attribute>BattleAutoCastSpell</Attribute>
  11.                 <StrVal>VendettaSpell</StrVal>
  12.                 <Value>100</Value>
  13.                 <Provides>Chooses a random enemy unit at start of combat.</Provides>
  14.             </GameModifier>
  15.             <GameModifier>
  16.                 <ModType>Unit</ModType>
  17.                 <Attribute>AdjustUnitStat</Attribute>
  18.                 <StrVal>UnitStat_Attack_Pierce</StrVal>
  19.                 <StrVal2>UnitStat_Vendetta</StrVal2>
  20.                 <Multiplier>1.33</Multiplier>
  21.                 <BonusValue>0</BonusValue>                
  22.                 <Provides>Grants +33% physical attack versus a that unit.</Provides>
  23.                 <vsHigher>1</vsHigher>
  24.             </GameModifier>            
  25.             <Cost>1</Cost>
  26.             <Type>Aggressive</Type>            
  27.             <AIData AIPersonality="AI_General">
  28.                 <AIPriority>5</AIPriority>
  29.             </AIData>
  30.         </AbilityBonusOption>
  31.     </AbilityBonus>
  32.  
  33.    <SpellDef InternalName="VendettaSpell">
  34.         <DisplayName>Vendetta</DisplayName>
  35.         <Description>Grants caster +33% physical attack versus target.</Description>
  36.         <FormattedDescription>Grants caster +33% physical attack versus target.</FormattedDescription>
  37.         <Image>T_Berzerk_Painting.png</Image>
  38.         <IconFG>Ability_Vendetta_Icon.png</IconFG>
  39.         <SpellBookSortCategory>Unit</SpellBookSortCategory>
  40.         <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
  41.         <SpellType>Tactical</SpellType>
  42.         <SpellClass>Offensive</SpellClass>
  43.         <SpellSubClass>Damage</SpellSubClass>
  44.         <SpellTargetType>RandomEnemyUnit</SpellTargetType>
  45.         <HideInHiergamenon>1</HideInHiergamenon>
  46.         <IsResistable>0</IsResistable>
  47.         <IsSpecialAbility>1</IsSpecialAbility>
  48.         <GameModifier>
  49.             <ModType>Unit</ModType>
  50.             <Attribute>AdjustUnitStat</Attribute>
  51.             <StrVal>UnitStat_Vendetta</StrVal>
  52.             <DisplayName>Targeted</DisplayName>                
  53.             <Duration>-1</Duration>
  54.             <Value>1</Value>
  55.         </GameModifier>        
  56.         <AIData AIPersonality="AI_General">
  57.             <AIPriority>60</AIPriority>
  58.         </AIData>
  59.         <HitSoundFX>Spell_DoubleStrike_01</HitSoundFX>
  60.         <MissSoundFX>Miss_Swing1</MissSoundFX>
  61.         <MissSoundFX>Miss_Swing2</MissSoundFX>
  62.         <SpellDefEffect>
  63.             <EffectName>Y_DoubleStrike_Particle</EffectName>
  64.             <LocalPosition>0,0,0</LocalPosition>
  65.             <EffectScale>1</EffectScale>
  66.             <EffectDelay>0</EffectDelay>
  67.             <SnapToTerrain>1</SnapToTerrain>
  68.         </SpellDefEffect>
  69.     </SpellDef>
  70.  
  71.     <UnitStatType InternalName="UnitStat_Vendetta">
  72.         <DisplayName>Vendetta</DisplayName>
  73.         <DisplayNameShort>VND</DisplayNameShort>
  74.         <Description>Shows whether a unit is under a Vendetta.</Description>
  75.         <Icon>Stat_Strength_Icon.png</Icon>
  76.         <Hidden>1</Hidden>
  77.         <DefaultValue>0.0</DefaultValue>
  78.         <UnitStatGrouping>AbilityStat</UnitStatGrouping>
  79.       <UnitStatGrouping>UnitDetailsAttribute</UnitStatGrouping>
  80.     </UnitStatType>   
Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108432  walnut2   Server Load Time: 00:00:00.0000219   Page Render Time: