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

docs:strategies:resourcesender [2009/07/01 20:43]
docs:strategies:resourcesender [2009/11/15 20:44] (current)
Line 2: Line 2:
^Purpose  |to periodically send resources to other villages  | ^Purpose  |to periodically send resources to other villages  |
-^When to use  | | +^When to use  | when you have spare resources in one village, need resources in another or need to feed defence troops or a World Wonder
-^When to avoid  | |+^When to avoid  |when you dont have a market or using to other players as may violate 1 hour production rule |
-FIXME: description+Uses your merchants to send resources between villages periodically or using clever wait as often as possible. 
 +You can specify if send less than available or to keep a minimum amount in the village for building or troop making.    Note if keepresources is used it takes precedance over allow less so may send odd surplus amounts.
==== Syntax ==== ==== Syntax ====
<code xml> <code xml>
-<strategy class="ResourceSender" desc="DESCRIPTION" enabled="true">+<strategy class="ResourceSender" desc="DESCRIPTION" enabled="true
 +          runWhile="RUNWHILE_UID" waitFor="WAITFOR_UID" uid="UID">
   <options cleverWait="CLEVERWAIT" delayMinutes="DELAY" randomOrder="RANDOMORDER"/>    <options cleverWait="CLEVERWAIT" delayMinutes="DELAY" randomOrder="RANDOMORDER"/>
 +   <keepResources wood="WOODKEEP" clay="CLAYKEEP" iron="IRONKEEP" crop="CROPKEEP"/>
   <sendMerchant x="XCOORD" y="YCOORD" village="TARGETNAME" wood="WOOD" clay="CLAY"    <sendMerchant x="XCOORD" y="YCOORD" village="TARGETNAME" wood="WOOD" clay="CLAY"
                 iron="IRON" crop="CROP" allowLess="ALLOWLESS"/>                  iron="IRON" crop="CROP" allowLess="ALLOWLESS"/>
Line 21: Line 26:
==== Attributes and parameters ==== ==== Attributes and parameters ====
-FIXME+|DESCRIPTION  |some optional description of your choice  | 
 +|WAITFOR_UID  |See [[index|"Strategies"]]  | 
 +|RUNWHILE_UID  |See [[index|"Strategies"]]  | 
 +|UID  |Unique IDentifier. See [[index|"Strategies"]]  | 
 +|CLEVERWAIT  |Run the strategy again when merchants come back  | 
 +|DELAY  |Time to wait before running again (with CLEVERWAIT false)  | 
 +|RANDOMORDER  |When the strategy runs, choose sendMerchants entries randomly  | 
 +|WOODKEEP, CLAYKEEP, IRONKEEP, CROPKEEP  |Minimum resources that should be left in the village  | 
 +|XCOORD, YCOORD  |target village coordinates, safer than using the name  | 
 +|TARGETNAME  |The name of the target village - beware if have same names | 
 +|WOOD, CLAY, IRON, CROP  |resources to send  | 
 +|ALLOWLESS  |"false" if you want to send the amount of resources and don't send anything if you don't have them, "true" if you might also send less than the specified amount when you don't have enough; default is "false"  |
==== Examples ==== ==== Examples ====
-FIXME +<code xml> 
 +<strategy class="ResourceSender" desc="Send Res" enabled="false" uid="1234567"> 
 +   <options cleverWait="false" delayMinutes="120" randomOrder="false"/> 
 +   <keepResources clay="500" crop="1000" iron="500" wood="500" /> 
 +   <sendMerchant allowLess="false" wood="750" clay="750" iron="500" crop="250" x="0" y="0"/> 

Personal Tools