Skip to content

TargetSpecialThreatCoefficient

Weights a candidate target by the SpecialThreatValue of that candidate's type.

Specification
Applies to
AircraftTypeBuildingTypeInfantryTypeUnitType
File
rules.ini
Section
[<ObjectType ID>]
Value
floating point
When omitted
ComputedTakes the value of TargetSpecialThreatCoefficientDefault in [General], which is itself 0 when that key is absent too.

The coefficient multiplies the candidate type’s SpecialThreatValue, a value that exists only to be weighted here. The coefficient comes from the type of the object doing the choosing. Set it positive on types that should hunt whatever a mod marks with a high SpecialThreatValue, and negative on types that should avoid it.

rules.ini
[MYHUNTER] ; example UnitType
TargetSpecialThreatCoefficient=1
[MYPRIZE] ; example UnitType worth hunting
SpecialThreatValue=50

With these values, MYHUNTER adds 50 to the threat score of every MYPRIZE it considers.

See also — target-selection