Lua changes on Sensor, seen by AI

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Lua changes on Sensor, seen by AI

Post by Parel803 »

A question, not sure if I'm suppose to ask it in this forum.
I've changed on a unit the sensor suite via lua. Made 2 attackers inbound from the other side with ASM's, did that in a attack mission.
The naval track stays unknown despite all emitters are in the "contact report" and it's the only one with that configuration, but there is no possible matches.
My question is if it is the case that when radars-fit is changed the AI DB does not take that into account? There is off course another big change of me doing somthing wrong.
with regards GJ
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua changes on Sensor, seen by AI

Post by KnightHawk75 »

If you asking if target classification is hampered by kitting out units with non-default gear and the addition or more emitters keeping level 2 classification from happening?
My answer to that is it might depend, but in the case of ship I've not had that happen except at distance by design given the gear the opponent was given to detect. It might help to know all the gear involved and how many sources you have picking up the emissions, at hat distance, are there jammers involved etc. Like 90% of the game the real answer is probably "depends on the exact situation". A .scen would help, but baring that, which sensors are involved picking up the emitting target, and what dbid is the target that you've customized? Just as an example an APY-9 or APY-2 (e-2d e-3isn't) going to find any ground targets, it'll find "surface" ships, but it's not flagged for ground\ground-mobile search...by default anyway, unless it's by mk1 eyeball. You gotta watch those abilities lists in the db, it's possible what you think should be detecting it's flagged for surface search etc.

Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Lua changes on Sensor, seen by AI

Post by Parel803 »

KnightHawk thx (again) for your time and answer. I see if I can replicate and post that scen.
with regards GJ
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Lua changes on Sensor, seen by AI

Post by Parel803 »

This is 1 unit of which I've changed the radar-fit by LUA. Looking from Redland side the Blue unit stays unk and the Contact report give me no possible matches. No problem but if this is happening after changing radar-fit I was not aware.
with regards GJ
Attachments
Test_EW_Lib.zip
(11.45 KiB) Downloaded 12 times
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua changes on Sensor, seen by AI

Post by KnightHawk75 »

I'll take a look and see what I can see in terms of it staying a level 1 'unknown'.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua changes on Sensor, seen by AI

Post by KnightHawk75 »

So yes it's definitely throwing off any non-SAR flagged radars from making an easy level2 or 3 classification once you throw it a curve ball of no matches in the DB no matter how close just based off radar signature. This is interesting, and I swear it didn't used to happen many moons ago (you'd get a level 2) - or maybe that's just when there are multiple matches.

Nice find. I think the reason I didn't noticed this before is I so often have a b-1b ibs around with and APG-83, or a MQ-4 with the ZPY around, or there is a sat with SAR flags above who pick it up, only tonight have I realized why. When I say SAR (Synthetic Aperture Radar) I mean those actually flagged SAR in the database sometimes the names don't indicate it or might indicate it but it not actually be tagged.


Way more info than you asked for:
In testing I found when it comes to search radars to ID that ship you'll need an SAR flagged radar and be within about 40-60% range of the radar doing the detecting @30k ft in the weather state of that scene. So about 125nm(62.5%), for a 200nm sensor, but the Sea Spray 7500E that claims a 320nm sensor seems capped at 128nm of detecting it (40%), while the Generic SAT SAR that has 650nm detects it at 325 (50%), not sure what is up with the different ranges guess other capabilities play a role adding or not subtracting distance or maybe it's just generation difference I didn't dig into that.

Your choices if you want that ship classified at level 3 from the patrol area are just the sat sar. If you can get inside of 130-120 nm your options open up a bit more (with most of the 200nm range options). Here's a full list of all radars that can actually level 3 id it (have both SAR flag and Surface Search capability), and what there listed max ranges are. I tested a quarter of these, and dozen of other radars, to narrow it down to the 3013 SAR flag being only ones that will trigger it.

Code: Select all

 dbid	name	               typecode	 max-range  role sarflag  surfaceflag
 -----   -----------------
 4471	Generic Satellite SAR	2001	650	2021	3013	1002
 6113	Sea Spray 7500E	2001	320	2021	3013	1002
 5526	Search Master	2001	240	2021	3013	1002
 637	AN/APS-137A(V)5 ISAR	2001	200	2021	3013	1002
 1075	AN/APS-137(V)1 ISAR	2001	200	2021	3013	1002
 2304	AN/APS-137(V)6 ISAR	2001	200	2021	3013	1002
 2305	AN/APS-137(V)4 ISAR	2001	200	2021	3013	1002
 2725	AN/APY-3	2001	200	2021	3013	1002
 3754	AN/APS-137(V)2 ISAR	2001	200	2021	3013	1002
 3755	AN/APS-137B(V)5 ISAR	2001	200	2021	3013	1002
 3757	AN/APS-137(V)5 ISAR	2001	200	2021	3013	1002
 3768	AN/APY-10	2001	200	2021	3013	1002
 4298	EL/M-2022U	2001	200	2021	3013	1002
 4505	ASTOR SAR	2001	200	2021	3013	1002
 4978	J/HPS-106	2001	200	2021	3013	1002
 5000	AN/APY-7 AESA	2001	200	2021	3013	1002
 5006	AN/ZPY-3 MFAS AESA	2001	200	2021	3013	1002
 5511	AN/ZPY-2 MP-RTIP AESA	2001	200	2012	3013	1002
 5555	AN/APG-83 SABR-GS AESA	2001	200	2121	3013	1002
 5899	Generic SAR / MTI	2001	200	2021	3013	1002

Code: Select all

6011	AN/ZPY-8 Osprey MM radar	2001	200	2012	3013	1002
 6111	Aselsan AESA	2001	200	2021	3013	1002
 381	AN/APG-80 AESA	2001	160	2121	3013	1002
 5427	AN/APG-83 SABR AESA	2001	160	2121	3013	1002
 4372	RBE-2AA AESA	2001	140	2122	3013	1002
 452	AN/ASD-12 SHARP [SAR]	2001	120	2022	3013	1002
 326	Generic SLAR	2001	100	2022	3013	1002
 1765	AN/APG-70	2001	100	2122	3013	1002
 2088	Global Hawk Sensor Package [ISAR]	2001	100	2022	3013	1002
 2221	AN/APG-70S	2001	100	2122	3013	1002
 2224	AN/APG-70I	2001	100	2122	3013	1002
 3137	ASARS-2	2001	100	2022	3013	1002
 4866	ASARS-2A	2001	100	2022	3013	1002
 5419	Terma 9000 SLAR	2001	100	2022	3013	1002
 5908	Anka-B Sensor Package [ISAR]	2001	100	2022	3013	1002
 2472	ASARS-1	2001	85	2022	3013	1002
 5192	AN/ZPY-4(V)1 [RDR-1700B+]	2001	80	2022	3013	1002
 1763	Eagle Eye ISAR	2001	60	2022	3013	1002
 2091	AN/ZPQ-1 TESAR	2001	60	2022	3013	1002
 2268	Fox Flat SLAR [Shompol]	2001	60	2022	3013	1002
 2271	IRIS SAR	2001	60	2022	3013	1002
 2350	SLAR	2001	60	2022	3013	1002
 

Code: Select all

 5900	Generic SAR / MTI	2001	50	2021	3013	1002
 2822	AN/APY-8 Lynx	2001	45	2023	3013	1002
 5456	HISAR SAR-MTI	2001	45	2021	3013	1002
 5510	AN/ZPY-1 STARLite	2001	20	2021	3013	1002
 
The other option is to not have it emmit on those two specifically added radars till after contactwrapper.classificationlevel => 3, cause if they emit at all, they'll stay in the contact record.

Code: Select all

local function findAllMatchingSensorsByDBID(stbl,matchid)
   local rettable={};
   for i,v in ipairs(stbl) do
     if v.sensor_dbid==matchid then table.insert(rettable,v); end
   end
   return rettable
 end
 
 local function FlipAllSensorByDBID(u,thedbid,state)
   u.obeyEMCON = false; -- take manual control.
   local stbl = findAllMatchingSensorsByDBID(u.sensors,thedbid); --go get a table of one or more sensor entries
   if((stbl ~= nil) and #stbl > 0) then
     for i,v in ipairs(stbl) do --for every matched dbid\returned sensor guid lets do something.
         local s = {sensor_guid = v.sensor_guid, sensor_status = v.sensor_status, sensor_isactive=state} --setup the change request.
         u.sensors = s; --submit the change request.
         s = nil;
     end
     stbl = nil; return true;
   else
     print('No matches found.')
   end
   return false;
 end 
 

Code: Select all

 local u = SE_GetUnit({guid=theguid})
 ScenEdit_SetEMCON('Unit',u.guid,'Radar=Passive')
 FlipAllSensorByDBID(u,5195,true) --flip only BMD radar on it will get level 3 id'd almost instantly by the Sky Master.
 
 --To Reverse
 --u.obeyEMCON = true;
 --ScenEdit_SetEMCON('Unit',u.guid,'Radar=Active')
 

The idea being if you need the Sky Master to detect it as what it is (maybe for AI WRA purposes perhaps), then maybe you don't let the ship turn on everything till after the ASM's have launched, or maybe not till the strike mission passes a certain threshold location, or you check for detection level > 2, if it is then you do the "reverse" above. or maybe you don't add the custom upgrades till after it's been id'd, or you damage the 2 nonstandard radars and fix them (sensor_status="Operational" is the local s line above) once it's id'd. 1/2 a dozen different ways to skin the cat so to speak depending on what you might need.
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Lua changes on Sensor, seen by AI

Post by Parel803 »

thank you, it is a lot of info :-). Thx for your time and help. I love the info reading about the game and it's complexness
with regards GJ
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: Lua changes on Sensor, seen by AI

Post by Parel803 »

Changed the radar on my Y8. Works great. Yes it was to get ASM's on target at a certain range.
The second part I have to study a little more, but def gonna try.
Thx again GJ
Post Reply

Return to “Lua Legion”