====== 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 ==== ==== Attributes and parameters ==== |DESCRIPTION |some optional description of your choice | |WAITFOR_UID |See [[index|"Strategies"]] | |RUNWHILE_UID |See [[index|"Strategies"]] | |UID |Unique IDentifier. See [[index|"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 Upgrade the weapons of Swordsman as well but only if have more than 1000 resources