How to Add Abilities to Your New Units?

I’m trying to add abilities like Veterancy & LancerChargeAttack on my new unit. I already add veterancy & LancerChargeAttack on my protomods file, is there anything else that I miss?

What tactics file are you using?

I made a new tactics file with bowmeleecavalry & handcavalrydirectional as reference, bowmeleecavalry being more dominant.

bowmeleecavalry may actually be messing with what you’re trying to do. Actually what’s bowmeleecavalry to begin with?

It’s Qizilbash’s tactics file. I’m planning to create a unit similar to the Qizilbash, but has the Lancer Charge & Promotion ability

1 Like

From what I’ve seen you need to enable Veterancy for your unit in the techtree for it to take effect. The LancerChargeAttack problem I believe is due to you using two incompatible tactics files at the same time, but I haven’t seen them so can’t truly tell.

Veterancy has a few different parts and two different ways to enable it.

If the unit always has it enabled, like a Jaguar Prowl Knight, you code it into the unit’s proto entry itself and that has three components to add: the VeterancyBonus code that determines which stats upgrade, a flag to mark it as an ExperienceUnit, and the command code for it to show Abilities.

  <veterancybonus>
      <rank id="0">
        <veterancymodify modifytype="MaxHP">1.1500</veterancymodify>
        <veterancymodify modifytype="Damage">1.1500</veterancymodify>
      </rank>
      <rank id="1">
        <veterancymodify modifytype="MaxHP">1.2500</veterancymodify>
        <veterancymodify modifytype="Damage">1.2500</veterancymodify>
      </rank>
      <rank id="2">
        <veterancymodify modifytype="MaxHP">1.4500</veterancymodify>
        <veterancymodify modifytype="Damage">1.4500</veterancymodify>
      </rank>
  </veterancybonus>

<flag>ExperienceUnit</flag>

<command page="11" column="0">Abilities</command>

If the unit sometimes has it enabled like after a card is sent or only for a certain civ you can enable Veterancy through a techtree entry, and you will still need to add the command code to show Abilities on the unit’s proto entry.

    <effect type="Data" amount="1.00" subtype="VeterancyEnable" relativity="Absolute">
        <target type="ProtoUnit">deMercBattleship</target>
    </effect>
    <effect type="Data" amount="1.05" subtype="VeterancyBonus" rank="0" modifytype="MaxHP" relativity="Assign">
        <target type="ProtoUnit">deMercBattleship</target>
    </effect>
    <effect type="Data" amount="1.10" subtype="VeterancyBonus" rank="1" modifytype="MaxHP" relativity="Assign">
        <target type="ProtoUnit">deMercBattleship</target>
    </effect>
    <effect type="Data" amount="1.15" subtype="VeterancyBonus" rank="2" modifytype="MaxHP" relativity="Assign">
        <target type="ProtoUnit">deMercBattleship</target>
    </effect>

Regardless of which method you use, the last step is to code the promotion icon into the abiltiies.xml or abilitymods.xml for the unit, and remember to set a tech requirement like the Crossbowman has if it’s not always active and gated behind a card or whatever.

<despyottoman>
    <ability>dePromotionHitpoints<alwaysdisabledingrid>true</alwaysdisabledingrid><forceshowrollover>true</forceshowrollover></ability>
    <ability>deChargeAbilitySpyPistol<tech>DEHCYildizAgents</tech><bindtochargeaction>true</bindtochargeaction><bindtoauxchargeaction>true</bindtoauxchargeaction><forceshowrollover>true</forceshowrollover></ability>
</despyottoman>

<crossbowman>
    <ability>dePromotionHpROF<tech>ChurchBestieros</tech><alwaysdisabledingrid>true</alwaysdisabledingrid><forceshowrollover>true</forceshowrollover></ability>
</crossbowman>

