06 — Tech modifiers: ImprovedBy and AffectedBy¶
Tech modifiers change a property of a unit type, missile, radar or explosion at run time, depending on technologies, unit tags, auras, lasting explosion effects or terrain. They are the main balancing tool: almost every upgrade in the shipped game is a tech modifier.
// (tech names below are illustrative)
ImprovedBy "Air_refuel" Range 1.5 // own tech: ×1.5
ImprovedBy "Powerful_Engine" Set Speed 65 // own tech: = 65
ImprovedBy Unit "Advanced_Sonar" Add Range 100 // own tech + unit has that tag: +100
AffectedBy Unit "Bomber_Stealth_Bonus_Modifier_1" Range 0.55 // target has that tag: ×0.55 (shipped)
AffectedBy InRange "EW" Sub Min 100 Range 500 Unless InRange "ACTIVE_EW_DEFENCE"
AffectedBy TargetInRange "My Missile Jammer" HitSpread 2.0 // the target is under its own side's jammer: x2
1. General form¶
ImprovedBy | AffectedBy [Unit | InRange | TargetInRange | Terrain | Explosion] "name" [AND <condition>]…
<body> — or — { <body> <body> … }
<body> := [Modify Weapon "missile"] <operator> <Property> ["tag"] <value | value | Complex …> [Unless <condition>]
| Movie … (appearance, see §7)
| Config "name" <Weapon lines> (units only, see §7)
| Radar "radar" … (units only, see §7)
- A header decides when the modifier is active.
AND <condition>adds extra conditions (up to 32) that must also hold.{ … }lets one header carry several bodies (each body may have its ownUnless):
ImprovedBy "Generation_4_Aircraft"
{
Set Size 0.03
Set Speed 1000
Set Range 3750
}
2. Headers¶
"Self" = the unit that owns the object being modified (for a missile: the launching unit; for a radar: the unit carrying it). "Target" = the other unit involved (the unit hit, the unit being looked at).
| Header | Active when | Typical use |
|---|---|---|
ImprovedBy "tech" |
Self's faction knows tech. |
Research upgrades. |
ImprovedBy Unit "tag" |
Self's faction knows tag and self's unit type has Modifier "tag" (or tag is its own Tech). |
Unit-specific upgrades; per-unit values via value. |
ImprovedBy InRange "missile" |
Self is inside the range of an active missile weapon of an own or allied unit. |
Buff auras (research, espionage, force fields). |
ImprovedBy Terrain "group" |
Self (a ground unit) stands on terrain of that group (from the map's TerrainTypeMap). | Terrain bonuses. |
ImprovedBy [NOT] Setting "name" |
The match has that setting on (with NOT: off), whatever was researched; §6.1. |
Values that differ by a match setting. |
AffectedBy "tech" |
The target's faction knows tech. |
Enemy counter-research (e.g. target's armour tech reduces your damage). |
AffectedBy Unit "tag" |
The target's faction knows tag and the target's unit type has Modifier "tag" (or tag is its own Tech). |
Stealth, hardening, special vulnerabilities. |
AffectedBy InRange "missile" |
Self is inside the range of an active missile weapon of an enemy unit. |
Jamming, debuff auras. |
AffectedBy TargetInRange "missile" |
The target is inside the range of an active missile weapon of its own or an allied unit (an enemy of self). Never when the target is a missile (interceptions are not affected). |
Jamming that protects what is under it: worse precision of the shots at it, wherever they come from. |
AffectedBy Explosion "explosion" |
Self was hit by that explosion and its LastingEffect is still running. |
EMP, chemical, cyber effects. |
AffectedBy Terrain "group" |
The target (a ground unit) stands on that terrain group. | Cover/terrain protection. |
[UNIT] "VirtualCity" MODIFY // shipped lines
ImprovedBy InRange "Research_Buff" Science 1.10 // own aura
AffectedBy Explosion "EMP_Blast" Complex Production // lasting effect on the city
case "EMP_Defence_Mk4" Multiply 0.75
default Multiply 0.25
[RADAR] "STD Long Wave" MODIFY
AffectedBy Unit "Bomber_Stealth_Bonus_Modifier_1" Range 0.55 // the target's tag
AffectedBy InRange "EW Jammer" Range 0.60 // an enemy aura over the radar
Notes:
InRangeworks only for weapons that are switched on, and for at most 32 different aura weapons in the whole game (every name used afterInRangeorTargetInRangecounts once). The aura's reach is the weapon'sRange.- For a missile "self" is always its launcher, also while it flies:
AffectedBy InRangeon a missile is about where the launcher stands, not where the missile is. To make an aura around the target count, useAffectedBy TargetInRange. AffectedBy TargetInRangeneeds a target unit: a strike on a point of the map (no target) is not affected. When a value is rolled matters too: a ballistic missile's deviation is rolled at launch, so the target's cover at launch counts; a guided missile's deviation is rolled at impact, a direct-fire shot's when it is fired.- Every unit type (and
VirtualCity) tracks the auras named byTargetInRangeand by target-side conditions (§6.1) automatically; this costs a little CPU per unit, only for those auras. - For cities (
VirtualCity), "self" is the city. - Explosion modifiers written in an explosion entry use the attacker as self and the unit hit as target.
3. Operators¶
| Operator | Written | Result |
|---|---|---|
| Multiply (default) | Range 1.5 or Multiply Range 1.5 |
value × 1.5 |
| Set | Set Range 850 |
value = 850 |
| Set Max | Set Max Range 850 |
value = max(value, 850) |
| Set Min | Set Min Range 850 |
value = min(value, 850) |
| Add | Add Range 100 |
value + 100 |
| Sub | Sub Range 100 |
value − 100 |
| Clamped variants | Add\|Sub\|Multiply Min <a> [Max <b>] \| Max <b> then property and value |
apply, then clamp to ≥ a and/or ≤ b. Example: Sub Min 100 Range 500 = subtract 500 but not below 100. |
| Complex | Complex Range followed by case/default lines |
choose an operation by condition (§5) |
| Delete | Delete Modifier "tag" |
removes a unit tag (only with Modifier) |
| Ladder | Ladder "name" HitSpread (no value) |
value × the ladder's multiplier for the two sides' research levels (§5.1) |
value instead of a number (only in Unit headers or case Unit): uses the tag's value from the unit's
Modifier "tag" value <v> line. Anywhere else it stops the loading.
[UNIT] "Spec_Ops_Team" MODIFY // shipped lines
ImprovedBy "Army_Mech_Mk2" Set Speed 70 // = 70
ImprovedBy "Army_Mech_Mk3" Power 1.05 // x 1.05
ImprovedBy "Spec_Ops_Boost_2" Add Speed 10 // + 10
Real after the value of MaxElevation or MinElevation gives the height in real km (01),
as in Set MaxElevation 37000 Real. Only with Set, Set Max and Set Min: with another operator it stops the
loading, and a case does not take it.
4. Property names¶
The same keyword can mean different things on different objects (they share one stored value). Only use the names listed for the object you are modifying — a name from another column is accepted silently but changes a different property.
| Keyword | Unit type | City (VirtualCity) |
Missile | Radar | Explosion | Modify Weapon |
|---|---|---|---|---|---|---|
Range |
flight range | — | attack range | detection range | — | — |
MinRange |
= Size ⚠ | = Size ⚠ | min range | (no effect) | — | — |
Size |
size | city size | = MinRange ⚠ | — | — | — |
Precision |
= MaxNumberOnMap ⚠ | = MaxNumberOnMap ⚠ | precision | (no effect) | — | — |
HitSpread / HitChance |
= MaxNumberOnMap ⚠ | = MaxNumberOnMap ⚠ | = Precision, by its meaning: HitSpread km off (a weapon that deviates), HitChance a beam's chance; the wrong one for the weapon's HitModel is reported at loading (02) |
(no effect) | — | — |
MaxNumberOnMap |
max on map | max on map | = Precision ⚠ | — | — | — |
Damage |
= VirtualSpeed ⚠ | — | explosion damage | — | — | — |
VirtualSpeed |
virtual speed | — | = Damage ⚠ | — | — | — |
Speed |
speed ¹ | — | speed ¹ | — | — | — |
TurnSpeed |
turn speed | — | turn speed | — | — | — |
CanBeIntercepted |
= RepairRange ⚠ | = RepairRange ⚠ | interception chance | — | — | = Load ⚠ |
RepairRange |
repair range | repair range | = CanBeIntercepted ⚠ | — | — | = Load ⚠ |
ProductionCost |
cost | — | cost | — | — | — |
MaxElevation / Elevation / MaxHeight |
max altitude | — | max altitude | max height | — | — |
MinElevation |
min altitude | — | min altitude | — | — | — |
Power |
hit points | city power | missile hit points | — | — | — |
DisassembleTime |
disassemble time | — | = LeadGuidance ⚠ | — | — | — |
LeadGuidance |
= DisassembleTime ⚠ | — | lead guidance | — | — | — |
Heads / Launch / Production / AttackDelay / LastingEffect |
AttackDelay | Production | Heads | — | LastingEffect | Launch |
FakeHeads / Time / Science / AttackOnMove / LastingDamage |
AttackOnMove | Science | FakeHeads | — | LastingDamage | Time |
ResupplyRange / FullEffectRange / MinHealthPercentage |
ResupplyRange | ResupplyRange | FullEffectRange | — | MinHealthPercentage | — |
AffectedRange / Espionage / ModelLaunchTime |
ModelLaunchTime | Espionage | AffectedRange (outer blast radius) | — | — | — |
Load |
— | — | — | — | — | (no effect) |
CanBeBuilt |
can be built (0/1) | — | can be built | — | — | — |
Movie |
appearance (§7) | — | appearance (§7) | — | — | — |
Modifier |
unit tags (§8) | city tags | — | — | — | — |
Casualties |
— | — | factor on its deaths in a city, starts at 1 (03) | — | — | — |
In the rows with several keywords, every keyword of the row is interchangeable; the bold word is what it
actually changes on that object. For readability write the matching word (Production on a city,
AttackDelay on a unit, Heads on a missile).
[UNIT] "VirtualCity" MODIFY
ImprovedBy "Production_Booster_1" Production 1.10 // the city's output (the row of AttackDelay on a unit)
[UNIT] "Mobile_ICBM" MODIFY
ImprovedBy "Solid_Fuel_Rockets" AttackDelay 0.35 // the same row on a unit
[MISSILE] "3x100kt_MRBM" MODIFY
ImprovedBy "My_Bus_Mk2" Add Heads 1 // and on a missile (a mod's tech)
¹ Do not change Speed with dynamic headers (InRange, Explosion, Terrain, AffectedBy); movement
code caches it. Use simple ImprovedBy / ImprovedBy Unit only. On a missile, a Set or Add value of Speed is
scaled by GlobalSpeedModifier like the base value.
Modify Weapon¶
On a unit: ImprovedBy "tech" Modify Weapon "missile" <op> Launch|Time <value> changes that weapon
in all of the unit's configs — salvo size or reload time (Load is accepted, has no effect). With Set/Add/Sub
the Time value is in reload units like the Weapon line; with Multiply it is a factor.
Modify Weapon cannot be used inside a weapon-config upgrade, and any other property after it stops the loading.
5. Complex modifiers¶
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
default Multiply 0.75
- When the header is active, the
caselines are tested in order and the first true one is applied;defaultalways matches — put it last. - Each case has its own operator (including clamped variants) and value (or
valueforcase Unit). - Case conditions (same syntax as
UnlessandAND):
| Condition | True when |
|---|---|
"tech" |
the checked faction knows tech |
Unit "tag" |
the checked faction knows tag and the checked unit type has that tag (its own Tech counts) |
InRange "missile" (optionally InRange Allied\|Own "missile") |
the checked unit is inside an own/allied active missile aura |
InRange Enemy "missile" |
inside an enemy active missile aura |
Explosion "explosion" |
the checked unit is under that explosion's lasting effect |
Terrain "group" |
the checked unit stands on that terrain group |
Setting "name" |
the match has that setting on (§6.1) |
NOT <condition> |
inverts it |
Up to 32 cases. If no case is true and there is no default, the modifier changes nothing; with a default, a
case that must stop the effect needs its own Multiply 1. An Unless for the whole body comes after the last
case (§6).
5.1 Ladders: a measure against its countermeasure¶
A ladder compares two research lines level by level, e.g. the target side's jamming against the attacker's
electronic counters. Ladders are defined in their own file, Ladders.txt (next to tech.txt, read right
after it; optional), and any modifier uses one with the Ladder operator - units, cities, radars, weapons and
explosions alike (e.g. a radar's range against the target's stealth research and the radar owner's sensor
research):
// Ladders.txt of a mod
USE PREVIOUS "Ladders.txt"
[LADDER] "My_Jamming"
Measure "Jammers" "Jammers_Mk2" "Jammers_Mk3" "Jammers_Mk4"
Counter "Electronic_Counters_Mk1" "Electronic_Counters_Mk2" "Electronic_Counters_Mk3" "Electronic_Counters_Mk4"
Difference -2 Multiply 4 2 1.18 1 // counter level - measure level: -2 or less, -1, 0, +1 or more
// Units/Missile_defs.txt of the mod ("My Missile Jammer": an aura weapon, 02 §10)
[MISSILE] "AGM" MODIFY
AffectedBy TargetInRange "My Missile Jammer" Ladder "My_Jamming" HitSpread
The shipped Ladders.txt defines one ladder, "Missile_Jamming", that no shipped weapon uses.
- Measure is the side the modifier's header checks (§6.1): the target for
AffectedBy "tech",Unit,TerrainandTargetInRange; self forImprovedBy …,AffectedBy InRangeandAffectedBy Explosion. Counter is the other side. - A side's level is the position of the highest research of its list that it knows (1 = the first); 0 when it knows none. The lists are usually chains, so the level is how far along the side is.
Difference <first> Multiply <values…>: the multiplier for each value of (counter level − measure level), starting with<first>; differences below the first or above the last use the end values. ForHitSpreada multiplier of 2 means about half the hits of a small blast (a shot lands evenly up toHitSpreadkm off, so the hit chance is about (blast + target size) ÷HitSpread), 1 no effect.HitChance(a beam) goes the other way: use multipliers below 1.- Measure level 0 (the side knows none of its list): no effect. Without the other side (a projected value with no target) the counter level is 0.
Ladderworks in any header and in acase; it cannot changeModifiertags. A modifier naming an undefined ladder stops the loading, and so does a ladder withoutMeasureor without multipliers. WithoutCounterthe counter level is always 0.- Every research name of every ladder must exist, even when no modifier uses the ladder: otherwise the game
stops with Technology not found. This is why Blitz, with its smaller tree, has its own
Ladders.txtwithout ladders (05 §6); its weapons cannot name a ladder. - A mod's
Ladders.txtreplaces the game's; to add or change ladders keep the others withUSE PREVIOUS "Ladders.txt"and write your[LADDER]sections after it (a ladder of the same name replaces the earlier one).IFblocks work as intech.txt. - The Explodopedia shows a ladder as a row per measure level: the effect without countermeasures, then each counter level that changes it.
Without a ladder, the same matrix takes one line per measure level: AND picks the level, Unless drops the line
once the side knows the next one, and a Complex over the other side's research gives the multipliers. The ladder
above written this way, for one weapon and its top two levels of four:
[MISSILE] "AGM" MODIFY
AffectedBy TargetInRange "My Missile Jammer" AND "Jammers_Mk4" Complex HitSpread
case self "Electronic_Counters_Mk4" Multiply 1.18
case self "Electronic_Counters_Mk3" Multiply 2
default Multiply 4
AffectedBy TargetInRange "My Missile Jammer" AND "Jammers_Mk3" Complex HitSpread
case self "Electronic_Counters_Mk4" Multiply 1
case self "Electronic_Counters_Mk3" Multiply 1.18
case self "Electronic_Counters_Mk2" Multiply 2
default Multiply 4
Unless "Jammers_Mk4"
The research lists are chains, so a side that knows Mk4 knows Mk3 too: hence the Unless. The cases run from the
highest counter that changes the result down. All four levels are in a comment of the shipped Ladders.txt.
Use this form when a change should differ from weapon to weapon, and the ladder otherwise.
To set up jamming from start to finish see Add a jamming ladder.
6. Unless and AND¶
Unless <condition>at the end of a body: the body is not applied if the condition is true ("this tech counters that effect"). OneUnlessper body, after its value or after the lastcase. Any condition works with any header, andself/targetchoose whose it is (§6.1).
// the observer's counter-stealth research cancels the satellite's stealth (an AffectedBy "tech" line checks
// the target by default: without "self" it would be the satellite owner's Space_radar_Mk4)
AffectedBy "Satellite_Stealth_Bonus_Modifier_1" Range 0.7 Unless self "Space_radar_Mk4"
* AND <condition> right after the header name: all conditions must be true for the header to be active.
ImprovedBy Unit "Naval_Sonar" AND InRange "Sonar_Buoy" Range 1.3 // illustrative names
6.1 self and target in conditions¶
Write self or target right after case, Unless, AND (after an optional NOT) to choose whose
faction/unit is checked:
| Header type | Checked by default | To check the other side write |
|---|---|---|
All ImprovedBy …, and AffectedBy InRange / AffectedBy Explosion |
self | target |
AffectedBy "tech", AffectedBy Unit, AffectedBy Terrain, AffectedBy TargetInRange |
target | self |
An InRange condition makes the unit it checks track that aura, for that relation (InRange Enemy against
enemies, InRange/Own/Allied against own and allied units): the modifier owner's unit type when it
checks self, every unit type when it checks the target. No extra header is needed for that.
Example — jamming of the target, stronger with the defender's EW research and cancelled by the attacker's countermeasures:
AffectedBy TargetInRange "My Missile Jammer" Complex HitSpread // tech names illustrative
case self "ECCM_Mk2" Multiply 1.0 // the attacker's countermeasures
case "EW_Jamming_Mk2" Multiply 2.5 // the target's faction knows it
default Multiply 1.6
A whole level-against-level matrix (several jamming and countermeasure levels) is one line with a ladder (§5.1).
Example — reduce damage against hardened targets unless the attacker has better guidance:
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
6.1 Values that depend on a match setting¶
Setting "name" is a condition like the others: it works after AND, Unless and case, with NOT as well. It
is also a header of its own, for a change with no research behind it. A match keeps its settings to its end, so the
values are decided when it starts and saved games keep them.
The names are the keywords of the map files, see 09: RealisticSatelliteOrbits, AllowAlliances,
TimedPermanentAlliances, AllowInstantTechSharing, AllowTechnologyTrade, EconomicSanctions, GenevaRequiresConsensus, PredefinedTeams,
AllowBuildingOnAlliedTerritory, AutoSlowDownAllowed, ProductionDegradesWithLosses,
LimitedProductionBenefitFromExpansion. Any other name stops the game with an error when the data is read.
[RADAR] "My Satellite Camera"
Range 150
ImprovedBy NOT Setting "RealisticSatelliteOrbits" Set Range 300 // the base value, classic orbits
ImprovedBy "Better_Optics" AND Setting "RealisticSatelliteOrbits" Set Range 250
ImprovedBy "Better_Optics" AND NOT Setting "RealisticSatelliteOrbits" Set Range 600
- Modifiers apply in the order of the file and the last
Setwins: the header line of a base value comes before the research lines. - Use
ANDfor several conditions together, also several settings. Acasehas one condition, so for research and a setting together give each setting its own header line:ImprovedBy InRange "Relay" AND Setting "RealisticSatelliteOrbits" Complex Range case self "Better_Optics" Set 500 default Set 250 ImprovedBy InRange "Relay" AND NOT Setting "RealisticSatelliteOrbits" Complex Range case self "Better_Optics" Set 1200 default Set 600 - The
Settingheader takes operators on properties only: noImage,ConfigorRadarbody. There is noAffectedBy Setting: useImprovedBy Setting, or a condition on theAffectedByline. - The in-game Explodopedia always shows the game as if all match settings were at their defaults, whatever match
is running: the
ANDandUnlesslines that hold then, and noSettingheader. So keep the default in the plain value (Range,ProductionCost) and use theSettingheader for the other case. It does not choose among the cases of aComplex: useAND. - A radar's
RangeByHeighthas the same condition after it (04).
7. Special bodies (units and missiles)¶
Appearance: Movie¶
Simple ImprovedBy "tech" only, no operator:
| Form | Effect |
|---|---|
ImprovedBy "tech" Movie Image "icon.png" |
Replace only the icon (missiles, units). |
ImprovedBy "tech" Movie "sprite.midx" [Icon "icon.png"] [RoundIcon "round.png"] [Model "model.midx"] |
Replace the map sprite, optionally the icons (icon defaults to frame IconIDX of the sprite, round icon to the icon) and the 3D model. |
ImprovedBy "tech" Movie Model "model.midx" |
Replace the 3D model. Can be combined with the previous form in the same { } block. |
| (sizes) | An upgrade's picture or model that is drawn bigger or smaller in its frame than the unit's first one gets a Scale in its own .midx (12); the upgrade itself has no size. |
delete ImprovedBy ALL Movie removes all appearance modifiers (handy in MODIFY entries before adding
new ones).
Weapon configs and radar sets (units only)¶
Simple ImprovedBy "tech" only, any other header stops the loading:
ImprovedBy "tech" Config "name"+Weapon …lines — adds or replaces a config whentechis known. Written right after a config's own weapon list,ImprovedBy "tech"+Weaponlines replaces that config's contents (01 §3.3).ImprovedBy "tech" Radar "radar" [Radar …]— replaces the whole radar list whentechis known (01 §4).
[UNIT] "Spec_Ops_Team" MODIFY // shipped lines
ImprovedBy "Army_Mech_Mk3"
{
Movie "Units/Images/Ground/Mid-Level/Spec_Ops_2.midx" Icon "Units/Images/Icons/Ground/Spec_Ops_2.png"
Model "Units/Images/Ground/Spec_Ops_Team_2.midx"
}
ImprovedBy "Spec_Ops_Boost_1" Modify Weapon "Small Arms" Set Time 9.5
8. Modifier tags¶
With the property Modifier "tag" a tech modifier adds, changes or removes a tag on the unit (or city)
at run time; other objects then react to the tag through AffectedBy Unit "tag"/ImprovedBy Unit "tag".
[UNIT] "VirtualCity" MODIFY
ImprovedBy InRange "FORCE_FIELD" Set Modifier "INVINCIBLE" 1.0 // cities under the field get the tag
[MISSILE] "Low-power nuclear bomb" MODIFY
AffectedBy Unit "INVINCIBLE" Set Damage 0 // …and take no damage
[UNIT] "Stealth_Bomber" MODIFY // illustrative unit
AffectedBy InRange "EW" Delete Modifier "Bomber_Stealth_Bonus_Modifier_1" // loses stealth inside enemy EW
Tag changes are evaluated only for these headers: simple ImprovedBy "tech", ImprovedBy InRange,
AffectedBy InRange, AffectedBy Explosion. (ImprovedBy Unit, simple AffectedBy, AffectedBy Unit
and Terrain headers do not change tags, and AffectedBy TargetInRange with Modifier stops the loading.) A tag
set to value 0 still exists — use Delete to remove it.
9. Evaluation order¶
For each property the base value is modified in this order; within each group, in the order the lines
appear (across MODIFY entries, appended lines come last):
- simple
ImprovedBy "tech" ImprovedBy UnitImprovedBy TerrainImprovedBy InRangeAffectedBy InRangeAffectedBy Explosion- simple
AffectedBy "tech" AffectedBy UnitAffectedBy TerrainAffectedBy TargetInRange
Because operations are applied in sequence, Set discards everything before it and multiplications
compound: ImprovedBy "A" Range 1.2 + ImprovedBy "B" Range 1.2 = ×1.44. To make an upgrade chain where
the last known level wins, use Set in increasing order (the shipped data does this: Set Range 850,
then Set Range 1000).
Two consequences to check when a change has no effect:
- A
Setthrows away the multipliers before it. Inside a group the lines run in file order, so put a multiplier that must survive after theSetlines of the upgrade chain, or into aComplexon theSet's own line. A multiplier in a later group (such asAffectedBy Unit) always applies after anImprovedBy "tech"Set. - Multiplying a base of 0 does nothing. A missile without
CanBeInterceptedhas 0, soCanBeIntercepted 2on it leaves it at 0; useSetor give it a base value.
[RADAR] "STD Long Wave" // shipped lines, base Range 400
ImprovedBy "LW_Mk2" Set Range 450 // step 1
ImprovedBy "LW_Mk3" Set Range 500 // step 1, later: wins once known
AffectedBy Unit "Bomber_Stealth_Bonus_Modifier_1" Range 0.55 // step 8: 500 x 0.55 = 275 against a stealth bomber
Steps 1–2 (and a Complex whose cases only test techs) are cached per faction and cheap. Steps 3–10 and any
value, InRange, Explosion or Terrain condition are evaluated per unit and cost CPU on large maps.
10. Deleting modifiers¶
| Form | Removes |
|---|---|
delete ImprovedBy "tech" |
All simple ImprovedBy lines with that tech, for every property. |
delete ImprovedBy Unit "tag" |
All ImprovedBy Unit "tag" lines. |
delete ImprovedBy InRange "missile" |
All ImprovedBy InRange "missile" lines. |
delete ImprovedBy Terrain "group" |
All ImprovedBy Terrain "group" lines. |
delete ImprovedBy ALL <Property> |
All simple ImprovedBy lines for that property (… Unit ALL <Property>, … InRange ALL <Property>, … Terrain ALL <Property> likewise). |
delete AffectedBy … |
Same forms, plus Explosion "explosion" and TargetInRange "missile". |
reset AffectedBy |
Every AffectedBy of the object. |
reset ImprovedBy |
Every ImprovedBy of the object. |
[RADAR] "STD Long Wave" MODIFY
delete ImprovedBy ALL Range // the LW_Mk2..Mk5 range lines, not the MaxHeight ones
ImprovedBy "LW_Mk3" Set Range 800
delete AffectedBy Unit "Bomber_Stealth_Bonus_Modifier_1"