This is an old revision of the document!


Strategy: Upgradetroop

Purpose to upgrade the weapons or armour of troops from the village
When to use when you want to make your troops stronger
When to avoid when you can upgrade buildings to make troops cheaper and quicker than upgrading

The UpgradeTroop strategy will upgrade the nominated troop type to the specified level at the appropriate upgrade site.

The strategy will optionally check periodically if it is time to upgrade and will finish when a desired level is reached.

Notes

  • At the Blacksmith you can upgrade the Weapons of Offensive troops like Swordsman or Imperians
  • At the Armoury you can upgrade the Armour of Defensive troops like Phalanx, Praetorians or Spearmen
  • To upgrade to level X requires a suitable building of at least that level

Syntax

FIXME Syntax

<strategy class="UpgradeTroop" desc="DESCRIPTION" enabled="true"
          runWhile="RUNWHILE_UID" waitFor="WAITFOR_UID" uid="UID">
        <keepResources wood="MIN_RES" clay="MIN_RES" iron="MIN_RES" crop="MIN_RES"/>
        <troops type="TROOPTYPE" weapon="true" maxLevel="LEVEL" minPauseMinutes="MINS" />
        <troops type="TROOPTYPE" armour="true" maxLevel="LEVEL" minPauseMinutes="MINS" />
     </strategy>
</strategy>

Attributes and parameters

DESCRIPTION some optional description of your choice
WAITFOR_UID See "Strategies"
RUNWHILE_UID See "Strategies"
UID Unique IDentifier. See "Strategies"
MIN_RES Minium amount of resources to keep of specified type, if lower will not upgrade - default 0
TROOPTYPE The type of the troops to upgrade in the server language - default 0
LEVEL The maximum level for the weapon or armour upgrade - default 0
MINS The period in minutes at which to check if can upgrade or to wait before upgrading again - default 0

Examples

Upgrade the armour of Gaul Phalanx to level 20

     <strategy desc="Upgrade" class="UpgradeTroop" enabled="true" uid="scomxV1ut">
        <troops type="Phalanx" armour="true" maxLevel="20" minPauseMinutes="10" />
     </strategy>

Upgrade the weapons of Swordsman as well but only if have more than 1000 resources

     <strategy desc="Upgrade" class="UpgradeTroop" enabled="true" uid="scomxV2ut">
		  <keepResources wood="1000" clay="1000" iron="1000" crop="500"/>
        <troops type="Swordsman" weapon="true" maxLevel="10" minPauseMinutes="10" />
        <troops type="Phalanx" armour="true" maxLevel="20" minPauseMinutes="10" />
     </strategy>


Personal Tools