Adding a charge attack is similar but much easier to break and cause frustration as there are more components spread across multiple files. You need to code the charge attack into the unit’s proto entry and add the command Abilities code for that unit. In addition to the protoaction for the attack itself, you can set the usage time for the attack, set the recharge time (which can be in seconds or number of hits), set up a second aux charge attack on the unit (like the General has for Carbine vs. Saber Strike), and set flags so the unit can move and idle with the charge attack weapon out if it’s not normally what they are using.

<rechargetime>60.0000</rechargetime>
<chargeusagetime>0.2500</chargeusagetime>

<auxrechargetime>60.0000</auxrechargetime>
<auxchargeusagetime>0.8000</auxchargeusagetime>

<recharge init="1" type="Attacks">8.0000</recharge>

<flag>ChargeMoveAnim</flag>
<flag>ChargeIdleAnim</flag>

The unit is going to need the charge attack in their tactics file. When coding the action for it, note the animation names it’s using because you’re going to need those to match with the unit’s animfile, and you’ll also want the action name to match with the protoaction you coded in the unit’s proto entry. Once the action is set up, make sure to add it to each tactic it is going to be usable in, for most it might be every single one, while some ranged ones may not be usable on melee mode etc.

<action>
    <name stringid="112954">LanceChargeAttack</name>
    <type>Attack</type>
    <attackaction>1</attackaction>
    <speedboost>1</speedboost>
    <targetspeedboost>1</targetspeedboost>
    <rangedlogic>1</rangedlogic>
    <anim>Attack_melee_charged</anim>
    <idleanim>Idle_charged</idleanim>
    <walkanim>Walk_charged</walkanim>
    <runanim>Run_charged</runanim>
    <maxrange>3</maxrange>
    <trackrating>240</trackrating>
    <projectile>InvisibleProjectileNoTracer</projectile>
    <impacteffect>effects\impacts\melee</impacteffect>
    <rate type="Unit">1.0</rate>
    <chargeaction>1</chargeaction>
    <throw>1</throw>
    <impactforcemin>500.0f</impactforcemin>
    <impactforcemax>800.0f</impactforcemax>
    <outerdamageareadistance>.55</outerdamageareadistance>
    <outerdamageareafactor>.5</outerdamageareafactor>
    <impactlaunchangle>65.0</impactlaunchangle>
    <areasortmode>Directional</areasortmode>
    <directionaldamage>1</directionaldamage>
    <directionaldamagerefangle>0.196350</directionaldamagerefangle>
    <numberbounces>0</numberbounces>
    <basedamagecap>1</basedamagecap>
    <perfectaccuracy>1</perfectaccuracy>
</action>

<tactic>StandGround<action priority="100">BuildingAttack</action>
	<action priority="75">GuardianAttack</action>
	<action priority="30">LanceChargeAttack</action>
	<action priority="25">DefendHandAttack</action>
	<action>Discover</action>
	<action>AutoStealth</action>
	<attacktype>LogicalTypeHandUnitsAttack</attacktype>
	<autoattacktype>LogicalTypeHandUnitsAutoAttack</autoattacktype>
	<attackresponsetype>LogicalTypeHandUnitsAttack</attackresponsetype>
	<runaway>0</runaway>
	<autoretarget>1</autoretarget>
	<idleanim>Idle</idleanim>
	<boredanim>Bored</boredanim>
	<deathanim>Death_by_melee</deathanim>
	<walkanim>Walk</walkanim>
	<joganim>Jog</joganim>
	<runanim>Run</runanim>
</tactic>

Just like with Veterancy, you’ll need to set up the abilitymods.xml for the unit. If you need a custom icon or strings you can make your own in powermods.xml.

<denatwingedhussar><ability>deChargeAbilityWingedHussarLance<bindtochargeaction>true</bindtochargeaction><forceshowrollover>true</forceshowrollover></ability>
</denatwingedhussar>

The last step should be over in the unit’s animfile, where you need to make sure 1) the animation names in the tactics file match with the ones in the animfile and 2) to add whatever new animations and/or models needed for the new attack such as adding a lance attachment or charged walking/running/idling. A mounted unit has two different files for horse and rider, so don’t forget to modify both.

