Modding the Swarm Mechanic
Good Morning
Was wondering if anyon knew where to easily find the swarm mechanic and how it can be modified. I wish to remove the +1 attack from the ability.
Good Morning
Was wondering if anyon knew where to easily find the swarm mechanic and how it can be modified. I wish to remove the +1 attack from the ability.
Pretty sure it's in CoreSpells.xml
<SpellDef InternalName="SwarmBonus">
<DisplayName>Swarm Bonus</DisplayName>
<Description>When a unit attacks, they get a bonus from allies that surrround their target.</Description>
<SpellBookSortCategory>Unit</SpellBookSortCategory>
<SpellBookSortSubCategory>UnitEnchantment</SpellBookSortSubCategory>
<SpellType>Tactical</SpellType>
<SpellClass>Defensive</SpellClass>
<SpellSubClass>Buff</SpellSubClass>
<SpellTargetType>Self</SpellTargetType>
<HideInHiergamenon>1</HideInHiergamenon>
<IsCastable>0</IsCastable>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Accuracy</StrVal>
<Duration>1</Duration>
<Value>5</Value>
</GameModifier>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Attack_Boost</StrVal>
<Duration>1</Duration>
<Value>1</Value>
</GameModifier>
</SpellDef>
Doh!
I didn't even consider to think it was a spell. I kept looking in the abilities files.
Presumably to reduce the attack boost from 1 to 0, I just have to change the <Value>1</Value> to <Value>0</Value> ??
Alternatively, I could remove the attack_stat_boost section from the spell?
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Attack_Boost</StrVal>
<Duration>1</Duration>
<Value>1</Value>
</GameModifier>
Yup. (to both) I recommend the latter rather than the former, and you could in fact make a new spell and put it in your mods folder and you won't have to edit the core files (spells are nice that way, except when it comes to mana costs, for some reason they do not get overwritten). Be sure your new spell has the same InternalName as the spell you wish to overwrite.
Welcome Guest! Please take the time to register with us.