Author Topic: Cooldown on Permanent Cloaking  (Read 1567 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Cooldown on Permanent Cloaking
« on: 13 July 2011, 07:01:48 »
It's possible to have a unit that has a permanent cloak (meaning they always have a cloak unless they use a decloaking skill (eg, they might be set so that when they attack, they become uncloaked) or are within the sights of a detector unit of the same cloak group). I had an interesting idea about having a unit that can only decloak by attacking, however, there was one slight issue: the moment they stopped attacking, they would instantly become "invisible" again. I propose a "cooldown" period for these decloak skills.

This would be XML specified, such as with <cooldown value="10" />, which would specify the time in seconds before the unit will be cloaked again once it finishes using that skill. So with that tag, for example, a unit that decloaks on attack will not be cloaked again for 10 seconds, so they cannot take out an entire base single handedly by letting the cloak resume after the attack, as well as it would work well with units that are meant to attack infrequently, eg, every 5 seconds.

Relatedly, another feature would be to prevent these cloaking units from regaining their cloak if under attack, and require a cooldown period of which they cannot be attacked in to cloak again. This could use <no-attacked-cloak value="true" length="10" />. The value would enable this (if false, they can regain their cloak even if under attack; if true, they cannot regain their cloak until they are no longer under attack). The length would be a cooldown period, in seconds, in which they cannot be attacked within in order to become cloaked again. If they get attacked, the timer restarts.

For example, a unit might have a decloaking skill on attack, so when it attacks, it's suddenly visible. The enemy will attack this unit, so even if it stops attacking, it will not regain it's cloak while under attack. If it kills the attacking enemy, it would have to wait ten seconds to regain that cloak.

Without this, cloaking without a detector will be hampered. I plan to make use of such a feature, if implemented, in Apocalyptic Dawn by having a sniper that has very potent cloaking and cannot be seen until he attacks (though I may have to give the short-sighted Headquarters a detector to prevent the abuse of them for spying on bases). The entire point of snipers is to remain hidden until after they snipe. Of course, once he pulls that trigger, he's vulnerable (the US, if I recall, has a system that can locate a sniper instantly based on the sound waves). This could also be applied to a sniper perch defensive structure, allowing them to be hidden until they decide to pull the trigger (it is a camouflaged post).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Cooldown on Permanent Cloaking
« Reply #1 on: 13 July 2011, 13:05:47 »
Interesting idea.

The cooldown for decloaking on skills can just be an attribute in the de-cloak node,
Code: [Select]
    <de-cloak skill-class="attack" cooldown="10" />

The second part will be a bit tricky to implement, I'll think on it...
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Cooldown on Permanent Cloaking
« Reply #2 on: 13 July 2011, 18:20:16 »
Interesting idea.

The cooldown for decloaking on skills can just be an attribute in the de-cloak node,
Code: [Select]
    <de-cloak skill-class="attack" cooldown="10" />

The second part will be a bit tricky to implement, I'll think on it...
That could work well too, and would allow different skills to have different cooldowns (perhaps a silenced gunshot would have a much shorter cooldown than a regular one?). The first part is the important part, the second part is more a wanna-be that could be more advanced.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything