ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

DamageParticleSystems

From ModEnc
Revision as of 18:47, 10 October 2020 by Crimsonum (talk | contribs) (Made the infantry spark bug more specific.)
Jump to navigation Jump to search


Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: DamageParticleSystems
File(s): Rules(md).ini
Values: Comma-separated list of strings. (Limited to: ParticleSystems IDs)
Default: none
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes



Specifies a list of ParticleSystems to spawn randomly when this object is damaged. Only particle systems with BehavesLike=Smoke or BehavesLike=Spark are eligible to be selected.

The spawned particle systems are attached to the owner object, and they are removed automatically when the owner is removed from the map.

BehavesLike=Smoke

A smoke particle system is created when a unit or structure is damaged and it enters yellow or red health (there has to be a change) and doesn't have a smoke particle system attached already. If the unit is below ground level, no particle system is created.

The smoke particle system is removed when the object is repaired back into green health by either a service depot, a repair weapon or self-heal, or by upgrading or using click repair on buildings. Other logics might not remove the particle system and it will stay active until it expires.

BehavesLike=Spark

Particle systems are created with a probability of either ConditionYellowSparkingProbability or ConditionRedSparkingProbability, depending on the health of the unit. If there is a spark particle system attached to the unit already, or the unit is below ground level, no particle system is created.

Spark particle systems are removed when they expire.

Bugs/Side-Effects/Unexpected Limitations

InfantryTypes can only use spark-like particles, and only if the type has Cyborg=yes set and the type's section is present in the map file. You must also include DamageParticleSystems for those types in the map. If both the type section and the flag are not defined in the map file, damage sparks will be disabled. This is a hardcoded behavior and it is not possible to enable this setting manually.

For example, if an infantry of the type [CYBORG] has DamageParticleSystems=SparkSys, you must insert this bit of code into any map file where you want the spark particles to appear:

[CYBORG]
DamageParticleSystems=SparkSys

Yuri's Revenge and Deactivated Units

Units like the Robot Tank constantly spawn a spark particle system when deactivated. This cannot be controlled with this tag. It always is [CombatDamage]DefaultSparkSystem=.

Myths

The behavior of this tag, especially the restriction on BehavesLike, is the same in Tiberian Sun, Firestorm, Red Alert 2 and Yuri's Revenge.