The new cloaking unit ability is now complete, and ready for some more extensive testing.
Windows people can get the
latest snapshot (rev 1004)Linux people all know how to compile programs themselves, so they'll be fine
You may experience graphical issues related to the new experimental shader code, if so, please open glestadv.ini and set
RenderUseShaders=falseThe
trac ticket has three addons attached, these are mutually exclusive, only put one at a time in your addons.
The first addon makes daemons invisible with a 'permanent' cloak, which is deactivated while the daemon is attacking, the XML looks like this,
<cloak type="permanent">
<de-cloak skill-class="attack" />
</cloak>
de-cloak nodes can specify an entire 'skill-class' or a specific 'skill-name', <de-cloak> nodes are valid for all cloak types and multiple de-cloak nodes can be used.
The second addon, invisible_daemons_v2, gives daemons an 'energy' cloak,
<cloak type="energy" cost='20'>
<image path="images/daemon_cloaked.png" />
<cloak-sound path="sounds/cloak.wav" />
<de-cloak-sound path="sounds/decloak.wav" />
</cloak>
The 'cost' is specified for the same interval as regeneration (once per second at normal game speed). <cloak-sound> and <de-cloak-sound> are supported for all cloak types, <image> is only needed for energy cloaks, and is the command button used to toggle the cloak on/off.
v2 also makes summoners 'detectors',
<detector value='true'/>
invisible_daemons_v3, gives daemons an 'effect' cloak,
<cloak type="effect">
<cloak-sound path="sounds/cloak.wav" />
<de-cloak-sound path="sounds/decloak.wav" />
</cloak>
<tags>
<tag value="daemon"/>
</tags>
The new <tags> in the unit parameters node allow you tag unit types, this feature will allow numerous things in the future, and was addded early to restrict the targets of an effect.
You should still set target='ally' in the effect/emanation tag, you can then use tags to further refine the potential targets.
The summoner in v3 has an emanation which cloaks nearby daemons,
<emanations>
<emanation name="hide_daemons" bias="beneficial" stacking="overwrite"
target="ally" chance="100.0" duration="2" radius="7">
<affect value="daemon" />
<flags>
<causes-cloak/>
</flags>
</emanation>
</emanations>
The new <affect> node is used to restrict this Effect to units tagged as 'daemon', in this case, just daemons.
The new flag <causes-cloak/> will trigger an 'effect' cloak on the target, if the target does not have an effect cloak, it will do nothing.
The new cast-spell command can also be used to make an 'invisibility' spell to make the caster invisible, spells to target other units or areas are due to be implemented sometime in the not to distant future.
Note: Units can have only one cloak type.
Enjoy, and please feel free to post questions and/or feedback here.