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

Difference between revisions of "Disguise"

From ModEnc
Jump to: navigation, search
 
m (Added links)
Line 1: Line 1:
 
== Making disguised units (by DCoder) ==
 
== Making disguised units (by DCoder) ==
  
You noticed how the spy can disguise itself as an enemy infantry and walk right past the defenses (except dogs/yuri)? To achieve that, you'll need only a couple of tags and a special weapon. Firstly, add <tt>CanDisguise=yes</tt> and <tt>PermaDisguise=yes</tt> to the soldier's code. Then, add this to the weapon: <tt>Warhead=Snapshot</tt> . The warhead <tt>[Snapshot]</tt> is already present in the game, but if you are using a different one, you'll have to add <tt>MakesDisguise=yes</tt> to the warhead's code too.
+
You noticed how the spy can disguise itself as an enemy [[infantry]] and walk right past the defenses (except dogs/yuri)? To achieve that, you'll need only a couple of tags and a special weapon. Firstly, add <tt>CanDisguise=yes</tt> and <tt>PermaDisguise=yes</tt> to the soldier's code. Then, add this to the weapon: <tt>[[Warhead]]=Snapshot</tt> . The [[warhead]] <tt>[Snapshot]</tt> is already present in the game, but if you are using a different one, you'll have to add <tt>MakesDisguise=yes</tt> to the [[warhead]]'s code too.
 
Now how do you make other units detect disguised units? Easy, by adding <tt>DetectDisguise=yes</tt> to their code.
 
Now how do you make other units detect disguised units? Easy, by adding <tt>DetectDisguise=yes</tt> to their code.
 
That's all about infantry disguises.
 
That's all about infantry disguises.
  
Now for vehicle disguises, a.k.a. Mirage Tank. This kind of disguise requires <tt>CanDisguise=yes</tt>, but not <tt>PermaDisguise=yes</tt>. Also, the vehicle that uses it should not have a turret as the disguising logic can't turn two voxels into a single shp, so it'll end up with two trees - one for body, drawn at ground level, and one for turret, drawn on top of the first one.  
+
Now for vehicle disguises, a.k.a. Mirage Tank. This kind of disguise requires <tt>CanDisguise=yes</tt>, but not <tt>PermaDisguise=yes</tt>. Also, the vehicle that uses it should not have a [[turret]] as the disguising logic can't turn two [[voxel]]s into a single [[shp]], so it'll end up with two trees - one for [[body]], drawn at ground level, and one for [[turret]], drawn on top of the first one.  
If you want to let vehicles pick their own disguises, you once again need a warhead with <tt>MakesDisguise=yes</tt>, but since the Mirage Tank uses terrain objects instead of infantry as disguise, you also need to add <tt>TerrainFire=yes</tt> to the weapon, which makes the vehicle able to target trees and other terrain objects.
+
If you want to let vehicles pick their own disguises, you once again need a [[warhead]] with <tt>MakesDisguise=yes</tt>, but since the Mirage Tank uses [[terrain]] objects instead of [[infantry]] as disguise, you also need to add <tt>TerrainFire=yes</tt> to the weapon, which makes the vehicle able to target trees and other [[terrain]] objects.
  
<tt>AlliedDisguise=, SovietDisguise=, and ThirdDisguise= </tt> tags define which infantry the units with <tt>PermaDisguise=yes</tt> look as when the owner hasn't disguised them yet, for each side respectively.
+
<tt>AlliedDisguise=, SovietDisguise=, and ThirdDisguise= </tt> tags define which infantry the units with <tt>PermaDisguise=yes</tt> look as when the owner hasn't disguised them yet, for each [[side]] respectively.
  
 
<tt>DefaultMirageTankDisguises=</tt> defines a list of terrain objects that a <tt>CanDisguise=yes</tt> unit <i>without</i> <tt>PermaDisguise=yes</tt> will try to look like when it doesn't have a custom disguise.
 
<tt>DefaultMirageTankDisguises=</tt> defines a list of terrain objects that a <tt>CanDisguise=yes</tt> unit <i>without</i> <tt>PermaDisguise=yes</tt> will try to look like when it doesn't have a custom disguise.
  
So if you give a vehicle <tt>PermaDisguise=yes</tt>, it will look stupid - it will use the <tt>Allied/Soviet/ThirdDisguise</tt> instead of <tt>DefaultMirageTankDisguises</tt>, 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 <tt>WalkFrames=1</tt> and uses the first frames of the infantry SHP as it's walking animation). I think that by giving the infantry art sections the proper vehicle-style frame reference tags, you can make it look properly, but this still requires some testing.
+
So if you give a vehicle <tt>PermaDisguise=yes</tt>, it will look stupid - it will use the <tt>Allied/Soviet/ThirdDisguise</tt> instead of <tt>DefaultMirageTankDisguises</tt>, 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 <tt>WalkFrames=1</tt> and uses the first frames of the infantry SHP as it's walking animation). I think that by giving the infantry art sections the proper vehicle-style frame reference tags, you can make it look properly, but this still requires some testing.

Revision as of 15:40, 12 August 2004

Making disguised units (by DCoder)

You noticed how the spy can disguise itself as an enemy infantry and walk right past the defenses (except dogs/yuri)? To achieve that, you'll need only a couple of tags and a special weapon. Firstly, add CanDisguise=yes and PermaDisguise=yes to the soldier's code. Then, add this to the weapon: Warhead=Snapshot . The warhead [Snapshot] is already present in the game, but if you are using a different one, you'll have to add MakesDisguise=yes to the warhead's code too. Now how do you make other units detect disguised units? Easy, by adding DetectDisguise=yes to their code. That's all about infantry disguises.

Now for vehicle disguises, a.k.a. Mirage Tank. This kind of disguise requires CanDisguise=yes, but not PermaDisguise=yes. Also, the vehicle that uses it should not have a turret as the disguising logic can't turn two voxels into a single shp, so it'll end up with two trees - one for body, drawn at ground level, and one for turret, drawn on top of the first one. 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 also need to add TerrainFire=yes to the weapon, which makes the vehicle able to target trees and other terrain objects.

AlliedDisguise=, SovietDisguise=, and ThirdDisguise= tags define which infantry the units with PermaDisguise=yes look as when the owner hasn't disguised them yet, for each side respectively.

DefaultMirageTankDisguises= 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 DefaultMirageTankDisguises, 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). I think that by giving the infantry art sections the proper vehicle-style frame reference tags, you can make it look properly, but this still requires some testing.