<anim>Attack_melee_charged<assetreference type="GrannyAnim">
		<file>animation_library\cavalry\horse_charge_attack</file>
		<weight>40</weight>
		<tag type="Attack">0.53</tag>
		<tag type="SpecificSoundSet"
		     checkvisible="1"
		     set="Swoosh">0.49</tag>
	</assetreference>
	<component>ModelComp</component>
</anim>
3 Likes

Thanks for the comprehensive guide, but unfortunately both icons failed to appear. Also adding ChargeIdleAnim makes my cavalry charge while Idle so I’m deleting every command that contains Charging while Idle & it fixed that problem, don’t know if this is what I’m supposed to do but my unit being a both Lancer & Bow cavalry. In the meantime, this is my code if you want to have a look;

clibanarii.xml

<?xml version="1.0" encoding="UTF-8"?>
<animfile>
  <definebone>HS Bone Hoof Frnt Lt</definebone>
  <definebone>HS Bone Hoof Frnt Rt</definebone>
  <definebone>HS Bone Hoof Back Lt</definebone>
  <definebone>HS Bone Hoof Back Rt</definebone>
  <definebone>Bip01 Root</definebone>
  <definebone>hotspot</definebone>
  <attachment>Rider<include>units\mercenaries\clibanarii_rider.xml</include></attachment>
  <component>ModelComp<assetreference type="GrannyModel"><file>units\asians\chinese\iron_flail\iron_flail_horse_0</file></assetreference><decal><effecttype>default</effecttype><texture isfakeshadow="1">shadows_selections\shadow_circle_128x128</texture><selectedtexture>shadows_selections\selection_oval_32x64</selectedtexture><width>1.50</width><height>3.00</height></decal><attach a="Rider" frombone="hotspot" tobone="ATTACHPOINT" syncanims="1"></attach></component>
  <anim>Walk<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_canter</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">1.00</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.83</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.70</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.50</tag></assetreference><component>ModelComp</component></anim>
  <anim>Jog<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_jog</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.80</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.95</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.75</tag></assetreference><component>ModelComp</component></anim>
  <anim>Run<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_gallop</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.73</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">1.00</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.70</tag></assetreference><component>ModelComp</component></anim>
  <anim>Highstep<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_highstep</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.73</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">1.00</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.70</tag></assetreference><component>ModelComp</component></anim>
  <anim>Idle<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component></anim>
  <anim>Idle_charged<assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_idle_j</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_master" tobone="bip01 prop1" syncanims="0"></attach></anim>
  <anim>Bored<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_bored_A</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_E</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_A</file><weight>50</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_I</file><weight>50</weight></assetreference><component>ModelComp</component></anim>
  <anim>Attack_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_1-5_attack_A</file><weight>40</weight><tag type="Attack">0.57</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_1-5_attack_B</file><weight>10</weight><tag type="Attack">0.57</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_1-5_attack_C</file><weight>10</weight><tag type="Attack">0.61</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_1-5_attack_D</file><weight>10</weight><tag type="Attack">0.56</tag></assetreference><component>ModelComp</component></anim>
  <anim>Attack_melee_charged<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_charge_attack</file><weight>40</weight><tag type="Attack">0.53</tag><tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.49</tag></assetreference><component>ModelComp</component></anim>
  <anim>Attack_trample<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_trample_A</file><weight>40</weight><tag type="Attack">0.56</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_trample_B</file><weight>40</weight><tag type="Attack">0.61</tag></assetreference><component>ModelComp</component></anim>
  <anim>Death_by_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathA</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.63</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathB</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.48</tag><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.80</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathC</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.53</tag></assetreference><component>ModelComp</component></anim>
  <anim>Attack_ranged<assetreference type="GrannyAnim"><file>animation_library\natives\bow_rider\horse\horse_bow_attack1</file><tag type="Attack">0.20</tag><tag type="SpecificSoundSet" checkvisible="1" set="Arrows">0.20</tag></assetreference><component>ModelComp</component></anim>
  <anim>Death_by_range<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathA</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.63</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathB</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.47</tag><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.78</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_deathC</file><tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.53</tag></assetreference><component>ModelComp</component></anim>
  <anim>Death_by_havoc<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_death_front</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_death_behind</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_death_left</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_death_right</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_death_run</file></assetreference><component>ModelComp</component></anim>
  <anim>Cheer<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_F</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_H</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_bored_A</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_E</file></assetreference><component>ModelComp</component></anim>
  <anim>Raze_idle<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component></anim>
  <anim>Raze_attack<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_3_raze_attack_A</file><tag type="Attack">0.80</tag><tag type="SpecificSoundSet" checkvisible="1" set="Arrows">0.79</tag><tag type="Particles" particlename="archertorch">0.00</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_3_raze_attack_B</file><tag type="Attack">0.80</tag><tag type="SpecificSoundSet" checkvisible="1" set="Arrows">0.77</tag><tag type="Particles" particlename="archertorch">0.00</tag></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_3_raze_attack_C</file><tag type="Attack">0.80</tag><tag type="SpecificSoundSet" checkvisible="1" set="Arrows">0.79</tag><tag type="Particles" particlename="archertorch">0.00</tag></assetreference><component>ModelComp</component></anim>
  <anim>Idle_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component></anim>
  <anim>Bored_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_bored_A</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_E</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_A</file><weight>50</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_idle_I</file><weight>50</weight></assetreference><component>ModelComp</component></anim>
  <anim>Walk_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_canter</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">1.00</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.83</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.70</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.50</tag></assetreference><component>ModelComp</component></anim>
  <anim>Jog_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_jog</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.80</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">0.95</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.75</tag></assetreference><component>ModelComp</component></anim>
  <anim>Run_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\horse_gallop</file><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT LT">0.73</tag><tag type="FootstepLeft" footprinttype="Horse" footprintbone="HS BONE HOOF BACK LT">0.50</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF FRNT RT">1.00</tag><tag type="FootstepRight" footprinttype="Horse" footprintbone="HS BONE HOOF BACK RT">0.70</tag></assetreference><component>ModelComp</component></anim>
