This is an old revision of the document!


Strategy: GrowItem

Purpose to make new buildings or increase the level of any field or building up to a given value
When to use when you want to build and grow some specific elements of your village, in a specific order, to a specific level
When to avoid

The GrowItem strategy contains a number of <item> tags. Each <item> tells which element you want to build and to which level. The <item> tags are executed sequentially, so you can devise your own strategy, like ”build the main building to level 10, then the granary to level 5, then the main building again to level 15…” and so on. An <item> is skipped only if it has reached MAX_LEVEL or if there are no resources for the next level.

To grow an element, you must identify it with the correct value of ITEM_ID_LIST. To find that value, click on the building or field you want to grow, then look at the address.

The last number in the address is the value for ITEM_ID_LIST.

ITEM_ID_LIST doesn't have to be just a single number: you can use a list of numbers separated by commas, or even ranges like 1-8. For example you could identify all crop fields with something like id=“2, 8, 9, 12, 13, 15” or all fields with id=“1-18” or even use id=“1-4, 5, 8, 12-15, 33”, whatever you might need that for.

Notes:

  • You can omit the “building” attribute when there is no choice, like for the wall.
  • You can configure an <item> without “building” attribute on an empty slot. That item will just be skipped until you build the first level manually. You can therefore prepare your strategy in advance, and build the first level of each building manually as needed.

Syntax

<strategy class="GrowItem" desc="DESCRIPTION" enabled="true" uid="UID">
    <item id="ITEM_ID_LIST" desc="DESCRIPTION" building="BUILDING" maxLevel="MAX_LEVEL"/>
    <item id="ITEM_ID_LIST" desc="DESCRIPTION" building="BUILDING" maxLevel="MAX_LEVEL"/>
    <item id="ITEM_ID_LIST" desc="DESCRIPTION" building="BUILDING" maxLevel="MAX_LEVEL"/>
</strategy>

Attributes and parameters

DESCRIPTION some optional description of your choice
BUILDING the name of the item you want to build, in the server language
ITEM_ID_LIST slot number or list of numbers (see above)
MAX_LEVEL the level to which you want to bring the element
UID Unique IDentifier. See "Strategies"

Examples

In this example, the two items will be grown to level 20 and 5 only if they already exist or when they will be manually built to the first level

<strategy class="GrowItem" desc="Grow Stuff" enabled="true" uid="s8255">
    <item id="38" desc="Officina" maxLevel="20"/>
    <item id="36" desc="Falegnameria" maxLevel="5"/>
</strategy>

In this example we are building in steps, from scratch. Item 40 is the wall.

<strategy class="GrowItem" desc="Grow Stuff" enabled="true" uid="s8242">
    <item id="31" building="Granary" maxLevel="10"/>
    <item id="33" building="Warehouse" maxLevel="10"/>
    <item id="28" building="Grain Mill" maxLevel="5"/>
    <item id="29" building="Palace" maxLevel="10"/>   
    <item id="31" building="Granary" maxLevel="20"/>
    <item id="33" building="Warehouse" maxLevel="20"/>
    <item id="29" building="Palace" maxLevel="20"/>
    <item id="40" maxLevel="20"/>
</strategy>


Personal Tools