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

ShrapnelWeapon

From ModEnc
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: ShrapnelWeapon
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: Weapons)
Default: none
Applicable to: Projectiles


If set, the warhead will fire this weapon upon detonation, from the impact point, if the impact point is not inside a structure. The amount of shots to fire is set by ShrapnelCount=.
This is used for the Prism Tank reflection effect.

The working mechanism of ShrapnelWeapon is as follows: When there are InfantryTypes, VehicleTypes, AircraftTypes and TerrainTypes on the ground of the cell where the explosion occurs (meaning that attacks against aerial units or units on elevated bridges are actually judged based on the situation in the cell directly below), it generates the quantity determined by ShrapnelCount. If the weapon's Range >1.0, it uses the same method as CellSpread to search for available non-ally house targets (including BuildingTypes in addition to the aforementioned items) within Range according to the lookup table order (ignoring target's Immune=bool and Armor attributes). If there are remaining shrapnel after assigning one shrapnel to each target, the excess shrapnel will randomly select cells within a 2-cell radius (5x5 area) around the explosion point (without checking for ally objects on the cells at this stage).

Notes

Like with AirburstWeapon, this weapon has to be attached to some (potentially dummy) unit, so that the game loads this weapon at startup time. Failing to do so will result in Internal Errors whenever the shrapnel effect is supposed to fire.

Unlike AirburstWeapon, these weapon is specifically support the rendering of two visual effects: Laser and EBolt (include IsAlternateColor).

When the warhead of the parent weapon has any of the following flags:

  1. MindControl=yes
  2. IvanBomb=yes
  3. BombDisarm=yes
  4. ElectricAssault=yes
  5. DirectRocker=yes (only when the target is VehicleType)
  6. Parasite=yes
  7. Temporal=yes
  8. IsLocomotor=yes
  9. Airstrike=yes
  10. MakesDisguise=yes
  11. NukeMaker=yes

It will not trigger the ShrapnelWeapon.

Bugs/Side-Effects/Unexpected Limitations

Due to the program's processing method, paratroopers in descent and units falling from destroyed bridges are also recognized as valid targets.