</animfile>

clibanarii_rider

<?xml version="1.0" encoding="UTF-8"?>
<animfile>
  <definebone>bone_lance</definebone>
  <definebone>Bip01 Prop1</definebone>
  <definebone>bone_bow</definebone>
  <definebone>bip01 prop2</definebone>
  <definebone>bone_master</definebone>
  <definebone>bone_shield</definebone>
  <definebone>Bip01 L ForeArm</definebone>
  <attachment>torch<include>effects\projectiles\torch_cavalry.xml</include></attachment>
  <attachment>lance<component>lance<assetreference type="GrannyModel"><file>units\asians\mercenaries\jat_lancer\jat_lance</file></assetreference></component><anim><component>lance</component></anim></attachment>
  <attachment>shield<include>units\asians\natives\qizilbash\qizilbash_shield.xml</include></attachment>
  <attachment>shield_back<include>units\asians\natives\qizilbash\qizilbash_shield_back.xml</include></attachment>
  <attachment>bows<component>bows<assetreference type="GrannyModel"><file>units\cavalry\cav_archer\cav_archer_1age_bow</file></assetreference></component><anim>Idle<component>bows</component></anim></attachment>
  <attachment>arrow_attachment<anim>Idle<component></component></anim><include>units\attachments\arrow.xml</include></attachment>
  <attachment>flaming_arrow<component>flame emitter<assetreference type="ParticleSystem"><file>units\attachments\fire_arrow.xml</file></assetreference></component><anim>Idle<component>flame emitter</component></anim><include>units\attachments\fire_arrow.xml</include></attachment>
  <component>ModelComp<assetreference type="GrannyModel"><file>units\cavalry\spahi\kapikulu_sipahi</file></assetreference></component>
  <anim>Walk<assetreference type="GrannyAnim"><file>animation_library\cavalry\bow_canter</file></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Jog<assetreference type="GrannyAnim"><file>animation_library\cavalry\bow_jog</file></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Run<assetreference type="GrannyAnim"><file>animation_library\cavalry\bow_gallop</file></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Idle<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Idle_charged<assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_idle_j</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_master" tobone="bip01 prop1" syncanims="0"></attach></anim>
  <anim>Bored<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_bored_A</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_E</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_A</file><weight>50</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_I</file><weight>50</weight></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Attack_ranged<assetreference type="GrannyAnim"><file>animation_library\cavalry\bow_attack</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="arrow_attachment" frombone="bone_bow" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Death_by_range<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathA</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathB</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathC</file></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Death_by_havoc<assetreference type="GrannyAnim"><file>animation_library\cavalry\rider_death_havoc_a</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\rider_death_havoc_b</file></assetreference><component>ModelComp</component></anim>
  <anim>Cheer<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_F</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_H</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_bored_A</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_E</file></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Raze_idle<assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\raze_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach></anim>
  <anim>Raze_attack<assetreference type="GrannyAnim"><file>animation_library\cavalry\bow_raze_attack_A</file></assetreference><component>ModelComp</component><attach a="flaming_arrow" frombone="bone_bow" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="bows" frombone="bone_bow" tobone="Bip01 L Hand" syncanims="0"></attach><attach a="shield_back" frombone="bone_backpack" tobone="SPINE1" syncanims="0"></attach></anim>
  <anim>Highstep<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_highstep</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Attack_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_attack_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_attack_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_attack_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_attack_D</file><weight>10</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Attack_melee_charged<assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_charge_attack</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_master" tobone="bip01 prop1" syncanims="0"></attach></anim>
  <anim>Attack_trample<assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_trample_attack</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\lance_trample_attack</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Death_by_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathA</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathB</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_deathC</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Cheer<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_F</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_H</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_bored_A</file></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_cheer_E</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Idle_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_A</file><weight>40</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_B</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_C</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_D</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_F</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_G</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_H</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_I</file><weight>40</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Bored_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_bored_A</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_E</file><weight>10</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_A</file><weight>50</weight></assetreference><assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_idle_I</file><weight>50</weight></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Walk_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_canter</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Jog_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_jog</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
  <anim>Run_melee<assetreference type="GrannyAnim"><file>animation_library\cavalry\sword_gallop</file></assetreference><component>ModelComp</component><attach a="lance" frombone="bone_lance" tobone="Bip01 Prop1" syncanims="0"></attach><attach a="shield" frombone="bone_shield" tobone="Bip01 L ForeArm" syncanims="0"></attach></anim>
