Disguise Logic
|
|
|
|
|
|
| Flag: | Disguise Logic |
| File(s): | Rules(md).ini |
| Values: | Strings (names of InfantryTypes) |
| Default: | none |
| Applicable to: | General |
Disguise mechanic is added since Red Alert 1 for the Allied spy and persists ever since until Yuri's Revenge
this page will primarily consists of Red Alert 2 Yuri's Revenge's functionality as it is more extensive. Perhaps we will need RA1 and TS/FS modders to uncover this further on their side.
Infantry Disguises (RA2 & YR)
By default, InfantryType with PermaDisguise=yes and CanDisguise=yes can automatically disguise as enemy basic infantries if its [MakeUpKit] weapon is not used. In vanilla game this is applied to vanilla Allied Spy, used to instantly send the Spy to player's base if Brutal mode is enabled.
the automatic disguise of said Infantry is as follow:
- If viewed by player on Allied side, it will be viewed as defined InfantryType's image on AlliedDisguise=
- If viewed by player on Soviet side, it will be viewed as defined InfantryType's image on SovietDisguise=
- If viewed by player on Third side (Yuri), it will be viewed as defined InfantryType's image on ThirdDisguise=
Vehicle Disguises (RA2 & YR)
The only disguising vehicle in the unmodded game is the Mirage Tank. This kind of disguise requires CanDisguise=yes, but not PermaDisguise=yes. Also, the vehicle that uses it should not have a turret or a barrel as the disguising logic can't turn several voxels into a single shp, so it'll end up with multiple trees - one for vehicle body, drawn at ground level, one for turret, drawn on top of the first one, and optionally one for barrel.
Note: Ares fixed that. Mirage Tank can now retain their core functionality whilst having Turret and Barrel [Mirage logic with Turrets/Barrels]
If you want to let vehicles pick their own disguises, you once again need a warhead with MakesDisguise=yes, but since the Mirage Tank uses terrain objects instead of infantry as disguise, you will also want to add TerrainFire=yes to the weapon, which makes the vehicle able to target trees and other terrain objects without having to use force-fire.
AlliedDisguise, SovietDisguise, and ThirdDisguise (YR only) tags define which infantry the units with PermaDisguise=yes look as when the owner hasn't disguised them yet, for each side respectively.
DefaultMirageDisguises defines a list of terrain objects that a CanDisguise=yes unit without PermaDisguise=yes will try to look like when it doesn't have a custom disguise.
So if you give a vehicle PermaDisguise=yes, it will look stupid - it will use the Allied/Soviet/ThirdDisguise instead of DefaultMirageDisguises, end up looking like an infantry, and because SHP vehicles (SHP is the only way infantry can look like) use a different method to reference proper art frames, you'll see a GI with his gun spinning around as the tank moves (the game then sets WalkFrames=1 and uses the first frames of the infantry SHP as it's walking animation).
Note #2: It is remain unknown if Vehicles can take an image of another VehicleType as disguise. If you see the note on Bugs in original ModENC that said otherwise. Take it with a grain of salt.





