Differences

This shows you the differences between two versions of the page.

docs:strategies:troopmanager [2010/09/09 09:59] (current)
xtian created
Line 1: Line 1:
 +====== Strategy: TroopManager ======
 +FIXME: Draft for 2.4 alpha
 +^Purpose  |to manage troop movements in a village and between villages|
 +^When to use  |when you want to send troops at a specific time to reinforce or attack or dodge attacks|
 +^When to avoid  |when you want to send very accurate timed waves or dodge close multiple waves or have multiple incoming attacks|
 +
 +The TroopManager strategy supports several modes of operation:
 +  * Dodge Incoming attacks by sending all own troops away for a short period of time
 +  * Gauls can release any Prisioners in Traps so will rebuild automatically
 +  * Troops can be sent at a specific time
 +  * Troops can be sent to arrive at a specific time
 +
 +When the strategy has an action to do at a specific time it will schedule to run as accurately as possible and not add random wait times.   However if many other strategies are ready they may run before and only approximate timing is possible
 +
 +**Notes**
 +  * ideally should be run as first strategy in the village to try and make timing as accurate as possible
 +  * currently does not manage any reinforcements in the village
 +
 +==== Syntax ====
 +
 +<code xml>
 +<strategy class="TroopManager" desc="DESCRIPTION" minPauseMinutes="MINS" sleep="SLEEP"
 +          enabled="true" runWhile="RUNWHILE_UID" waitFor="WAITFOR_UID" uid="UID">
 + <release enabled="RELEASE" />
 + <dodge enabled="DODGE" x="XCOORD" y="YCOORD" recall="RSECS" wait="WSECS" />
 + <troops type="TROOP_NAME" allowLess="ALLOWLESS" min="MINIMUM_TROOPS"
 + randomise="RANDOMISE" enabled="true">TROOP_AMOUNT</troops>
 + <time type="START|ARRIVE" maxLateMinutes="LATE" movement="REINFORCE|RAID|ATTACK" coords="(XCOORD|YCOORD)"
 +            village="TARGETNAME" desc="DESCRIPTION" format="dd/MM/yyyy HH:mm:ss">TIME</time>
 +</strategy>
 +
 +x="XCOORD" y="YCOORD"
 +</code>
 +
 +==== 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"]]  |
 +|MINS|the time in minutes to wait before running again when no action is scheduled or attack detected|
 +|SLEEP|the time in seconds to wait in this strategy watching the clock rather than look at other villages.  Longer will give better timing for this movement but may interfere with other village actions or multiple attacks; default is "60"|
 +|DODGE|"false" if you want to report incoming attacks in log, "true" if you want any troops in the village to be sent away; default is "false"|
 +|RSECS|time in seconds before attack to send troops out and wait to recall troops; default is "30"|
 +|WSECS|time in seconds to wake up before any movement and wait in village strategy.  Should be less than RSECS * 2; default is "50"|
 +|RELEASE|"false" if you want to leave any enemy troops in Gaul traps, "true" if you want to release them as soon as possible to allow traps to rebuild; default is "false"|
 +|TARGETNAME  |The name of the target village  |
 +|XCOORD, YCOORD  |target village coordinates, safer to use than the name also supports x="XPOS" y= "YPOS" |
 +|REINFORCE, RAID, ATTACK  |the type of movement. The value to use can be found in the language configuration file  |
 +|TROOP_NAME  |type of troops, in the server language or as an alias defined in the language configuration file  |
 +|ALLOWLESS  |"false" if you want to send the amount of troops and don't send anything if you don't have them, "true" if you might also send less than the specified troops when you don't have enough; default is "false"  |
 +|MINIMUM_TROOPS  |the minimum amount of troops to send when allowLess="true"; default is "0"  |
 +|TROOP_AMOUNT  |the number of soldiers to send. The actual amount sent depends on the values of "allowLess", "minimumTroops" and "randomise"  |
 +|TIME|the time of arrival or departure|
 +|START, ARRIVE|selects if the time is the time to start movement or time to arrive; default is "start"|
 +|FORMAT|the format to use for time; default="dd/MM/yyyy HH:mm:ss"|
 +|LATE|the time in minutes to allow troops to be late if strategy not run at exact time; default is "0"|
 +
 +
 +
 +==== Examples ====
 +
 +<code xml>
 +<strategy class="TroopManager" desc="TroopManager" minPauseMinutes="5" enabled="true" uid="1">
 + <release enabled="true" />
 + <dodge enabled="true" x="0" y="0" recall="20" wait="30" />
 + <troops type="Phalanx" allowLess="true" min="1" randomise="false" enabled="true">1000</troops>
 + <time type="start" maxLateMinutes="5" movement="reinforce" coords="(0|0)" village="" desc="desc"
 +                format="dd/MM/yyyy HH:mm:ss">01/04/2010 20:30:00</time>
 + <time type="arrive" movement="reinforce" coords="(0|0)" village="" desc="desc"
 +                format="dd/MM/yyyy HH:mm:ss">01/04/2010 21:25:00</time>
 +</strategy>
 +</code>


Personal Tools