Tags

Note: This may not be the permanent location of this page.

Tags are used by modders to give attributes to objects. Tags always begin with the tag and are almost always ended by /tag (ex. "stuff" ). The following is divided by relevant xml file.

=actions.xml= The actions.xml file is surrounded by the tag. Interior, each entry is surrounded by the tag.


Value: alphanumeric. Establishes the id of the action and is used to reference the action elsewhere. This is normally done as q, ie, qcut.


Value: priorities.xml "id". Establishes priority of the action (see priorities.xml)

Value: any. Names the action. Only relevant to right-click actions and actions that do not create an item

The queue tag surrounds instructions for your civilians within an action. Instructions are followed in sequentially.

Value: items.xml entry. Instructs the civilian to move to the named item and pick it up. Multiple items can be listed, separated by commas, and results in any 1 of those items being picked up.


Value: livingentities.xml entry. Variant on pick for picking up a living entity of type FRIENDLY.

Value: items.xml entry. Instructs the civilian to move to the named item.

Value: numeric. Instructs the civilian to wait (do nothing) for X turns.

Value: N/A. Instructs the civilian to destroy whatever he/she is holding (via the pick tag). Note the tag is self contained; it does not need an end tag nor any value.

Value: N/A.  Frees the civilian from current queue to allow eating or sleeping.


Value: items.xml entry. Creates an item.


Value: livingentities.xml entry. Creates a living entity of type Friendly.

=buildings.xml= This file is surrounded by the tag and the entry tags are the reference IDs (ex., not pigfarm ).

Value: any. Building name, visible when you construct the building and mouse over it.

Value: any. Sub text for the building, visible when you construct it.

Value: numeric. The number of squares the building requires on the x axis. Default is 1.

Value: numeric. The number of squares the building takes on the y axis. Default is 1.


Value: E, 0 or 1. Sets which squares of the building citizens can walk through, starting with the north-west corner, with "1" being allowed and "0" being blocked. "E" sets the spawn location for items or entities and can be walked through. The default for 3x3 structures such as farms is "1001E0111", and for 2x2 structures like the mineshaft is "00E1".

Value: SPAWN. What the building does. Currently SPAWN is the only option (Building spawns a livingEntity or item).


Value: true/false, defaults true. Sets if the building can be built underground.


Value: terrain.xml entry. Sets any terrain tiles that the building must be built over. If none are set the building can be placed anywhere.

Value: items.xml entry. Required to build the building. Multiple tags can be set and are additive.


Value: livingentities.xml entry. Variant for type Friendly on prerquisite.


Value: true/false, defaults false. When true the item spawns the terrain it is built on (ex. mineshaft).

Value: true/false, defaults false. Sets the default state of the building if it is a SPAWN building.

=campaigns.xml=

=caravans.xml= This file is surrounded by the tag and the entry tags are the reference IDs (ex., not food ).

Value: zones.xml entry. The zone where the Caravan will set up. Usually zmarket but can be set to other zones.


Value: numeric. The mark-up for items sold by the Caravan. For example, if a Caravan has 200</pricePCT> every item sold by the caravan will be double the item's default value.

Value: numeric. The amount of coins the Caravan carries.

Value: items.xml "type". The types of items that the Caravan will buy from the player. Multiple items separated by commas.

<comePCT>
The chance the Caravan will arrive every time the game generates a new Caravan. Can be any number between 1-100. For example, if a caravan has <comePCT>100</comePCT> it has an equal chance of spawning with other Caravans of the same <comePCT>, but if a Caravan has <comePCT>1</comePCT> then each time the game spawns a Caravan it only has a 1% chance of spawning versus a Caravan with <comePCT>100</comePCT>

Sets a random item type that the Caravan will sell. Must be closed with a tag once the following tags are set. Only 1 type per entry.

Value: items.xml "type". Sets the type for random item generation.

<PCT>
Value: numeric. The chance the Caravan will generate the item(s).

Value: numeric. The number of items generated within the type. Can use Towns' Dice system to generate random numbers.

=effects.xml= Surrounded by tag, each entry marked by tag.


Value: alphanumeric. The effect id for referencing it elsewhere.

Value: any. The name that shows if hovering over a currently affected entity.

<removeTarget>
Value: true/false, defaults false. Causes the entity to forget its current target.

<DOT>
Value: numeric. Does X damage (or healing if negative) every turn the effect lasts. (Damage Over Time)

<graphicChange>
Value: graphics.ini entry. Identifies a new graphic to replace the entity with during the effect.

<attackAllies>
Value: true/false, defaults false. True forces the entity to attack allies during the effect.

Value: numeric. How long the effect lasts in turns. If the tag is absent, the effect is always active.

<afterEffects>
Value: effects.xml "id". Triggers new effect(s) after the current ends. Multiple entries are separated by commas.

<messageWhenVanish>
Value: true/false, defaults true.

<attributePCT>
attributePCT tags modify stats of the living entity by a percentage (ex. <damagePCT>50</damagePCT> would reduce damage output by half).

<attackPCT>
Value: numeric. Modifies attack total.

<damagePCT>
Value: numeric. Modifies overall damage output.

<healthPCT>
Value: numeric. Modifies health totals (does not modify current health, only total).

<defensePCT>
Value: numeric. Modifies defense total.

<speedPCT>
Value: numeric. Modifies walkSpeed total.

<attackSpeedPCT>
Value: numeric. Modifies attackSpeed total.

Targeting & Chaining Effects
By default, effects affect the entity using the effect. In order to affect other targets, you need to make a targeting effect using one of the below methods, which then "chains" to a new effect(s) (one can chain to the same target using "afterEffects" above).

<onHitPCT>
Value: numeric. The effect occurs with % chance on melee hits.

