Skip to content

Effect Type

Written by: Alian713, Kramb


1. cSetAttribute

Value: int 0

This is the ID of the Set Attribute effect of the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cSetAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cSetAttribute, 74, cHitpoints, 100)

This sets the HP of unit 74 (militia) to 100 (the value). Alternatively, any of the Unit Attribute Constants may be used to modify the corresponding unit property

2. cModResource

Value: int 1

This is the ID of the Modify Resource effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cModResource, resourceID, operation, value)

Example:

1
 xsEffectAmount(cModResource, cAttributeFood, cAttributeAdd, 100)

This adds 100 to the current food amount. Alternatively, cAttributeSet may be used to set the food amount to 100. Also, see the Resource

3. cEnableObject

Value: int 2

This is the ID of the Enable (or disable) Object effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cEnableObject, unitID, enableOrDisable, 0)

Example:

1
 xsEffectAmount(cEnableObject, 74, cAttributeDisable, 0)

This disables the unit 74 (militia). Alternatively, cAttributeEnable may be used to enable an object instead

4. cUpgradeUnit

Value: int 3

This is the ID of the Upgrade Unit effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cUpgradeUnit, oldUnitID, newUnitID, 0)

Example:

1
 xsEffectAmount(cUpgradeUnit, 74, 75, 0)

This copies all units attributes except ID and available from unit 75 (man at arms) to 74 (militia)

5. cAddAttribute

Value: int 4

This is the ID of the Add Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cAddAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cAddAttribute, 74, 0, 100)

This adds 100 (the value) to the attribute 0 (HP) of unit 74 (militia)

6. cMulAttribute

Value: int 5

This is the ID of the Multiply Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cMulAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cMulAttribute, 74, 0, 100)

This multiplies the attribute 0 (HP) of unit 74 (militia) by 100 (the value)

7. cMulResource

Value: int 6

This is the ID of the Multiply Resource effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cMulResource, resourceID, 0, value)

Example:

1
 xsEffectAmount(cMulResource, cAttributeFood, 0, 10)

This multiplies the food amount by 10 (the value)

8. cSpawnUnit

Value: int 7

This is the ID of the Spawn Unit effect for the xsEffectAmount function

Syntax:

1
2
 xsEffectAmount(cModResource, cAttributeSpawnCap, cAttributeSet, numBuildings);
 xsEffectAmount(cSpawnUnit, unitID, buildingID, numUnits)

Example:

1
2
 xsEffectAmount(cModResource, cAttributeSpawnCap, cAttributeSet, 2);
 xsEffectAmount(cSpawnUnit, 83, 109, 5)

This will spawn 5 villagers (83) from each town centre (109), for a maximum of 2 town centres. Note that setting the cAttributeCap resource to a non 0 value is required for using this effect. If you prefer spawning the units garrisoned set resource cAttributeSpawnStayInside to 1.

9. cModifyTech

Value: int 8

This is the ID of the Modify Technology effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cModifyTech, techID, techAttribute, value)

Example:

1
 xsEffectAmount(cModifyTech, 22, cAttrSetTime, 10)

This sets the research time of tech 22 (loom) to 10s (the value). Alternatively, any of the Tech Attribute Constants may be used to modify the corresponding tech property

10. cSetPlayerData

Value: int 9

This is the ID of the Set Player Data effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cSetPlayerData, 0, cAttributeSet, value)

Example:

1
 xsEffectAmount(cSetPlayerData, 0, cAttributeSet, 10230)

This sets the player data 0 (Civilization Name ID) to 10230 (the value)

11. cSetUnitAttribute

Value: int 10

This is the ID of the Set Unit Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cSetUnitAttribute, unitId, attribute, value)

Example:

1
 xsEffectAmount(cSetUnitAttribute, 0, cHitpoints, 40)

This sets unit 0's HP to 40. This is the same as modify object attribute in the editor

12. cAddUnitAttribute

Value: int 11

This is the ID of the Add Unit Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cAddUnitAttribute, unitId, attribute, value)

Example:

1
 xsEffectAmount(cAddUnitAttribute, 0, cHitpoints, 40)

This adds 40 to unit 0's HP. This is the same as modify object attribute in the editor

13. cMulUnitAttribute

Value: int 12

This is the ID of the Multiply Unit Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cMulUnitAttribute, unitId, attribute, value)

Example:

1
 xsEffectAmount(cMulUnitAttribute, 0, cHitpoints, 40)

This multiplies unit 0's HP by 40. This is the same as modify object attribute in the editor

14. cSetTechCost

Value: int 100

This is the ID of the Set Technology Cost effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cSetTechCost, techID, resourceID, value)

Example:

1
 xsEffectAmount(cSetTechCost, 22, cAttributeFood, 10)

This sets the food cost of tech 22 (loom) to 10 (the value)

15. cAddTechCost

Value: int 101

This is the ID of the Add Technology Cost effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cAddTechCost, techID, resourceID, value)

Example:

1
 xsEffectAmount(cAddTechCost, 22, cAttributeFood, 10)

This adds 10 (the) to the current food cost of tech 22 (loom)

16. cDisableTech

Value: int 102

This is the ID of the Disable Tech effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cDisableTech, techID, 0, 0)

Example:

1
 xsEffectAmount(cDisableTech, 22, 0, 0)

This disables the tech 22 (loom)

17. cModTechTime

Value: int 103

This is the ID of the Modify Technology Time effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cModTechTime, techID, operation, value)

Example:

1
 xsEffectAmount(cModTechTime, 22, cAttributeSet, 10)

