====== 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 '''' tags. Each '''' tells which element you want to build and to which level. The '''' 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 '''' 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. |{{:docs:strategies:growitem:img:itemid.png?direct&300}}| 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 '''' 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 ==== ==== 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"]] | |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 | ==== 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 In this example we are building in steps, from scratch. Item 40 is the wall.