Azurian
The Azurian
Properties Cheatcheat
Element|Description
bSourceDrain|Properties that are declared as bSourceDrain are produced or consumed on game objects, move/spread/diffuse to other game objects and interact with other properties on the same game object. Game objects are plot, unit, city, player, team and game.
Property Source/Drains |produce or consume a property on a game object when they are active. Examples: This can be a constant production with a limit or a percent based decay or growth that is exponential on low amounts and limited on higher amounts.
Property Interactions| interactions between two different properties on the same game object. Examples: Two properties of which the higher reduces the other or a conversion between two properties or a spreading or diffusion from one property to the other.
Property Propagators| cause a property to interact with the same property on other game objects. Example: A property diffuses or spreads or moves to other game objects or gathers to a game object.
Game Object|Description
GAMEOBJECT_GAME|only one is present, it represents everything that is global
GAMEOBJECT_TEAM| a group of players that are permanently allied and share tech and some wonder effects
GAMEOBJECT_PLAYER|in a normal single player Civ4 game without set up teams there is no real difference between player and team
GAMEOBJECT_CITY|
GAMEOBJECT_UNIT|
GAMEOBJECT_PLOT|
Element|Description
Propagator| A type of manipulator
ChangePropagator| Grants a property to Propagate (manipulates) another property.
GameObjectTypeFrom|The "master" property that does the manipulation.
GameObjectTypeTo|The "slave" property that is manipulated.
iChangePercent| the strength of the manipulation.
Source|Description
PROPERTYSOURCE_CONSTANT|Adds X /Turn
iAmountPerTurn| Amount of X /Turn
PROPERTYSOURCE_CONSTANT_LIMITED|???
PROPERTYSOURCE_DECAY|decays X% of Property / Turn
Element|Descriptions
PROPERTYPROPAGATOR_SPREAD|Spreads the property without decreasing it on the source object
PROPERTYPROPAGATOR_GATHER|Collects properties from other objects and moves it to the object with the propagator
PROPERTYPROPAGATOR_DIFFUSE| Moves a property from a source object to target objects with a rate depending on the difference between them
iDistance|Diffuse from the city to all plots in a distance
iPercent|How much you want the difference reduced per turn
Element|Description
AiWeight|The Ai knows that higher values are either good or ba based on the sign of the aiweight (- is bad).For buildings and properties on cities this should be very easy. For properties on anything other than cities, and sources on anything other an buildings, if we want the AI to be able to react meaningfully to it, then we'll need new code, and at least for anything unit or route propagated, whole new strategy and tactical routines.
Operationrange|t knows the range over which the property operates (values below which or above which further improvements or degradations won't really make any practical difference), and based on where it is in that range currently it weighs buildings that add to or subtract from the property in question.
Element|Description
RelationType|only used by propagators.
RELATION_ASSOCIATED|which depending on the TargetObjectType can mean owner, owned (e.g. from a team object with target type city it will mean all cities of that team, from a plot to a player it will mean the owner of that plot)
RELATION_TRADE| which currently is only defined for cities with target cities and means the cities with which the city has trade routes
RELATION_NEAR|uses iDistance and means all objects within that distance of the TargetObjectType (e.g. with target object
GAMEOBJECT_UNIT| and iDistance 2 it will mean all units within the plot on which the source object is
RELATION_SAME_PLOT| is more or less the same as RELATION_NEAR with a distance of 0
Element|Description
AIScaleType | tells the AI how it should scale the weight. AISCALE_CITY will cause it to consider the property more important in larger cities and less important in smaller cities.
iOperationalRangeMin and iOperationalRangeMax|will tell the AI in which range the property will usually be and the AI will assume that getting a negative property close to the end of the range will cause considerably worse effects than having it somewhere in the mid of the range.
|Tips
|If your property is not a drain source property then the main next step is to consider all the buildings that you want to add that property to and then add them there in the building XMLs.
|For drain source properties you can add property manipulators to a lot of different info XMLs depending on what you want to model (buildings, unit types, promotions, leader traits, ...).
|You can also require minimum and maximum property values to allow building something (this is not the same as auto building).
|Events can be given property requirements as well.
Element| Description
MinValue|Minimumvalue needed for the building to exist
MaxValue|It is a range. If the property value gets outside that range, the building is removed.You need that if you want to have some buildings , for exampleonly at low crime or at negative crime.Or another use would be to have multiple versions of a building that are used at different crime levels.
This are the Game Object Modifiers AI Andy Added.
GOM_BUILDING
GOM_PROMOTION
GOM_TRAIT
GOM_FEATURE
GOM_OPTION
GOM_TERRAIN
GOM_GAMESPEED
GOM_ROUTE
GOM_BONUS
GOM_UNITTYPE
GOM_TECH
GOM_CIVIC
GOM_RELIGION
GOM_CORPORATION
Expressions
http://forums.civfanatics.com/showpost.php?p=11598257&postcount=27
Has
The Has tag is one of the most common tags you will use with boolean expressions. It evaluates if the referenced game object modifier is on the object. Game object modifiers or short GOM are a lot of different things from promotion to religion:
Name | Description
Active | In property manipulators. They will only have an effect if the Active expression evaluates to true.
NewCityFree| In building info. If it evaluates to true when you found a new city, then that building will be added for free (if it can be constructed).
ConstructCondition| In building info. If it evaluates to false for a city, then that city won't be able to build that building.
TrainCondition| In unit info. Same as ConstructCondition except for units.
Name|Description
ATTRIBUTE_POPULATION|manipulate property based on population
ATTRIBUTE_HEALTH| manipulate property based on health
ATTRIBUTE_HAPPINESS |manipulate property based on happiness
AND| The And tag can have any number of subexpressions and it will only evaluate to true if all subexpressions are true
Or |Or is exactly the same as And, except that it is enough if one subexpression evaluates to true.
BEqual |That is short for boolean equal. It takes exactly two subexpressions and evaluates to true if both subexpressions evaluate to the same.
Not |This tag inverts the result of its one subexpression
Templates
This code gives +5 Electricity per turn to a building.
This building creates 5% Electricity a Turn.
This means The Orbital Power Plant requires 1500 Electricity to be enabled. Any less and its disabled.
This means the building gains 5 Electricity at Cybernetics.
This means the Digital Library Consumes 5 Electricity a Turn.
The Computer Resource consumes 1 electricity.
That one would mean the property manipulator is active on plots with a road or paved road running through a forest.
If you are running feudal, then you need a forest near the new city to get it for free. Otherwise you need a jungle near it.
So the city will only be able to build that building if it has fresh water, access to apples and its owner runs the feudal civic.
The unit is trainable in the city if it has more than 5 forests (so at least 6).
Cannot Build if X Terrain is in the city vicinity unless you have Y Building.
bSourceDrain|Properties that are declared as bSourceDrain are produced or consumed on game objects, move/spread/diffuse to other game objects and interact with other properties on the same game object. Game objects are plot, unit, city, player, team and game.
Property Source/Drains |produce or consume a property on a game object when they are active. Examples: This can be a constant production with a limit or a percent based decay or growth that is exponential on low amounts and limited on higher amounts.
Property Interactions| interactions between two different properties on the same game object. Examples: Two properties of which the higher reduces the other or a conversion between two properties or a spreading or diffusion from one property to the other.
Property Propagators| cause a property to interact with the same property on other game objects. Example: A property diffuses or spreads or moves to other game objects or gathers to a game object.
The most important thing to consider is bSourceDrain. It decides the behavior of the property. A property that is not source/drain will behave similar to something like happiness. Buildings add it or remove it, but the happiness remains constant when you don't build or lose buildings (except for temporary effects).
Source/drain properties on the other hand are dynamic properties that have sources that provide a property increase every turn and drains that decrease it. There are also interactions that might convert a property to a different one each turn or similar things. And finally there are propagators that spread, diffuse or gather properties to other objects.
ChangePropagators allow you to copy changes to a property on one object to another object type. This generates a kind of accumulated value. Example: Flammability uses that by propagating 100% of the city flammability to the player. So the player flammability will always be the sum of the flammabilities of the cities of that player.
PropertyManipulators are used for source/drain properties and are explained in the previous tutorial (using them in the property info itself applies them to all objects of a certain type).
PropertyBuildings allow you to specify buildings that should be automatically built when the property is in a certain range and removed once it is not. This might be real buildings (but always give them a hammer cost of -1 so they are not sellable) or pseudo buildings. The important thing is that that allows you to apply all kinds of effects on the cities depending on the property value. Mind that currently the requirements defined in the building info are ignored for this (I will change that at some point but it requires reevaluating the property buildings not only on property changes but also on changes that might influence those requirements).
PropertyPromotions is the same as PropertyBuildings except that it applies to units via promotions. So you can apply effects on the units depending on the property value. Important here is as well that you don't use promotions that the unit might get in another way.
GAMEOBJECT_GAME|only one is present, it represents everything that is global
GAMEOBJECT_TEAM| a group of players that are permanently allied and share tech and some wonder effects
GAMEOBJECT_PLAYER|in a normal single player Civ4 game without set up teams there is no real difference between player and team
GAMEOBJECT_CITY|
GAMEOBJECT_UNIT|
GAMEOBJECT_PLOT|
Game objects have properties (from the generic property system) and attributes (an abstract interface to the properties that are not modelled by the generic property system). There are relations between game objects (near, same plot, trade, associated).
Game objects can have game object modifiers (GOMs, that includes buildings, promotions, features, terrains, resources, traits, ...). Game objects either have a specific GOM or not (so you can query a GAMEOBJECT_CITY if it has the GOM_BUILDING BUILDING_PALACE or not).
Propagator| A type of manipulator
ChangePropagator| Grants a property to Propagate (manipulates) another property.
GameObjectTypeFrom|The "master" property that does the manipulation.
GameObjectTypeTo|The "slave" property that is manipulated.
iChangePercent| the strength of the manipulation.
Code:
<ChangePropagators>
<ChangePropagator>
<GameObjectTypeFrom>GAMEOBJECT_CITY</GameObjectTypeFrom>
<GameObjectTypeTo>GAMEOBJECT_PLAYER</GameObjectTypeTo>
<iChangePercent>100</iChangePercent>
</ChangePropagator>
</ChangePropagators>
AiAndy said:That means propagate any change of this property type on a city to a player (from city to player that means the owner) with 100% strength. So if crime on the city increases by 5, crime on the player increases by 5 as well.
PROPERTYSOURCE_CONSTANT|Adds X /Turn
iAmountPerTurn| Amount of X /Turn
PROPERTYSOURCE_CONSTANT_LIMITED|???
PROPERTYSOURCE_DECAY|decays X% of Property / Turn
Code:
<PropertyManipulators>
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_CRIME</PropertyType>
<iAmountPerTurn>20</iAmountPerTurn>
</PropertySource>
</PropertyManipulators>
Adds 20 crime each turn.
PROPERTYPROPAGATOR_SPREAD|Spreads the property without decreasing it on the source object
PROPERTYPROPAGATOR_GATHER|Collects properties from other objects and moves it to the object with the propagator
PROPERTYPROPAGATOR_DIFFUSE| Moves a property from a source object to target objects with a rate depending on the difference between them
iDistance|Diffuse from the city to all plots in a distance
iPercent|How much you want the difference reduced per turn
Code:
<PropertyManipulators>
<PropertyPropagator>
<PropertyPropagatorType>PROPERTYPROPAGATOR_DIFFUSE</PropertyPropagatorType>
<PropertyType>PROPERTY_CRIME</PropertyType>
<GameObjectType>GAMEOBJECT_CITY</GameObjectType>
<TargetObjectType>GAMEOBJECT_PLOT</TargetObjectType>
<RelationType>RELATION_NEAR</RelationType>
<iDistance>1</iDistance>
<iPercent>2</iPercent>
</PropertyPropagator>
</PropertyManipulators>
aIAndy said:this means diffuse crime from cities to nearby plots in a distance of max 1 with 2%.
AiWeight|The Ai knows that higher values are either good or ba based on the sign of the aiweight (- is bad).For buildings and properties on cities this should be very easy. For properties on anything other than cities, and sources on anything other an buildings, if we want the AI to be able to react meaningfully to it, then we'll need new code, and at least for anything unit or route propagated, whole new strategy and tactical routines.
Operationrange|t knows the range over which the property operates (values below which or above which further improvements or degradations won't really make any practical difference), and based on where it is in that range currently it weighs buildings that add to or subtract from the property in question.
properties that matter really only in cities, and are sourced by buildings
properties that are used to model environmental factors, the impact of which players (and the AI) need to deal with, but which they cannot be expected to have much actual control over
RelationType|only used by propagators.
RELATION_ASSOCIATED|which depending on the TargetObjectType can mean owner, owned (e.g. from a team object with target type city it will mean all cities of that team, from a plot to a player it will mean the owner of that plot)
RELATION_TRADE| which currently is only defined for cities with target cities and means the cities with which the city has trade routes
RELATION_NEAR|uses iDistance and means all objects within that distance of the TargetObjectType (e.g. with target object
GAMEOBJECT_UNIT| and iDistance 2 it will mean all units within the plot on which the source object is
RELATION_SAME_PLOT| is more or less the same as RELATION_NEAR with a distance of 0
Most of what you will add to buildings will be sources or drains.
There are some buildings for which you might consider a propagator in addition. Like a Smuggler's Shanty moving more crime to the nearby water plots.
AIScaleType | tells the AI how it should scale the weight. AISCALE_CITY will cause it to consider the property more important in larger cities and less important in smaller cities.
iOperationalRangeMin and iOperationalRangeMax|will tell the AI in which range the property will usually be and the AI will assume that getting a negative property close to the end of the range will cause considerably worse effects than having it somewhere in the mid of the range.
|If your property is not a drain source property then the main next step is to consider all the buildings that you want to add that property to and then add them there in the building XMLs.
|For drain source properties you can add property manipulators to a lot of different info XMLs depending on what you want to model (buildings, unit types, promotions, leader traits, ...).
|You can also require minimum and maximum property values to allow building something (this is not the same as auto building).
|Events can be given property requirements as well.
MinValue|Minimumvalue needed for the building to exist
MaxValue|It is a range. If the property value gets outside that range, the building is removed.You need that if you want to have some buildings , for exampleonly at low crime or at negative crime.Or another use would be to have multiple versions of a building that are used at different crime levels.
Code:
<PropertyInfos>
<PropertyInfo>
<Type>PROPERTY_CRIME</Type>
<PropertyBuildings>
<PropertyBuilding>
<BuildingType>BUILDING_CRIME_TPING</BuildingType>
<iMinValue>10</iMinValue>
<iMaxValue>100000</iMaxValue>
</PropertyInfo>
</PropertyInfos>
</Civ4PropertyInfos>
Crime Toilet Papering only exists when there is a Crime Value of at least 10. At Crime 9 it disappears.
Code:
<PropertyManipulators>
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_CRIME</PropertyType>
<iAmountPerTurn>5</iAmountPerTurn>
</PropertySource>
</PropertyManipulators>
</UnitInfo>
If used on Unit, this Unit can spread 5 crime a Turn.
This are the Game Object Modifiers AI Andy Added.
GOM_BUILDING
GOM_PROMOTION
GOM_TRAIT
GOM_FEATURE
GOM_OPTION
GOM_TERRAIN
GOM_GAMESPEED
GOM_ROUTE
GOM_BONUS
GOM_UNITTYPE
GOM_TECH
GOM_CIVIC
GOM_RELIGION
GOM_CORPORATION
Code:
<PropertyManipulators>
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_ELECTRICTY</PropertyType>
<iAmountPerTurn>1</iAmountPerTurn> ADD VALUE
<Active>
<Has>
<GOMType>GOM_TECH</GOMType>
<ID>TECH_CYBERNETICS</ID> ADD TECH
</Has>
</Active>
</PropertySource>
</PropertyManipulators>
This means Cybernetics Tech will increase Electricity by 1.
Expressions
http://forums.civfanatics.com/showpost.php?p=11598257&postcount=27
Spoiler :
Boolean Expression Tutorial
Some information about how to use the Boolean Expressions.
At the moment I write this there are 4 places you can use Boolean Expressions at:
- In the Active tag of property manipulators. They will only have an effect if the Active expression evaluates to true.
- NewCityFree tag in building info. If it evaluates to true when you found a new city, then that building will be added for free (if it can be constructed).
- ConstructCondition tag in building info. If it evaluates to false for a city, then that city won't be able to build that building.
- TrainCondition tag in unit info. Same as ConstructCondition except for units.
Boolean expressions can consist of several different tags of which many also have subexpressions.
Literal
If a tag expects a boolean expression, you can also simply use 0 for false or 1 for true similar to what simple boolean XML tags expect. So this is valid:
<NewCityFree>1</NewCityFree>
The building would always be free in a new city if it can be constructed at that time.
As you can now with all boolean XML tags you can also refer to a boolean global define:
<NewCityFree>BUILDING_X_FREE_IN_NEW_CITY</NewCityFree.
So to use the Has tag you first specify the type of the GOM and then the ID:
In this case the building would only be free in a new city if the game option GAMEOPTION_BUILDING_X_FREE is set.Code:<NewCityFree> <Has> <GOMType>GOM_OPTION</GOMType> <ID>GAMEOPTION_BUILDING_X_FREE</ID> </Has> </NewCityFree>
The exact meaning of evaluating if a game object has a certain GOM depends on the GOM type and the game object type. GOM_RELIGION on a city evaluates if the city has the religion, on a player it evaluates if the religion is state religion of that player.
Is
The Is tag is somewhat similar to the Has tag but it doesn't check GOMs but some other states that a game object can have.
An easy example is to check if a game object is on water or next to a river:
Added to the propagators that spread water pollution they would only be active next to rivers or on water instead of spreading the water pollution deep into deserts.Code:<Active> <Is>TAG_WATER</Is> </Active>
And
The And tag can have any number of subexpressions and it will only evaluate to true if all subexpressions are true.
An example of an And with three subexpressions:
So the city will only be able to build that building if it has fresh water, access to apples and its owner runs the feudal civic.Code:<ConstructCondition> <And> <Is>TAG_FRESH_WATER</Is> <Has> <GOMType>GOM_BONUS</GOMType> <ID>BONUS_APPLE</ID> </Has> <Has> <GOMType>GOM_CIVIC</GOMType> <ID>CIVIC_FEUDAL</ID> </Has> </And> </ConstructCondition>
Or
Or is exactly the same as And, except that it is enough if one subexpression evaluates to true.
BEqual
That is short for boolean equal. It takes exactly two subexpressions and evaluates to true if both subexpressions evaluate to the same.
Example:
This building would only be constructable if the city either has fresh water and apples or neither has fresh water nor apples. If it has apples but no fresh water then it won't be able to build it. Ok, not a very meaningful example.Code:<ConstructCondition> <BEqual> <Is>TAG_FRESH_WATER</Is> <Has> <GOMType>GOM_BONUS</GOMType> <ID>BONUS_APPLE</ID> </Has> </BEqual> </ConstructCondition>
Not
This tag inverts the result of its one subexpression.
This building can only be built if there is no access to apples.Code:<ConstructCondition> <Not> <Has> <GOMType>GOM_BONUS</GOMType> <ID>BONUS_APPLE</ID> </Has> </Not> </ConstructCondition>
If
If has three subexpressions (If Expression then Expression else Expression). The first one decides if the second (if true) or the third (if false) is used.
If you are running feudal, then you need a forest near the new city to get it for free. Otherwise you need a jungle near it.Code:<NewCityFree> <If> <Has> <GOMType>GOM_CIVIC</GOMType> <ID>CIVIC_FEUDAL</ID> </Has> <Has> <GOMType>GOM_FEATURE</GOMType> <ID>FEATURE_FOREST</ID> </Has> <Has> <GOMType>GOM_FEATURE</GOMType> <ID>FEATURE_JUNGLE</ID> </Has> </If> </NewCityFree>
IntegrateOr
This tag allows you to query other game objects and if any of them evaluate the subexpression to true, then it will be true.
The way to describe the objects to query is the same as for property manipulators. So you first tell which relation to the primary game object these game objects have in the tag named RelationType. For that you can use these:
Then you specify the target object type, tag name GameObjectType. These are the game object types:
- RELATION_ASSOCIATED // owner, owned, ... depending on type
- RELATION_TRADE // trade routes, query from a city to cities
- RELATION_NEAR // needs iDistance tag to specify the distance
- RELATION_SAME_PLOT
- RELATION_WORKING // query plots from a city to get the plots belonging to the city and vice versa get the city to which the plot belongs
- GAMEOBJECT_GAME
- GAMEOBJECT_TEAM
- GAMEOBJECT_PLAYER
- GAMEOBJECT_CITY
- GAMEOBJECT_UNIT
- GAMEOBJECT_PLOT
Example:
This building can only be built if the city has a trade route with a city that has a palace.Code:<ConstructCondition> <IntegrateOr> <RelationType>RELATION_TRADE</RelationType> <GameObjectType>GAMEOBJECT_CITY</GameObjectType> <Has> <GOMType>GOM_BUILDING</GOMType> <ID>BUILDING_PALACE</ID> </Has> </IntegrateOr> </ConstructCondition>
Code:
<Active>
<And>
<Has>
<GOMType>GOM_FEATURE</GOMType>
<ID>FEATURE_FOREST</ID>
</Has>
<Or>
<Has>
<GOMType>GOM_ROUTE</GOMType>
<ID>ROUTE_ROAD</ID>
</Has>
<Has>
<GOMType>GOM_ROUTE</GOMType>
<ID>ROUTE_PAVED</ID>
</Has>
</Or>
</And>
</Active>
That one would mean the property manipulator is active on plots with a road or paved road running through a forest.
Has
The Has tag is one of the most common tags you will use with boolean expressions. It evaluates if the referenced game object modifier is on the object. Game object modifiers or short GOM are a lot of different things from promotion to religion:
The Has tag allows to query a lot of different GOMs (game object modifiers).
That are:
GOM_BUILDING
GOM_PROMOTION
GOM_TRAIT
GOM_FEATURE
GOM_OPTION
GOM_TERRAIN
GOM_GAMESPEED
GOM_ROUTE
GOM_BONUS
GOM_UNITTYPE
GOM_TECH
GOM_CIVIC
GOM_RELIGION
GOM_CORPORATION
With GOM_OPTION you can make a certain source or propagator only active when a specific game option is chosen.
The result of most of those depends on which game object it is evaluated. A GOM_FEATURE evaluated on a city will return true if there are any plots with that feature belonging to the city. Evaluated on a plot it will only return true if that specific plot has the feature.
Active | In property manipulators. They will only have an effect if the Active expression evaluates to true.
NewCityFree| In building info. If it evaluates to true when you found a new city, then that building will be added for free (if it can be constructed).
ConstructCondition| In building info. If it evaluates to false for a city, then that city won't be able to build that building.
TrainCondition| In unit info. Same as ConstructCondition except for units.
ATTRIBUTE_POPULATION|manipulate property based on population
ATTRIBUTE_HEALTH| manipulate property based on health
ATTRIBUTE_HAPPINESS |manipulate property based on happiness
Or |Or is exactly the same as And, except that it is enough if one subexpression evaluates to true.
BEqual |That is short for boolean equal. It takes exactly two subexpressions and evaluates to true if both subexpressions evaluate to the same.
Not |This tag inverts the result of its one subexpression
Templates
Code:
<PropertyManipulators>
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_ELECTRICITY</PropertyType>
<iAmountPerTurn>5</iAmountPerTurn>
</PropertySource>
</PropertyManipulators>
This code gives +5 Electricity per turn to a building.
Code:
<PropertyManipulators>
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_DIFFUSE</PropertySourceType>
<PropertyType>PROPERTY_ELECTRICITY</PropertyType>
<iAmountPerTurn>5</iAmountPerTurn>
</PropertySource>
</PropertyManipulators>
This building creates 5% Electricity a Turn.
Code:
<PropertyInfos>
<PropertyInfo>
<Type>PROPERTY_ELECTRICITY</Type>
<PropertyBuildings>
<PropertyBuilding>
<BuildingType>BUILDING_ORBITALPOWERPLANT</BuildingType>
<iMinValue>1500</iMinValue>
<iMaxValue>1000000</iMaxValue>
</PropertyBuilding>
</PropertyBuildings>
</PropertyInfo>
</PropertyInfos>
This means The Orbital Power Plant requires 1500 Electricity to be enabled. Any less and its disabled.
Code:
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_ELECTRCITY</PropertyType>
<iAmountPerTurn>5</iAmountPerTurn>
<Active>
<Has>
<GOMType>GOM_TECH</GOMType>
<ID>TECH_CYBERNETICS</ID>
</Has>
</Active>
This means the building gains 5 Electricity at Cybernetics.
Code:
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_ELECTRCITY</PropertyType>
<iAmountPerTurn>-5</iAmountPerTurn>
<Active>
<Has>
<GOMType>GOM_BUILDING</GOMType>
<ID>BUILDING_DIGITALIBARY</ID>
</Has>
</Active>
This means the Digital Library Consumes 5 Electricity a Turn.
Code:
<PropertySource>
<PropertySourceType>PROPERTYSOURCE_CONSTANT</PropertySourceType>
<PropertyType>PROPERTY_ELECTRCITY</PropertyType>
<iAmountPerTurn>-1</iAmountPerTurn>
<Active>
<Has>
<GOMType>GOM_BONUS</GOMType>
<ID>BONUS_COMPUTER</ID>
</Has>
</Active>
The Computer Resource consumes 1 electricity.
Code:
<Active>
<And>
<Has>
<GOMType>GOM_FEATURE</GOMType>
<ID>FEATURE_FOREST</ID>
</Has>
<Or>
<Has>
<GOMType>GOM_ROUTE</GOMType>
<ID>ROUTE_ROAD</ID>
</Has>
<Has>
<GOMType>GOM_ROUTE</GOMType>
<ID>ROUTE_PAVED</ID>
</Has>
</Or>
</And>
</Active>
Code:
<NewCityFree>
<If>
<Has>
<GOMType>GOM_CIVIC</GOMType>
<ID>CIVIC_FEUDAL</ID>
</Has>
<Has>
<GOMType>GOM_FEATURE</GOMType>
<ID>FEATURE_FOREST</ID>
</Has>
<Has>
<GOMType>GOM_FEATURE</GOMType>
<ID>FEATURE_JUNGLE</ID>
</Has>
</If>
</NewCityFree>
If you are running feudal, then you need a forest near the new city to get it for free. Otherwise you need a jungle near it.
Code:
<ConstructCondition>
<And>
<Is>TAG_FRESH_WATER</Is>
<Has>
<GOMType>GOM_BONUS</GOMType>
<ID>BONUS_APPLE</ID>
</Has>
<Has>
<GOMType>GOM_CIVIC</GOMType>
<ID>CIVIC_FEUDAL</ID>
</Has>
</And>
</ConstructCondition>
So the city will only be able to build that building if it has fresh water, access to apples and its owner runs the feudal civic.
Code:
<TrainCondition>
<Greater>
<IntegrateCount>
<RelationType>RELATION_WORKING</RelationType>
<GameObjectType>GAMEOBJECT_PLOT</GameObjectType>
<Has>
<GOMType>GOM_FEATURE</GOMType>
<ID>FEATURE_FOREST</ID>
</Has>
</IntegrateCount>
<Constant>5</Constant>
</Greater>
</TrainCondition>
The unit is trainable in the city if it has more than 5 forests (so at least 6).
Code:
<ConstructCondition>
<Or>
<Not>
<Has>
<GOMType>GOM_TERRAIN</GOMType>
<ID>TERRAIN_X</ID>
</Has>
</Not>
<Has>
<GOMType>GOM_BUILDING</GOMType>
<ID>BUILDING_Y</ID>
</Has>
</Or>
</ConstructCondition>
Cannot Build if X Terrain is in the city vicinity unless you have Y Building.