<onRangedHitPCT>
Value: numeric. Same as onHitPCT but for ranged hits.

<onHitEffects>
Value: effects.xml "id". Effect(s) which occurs on the target when onHitPCT is succesful. Multiple entries are separated by commas (ex. <onHitEffects>stunned,bleeding</onHitEffects>).

<onRangedHitEffects>
Value: effects.xml "id". Same as onHitEffects but for ranged attacks.

<castEffects>
Value: effects.xml "id". While affected, the entity will "cast" the effect(s) listed. Multiple entries are separated by commas.

<castCooldown>
Value: numeric. The time in turns between castEffects.

<castTargets>
Value: livingentities.xml "type" or entry. Establishes possible targets of castEffects (ex. <castTargets>ENEMY,FRIENDLY,froggy</castTargets>).

=heroes.xml= =items.xml= This file is surrounded by the tag and the entry tags are the reference IDs (ex., not stool</id> ).

Value: any. Names the item - this is what shows on hover as well as in menus if the item is created via an action.

Value: any. Sets the hover subtext for the item.

Value: actions.xml "id". References an action that the item can be right-clicked to preform.

Value: true/false, defaults false. True means the item cannot be moved once placed unless invalidated (such as by removing terrain beneath it).

<buildingTime>
Value: numeric. If the item is auto-produced via a building, this tag sets the turns required for 1 spawn.

Value: items.xml entry. If the item is produced by a building, this sets item(s) required to make 1 of the item. Each tag is one prerequisite item.

Value: true/false, defaults false. True allows the item to be stored in containers.

<stackableSize>
Value: numeric. Establishes how many "slots" in a container an item requires.

Value: true/false, defaults false. True allows the item to store other items.

<containerSize>
Value: numeric. Establishes the amount of item "slots" the container can hold.

<canBeEaten>
Value: true/false, defaults false. True makes the item edible,

<foodValue>
Value: numeric. Determines eating preference with higher numbers being selected over lower ones (highest vanilla value is 6 for cookies).

<foodFillPCT>
Value: numeric. The percentage the food fills (can be over 100).

<foodEatTime>
Value: numeric. How many turns is required to consume the food.

<foodEffects>
Value: effects.xml "id". Sets effects for eating the food. Multiple entries separated with commas.

<maxAge>
Value: numeric. Sets the item to disappear after X turns.

<maxAgeItem>
Value: items.xml entry. Spawns a new item when maxAge expires.

Value: terrain.xml entry. One entry per tag, multiple tags acceptable.

Equipment Tags
These tags are for equipment items specifically.

Value: WEAPON/HEAD/BODY/LEGS/FEET. This allows the item to be equipped in the specified slot.

Value: numeric. Sets the level of the equipment; used for auto-equip discrimination.

Value: true/false, defaults false. True means the item can be fired up to total LOS value.

<rangedAmmo>
Value: graphics.ini entry. Sets the graphic of the projectile.

<rangedCharges>
Value: numeric/INFINITE. Sets how many projectiles can be fired before the item is destroyed, or, unlimited if set INFINITE.

Value: numeric. Sets a flat attack modifier for the equipment, generally partially random.

Value: numeric. Sets a flat defense modifier for the equipment, generally partially random.

Value: numeric. Sets a flat damage modifier for the equipment, generally partially random (note that random values only apply when item is created, not per hit).

<LOS>
Value: numeric. Sets a flat LOS (Line Of Sight) modifier for the equipment, generally partially or entirely random if present. It is the distance (in spaces) that an entity can see, or fire a ranged weapon.

<walkSpeed>
Value: numeric. Sets a flat movement speed modifier for the equipment.

<attackSpeed>
Value: numeric. Sets a flat attack speed modifier for the equipment.

Value: any. Sets the attack verb of a weapon for messages (ex. Chris hits froggy for 100 damage).

<verbInfinitive>
Value: any. Sets the infinitive attack verb of a weapon for messages (ex. Chris attempts to hit froggy but misses).

Value: numeric. Monetary base value for caravan trading purposes. Note that this can be enhanced by prefixes, suffixes, better random values (for equipment) and caravan random price percentage.

=livingentities.xml= =matspanel.xml= =menu.xml= =menu_production.xml= =menu_right.xml= =names.xml= =prefixsuffix.xml= =prices.xml= =priorities.xml= =skills.xml= =terrain.xml= =types.xml= =zones.xml= =graphics.ini=

=Map Gen Files= Found within data/campaigns/c1/map name

<numCitizens>
<numCitizens>XX</numCitizens> Changing the number between these tags, will change the number of townies a player/you start off with. The base number of starting townies is 11.

<startingLevel>
=Miscellaneous= This section is for tag modifiers and things not covered specifically by an xml section.

useSource="true"
Found in actions.xml, this modifies and tags (ex. <pick useSource="true">rmwood ), and is necessary to enable a right click action on an item or entity.

esES="XYZ"
Found on, , and attackverb tags, this enables a Spanish translation (ex. <attackVerb esES="golpea">punches</attackVerb>).

Random Numerical Values
Numeric values generally accept randomization using the "d" mechanism (ex. 1d200+1 randoms 1 to 200 plus 1).

=deprecated=

is what group the object belongs to

Possible Type values
has a range of possible values, depending on which file it is located in.

items.xml

 * rawmaterials
 * rawfood
 * prepfood
 * utils
 * decorative
 * furniture
 * weapon
 * armor

<maxAge>
maxAge determines the "lifespan" of an item or living entity in turns. The object or entity is destroyed once this expires.

<item code=" " parameter= " "/>
Code = action type

parameter = action name

Valid code=" " values
Note: do not confuse code=" " with the tag located in the action
 * QUEUE
 * QUEUEANDPLACE
 * QUEUEANDPLACEROW