quick questions about stealth/cloaking

quick questions about stealth/cloaking

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

quick questions about stealth/cloaking

Post by smoth »

is there a way to make aircraft NOT reveal stealth and cloaked units when they fly over?

When a unit is cloaked/stealth, is it possible to temporarily disable stealth/cloaking for a short period and then have it go on again once say 1 second has passed?

Not a part of stealth/cloaking but
Is there a way to make the unit NOT have a radar icon but still be the standard visible when in LOS?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: quick questions about stealth/cloaking

Post by Jools »

Here are some quick answers (mods may want to split them if they are off-topic):

2: lups does this by drawing a shader that only lasts for maybe a second when cloak is interrupted, even if the cloak setting itself never turns off.

3: The is MinimapNoDraw or something similar.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: quick questions about stealth/cloaking

Post by smoth »

1) the unit would be targeted if I just disable it's rendering.

2) I want the radar blips for that unit outside of los gone as well. Does this do that?

thanks in advance
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: quick questions about stealth/cloaking

Post by Google_Frog »

1) Yes. ZK has spherical decloak ranges but I forget how it is achieved and my quick look did not find it. I suspect it is a modrule or unitdef thing.

2) Jools is a bit wrong here. LUPs just tells players the location of affected cloaked units, it has no effect on unit behaviour or mechanics. Here is my solution:
https://github.com/ZeroK-RTS/Zero-K/blo ... amaged.lua
I replaced the old cloak state icon with one which exists purely to set the desired cloak state of a unit. Then I am able to modify the cloak state with lua without making the UI bad. You want GG.PokeDecloakUnit.

3) Stealth means that a unit does not show up on radar. All you have to do is set a unit to be stealthed indefinitely. I think there is a unitdef tag for this.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: quick questions about stealth/cloaking

Post by smoth »

yeah but IIRC stealth follows the same rules as cloaking, that is aircraft flies over and it is revealed.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: quick questions about stealth/cloaking

Post by FLOZi »

It will be revealed by LOS but shouldn't be revealed by radar under any circumstance afaik
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: quick questions about stealth/cloaking

Post by Jools »

Just remember to also use sonarstealth if you opt this route, or units will be visible by sonar...
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: quick questions about stealth/cloaking

Post by Google_Frog »

smoth have you tried and failed to implement 1) and 3)? The stealth tag is very simple and seems to be unbreakable. I do not actually know how to make units decloak when aircraft fly over.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: quick questions about stealth/cloaking

Post by smoth »

FLOZi wrote:It will be revealed by LOS but shouldn't be revealed by radar under any circumstance afaik
Awesome.

So now all I need to do is figure out how to stop aircraft from being able to fly over a cloaked unit and reveal it!

Google, in the past I played with cloaking/stealth but the aircraft flying over and revealing it stopped me from playing further. There is a possibility that has been changed since then :)
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: quick questions about stealth/cloaking

Post by Google_Frog »

It is worth testing again. I recall an engine change from many years ago which added spherical decloak.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: quick questions about stealth/cloaking

Post by FLOZi »

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: quick questions about stealth/cloaking

Post by smoth »

nope because I would not have guessed that tag name to search for it begin with nor would I assume shit works like it is described. See weapon emits bug where I was told to work around it using shot counts etc because at some point emitters were broken for beam lasers :(. Not that it matters, I did work around it and dropped the feature.. but I figured check here first rather than tag list as I was unaware that someone added the spherical tag.

even that being said, that doesn't change aircraft revealing cloaked units, it just adds a sphere.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: quick questions about stealth/cloaking

Post by Google_Frog »

So you want aircraft to not decloak things at all? I can see that being relevant if your aircraft fly low or you want really large decloak ranges. The feasibility of this depends on your parameters because I think large unit-in-sphere checks would be too slow to use for a luaed cloak system.

You need the tag that I describe here: http://springrts.com/mantis/view.php?id=2683
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: quick questions about stealth/cloaking

Post by FLOZi »

smoth wrote:nope because I would not have guessed that tag name to search for it begin with nor would I assume shit works like it is described. See weapon emits bug where I was told to work around it using shot counts etc because at some point emitters were broken for beam lasers :(. Not that it matters, I did work around it and dropped the feature.. but I figured check here first rather than tag list as I was unaware that someone added the spherical tag.

even that being said, that doesn't change aircraft revealing cloaked units, it just adds a sphere.
Come come, it is under the 'cloaking' section of tags :P
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: quick questions about stealth/cloaking

Post by smoth »

you would think but yeah, I am me.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: quick questions about stealth/cloaking

Post by Forboding Angel »

smoth wrote:is there a way to make aircraft NOT reveal stealth and cloaked units when they fly over?

When a unit is cloaked/stealth, is it possible to temporarily disable stealth/cloaking for a short period and then have it go on again once say 1 second has passed?

Not a part of stealth/cloaking but
Is there a way to make the unit NOT have a radar icon but still be the standard visible when in LOS?
1. Yeah, evo does it

Code: Select all

	-- Cloaking

	cancloak		             = true,
	cloakCost		             = 1,
	cloakCostMoving	             = 2,
	minCloakDistance             = 70,
	decloakOnFire	             = true,
	decloakSpherical             = true,
	initCloaked		             = false,
	
	-- End Cloaking
2. Yes

Code: Select all

int cloakTimeout Default: 128  
The minimum time, in frames, between a decloak and subsequent re-cloak.
3. Yes, evo does it for all mobile units. Enable stealth for each unit.
Post Reply

Return to “Game Development”