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

Engineer

From ModEnc
Jump to navigation Jump to search

For [General]

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: Engineer
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: InfantryTypes)
Default: none
Applicable to: General


Defines an InfantryType that will have a 25% chance to spawn from a destroyed building that has Factory=BuildingType.

Notes

However, Red Alert 2 (and Yuri's Revenge) do not distinguish between factions so the Engineer spawned will always be the infantry defined by this tag.

Bugs/Side-Effects/Unexpected Limitations

Because of a bad algorithm selling a building could go into an infinite loop. The game ensures to at most spawn one infantry unit having Engineer=yes set by just generating a new crew member until it has Engineer=no set. If there are only crew types (set in AlliedCrew=, Technician=, Engineer= and others) with Engineer=yes, this will never succeed and the game will freeze.

  • This bug has been fixed in Ares 0.3.

When Technician=, Engineer=, AlliedCrew= and others weren’t defined, the game crashed when a building was sold or destroyed. This was just because of oversights in both cases.

  • When selling, the flawed [InfantryType]Engineer=yes check happened before the crew type was verified to be set at all.
  • When destroyed, the game checked whether the crew type was set, but then went ahead and tried to write the name of the crew type to the debug log regardless of the result.
  • This bug has been fixed in Ares 0.3.

See Also

For InfantryTypes

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


Determines whether this InfantryType has the properties of an engineer, which allows that infantry to enter any structure that has BridgeRepairHut=yes set, capture any structure that has Capturable=yes set and to repair any structures owned by that player without Repairable=no.

Notes

In Red Alert 2 and Yuri's Revenge, this comes with the effect of forcibly disabling actively seeking targets, except if it is in an adjacent cell to a building with Overpowerable=true and the secondary weapon uses a warhead with ElectricAssault=yes, in this case, it will actively charge the building. and there does not include Attack Move. Therefore, it is best to use it in combination with PreventAttackMove=yes to prohibit it, just like the respective engineers of the three factions in vanilla. Otherwise, if such infantry possesses a weapon, it will actively use the weapon to attack nearby buildings instead of entering them.

This also prevents infantry with weapons from getting an Attack cursor[1] on any object[2], except if the weapon has a warhead with BombDisarm=yes set, in which case it will be able to target and successfully be used on objects that have an IvanBomb attached. Of course, for active attack actions that do not require cursor operation, there is no such restriction. Besides the actively charge and Attack Move mentioned above, for example is that as long as there is no CanRetaliate=no and the weapon can target the other party, it will actively retaliate against enemies using its own weapon, regardless of the weapon type.

Bugs/Side-Effects/Unexpected Limitations

If this infantry unit also has Occupier=yes, then although the repair function from Engineer=yes will be prioritized in cursor control, the unit will be unable to successfully enter target buildings, because in action control, the occupier action is actually executed, and if the target meets conditions such as CanBeOccupied=yes and is already damaged[3], then it will enter the building as a occupier.

Footnotes

  1. This takes precedence over AttackCursorOnFriendlies=yes, AttackFriendlies=yes, and Ivan=yes, etc.
  2. Weapons of any kind can be force-fired on the ground as long as their projectile does not have AG=no.
  3. Only when in damage can NoRepair (Index 190 (0-based) in mouse.sha.) EngineerRepair (Starting from index 150 to 169.)

See Also