Differences

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

docs:strategies:ratedfieldgrowth [2009/07/18 21:58]
gac
docs:strategies:ratedfieldgrowth [2009/07/18 22:04] (current)
gac
Line 6: Line 6:
The RatedFieldGrowth strategy will try to grow the fields while keeping the given proportion between resources. After a run, the strategy will be called again when the field level has been completed, when the needed resources have become available or after "checkTimeMinutes" has passed since the last check, whatever comes first. It is a good idea not to use a very short "checkTimeMinutes" value otherwise the nanny will hopelessly keep checking the fields while something is still growing or resources aren't available. The RatedFieldGrowth strategy will try to grow the fields while keeping the given proportion between resources. After a run, the strategy will be called again when the field level has been completed, when the needed resources have become available or after "checkTimeMinutes" has passed since the last check, whatever comes first. It is a good idea not to use a very short "checkTimeMinutes" value otherwise the nanny will hopelessly keep checking the fields while something is still growing or resources aren't available.
 +
 +From version 2.3.0 there is an optional new parameter at top level sets max level for any field, once reached this field type will no longer be grown but others will so rate difference will not be maintained.
 +
 +Individual resource types can have different maximums using an optional parameter line to specify individual types.
**Notes:** **Notes:**
Line 44: Line 48:
</strategy> </strategy>
</code> </code>
 +
 +The example below grows WOOD and CLAY to level 9 but limits iron to 6 and crop to 5 which is the level at which a Grain Mill can be constructed.
<code xml> <code xml>
-<strategy class="RatedFieldGrowth" desc="Finetuned growth" enabled="true" uid="s2200">+<strategy class="RatedFieldGrowth" desc="Finetuned growth" enabled="true" uid="s2200" maxLevel="9">
<productionRate wood="50" clay="65" iron="40" crop="35" <productionRate wood="50" clay="65" iron="40" crop="35"
     checkTimeMinutes="180"/>      checkTimeMinutes="180"/>


Personal Tools