Jump to content

Disguise Logic: Difference between revisions

From ModEnc²
BlackgamerzVN (talk | contribs)
No edit summary
BlackgamerzVN (talk | contribs)
mNo edit summary
Line 35: Line 35:
The only disguising vehicle in the unmodded game is the Mirage Tank. This kind of disguise requires {{f|CanDisguise|yes|link}}, but not {{f|PermaDisguise|yes|link}}. Also, the vehicle that uses it should not have a [[turret]] or a [[barrel]] as the disguising logic can't turn several [[voxel]]s 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.
The only disguising vehicle in the unmodded game is the Mirage Tank. This kind of disguise requires {{f|CanDisguise|yes|link}}, but not {{f|PermaDisguise|yes|link}}. Also, the vehicle that uses it should not have a [[turret]] or a [[barrel]] as the disguising logic can't turn several [[voxel]]s 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:. Mirage Tank can now retain their core functionality whilst having Turret and Barrel with Ares. For more information, see: [https://ares-developers.github.io/Ares-docs/bugfixes/type2/miragelogicwithturretsbarrels.html| Mirage logic with Turrets/Barrels]
* Note: Mirage Tank can now retain their core functionality whilst having Turret and Barrel with Ares. For more information, see: [https://ares-developers.github.io/Ares-docs/bugfixes/type2/miragelogicwithturretsbarrels.html| Mirage logic with Turrets/Barrels]


If you want to let vehicles pick their own disguises, you once again need a [[warhead]] with {{f|MakesDisguise|yes|link}}, but since the Mirage Tank uses [[TerrainTypes|terrain objects]] instead of infantry as disguise, you will also want to add {{f|TerrainFire|yes|link}} to the weapon, which makes the vehicle able to target trees and other terrain objects without having to use force-fire.
If you want to let vehicles pick their own disguises, you once again need a [[warhead]] with {{f|MakesDisguise|yes|link}}, but since the Mirage Tank uses [[TerrainTypes|terrain objects]] instead of infantry as disguise, you will also want to add {{f|TerrainFire|yes|link}} to the weapon, which makes the vehicle able to target trees and other terrain objects without having to use force-fire.

Revision as of 10:01, 4 April 2025

Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
Flag: Disguise Logic
File(s): Rules(md).ini
Values: Strings (names of InfantryTypes)
Default: none
Applicable to: General


The Disguise mechanic has been around since Red Alert for the Allied spy, and persists right through to Yuri's Revenge.

The summary below will focus on YR functionality as it is more extensive.

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, which is the case when there is no enemy InfantryTypes on the map. In game this is applied to vanilla Allied Spy.

  • To periodically remind the player of a unit's disguised status, the unit's original image will briefly appear to its owner before reverting to its disguise.

The automatic disguise of said Infantry is automatically assigned to Owner unit, and utilized when a faction outside of Allied side captured their Barrack whilst having their Battle Lab in the vanilla game. The disguises are as follow:

  1. AlliedDisguise= will show enemies the specified unit as an Allied player
  2. SovietDisguise= will show enemies the specified unit as a Soviet player
  3. ThirdDisguise= (YR only) will show enemies the specified unit as a Yuri Country player

If a disguise is acquired on enemy unit, enemy combat units and structures will not target them until manually ordered so by player.

  • Alternatively, TechnoTypes with DetectDisguise=yes can auto acquire and damage them. In vanilla they are applied to Attack Dogs and Yuri's Clone. This tag is not functional in Tiberian Sun.

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.

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.

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).

In base RA2 Mirage Tank disguising as tree can't be targetable until revealed, whilst Yuri's Revenge disabled that. Modders can decide whenever to make Mirage tank disguising as tree is targetable or not by setting TreeTargeting=. Keep in mind the effect of this tag works differently in YR comparing to base RA2.

  • Note #2: It is remain unknown if Vehicles can take an image of another VehicleType as disguise. Proceed carefully as it may cause unforseen behaviors and other issues.