An attempt at an anti-stealth device

A place to discuss mods in development and concepts for new mods.
Post Reply
Arkheias
Commonwealth Pilot
Commonwealth Pilot
Posts: 95
Joined: Mon Jun 02, 2014 8:06 pm

I've been working on a new series of devices (for the next update to my Cabbage Corp mod) that would increase a ship's ability to detect objects with a high stealth rating and/or objects that are far away. The device seems to work for npc ships, in that it appears to modify their stored perception values correctly (I am not going to attempt a behavioral analysis of npc with different perception values to see if this causes them to react differently in the presence of antagonistic stealth ships.), but the main functions: (shpGetAISetting gSource 'perception), (shpSetAISetting gSource "perception" someValue) always return Nil for a playership.

I have checked, and altering the perception value in an <AISettings> block for a playership seems to correctly change the distance at which stealth ships become visible to the player controlling said playership. As far as I can tell the game only checks that value once, then all future attempts to retrieve or modifiy it are ignored. My theory is that the perception value is moved to some alternative location once a ship is recognized as being a playership and then all AISettings for that ship are ignored for future functions. I have tried to access a perception value using shpGetDataField, objGetDataField and typGetDatafield but none of them return a value for a "perception" data-field.

I have included a copy of the xml data for the theoretical anti-stealth device in question. All names, descriptions and values are subject to change. I would greatly appreciate any help with getting this device to work for playerships or just confirmation that it is currently impossible and that all hope is lost and whatnot.

Code: Select all

<?xml version="1.0" ?>
<TranscendenceModule>

<!-- ================================================================ -->
						<!-- DRADIS Base Device -->
<!-- ================================================================ -->

<!-- DRADIS Base Class -->

	<ItemType UNID="&baCCDRADISBase;"
			name=				"(DRADIS base class)"
			virtual=			"true"
	>
		
		<Events>
			<CanBeInstalled>
				(switch
					(not (not (objGetItems gSource "dI +cabbageDRADIS")))
						(block Nil
							(objSendMessage gSource Nil "You cannot install another DRADIS module as it will interfere with the one currently installed.")
							"You cannot install another DRADIS module as it will interfere with the one currently installed."
						)
					True
				)
			</CanBeInstalled>
			
			<OnEnable>
				(block Nil
					(objSetData gSource "CCShipBasePerception" (shpGetAISetting gSource 'perception))
					(shpSetAISetting gSource "perception" 
						(max 
							(add 
								(objGetData gSource 'CCShipBasePerception)
								(@ (itmGetStaticData gItem "CCDRADIS")'addPerception)
							)
							(@ (itmGetStaticData gItem "CCDRADIS") 'minPerception)
						)
					)
				)
			</OnEnable>
			
			<OnDisable>
				(shpSetAISetting gSource "perception" (objGetData gSource 'CCShipBasePerception))
			</OnDisable>
		</Events>
	</ItemType>
	
<!-- ================================================================ -->
						<!-- DRADIS Devices -->
<!-- ================================================================ -->

	<!-- mark I DRADIS module -->

	<ItemType UNID="&itCCMIDRADISModule;"
			name=				"mark I DRADIS module"
			attributes=			"cabbageCorp, cabbageDRADIS, majorItem, specialty"
			inherit=			"&baCCDRADISBase;"
			
			level=				"5"
			frequency=			"veryrare"
			
			value=				"6000"
			mass=				"4000"

			description=		"This device increases the effective perception of a ship's targeting systems, increasing the range at which it can detect hidden objects in space."
	>

		<Image imageID="&rsCCItems;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
		
		<MiscellaneousDevice
				powerUse=		"20"
		/>
		
		<StaticData>
			<CCDRADIS>
				{minPerception:3 addPerception:1}
			</CCDRADIS>
		</StaticData>
	</ItemType>
	
</TranscendenceModule>
Cabbage Corp, the only mod with cabbages!

Please feel free to submit bug reports or issues related to the Cabbage Corp mod on the GitHub page, the forum thread, in a private message or even on the Xelerus page. Suggestions are fine too.
bzm3r
Militia Lieutenant
Militia Lieutenant
Posts: 100
Joined: Tue Oct 23, 2012 2:38 pm

Hi. Most likely you've figured out flavour text reasons for why stealth/anti-stealth devices exist, but I just wanted to say that I had looked into the matter a bit myself, and come to the following conclusions:

1) most likely, sensors in space are all about detecting energy radiated away from the object via electromagnetic radiation (EM radiation), or detecting EM radiation (from an emitting source) reflected by zero-emission/low-emission objects (e.g. the moon reflects the EM radiation of the sun)

2) the energy, "per packet" of the EM radiation determines what "type" of EM radiation it is: ranging from super high energy gamma rays to low energy radio waves.

3) the parameters that control how prone to detection an object is are its size, reflectivity, and distance from the sensor: if an object is large, and emits medium energy-per-packet radiation, it can be more detectable than a small high energy-per-packet emitting object because the larger object may simply end up emitting more energy over its surface area; if an object is absorbent (i.e. not reflective), then it will be less detectable than an object that is reflective; if an object is far away, then it will be less detectable than an object that is closer (I think 1/x^2 laws apply again?)

3) super awesome sensors might be able to detect EM radiation over the entire spectrum, but this isn't a technologically trivial task: some sensors might good at detecting radiation from a certain portion of the EM spectrum, but they might totally suck at deciphering the direction from which it came; alternatively directions might be easy to determine for a sensor, but only for the limited portion of the EM spectrum over which it can detect; directionality detection also plays a role in "resolution" -- two objects that are close by might end up being detected as a single object by a sensor that isn't quite able to finely separate out signals


So, in conclusion, one could develop justification for stealth/anti-stealth with the following principles in mind:

Stealth:

[*] can some technology be used to reduce the amount of energy radiated by an object (perhaps only during certain time periods)?
[*] can some technology be used to reduce the amount of energy reflected by an object (perhaps only during certain time periods), either by absorbing the incoming radiation, or diffusing over many directions?
[*] can some technology be used to confuse certain sensors as to the size/type of the object (maybe purposefully generate more energy, and emit it in a way that makes it seem like you are a bigger/more-dangerous object)?

Anti-stealth

[*] can some technology be used to increase the portion of the EM spectrum over which a sensor is able to detect radiation?
[*] can some technology be used to increase the sensitivity of a sensor over a certain range of the EM spectrum (i.e. its somehow able to catch very few "energy packets" (photons) and still make sense of the data)?
[*] can some technology be used to increase the "resolution" of the sensor? (how close do two objects have to be before they start being confused for one object?)
[*] can some technology be used to actively emit high enough radiation in order to bounce it off of wannabe-stealthy objects? (this would make the active source very detectable)

Anyway, I think stealth/anti-stealth warfare can be a very interesting game mechanic!
Post Reply