Relevant for: ICBM v2.0.
Missiles -
https://docs.google.com/document/d/1dtpzQ92EPMzpXIcRvU5JUmuf1fdchamH5Djzrj4Vfa
M/edit?usp=sharing
Radars -
https://docs.google.com/document/d/1WXWr62cV1EXwstxB3CuuCgb3yXfOAcRlH4nZgEU
Rsg8/edit?usp=sharing
Units -
https://docs.google.com/document/d/1ing9nZALJ9ewhSABD69iDL39sHyFwY69m8t9qzpA
MoU/edit?usp=sharing
Explosions -
https://docs.google.com/document/d/
1inVSVWnPY7X_JornHWifkLTk_pjQScfMZZGXWAgsZ2A/edit?usp=sharing
Tech modifiers
Tech modifiers is the possibility to alter properties of the units/missiles/radars or explosions
depending on different technologies available to your faction or units as well as enemy
faction, or unit or active weapon.
A typical tech modifier looks like this:
ImprovedBy "Air_refuel" Range 1.5
ImprovedBy "Powerful_Engine" Set Speed 65
ImprovedBy Unit "Advanced_Sonar" Add Range 100
AffectedBy Unit "Stealth_aircrafts" Range 0.75
AffectedBy InRange "EW" Sub Range 500 Unless InRange “ACTIVE_EW_DEFENCE”
Black part is Header
Blue part is Operator
Green part is Property modifier
Grey part is Unless condition
Modifier header
There are two types of Tech modifiers - ImprovedBy and AffectedBy and a total of seven
sub-types:
1. ImprovedBy “tech_name” - effective when your faction has the “tech_name”
technology discovered
2. ImprovedBy Unit “tech_name” - effective when your faction has the “tech_name”
technology discovered and your unit has “tech_name” as one of its Modifier
properties
3. ImprovedBy InRange “weapon_name” - effective when your unit is in range of one
of the “weapon_name” weapon of some allied (or own) unit and this weapon is
active.
4. (from 2.0) ImprovedBy Terrain “TerrainGroupID” - effective when your ground unit is
positioned on some type of the terrain defined in the TerrainTypeMap section of a
world map.
5. AffectedBy “tech_name” - effective when enemy faction has the “tech_name”
technology discovered
6. AffectedBy Unit “tech_name” - effective when enemy faction has the “tech_name”
technology discovered and enemy unit has “tech_name” as one of its Modifier
7. AffectedBy InRange “weapon_name” - effective when your unit is in range of one of
the “weapon_name” weapon of some enemy unit and this weapon is active
8. AffectedBy Explosion “explosion_type_name” - effective when your unit was hit by
the “explosion_type_name” and the effect is still lasting
9. (from 2.0.0) AffectedBy Terrain “TerrainGroupID” - effective when the enemy ground
unit is positioned on some type of the terrain defined in the TerrainTypeMap section
of a world map.
Modifier operator
Header can be followed by one of the following operators:
• Multiply - this is the default operator. If the operator is omitted, Multiply is implied.
Thus omitting the operator or stating Multiply as an operator means the Property
should be multiplied by the provided value.
In the example above
ImprovedBy "Air_refuel" Range 1.5
Property Range will be multiplied by 1.5 if our faction has the “Air_refuel”
technology available.
• Set - this operator instructs to ignore the current value of the Property and set it to
the provided value.
For example:
ImprovedBy "Powerful_Engine" Set Speed 65
Here speed property will be set to 65 if our faction has the “Powerful_Engine”
technology discovered.
• Set Min - compares the current value of the Property and the provided value and
selects the minimum of the two
• Set Max - compares the current value of the Property and the provided value and
selects the maximum of the two
• Add - adds the provided value to the current value
For example:
ImprovedBy Unit "Advanced_Sonar" Add Range 100
If our unit has “Advanced_Sonar” in his list of Modifiers and the technology is
available for our faction, the Range property (for some radar, if it is applied to that
sonar in Radars.txt file) will be increased by 100
• Sub - subtracts the provided value from the current value
For example:
AffectedBy InRange "EW" Sub Range 500
If our unit is inside the range of the “EW” weapon of some enemy unit (even
invisible) and this weapon is switched on, the Range property will be decreased by
500
• Complex - Allows to select different values basing on other conditions
For example:
[RADAR] "Fixed Long Wave" Modify
AffectedBy InRange "EW" Complex Range
case InRange “ACTIVE_EW_DEFENCE” Multiply 1.0
case "Anti-Jammers_Mk3" Multiply 0.95
case "Anti-Jammers_Mk2" Multiply 0.85
case "Anti-Jammers" Multiply 0.80
default Multiply 0.75
Refer the Complex Modifier section for more info
• Delete - only used with the MODIFIER sub-operator, to delete some specific Unit’s
modifier
For example:
AffectedBy InRange "EW" Delete Modifier “HIDDEN”
If our unit is inside the range of the “EW” weapon of some enemy unit (even
invisible) and this weapon is switched on, the unit loses its “HIDDEN” modifier
“Modifier” sub-operator
Any Operator (Set, Add, Multiply, etc) can be followed by the keyword Modifier - in this
case the TechModifier influences some specific modifier of the Unit.
For example:
in Units.txt:
[UNIT] "VirtualCity" MODIFY
ImprovedBy InRange "FORCE_FIELD" Set Modifier "INVINCIBLE" 1.0
in Missiles.txt:
[MISSILE] "Low-power nuclear bomb" Modify
AffectedBy Unit "INVINCIBLE" Set Damage 0
In this example, when you build a new unit and switch on it's "FORCE_FIELD" weapon,
the cities that are in range of this weapon will become invincible for small nuclear bomb
Property modifier
A number of properties of Unit types, Missiles and Radars can be affected by Tech
Modifiers
For Unit types:
• Speed
• VirtualSpeed
• Range
• TurnSpeed
• Power
• ProductionCost
• CanBeBuilt
• Size
• Disassemble
• MaxElevation
• MinElevation
• MaxNumberOnMap
• ResupplyRange
• RepairRange
• (from 2.0.0) AttackDelay
• (from 2.0.0) ModelLaunchTime
• (from 2.0.0) AttackOnMove
• Movie
• Modify Weapon
For Missiles:
• Power
• Range
• MinRange
• Damage
• Speed
• Precision
• TurnSpeed
• CanBeIntercepted
• ProductionCost
• CanBeBuilt
• MaxElevation
• MinElevation
• NumberOfHeads
• NumberOfFakeHeads
• LastingEffect - removed
• LastingDamage - removed
• LeadGuidance
• FullEffectRange
• AffectedRange
• Movie
For Radars:
• Range
• MaxHeight
For VirtualCity:
• Production
• Science
• Espionage
• Power
• MaxNumberOnMap
• Size
• ResupplyRange
• RepairRange
Movie Property Modifier
Image is a special case of Property for Tech Modifier, available for Unit Type and Missile.
This allows a unit or a missile to change its visual appearance when your faction discovers
some technology.
• When you need to replace just icon, the modifier looks like this:
ImprovedBy “tech_name” Movie Image “new_image_path”
Example, changing the icon of the AAM missile when Advanced AAM is discovered:
ImprovedBy "AAM_Mk2" Movie Image "Units/Images/Missiles/aam_mk2.png"
• When you need to change the appearance of a unit on the map, you need to
change its movie file. Then the modifier will look like this:
ImprovedBy “tech_name” Movie “new_movie_path” Icon “new_image_path”
RoundIcon “new_round_image_path”
Icon and RoundIcon can be omitted. If RoundIcon is not specified, it equals Icon. If
Icon is not specified, the icon is taken directly from the movie sequence of the unit,
taking the frame IconIDX (this is the configurable property of a unit).
Example, changing the appearance of the fighter when Stealth technology is
explored - changing both image sequence file and the icon file.
ImprovedBy "Stealth_aircrafts" Movie "Units/Images/Airborne/aircraft_stealth.vidx"
Icon "Units/Images/Icons/aircraft_stealth.png"
Note that if you use Movie property modifier, you should not use any Operator and neither
“Unit” nor “InRange” Header is possible. It should always be a simple ImprovedBy header
in this case.
Modify Weapon Property Modifier
This is a special case of Property for Tech Modifier, available for Units only. This allows to
modify the basic properties of the Unit’s weapon - Launch and Time.
Example, changing the number of simultaneously launched missiles when “Mobile Sam”
technology is available:
ImprovedBy "Mobile_SAM" Modify Weapon "SAM" Set Launch 3
Weapon Config Tech Modifier
There is a special case when a Tech Modifier is used to modify a weapon config of some
unit.
In this case the Tech Modifier should immediately follow the description of a weapon config
and can only be a simple ImprovedBy type. This makes a weapon config replaced by the
new one when the technology specified after ImprovedBy becomes available.
For example, here we have a usual ASM config of a carrier fighter (that consists of just 2
ASM missiles) replaced by a new config (4 ASM + 2 AAM) when “Advanced_aircraft” tech
becomes available:
Config "ASM" Default
Weapon "ASM" 2 Launch 2 Time 90 AutoEngage
ImprovedBy "Advanced_aircrafts"
Weapon "ASM" 4 Launch 2 Time 60 AutoEngage Principal
Weapon "AAM" 2 Launch 1 Time 60 AutoEngage
Value referencing modifier
For ImprovedBy Unit and AffectedBy Unit modifiers it is possible to use not the constant
value for operation, but the value defined in the Modifier property of the unit (referenced by
the value keyword).
For example:
In Unit definition
Modifier “Stealth_aircraft” value 0.5
In Missile definition
AffectedBy Unit "Stealth_aircraft" Range value
Execution orders
Tech Modifiers are applied in the specific order:
1. First, the base value of a property is calculated.
2. Simple ImprovedBy modifiers applied, in the order of appearance
3. ImprovedBy Unit modifiers applied, in the order of appearance
4. ImprovedBy Terrain modifiers applied, in the order of appearance
5. ImprovedBy InRange modifiers applied, in the order of appearance
6. AffectedBy InRange modifiers applied, in the order of appearance
7. AffectedBy Explosion modifiers applied, in the order of appearance
8. Simple AffectedBy modifiers applied, in the order of appearance
9. AffectedBy Unit modifiers applied, in the order of appearance
10.AffectedBy Terrain modifiers applied, in the order of appearance
Complex Modifier
Allows to select different values basing on other conditions
Complex modifier can follow any type of the modifier to add a next layer of branching
checks when the primary condition is true.
Example:
[RADAR] "Fixed Long Wave" Modify
AffectedBy InRange "EW" Complex Range
case InRange “ACTIVE_EW_DEFENCE” Multiply 1.0
case "Anti-Jammers_Mk3" Multiply 0.95
case "Anti-Jammers_Mk2" Multiply 0.85
case "Anti-Jammers" Multiply 0.80
default Multiply 0.75
In the example above, when a radar is influenced by the enemy “EW” weapon (InRange
“EW”), different effects are achieved based on the availability of different technologies.
For example, if we have "Anti-Jammers_Mk3" technology available, the radar Range
property is multiplied by 0.95, but when neither of the listed techs is available, the default
multiplier of 0.75 is applied.
Note there can be different types of conditions. The default “case” is a simple check for the
availability of the listed technology. So it is equivalent to a simple “ImprovedBy”. But other
types can be used as well:
• case“tech_name” - effective when your faction has the “tech_name” technology
discovered
• case Unit “tech_name” - effective when your faction has the “tech_name”
technology discovered and your unit has “tech_name” as one of its Modifier
properties
• case InRange “weapon_name” - effective when your unit is in range of one of the
“weapon_name” weapon of some allied (or own) unit and this weapon is active.
(Note! Before 2.0 this variant was used to check if the unit is influenced by some
Enemy weapon, not allied.)
• (from 2.0) case InRange Enemy “weapon_name” - effective when your unit is in
range of one of the “weapon_name” weapon of some enemy unit and this weapon
is active.
• (from 2.0) case Terrain “TerrainGroupID” - effective when your ground unit is
positioned on some type of the terrain defined in the TerrainTypeMap section of a
world map.
• case Explosion “explosion_type_name” - effective when your unit was hit by the
“explosion_type_name” and the effect is still lasting
After each case keyword, you can use the modifier self or target that directly specifies if
the check should be performed against the own unit or target unit.
The defaults are:
All ImprovedBy use self by default, all AffectedBy except for InRange and Explosion use
target by default. So using these modifiers can be essential in complex case, when we, for
example, first check the properties of the target unit and then our own properties:
AffectedBy Unit "BM_Accuracy_Damage_Penalty" Complex Damage
Case self "Advanced_Inertial_Guidance" Multiply 1
Case self "Improved_Inertial_Guidance" Multiply 0.75
Default Multiply 0.5
In this example we first check if the target unit has "BM_Accuracy_Damage_Penalty"
modifier and if this is true, we then check if our own faction has some technology to
overcome this modifier.
Unless Condition
Unless condition is the additional check performed when the primary check is true.
If the Unless condition is also true, the modifier is not applied.
A typical usage could be one technology overcoming the effect of some other technology.
Different types of conditions can be used - the same way as for the Complex Modifier.