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

Bunker

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: Bunker
File(s): rules(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: no
Applicable to: BuildingTypes


Specify that this building is a Tank Bunker, just like Yuri's one in vanilla. After entering, the vehicle will receive a series of bonuses.

Notes

When a vehicle enters this building, it plays the sound specified by [AudioVisual]BunkerWallsUpSound=; when it leaves, it plays the sound specified by [AudioVisual]BunkerWallsDownSound=.

When a vehicle has entered a building, it will read the flag under the ***Tank Bunker*** section:

For a vehicle to be able to enter this building, at least one side of it must be longer than 1 cell. That is, a building with Foundation=1x1 will allow the vehicle to initiate the enter command and approach, but it cannot actually enter the building.

  • A normal Tank Bunker will stutter when a vehicle enters it, but if this building also has ConstructionYard=yes, then its entry process will be incredibly smooth. If one of your Tank Bunkers always fails to enter due to having too large a Foundation, then you can try this.
  • Additionally, it is necessary to ensure that the vehicle can drive to the required position, so things like NumberImpassableRows should be used to make the building have passable parts.

If this building has weapons and is firing when entered, it will stop firing but retain the target, and resume attacking the original target when the vehicle leaves the building.

In any case, the Tank Bunker can only enter one vehicle, and it does not check NumberOfDocks, no matter if you set it to 0, 9, or anything else.

Unit attack determination will have an additional check for vehicles in a bunker. If a unit's weapon range is less than 384 leptons (1.5 cells)[3], then that weapon will be prohibited from acquiring the Attack cursor on vehicles inside the bunker.

If a vehicle successfully enters the building, it will stop at the center-most position, with its body facing due south (bottom-left of the screen). For buildings with even side lengths, this will occupy the cell biased towards the bottom of the screen, while the actual position moves half a cell in the opposite direction, and it is corrected back to the correct position when the vehicle exits the building.

Bugs/Side-Effects/Unexpected Limitations

If it is a building with an odd side length, this position correction will cause an error in the actual position after the unit leaves the building, meaning that the center of the cell it occupies is not the center of its entity. This will cause functions that rely on cell judgment to malfunction, for example, vanilla Arcing projectiles will attack the wrong position, making such units appear to have 100% evasion.

Lasher Light Tank with misaligned coordinates after leaving the Tank Bunker with an odd side length.

This cannot be used together with other entry logics like InfantryAbsorb.

  • Firstly, in this case, InfantryAbsorb=yes will allow UnitAbsorb to work, and its default value is no, preventing vehicles from entering.
  • But even if UnitAbsorb=yes is set also[4], it will still cause the vehicle to only attempt to enter the building but never actually enter.

Footnotes

  1. Actually, it performs division on the rearm time, thus it is multiplication for the firing rate, meaning the larger this value, the higher the firing frequency.
  2. Note that this is not multiplication but addition.
  3. This might be a special handling for melee units, or more accurately, it might be targeted at Yuri Brute.
  4. If the building does have Passengers settings, it will prioritize that, and when it cannot hold more passengers, it will revert to the above behavior.

References

Starting from Phobos Build#48, the bonuses provided by the Tank Bunker and the sound effects for entering/exiting the Tank Bunker can be customized on the building itself. Refer to Phobos documentation.

  • Currently, this does not include BunkerWeaponRangeBonus.

See Also