</animfile>

protomods.xml

<protomods>
<unit id="191120231" name="zpNatClibanarii">
    <dbid>191120231</dbid>
    <displaynameid>191120231</displaynameid>
    <editornameid>191120231</editornameid>
    <populationcount>0</populationcount>
    <subciv>Sufi</subciv>
    <obstructionradiusx>0.7900</obstructionradiusx>
    <obstructionradiusz>0.7900</obstructionradiusz>
    <formationcategory>Mobile</formationcategory>
    <maxvelocity>6.750</maxvelocity>
    <maxrunvelocity>8.7500</maxrunvelocity>
    <movementtype>land</movementtype>
    <turnrate>18.0000</turnrate>
    <animfile>units\mercenaries\clibanarii.xml</animfile>
    <impacttype>Flesh</impacttype>
    <physicsinfo>cav</physicsinfo>
    <icon>resources\art\units\asians\natives\qizilbash\qizilbash_icon.png</icon>
    <portraiticon>resources\art\units\asians\natives\qizilbash\qizilbash_portrait.png</portraiticon>
    <rollovertextid>61101</rollovertextid>
    <shortrollovertextid>61478</shortrollovertextid>
    <initialhitpoints>1200.0000</initialhitpoints>
    <maxhitpoints>1200.0000</maxhitpoints>
    <los>15.0000</los>
	<rechargetime>20.0000</rechargetime>
    <chargeusagetime>0.2500</chargeusagetime>
	<recharge init="1" type="Attacks">8.0000</recharge>
    <projectileprotounit>Arrow</projectileprotounit>
    <unitaitype>RangedCombative</unitaitype>
    <trainpoints>38.0000</trainpoints>
    <buildlimit>12</buildlimit>
    <bounty>40.0000</bounty>
    <buildbounty>40.0000</buildbounty>
    <cost resourcetype="Food">200.0000</cost>
    <cost resourcetype="Gold">200.0000</cost>
    <allowedage>1</allowedage>
    <armor type="Ranged" value="0.4000">
    </armor>
	<armor type="Hand" value="0.2000">
    </armor>
	<veterancybonus>
      <rank id="0">
        <veterancymodify modifytype="MaxHP">1.1000</veterancymodify>
        <veterancymodify modifytype="Damage">1.1000</veterancymodify>
      </rank>
      <rank id="1">
        <veterancymodify modifytype="MaxHP">1.2000</veterancymodify>
        <veterancymodify modifytype="Damage">1.2000</veterancymodify>
      </rank>
      <rank id="2">
        <veterancymodify modifytype="MaxHP">1.3000</veterancymodify>
        <veterancymodify modifytype="Damage">1.3000</veterancymodify>
      </rank>
    </veterancybonus>
    <sharedselectionunittypes>
      <unittype>deNatMercQizilbash</unittype>
    </sharedselectionunittypes>  
    <unittype>LogicalTypeHealed</unittype>
    <unittype>LogicalTypeValidSharpshoot</unittype>
    <unittype>LogicalTypeNeededForVictory</unittype>
    <unittype>LogicalTypeHandUnitsAutoAttack</unittype>
    <unittype>LogicalTypeLandMilitary</unittype>
    <unittype>LogicalTypeScout</unittype>
    <unittype>LogicalTypeValidSPCUnitsDeadCondition</unittype>
    <unittype>LogicalTypeGarrisonInShips</unittype>
    <unittype>LogicalTypeRangedUnitsAutoAttack</unittype>
    <unittype>LogicalTypeRangedUnitsAutoAttackNoVillagers</unittype>
    <unittype>LogicalTypeVillagersAttack</unittype>
    <unittype>LogicalTypeHandUnitsAttack</unittype>
    <unittype>LogicalTypeRangedUnitsAttack</unittype>
    <unittype>LogicalTypeMinimapFilterMilitary</unittype>
    <unittype>Military</unittype>
    <unittype>UnitClass</unittype>
    <unittype>Unit</unittype>
    <unittype>AbstractLancer</unittype>
    <unittype>AbstractCavalry</unittype>
    <unittype>AbstractNativeWarrior</unittype>
    <unittype>AbstractRangedHeavyCavalry</unittype>
    <unittype>AbstractHeavyCavalry</unittype>
    <unittype>AbstractRangedCavalry</unittype>
    <unittype>AbstractHandCavalry</unittype>
    <unittype>ConvertsHerds</unittype>
    <unittype>AbstractCavalryInfantry</unittype>
    <unittype>CountsTowardMilitaryScore</unittype>
    <unittype>HasBountyValue</unittype>
    <unittype>Ranged</unittype>
    <flag>CollidesWithProjectiles</flag>
    <flag>ApplyHandicapTraining</flag>
    <flag>CorpseDecays</flag>
    <flag>ShowGarrisonButton</flag>
    <flag>DontRotateObstruction</flag>
    <flag>ObscuredByUnits</flag>
    <flag>ConstrainOrientation</flag>
    <flag>OrientUnitWithGround</flag>
    <flag>Tracked</flag>
	<flag>ExperienceUnit</flag>
	<flag>ChargeMoveAnim</flag>
	<flag>ChargeIdleAnim</flag>
    <command page="10" column="1">Stop</command>
    <command page="10" column="0">Garrison</command>
    <command page="10" column="7">Delete</command>
	<command page="11" column="0">Abilities</command>
    <tactics>clibanarii.tactics</tactics>
    <protoaction>
      <name>BuildingAttack</name>
      <damage>20.000000</damage>
      <damagetype>Siege</damagetype>
      <rof>1.500000</rof>
      <maxrange>6.000000</maxrange>
    </protoaction>
	<protoaction>
      <name>MeleeHandAttack</name>
      <damage>18.0000</damage>
      <damagetype>Hand</damagetype>
      <rof>1.500000</rof>
      <damagebonus type="AbstractInfantry">2.000000</damagebonus>
    </protoaction>
    <protoaction>
      <name>TrampleHandAttack</name>
      <damage>12.0000</damage>
      <damagetype>Hand</damagetype>
      <rof>2.000000</rof>
      <maxrange>3.750000</maxrange>
      <damagecap>60.000</damagecap>
      <damagearea>3.000000</damagearea>
      <damageflags>Enemy</damageflags>
      <damagebonus type="AbstractInfantry">2.000000</damagebonus>
    </protoaction>
	<protoaction>
      <name>LanceChargeAttack</name>
      <damage>37.500000</damage>
      <damagetype>Hand</damagetype>
      <maxrange>2.000000</maxrange>
      <damagecap>75.000000</damagecap>
      <damagearea>3.000000</damagearea>
      <damagebonus type="AbstractInfantry">1.500000</damagebonus>
      <damagebonus type="AbstractHeavyInfantry">0.670000</damagebonus>
      <damagebonus type="AbstractHeavyCavalry">1.340000</damagebonus>
      <damagebonus type="AbstractCoyoteMan">1.200000</damagebonus>
      <damageflags>Enemy</damageflags>
    </protoaction>
    <protoaction>
      <name>BowAttack</name>
      <damage>20.000000</damage>
      <damagetype>Ranged</damagetype>
      <minrange>4.000000</minrange>
      <maxrange>12.000000</maxrange>
      <rof>1.500000</rof>
    </protoaction>
  </unit>