This sets the research time of tech 22 (loom) to 10s (the value). Alternatively, cAttributeAdd may be used to add to the current research time of the technology

18. cGaiaSetAttribute

Value: int -1

This is the ID of the Gaia Set Attribute effect of the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaSetAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cGaiaSetAttribute, 74, 0, 100)

This sets the attribute 0 (HP) of unit 74 (militia) to 100 (the value)

19. cGaiaModResource

Value: int -2

This is the ID of the Gaia Modify Resource effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaModResource, resourceID, operation, value)

Example:

1
 xsEffectAmount(cGaiaModResource, cAttributeFood, cAttributeAdd, 100)

This adds 100 to the current food amount. Alternatively, cAttributeSet may be used to set the food amount to 100

20. cGaiaEnableObject

Value: int -3

This is the ID of the Gaia Enable (or disable) Object effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaEnableObject, unitID, enableOrDisable, 0)

Example:

1
 xsEffectAmount(cGaiaEnableObject, 74, cAttributeDisable, 0)

This disables the unit 74 (militia). Alternatively, cAttributeEnable may be used to enable an object instead

21. cGaiaUpgradeUnit

Value: int -4

This is the ID of the Gaia Upgrade Unit effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaUpgradeUnit, oldUnitID, newUnitID, 0)

Example:

1
 xsEffectAmount(cGaiaUpgradeUnit, 74, 75, 0)

This replaces all units 74 (militia) with 75 (man at arms) on the map and also disables unit 74 and enables unit 75

22. cGaiaAddAttribute

Value: int -5

This is the ID of the Gaia Add Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaAddAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cGaiaAddAttribute, 74, 0, 100)

This adds 100 (the value) to the attribute 0 (HP) of unit 74 (militia)

23. cGaiaMulAttribute

Value: int -6

This is the ID of the Gaia Multiply Attribute effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaMulAttribute, unitID, attributeID, value)

Example:

1
 xsEffectAmount(cGaiaMulAttribute, 74, 0, 100)

This multiplies the attribute 0 (HP) of unit 74 (militia) by 100 (the value)

24. cGaiaMulResource

Value: int -7

This is the ID of the Gaia Multiply Resource effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaMulResource, resourceID, 0, value)

Example:

1
 xsEffectAmount(cGaiaMulResource, cAttributeFood, 0, 10)

This multiplies the food amount by 10 (the value)

25. cGaiaSpawnUnit

Value: int -8

This is the ID of the Gaia Spawn Unit effect for the xsEffectAmount function

Syntax:

1
2
 xsEffectAmount(cGaiaModResource, cAttributeSpawnCap, cAttributeSet, numBuildings);
 xsEffectAmount(cGaiaSpawnUnit, unitID, buildingID, numUnits)

Example:

1
2
 xsEffectAmount(cGaiaModResource, cAttributeSpawnCap, cAttributeSet, 2);
 xsEffectAmount(cGaiaSpawnUnit, 83, 109, 5)

This will spawn 5 villagers (83) from each town centre (109), for a maximum of 2 town centres. Note that setting the cAttributeCap resource to a non 0 value is required for using this effect. If you prefer spawning the units garrisoned set resource cAttributeSpawnStayInside to 1.

26. cGaiaModifyTech

Value: int -9

This is the ID of the Gaia Modify Technology effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaModifyTech, techID, techAttribute, value)

Example:

1
 xsEffectAmount(cGaiaModifyTech, 22, cAttrSetTime, 10)

This sets the research time of tech 22 (loom) to 10s (the value). Alternatively, any of the Tech Attribute Constants may be used to modify the corresponding tech property

27. cGaiaSetPlayerData

Value: int -10

This is the ID of the Gaia Set Player Data effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaSetPlayerData, 0, cAttributeSet, value)

Example:

1
 xsEffectAmount(cGaiaSetPlayerData, 0, cAttributeSet, 10230)

This sets the player data 0 (Civilization Name ID) to 10230 (the value)

28. cGaiaSetTechCost

Value: int -101

This is the ID of the Gaia Set Technology Cost effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cGaiaSetTechCost, techID, resourceID, value)

Example:

1
 xsEffectAmount(cGaiaSetTechCost, 22, cAttributeFood, 10)

This sets the food cost of tech 22 (loom) to 10 (the value)

29. cGaiaAddTechCost

Value: int -102

This is the ID of the Gaia Add Technology Cost effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cGaiaAddTechCost, techID, resourceID, value)

Example:

1
 xsEffectAmount(cGaiaAddTechCost, 22, cAttributeFood, 10)

This adds 10 (the) to the current food cost of tech 22 (loom)

30. cGaiaDisableTech

Value: int -103

This is the ID of the Gaia Disable Tech effect for the xsEffectAmount function

Syntax:

1
 xsEffectAmount(cGaiaDisableTech, techID, 0, 0)

Example:

1
 xsEffectAmount(cGaiaDisableTech, 22, 0, 0)

This disables the tech 22 (loom)

31. cGaiaModTechTime

Value: int -104

This is the ID of the Gaia Modify Technology Time effect for the xsEffectAmount function. No Longer works, use cModifyTech instead

Syntax:

1
 xsEffectAmount(cGaiaModTechTime, techID, operation, value)

Example:

1
 xsEffectAmount(cGaiaModTechTime, 22, cAttributeSet, 10)

This sets the research time of tech 22 (loom) to 10s (the value). Alternatively, cAttributeAdd may be used to add to the current research time of the technology