• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Replicating Red Alert Spy Disguise

GOAL
This tutorial aims to allow you to replicate the disguise ability used by Spies in Red Alert 2 and Red Alert 3. This also extends to Saboteur and Infiltrator from Mental Omega.

KNOWLEDGE REQUIRED
  1. Basic Knowledge of Trigger Editor
  2. Basic Knowledge of Object Editor
  3. Some of your time
TOOLS REQUIRED
  1. World Editor patch 1.32+
  2. Warcraft III patch 1.32+
TABLE OF CONTENT
  1. Introduction
  2. Major Notes Prior to Start
  3. Setting Up the Object Editor
  4. Setting Up the Trigger Editor
  5. Additional Notes
Introduction
Spies in Red Alert is a vital Allied unit that can disguise as enemy troops, and infiltrate enemy buildings to provide the spy owner additional advantage. They are unarmed and rely on their disguise to avoid combat. Today, we will replicate this effect into Warcraft III with the power of the new Skins natives and good old Mechanical Critter.​

Major Notes Prior to Start
This tutorial will not explain where is what, since you are assumed to know where to find X or Y in both Object Editor and Trigger Editor. This method also has one major limitation: it relies on abusing the Mechanical Critter's ability to attain the perfect replication, which by its own is very limiting. If you aim to have the spy unit trainable, then this will require additional workarounds (which is not part of the tutorial but hints to handle this pickle will be thrown at the last section).​

Setting Up the Object Editor
There are several pieces of stuff in the object editor we need to do before start triggering our Spy's disguise.​
  1. Prepare your Spy and Lead Spy unit. The Lead Spy will be the one spawning the Spy unit via Mechanical Critter. I use Spell Breaker for Lead Spy and Footman as Spy.
    MechCrit.PNG
  2. Create an ability based on Chaos. If you use the Siege Engine variant, make sure to remove Barrage from the requirement. Refer to the image below for an example.
    Disguiser.PNG
  3. Create another ability based on Channel. This is the selector ability that is used by the player to select the target disguise. Refer to the image below for necessary configurations.
    Disguise.PNG
  4. Add the ability from step 3 to your Spy. Step 2 will be relevant during the trigger section.

Setting Up the Trigger Editor
There's quite a number we need to do here. To start off, we will begin with the clickable Disguise ability (the one based on the channel ability). Below is the minimum trigger needed to create a visual replica of the target.​
  • [/INDENT]
  • [INDENT]Disguise[/INDENT]
  • [INDENT] Events[/INDENT]
  • [INDENT] Unit - A unit Starts the effect of an ability[/INDENT]
  • [INDENT] Conditions[/INDENT]
  • [INDENT] (Ability being cast) Equal to Disguise[/INDENT]
  • [INDENT] Actions[/INDENT]
  • [INDENT] Unit - Set Unit Skin of (Triggering unit) to (Skin ID of (Target unit of ability being cast))[/INDENT]
  • [INDENT] Unit - Change color of (Triggering unit) to (Color of (Owner of (Target unit of ability being cast)))[/INDENT]
  • [INDENT]
This trigger will change the unit skin (visual) to match the target, and of course, we also change the color for good measures (cause the only thing an opposition faction color does is marking a big red target on the spy's head). If you wanna be a bit pickier, you can also change the name, HP (though that could be problematic, but eh, whatever), MP, and so on.​
Now, if we just plug this into our spy and call it a day, there will be one big problem: the Enemy will auto-attack the spy, even if they look friendly. This is where the whole mechanical critter section comes in. We need to prepare another trigger.​
  • [/INDENT]
  • [INDENT]Spy Enter[/INDENT]
  • [INDENT] Events[/INDENT]
  • [INDENT] Unit - A unit Spawns a summoned unit[/INDENT]
  • [INDENT] Conditions[/INDENT]
  • [INDENT] (Unit-type of (Summoning unit)) Equal to Lead Spy[/INDENT]
  • [INDENT] Actions[/INDENT]
  • [INDENT] Unit - Add Object Editor Step 1 Ability to (Summoned unit)[/INDENT]
  • [INDENT]
Remember the whole chaos shenanigan we set up at the start? Since Mechanical Critter is very limiting, we can cheat this with the Chaos ability to change the critter to the unit we need. This is a problem if the unit has multiple summoning ability, so if that's the case, have a dummy unit do the critter summoning job instead.​
DONE! Now place your "Lead Spy" and test the map. You can scatter random owned units for example to see it in action.​

Additional Notes
  1. If you use Footman as the base for Spy like my example, you'll notice that the unit is still attacked in combat if the Footman attacks the enemy. This can be fixed by removing the attack ability (if one wants to preserve the UI information) or disable attacking for the Spy altogether.
  2. In case of multiple spawn ability owned by the Lead Spy, use this format: Lead Spy cast dummy ability -> spawn a dummy -> dummy cast mechanical critter -> have trigger detect dummy cast -> change critter to spy.
  3. The Order for Mechanical Critter is "mechanicalcritter" and seems to not possess a GUI equivalent. This action can be used to order a unit to force cast it: call IssueImmediateOrderBJ( unit, "mechanicalcritter" ) with unit replaced with proper unit data.
 
Last edited by a moderator:
Amazing! Always dreamt of remaking this mechanic in Warcraft III.

Shame that it only works in patches above 1.32 :c

There's a problem though, which requires more workarounds: Say you have three FFA players, all hostile to one another. If player 1 has a spy disguised as a P2 unit, P3 units will still ignore the spy because Mechanical Critter makes the spy seem neutral to everyone else. Maybe we need to trigger auto-attack in this case, albeit, it might seem too long-winded for this tutorial?

By the way, a minor issue: if I am not mistaken, the Chaos ability turns temporary stat changes (e.g. aura movement speed bonus, aura armor bonus) into permanent changes whenever added/applied. Maybe consider telling users to remove aura bonuses (and drop items), or at least a heads-up?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Wouldn't it better to:
1. Make an ability based on channel
2. When ability is cast, create the unit. This would replace your "a unit is summoned" trigger

Since you can change the base order id of channel this solution is more universal.
You could also add the disguise ability to the spy in the object editor.
 
Wouldn't it better to:
1. Make an ability based on channel
2. When ability is cast, create the unit. This would replace your "a unit is summoned" trigger

Since you can change the base order id of channel this solution is more universal.
You could also add the disguise ability to the spy in the object editor.
Blizzard lacks native to prevent a unit from being auto-acquired by enemies with exception of Mechanical Critter ability. Units created via trigger will remain auto acquired.

Yes, one can use dummy and have another ability (or heck, trainable unit) for the spy lead unit, but you will in the end do the mechanical Critter trick to accomplish the not auto acquired part of the code.

Only alternative I know is, if one is insane enough, is to rewrite the whole auto-acquire system with their own.
 
Top