</protomods>

I will share you the mods that enable the veterancy bonus on my otontin slinger:

abilities/abilitymods

<abilitymods>
	<xpMacehualtin>
		<ability>dePromotionHpROF<alwaysdisabledingrid>true</alwaysdisabledingrid><forceshowrollover>true</forceshowrollover></ability>
	</xpMacehualtin>
		
</abilitymods>

protomods

<protomods>
	<unit id="745" name="xpMacehualtin">
		<veterancybonus mergeMode='add'>
		  <rank id="0">
			<veterancymodify modifytype="ROF">0.90</veterancymodify>
		  </rank>
		  <rank id="1">
			<veterancymodify modifytype="ROF">0.80</veterancymodify>
		  </rank>
		  <rank id="2">
			<veterancymodify modifytype="ROF">0.70</veterancymodify>
		  </rank>
		</veterancybonus>
		<command mergeMode='add' page="11" column="0">Abilities</command>
	</unit>

 </protomods>

Techtreemods

<Techtreemods>
	<Tech name='Age0XPAztec'>
	<Effects>	
	 
	 <effect mergeMode='add' type="Data"  amount="1.00" subtype="VeterancyEnable" relativity="Absolute">
        <target type="ProtoUnit">xpMacehualtin</target>
      </effect>
	  
	 </Effects>
	</Tech>
</Techtreemods>
1 Like

Finally it works somehow, all the codes are the same as before but somehow it works, maybe there are a few missing words perhaps? It remains a mystery I guess :rofl:
This question is outside the topic, but how can I replace a unit ingame with the one from the mod?

Are some tactics incompatible?

Thank you so much, you have no idea how all of this helped me.

Now I was able to add the charging skill to a unique unit that I made