UnitRepair
| Flag: | UnitRepair |
| File(s): | rules(md).ini |
| Values: | Boolean values: yes or no, true or false, 1 or 0 |
| Default: | no |
| Applicable to: | BuildingTypes |
If set to yes, VehicleTypes are able to dock with this structure and get repaired. Repair rate and cost is determined by the [General]→URepairRate= and [General]→RepairStep= flags.
Notes
Such buildings also come with an effect that allows selling vehicles during repair, as long as those vehicles can dock and move to the building's center cell. For [NADEPT], in the vanilla version, which uses a 4x3 foundation and other settings, there is no true 'center' cell. The cursor hovering over the vehicle will display as SellUnit (in mouse.sha from frame 139 to 148). This feature was removed in Yuri's Revenge version 1.001, but Ares has restored it.
- Ares 3.0 changes the logic to work with a unit's individual dock position on each building instead.
The AI is extremely dumb about using repair bays of any kind - it will blindly send Kirovs and Siege Choppers there despite the fact that they can never actually get repaired, and it will not differentiate between a land-based and water-based repair bay when a unit can reach both (e.g. Robot Tank). In some cases, a non Naval unit will enter a Shipyard for repairs, but the Shipyard will not repair it. So, it would be wise not to give the AI any repair bays.
For Yuri's Revenge, if you use this flag on Bio Reactor, it will allow InfantryTypes to enter Bio Reactor only if it receives the damage.
Bugs/Side-Effects/Unexpected Limitations
- In unmodded Red Alert 2 and Yuri's Revenge, this flag is commented out from the entries for the Allied Airforce Command Center and its American equivalent, along with a comment
;gs this is part of reloading + being an aircraft (Repair code is oogly, only Reload got rewritten for four ports.).
- The comment fails to mention any bugs, but reenabling it on such a structure will have adverse side-effects and even cause an Internal Error - when an AI's unit is damaged, it will attempt to find the closest structure it has with this flag enabled (regardless of whether the unit can actually enter it), and send the unit there for repairs. If that destination structure happens to be an airpad, the game will enter an infinite loop and crash.
- In addition to this, even aircraft that can legitimately land in this structure will trigger its repair loop after landing, and this loop will kick them off once they're fully repaired, meaning that an aircraft sent to dock with such a structure will never manage to do it.
- When a vehicle with BalloonHover=yes and its weapon's projectile has Vertical=yes is ordered to attack a building with UnitRepair=yes, it will not actively approach the target if it is beyond weapon's Range.
References
With Ares, selling units when they dock at buildings like Repair Depots can be disabled per structure, and specific units can be made unsellable on dock structures. Refer to Ares documentation.
See Also
- Unsellable
- UnitSell (Ares Only)
- UnitsUnsellable (Ares Only)