Tasks¶
Written by: Kramb
This page lists unit task types, the object and task attributes they use, and XS examples where available. If a task or description is incomplete or incorrect, please let the authors of this guide know!
Attributes without an available XS constant are marked Unavailable.
1. Move to¶
-
XS constant: cTaskTypeMoveTo
-
Unknown.
2. Follow¶
-
XS constant: cTaskTypeFollow
-
Unknown.
3. Garrison¶
-
XS constant: cTaskTypeGarrison
-
Ability to garrison a unit into another unit or building.
Object attributes
| XS constant | Description |
|---|---|
| cGarrisonCapacity | Target object must have some capacity for the current unit to garrison to. |
| cGarrisonType | If target object is a building, it must have a garrison type that matches current unit's type. |
| cTraits | If target object is a unit, it must have this bitfield 1st bit (1) set for garrison unit. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkRange | Range at which a unit can garrison. |
| cTaskAttrOwnerType | Controls which objects the task can target based on ownership. Values: 0 — All objects; 1 — Your objects only; 2 — Neutral and enemy objects only; 3 — Gaia only; 4 — Gaia, your and ally objects only; 5 — Gaia, neutral and enemy objects only; 6 — All but your objects. |
| cTaskAttrObjectId | Object in which a unit can garrison. |
| cTaskAttrObjectClass | Object in which a unit can garrison. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
4. Explore¶
-
XS constant: cTaskTypeExplore
-
Unknown.
5. Gather/rebuild¶
-
XS constant: cTaskTypeGatherRebuild
-
Unknown.
6. Graze¶
-
XS constant: cTaskTypeGraze
-
Unknown.
7. Combat¶
-
XS constant: cTaskTypeCombat
-
Unknown.
8. Shoot¶
-
XS constant: cTaskTypeShoot
-
Unknown.
9. Attack¶
-
XS constant: cTaskTypeAttack
-
Unknown.
10. Fly¶
-
XS constant: cTaskTypeFly
-
Unknown.
Object attributes
| XS constant | Description |
|---|---|
| cStanding2Graphic | Used instead of the task's Working graphic (14). Graphic while moving, if not set uses moving graphic. |
| cWalkingGraphic | Used if Standing Graphic 2 (72) or the task's Working graphic (14) is not set. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Unit speed multiplier while roaming. |
| cTaskAttrWorkValue2 | Unit ID to avoid. |
| cTaskAttrWorkRange | Minimum distance to the unit to avoid that will be maintained while roaming. |
| cTaskAttrSearchWaitTime | Time in seconds that the unit pauses, playing the idle animations, when changing direction. |
| cTaskAttrCombatLevelFlag | If set to 1, only roam around if the unit is owned by Gaia. |
| cTaskAttrTerrain | Terrain Table that the unit will be allowed to roam on. If -1, use the unit's terrain table. |
| cTaskAttrMovingGraphic | Graphics used for the unit moving around, randomly alternates between them. |
| cTaskAttrProceedingGraphic | Graphics used for the unit moving around, randomly alternates between them. |
| cTaskAttrWorkingGraphic | Graphics used for the unit moving around, randomly alternates between them. |
| cTaskAttrCarryCheck | Distance the unit is allowed to move from its starting position before picking a new direction to return closer. If 0, no limit. |
11. Scare/hunt¶
-
XS constant: 11
-
Unknown.
12. Unload boat like¶
-
XS constant: cTaskTypeUnloadBoatLike
-
Ability for a unit to unload when reaching certain terrain.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue2 | Unknown. |
| cTaskAttrTerrain | Terrain on which unit can unload. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
13. Guard¶
-
XS constant: cTaskTypeGuard
-
Unknown.
14. Unload over wall¶
-
XS constant: cTaskTypeUnloadOverWall
-
Ability for units to unload units over buildings. Only works for walls. For other buildings unit is unloaded on the same side as the task containing unit.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue2 | Unknown. |
| cTaskAttrWorkRange | Unknown. |
| cTaskAttrWorkingGraphic | Graphic of the unit when unloading. |
| cTaskAttrCarryCheck | Unknown. |
| cTaskAttrObjectId | Building id or class over which to unload units. |
| cTaskAttrObjectClass | Building id or class over which to unload units. |
21. Make¶
-
XS constant: cTaskTypeMake
-
Unknown. Related to farms, fishing traps and similar. Maybe the ability to remake them?
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Unknown. |
| cTaskAttrResourceIn | Unknown; resource being collected. |
| cTaskAttrProductivityResource | Unknown, sometimes resource being deposited to. |
101. Build¶
-
XS constant: cTaskTypeBuild
-
Ability for units to build buildings. Building seems hardcoded for villagers and fishing ships. Military units can use this task to build 1 building.
Object attributes
| XS constant | Description |
|---|---|
| cWorkRate | Rate at which the unit builds. |
| cTraits | Set this bitfield 3rd bit (4) to enable military units to build 1 building. |
| cTraitPiece | Building id to build. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Multiplier for Work rate (13). |
| cTaskAttrWorkRange | Build range. |
| cTaskAttrSearchWaitTime | Unknown. |
| cTaskAttrProceedingGraphic | Graphic used while the unit is building. |
| cTaskAttrWorkingGraphic | Graphic of the unit building a secondary building. |
| cTaskAttrDepositSound | Sound id of the unit building. |
| cTaskAttrAutoSearch | Unknown. |
| cTaskAttrBuildingPick | Unknown. |
| cTaskAttrObjectId | For units building 1 building must be the id of the building and match the Trait piece (56) field, for villagers this value is -1. |
| cTaskAttrObjectClass | For units building 1 building must be the id of the building and match the Trait piece (56) field, for villagers this value is -1. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
102. Make unit¶
-
XS constant: cTaskTypeMakeUnit
-
Unknown.
103. Make tech¶
-
XS constant: cTaskTypeMakeTech
-
Unknown.
104. Convert¶
-
XS constant: cTaskTypeConvert
-
Ability for units to convert other units. Monks use task attributes, non-monks use object and task attributes. For non-monk units this ability does not work if the unit does not have an attack or similar task already. When adding this task to regular units, existing units will have empty faith bar and will not regenerate, newly created ones will work fine. In addition I did not find a way to add targeting limitations, it seems whatever values are set you can always convert all units and buildings.
Object attributes
| XS constant | Description |
|---|---|
| cMaxCharge | Amount of value to regenerate to regain conversion ability, usually set to 1. |
| cRechargeRate | Amount of charge regenerated per second. |
| cChargeEvent | Conversion range for non-monks. |
| cChargeType | Set to -4 to enable conversion for non-monks. |
| cButtonIconId | Icon for the conversion button. |
| cShortTooltipId | String ID for the conversion button's short tooltip. |
| cExtendedTooltipId | String ID for the conversion button's extended tooltip. |
| cChargeTarget | Conversion percent chance. For example, for 50% set to 50. Not changeable with triggers yet, use task attributes instead. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Minimum conversion time in seconds. |
| cTaskAttrWorkValue2 | Maximum conversion time in seconds. |
| cTaskAttrWorkRange | Conversion range, if positive takes precedence over object attribute. |
| cTaskAttrSearchWaitTime | Unknown, for monks it's set to 3091, for buildings 3049, for siege 3093 and for units to 0. Probably somehow related to these abilities being unlocked by research. Maybe unused. |
| cTaskAttrCombatLevelFlag | Unknown. |
| cTaskAttrProductivityResource | If set associated resource value is a modifier to conversion chance. |
| cTaskAttrUnusedResource | If set enable conversion and apply to the conversion range if the associated resource value is greater than 0. |
| cTaskAttrEnableTargeting | Unknown. |
| cTaskAttrObjectId | Target object or object class to be an eligible target for conversion. |
| cTaskAttrObjectClass | Target object or object class to be an eligible target for conversion. |
105. Heal¶
-
XS constant: cTaskTypeHeal
-
Ability of a unit to heal other units.
Object attributes
| XS constant | Description |
|---|---|
| cWorkRate | Rate at which the unit heals. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Multiplier for Work rate (13). |
| cTaskAttrProceedingGraphic | Graphic used while the unit is healing. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
106. Repair¶
-
XS constant: cTaskTypeRepair
-
Ability for unit to repair buildings or units.
Object attributes
| XS constant | Description |
|---|---|
| cWorkRate | Rate at which the unit repairs. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Multiplier for Work rate (13). |
| cTaskAttrSearchWaitTime | Unknown. |
| cTaskAttrProceedingGraphic | Graphic used while the unit is repairing. |
| cTaskAttrWorkingGraphic | Graphic of a unit repairing, seems to be not needed. |
| cTaskAttrDepositSound | Sound id of the unit repairing. |
| cTaskAttrAutoSearch | Unknown. |
| cTaskAttrBuildingPick | Unknown. |
| cTaskAttrObjectId | If -1 repairs everything that is repairable, if set repairs that specific object or objects of a class. |
| cTaskAttrObjectClass | If -1 repairs everything that is repairable, if set repairs that specific object or objects of a class. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
107. Get auto-converted¶
-
XS constant: cTaskTypeGetAutoConverted
-
Ability to be auto-converted to the player based on that player's other nearby units (e.g., sheep). Does not seem to work on normal units and buildings.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrSearchWaitTime | String ID of a text to display when the unit is converted. |
| cTaskAttrObjectId | Always -1. |
| cTaskAttrObjectClass | Always -1. |
108. Discovery artifact¶
-
XS constant: cTaskTypeDiscoveryArtifact
-
Unknown.
110. Hunt¶
-
XS constant: cTaskTypeHunt
-
Gives the ability to gather resources from map objects and place it into player resources. Since drop sites can't be changed with triggers this task can't be added.
Object attributes
| XS constant | Description |
|---|---|
| cWorkRate | Rate at which the unit gathers resources. |
| Unavailable — Drop sites | Object at which gathered resources are deposited. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Multiplier for Work rate (13). |
| cTaskAttrWorkRange | Gather range. |
| cTaskAttrSearchWaitTime | Unknown. |
| cTaskAttrCombatLevelFlag | Unknown. |
| cTaskAttrOwnerType | Controls which objects the task can target based on ownership. Values: 0 — All objects; 1 — Your objects only; 2 — Neutral and enemy objects only; 3 — Gaia only; 4 — Gaia, your and ally objects only; 5 — Gaia, neutral and enemy objects only; 6 — All but your objects. |
| cTaskAttrResourceIn | Resource to take from the hunted animal. |
| cTaskAttrResourceOut | Associated resource to deposit gathered resource into. |
| cTaskAttrUnusedResource | If the associated resource value is 1, the hunted corpse does not decay. |
| cTaskAttrProceedingGraphic | ID of the graphic used while the unit is attacking. |
| cTaskAttrWorkingGraphic | ID of the graphic used while the unit is gathering. |
| cTaskAttrCarryingGraphic | ID of the graphic used while the unit is carrying resources. |
| cTaskAttrAutoSearch | If set to 1 unit searches for nearby objects to continuously gather from. |
| cTaskAttrCarryCheck | If set to 1 check if target object has resource before gathering, if set to 0 use Target Diplomacy (6) instead. |
| cTaskAttrObjectId | The object to gather from. |
| cTaskAttrObjectClass | The object to gather from. |
111. Trade¶
-
XS constant: cTaskTypeTrade
-
Adds the ability of the unit to trade for gold with other buildings. Since drop sites can't be changed with triggers this task can't be added.
Object attributes
| XS constant | Description |
|---|---|
| cWorkRate | Rate at which the unit trades resources. |
| Unavailable — Drop sites | Object to which trade resources are returned. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Multiplier for Work rate (13). |
| cTaskAttrResourceIn | Unknown. |
| cTaskAttrProductivityResource | Productivity for secondary trade resource. |
| cTaskAttrResourceOut | Secondary resource to trade for other than gold when is enabled. |
| cTaskAttrCarryingGraphic | ID of the graphic used while the unit is carrying trade resources. |
| cTaskAttrObjectId | Building to trade with. |
| cTaskAttrObjectClass | Building to trade with. |
120. Generate wonder victory¶
-
XS constant: cTaskTypeGenerateWonderVictory
-
Ability for the object to start a wonder victory timer. Adding it to another object does not seem to work.
121. Deselect when tasked¶
-
XS constant: cTaskTypeDeselectWhenTasked
-
Unknown. Related to farms finishing traps and similar.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Unknown. |
| cTaskAttrResourceIn | Unknown; resource being collected. |
122. Loot gather¶
-
XS constant: cTaskTypeLootGather
-
Unknown.
123. Housing¶
-
XS constant: cTaskTypeHousing
-
Unknown.
124. Pack¶
-
XS constant: cTaskTypePack
-
Unknown.
125. Unpack and attack¶
-
XS constant: cTaskTypeUnpackAndAttack
-
Ability to unpack from one unit to another and attack. Not possible to add this task with triggers currently.
Object attributes
| XS constant | Description |
|---|---|
| Unavailable — Transform unit | Unit id to transform to. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrCombatLevelFlag | Unknown. |
| cTaskAttrEnableTargeting | Unknown. |
131. Off map trade¶
-
XS constant: cTaskTypeOffMapTrade
-
Unknown.
132. Pickup unit¶
-
XS constant: cTaskTypePickupUnit
-
Ability to pick up targeted objects and turn into a different unit when done. Seems to only work on relics.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Unit id to change into when picking up an object. |
| cTaskAttrObjectId | Object id to pick up. Seems to ignore this value and only works on relics. |
| cTaskAttrObjectClass | Object id to pick up. Seems to ignore this value and only works on relics. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 | |
133. Charge attack¶
-
XS constant: cTaskTypeChargeAttack
-
Ability to increase the object's speed when closing the distance for an attack.
Object attributes
| XS constant | Description |
|---|---|
| cMaxCharge | Value added to the attack while charging. Must be at least 1 for the charge to work. |
| cRechargeRate | Amount of charge regenerated per second. The charge can be used again when it reaches Maximum Charge (59). |
| cChargeEvent | Must be 0 or 1 for the task to work. |
| cChargeType | Must be 1 for the task to work. |
| cSpecialAbility | Must be 3 for the task to work. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Minimum distance from the target for the speed up to start. |
| cTaskAttrWorkValue2 | Maximum distance from the target for the speed to start. |
| cTaskAttrWorkRange | Multiplier on the unit speed while charging. |
| cTaskAttrWorkFlag2 | Must be 2001 for the task to work. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
134. Transform unit¶
-
XS constant: cTaskTypeTransformUnit
-
Unknown.
135. Kidnap unit¶
-
XS constant: cTaskTypeKidnapUnit
-
Ability to take an enemy unit and when returning to a town center convert it to your own. Attacking another unit while having a kidnapped unit will release that unit. If a unit has another task that can be performed on a target - this task will not work. Units can be kidnapped on their dying animations but will be returned as corpses.
Object attributes
| XS constant | Description |
|---|---|
| cGarrisonCapacity | Unit must have some capacity to hold a kidnapped unit. |
| Unavailable — Task swap group | Will swap the kidnapper into a different unit that also has the same value in this attribute after the kidnapping. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrOwnerType | Controls which objects the task can target based on ownership. Values: 0 — All objects; 1 — Your objects only; 2 — Neutral and enemy objects only; 3 — Gaia only; 4 — Gaia, your and ally objects only; 5 — Gaia, neutral and enemy objects only; 6 — All but your objects. |
| cTaskAttrObjectId | Unit id or class id that can be kidnapped. |
| cTaskAttrObjectClass | Unit id or class id that can be kidnapped. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
136. Deposit unit¶
-
XS constant: cTaskTypeDepositUnit
-
Ability to deposit picked up objects (task 132) into a building and change to a different unit when done. Seems to only work on relics.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Unit id to change into when depositing an object. |
| cTaskAttrObjectId | Building id to deposit the picked up object to, does not seem to work with custom units. |
| cTaskAttrObjectClass | Building id to deposit the picked up object to, does not seem to work with custom units. |
149. Shear¶
-
XS constant: cTaskTypeShear
-
Unknown.
151. Generate resources¶
-
XS constant: cTaskTypeGenerateResources
-
Ability of an object to gain resources when attacking or idling.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Amount of resources received. |
| cTaskAttrCombatLevelFlag | For units, set to 2 to generate resources passively. Buildings always generate resources passively. |
| cTaskAttrProductivityResource | The value of this resource is used as a multiplier of the amount received. Must be set to some resource containing a positive value for the task to work. |
| cTaskAttrResourceOut | Resource type to receive. |
| cTaskAttrObjectId | Object which if attacked by a unit will generate resource. |
| cTaskAttrObjectClass | Object which if attacked by a unit will generate resource. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
152. Movement damage¶
-
XS constant: cTaskTypeMovementDamage
-
Ability for a unit to damage surrounding enemy units while moving.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Amount of damage to deal per tick. If negative will increase the current HP instead. Will go over max HP. |
| cTaskAttrWorkValue2 | How often the unit damages surrounding units in fraction of seconds. |
| cTaskAttrWorkRange | Range of this damage surrounding the current unit. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
153. Movable dropsite¶
-
XS constant: cTaskTypeMovableDropsite
-
Ability for a unit to be a movable dropsite. For this task to work this unit needs to be added for the worker unit as a dropsite (currently not possible with triggers or XS).
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrSearchWaitTime | Unknown. |
| cTaskAttrCarryCheck | Unknown. |
| cTaskAttrObjectId | Resources containing object for which this unit exists as a dropsite. |
| cTaskAttrObjectClass | Resources containing object for which this unit exists as a dropsite. |
154. Loot¶
-
XS constant: cTaskTypeLoot
-
Ability of an object to gain resources and attributes after killing or converting an object.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Amount of resources received. |
| cTaskAttrWorkRange | If set to 0 applies to all units. If set to >0 then it applies to only units whose player matches this value. |
| cTaskAttrWorkFlag2 | If set, maximum number of times this unit can trigger the task. |
| cTaskAttrSearchWaitTime | ID of the object attribute modified by this task. Attributes known to be supported include: Hit points (0), Attack (9). |
| cTaskAttrCombatLevelFlag | If set to 1, unit will gain attributes. |
| cTaskAttrResourceIn | If set the tech of the associated resources value id will be researched. |
| cTaskAttrProductivityResource | If positive, the associated resource value must be greater than 0 for this task to activate. The positive value multiplies the resources gained. If negative, its absolute value is treated as a technology ID, and that technology must be researched for this task to activate. |
| cTaskAttrResourceOut | Resource type to receive. |
| cTaskAttrUnusedResource | If set the tech of the associated resources value id will be researched. |
| cTaskAttrProceedingGraphic | Graphic that plays when the unit gains an attribute via the task. |
| cTaskAttrCarryCheck | If set, all Tasks 154 with the same Carry Check ID will count towards the same cap. |
| cTaskAttrGatherType | If unit gains attributes this attribute stores the amount of attribute the unit gains. |
| cTaskAttrObjectId | Object which if killed by this unit will trigger resource/attribute gain. If -1 affects all units. Has to be an object that can increase the kill/razing/conversions stats. |
| cTaskAttrObjectClass | Object which if killed by this unit will trigger resource/attribute gain. If -1 affects all units. Has to be an object that can increase the kill/razing/conversions stats. |
XS example 1
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
XS example 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
155. Aura¶
-
XS constant: cTaskTypeAura
-
Auras are stat modifiers that affect all objects surrounding the aura object (or the aura object itself).
Object attributes
| XS constant | Description |
|---|---|
| cRechargeRate | Amount of charge regenerated per second. Together with Maximum Charge (59), this controls the temporary aura's cooldown. The cooldown ends when the charge reaches Maximum Charge (59). For a 60-second cooldown, set Maximum Charge (59) to 1 and Recharge rate (60) to 0.01666667 (1.0 / 60.0). |
| cChargeEvent | For temporary auras stores aura duration when activated. |
| cChargeType | Set to -3 to enable temporary auras. |
| cCombatAbility | Attribute bitfield 6th bit (32) needs to be set for the aura to activate. If 7th bit is set (64) the aura will affect the unit itself instead of the units in range (aura prerequisites still need to be met on other units). |
| cButtonIconId | Icon for the temporary aura button. |
| cShortTooltipId | String ID for the temporary aura button's short tooltip. |
| cExtendedTooltipId | String ID for the temporary aura button's extended tooltip. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Aura attribute value to add or multiply. |
| cTaskAttrWorkValue2 | Minimum amount of units to be in range for the aura to activate. |
| cTaskAttrWorkRange | Aura range. If aura targets enemies the targeted enemy units must be in range of aura units sight range. |
| cTaskAttrSearchWaitTime | ID of the object attribute modified by this task. Attributes known to be supported include: Hit points (0), Line of sight (1), Movement speed (5), Attack (9), Attack reload time (10), Maximum Range (12) (visual only), Work rate (13), Regeneration rate (109), Conversion chance modifier (113), Melee armor (116), Pierce armor (117), Regeneration HP percent (120). |
| cTaskAttrCombatLevelFlag | Bit field of aura settings: multiply (1) multiplies attribute value instead of adds it, circular (2) makes aura range circular instead of square, visible (4) shows range indicator (is affected by ui settings), temporary (8) makes aura effect temporary, activated (16) the temporary effect is only applied on the moment of aura activation, and remains if target units leave the aura, translucent (32) make aura indicator translucent, unsure how it works as its overwritten by ui settings. |
| cTaskAttrOwnerType | Controls which objects the task can target based on ownership. Values: 0 — All objects; 1 — Your objects only; 2 — Neutral and enemy objects only; 3 — Gaia only; 4 — Gaia, your and ally objects only; 5 — Gaia, neutral and enemy objects only; 6 — All but your objects. |
| cTaskAttrProceedingGraphic | Graphic displayed over the units receiving the aura. |
| cTaskAttrGatheringSound | Short Tooltip for UI indicator. |
| cTaskAttrDepositSound | Long Tooltip for UI indicator. |
| cTaskAttrGatherType | UI indicator icon displayed (per icons.json). |
| cTaskAttrEnabled | If set, the associated resource value needs to be set to >0 for the aura to activate. |
| cTaskAttrObjectId | Object targeted by the aura. |
| cTaskAttrObjectClass | Object targeted by the aura. |
XS example 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
XS example 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
156. Additional spawn¶
-
XS constant: cTaskTypeExtraSpawn
-
Spawns additional units when the unit is trained.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Id of an additional unit to spawn. |
| cTaskAttrWorkValue2 | Number of units to spawn. |
| cTaskAttrResourceIn | If set, the value of the corresponding resource needs to be >0 for the Task to trigger. |
| cTaskAttrProductivityResource | If set, the associated resource value is added to the number of units to spawn. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
157. Stinger¶
-
XS constant: cTaskTypeStinger
-
Stingers are stat modifiers applied on a unit being attacked or the attacking unit.
Object attributes
| XS constant | Description |
|---|---|
| cCombatAbility | Attribute bitfield 8th bit (128) needs to be set for stingers to activate. |
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Stingers attribute value to add or multiply. |
| cTaskAttrWorkValue2 | Effect duration in seconds, if negative it's permanent. |
| cTaskAttrWorkRange | If 0 apply to the attacker, if 1 apply to the target of the attack (including splash damage targets). |
| cTaskAttrSearchWaitTime | ID of the object attribute modified by this task. Attributes known to be supported include: Hit points (0), Movement speed (5), Attack (9), Attack reload time (10), Regeneration rate (109), Melee armor (116), Pierce armor (117), Regeneration HP percent (120). |
| cTaskAttrCombatLevelFlag | Bit field of stingers settings: Multiply (1) multiplies attribute value instead of adds it, Not stack (2) does not allow other stinger tasks that modify same attribute to stack. |
| cTaskAttrOwnerType | Controls which objects the task can target based on ownership. Values: 0 — All objects; 1 — Your objects only; 2 — Neutral and enemy objects only; 3 — Gaia only; 4 — Gaia, your and ally objects only; 5 — Gaia, neutral and enemy objects only; 6 — All but your objects. |
| cTaskAttrProductivityResource | If positive, the associated resource value must be greater than 0 for this task to activate. |
| cTaskAttrObjectId | Object targeted by the stinger. |
| cTaskAttrObjectClass | Object targeted by the stinger. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
158. HP transformation¶
-
XS constant: cTaskTypeHPTransform
-
Transform into another unit based on current HP.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | ID of the unit to transform to. |
| cTaskAttrWorkValue2 | HP to trigger the transformation. If >0 transforms when the unit's current HP is higher than the value. If <0 transforms when the unit's current HP is lower than the value made positive (currHp < (workVal * -1)). |
| cTaskAttrCombatLevelFlag | Bit field of HP transformation settings: Multiply (1) will use the Work value 2 (1) as a multiplier of current HP instead of exact value. |
| cTaskAttrProductivityResource | If positive, the associated resource value must be greater than 0 for this task to activate. If negative, its absolute value is treated as a technology ID, and that technology must be researched for this task to activate. |
| cTaskAttrResourceOut | If set, will add its associated resource value to the Work value 2 (1). |
| cTaskAttrProceedingGraphic | Graphic that plays when units transform. |
| cTaskAttrObjectId | Always -1. |
| cTaskAttrObjectClass | Always -1. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
159. Amphibious¶
-
XS constant: cTaskTypeAmphibious
-
Unit changes graphics based on current terrain.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Movement Speed multiplier. |
| cTaskAttrWorkValue2 | Attack Speed multiplier. |
| cTaskAttrTerrain | Terrain (or Terrain Type) on which the unit will use the task. If >= 0: Terrain ID. If <0: Terrain Type (can combine multiple bits). |
| cTaskAttrMovingGraphic | Walking Graphic. |
| cTaskAttrProceedingGraphic | Attack Graphic. |
| cTaskAttrWorkingGraphic | Running Graphic. |
| cTaskAttrCarryingGraphic | Idle Graphic. |
| cTaskAttrGatheringSound | Dying Graphic. |
| cTaskAttrDepositSound | Undead Graphic. |
160. HP damage modifier¶
-
XS constant: cTaskTypeHPModifier
-
Unit has attribute modified based on percentage of missing HP.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Value to add. |
| cTaskAttrWorkValue2 | Threshold of HP percentage to apply the modifier. |
| cTaskAttrWorkRange | If 0, check the unit's own HP. If > 0, compare the current target's HP. |
| cTaskAttrSearchWaitTime | ID of the object attribute modified by this task. Attributes known to be supported include: Attack (9). |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
161. Unit refund¶
-
XS constant: cTaskTypeRefund
-
Resource to grant on death.
Task attributes
| XS constant | Description |
|---|---|
| cTaskAttrWorkValue1 | Value to refund. |
| cTaskAttrWorkRange | If 0, grant the resources to the player who owned the unit. If > 0, grant to the player who killed the unit. |
| cTaskAttrCombatLevelFlag | If 0, use Work Value 1 as a flat value to grant. If 1, use Work Value 1 as a fraction of the unit's associated resource cost. |
| cTaskAttrProductivityResource | If set, multiply Work Value 1 by the value of this resource. |
| cTaskAttrResourceOut | Resource to refund. |
XS example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |