Giter VIP home page Giter VIP logo

Comments (2)

Whiskey-11 avatar Whiskey-11 commented on September 27, 2024

To add to this, I tested several things and I think I've narrowed down the issue to Autonomous States don't update while a system is ON.

During testing of both Command Centers and Power to Command Centers, it appears that if I blow up the CC or Power to the CC without turning a SAM on, the autonomous state updates correctly and the SAM remains off. However, if you activate the SAM site, without being shot at, and then blow up the SAM site, it will NEVER turn off even if commanded to go dark at the loss of a CC.

In the test mission, I have:

  • A single SA-10 which is set to go DARK
  • A single SA-15 which is set to DCS Default
  • A 55G6 EWR set to act as an EWR (duh :P)
  • A command center
  • A power unit.

The SA-15 is set to act as point defense for the SA-10 (not that it matters). The SA-10, SA-15, and 55G6 are set to have a ConnectionNode to the command center. The Power Unit is connected to both the 55G6 AND the Command Center.

In testing:

  • If you blow up the Power OR Command Center while the SA-10 is ON, it never shuts off. (Incorrect Behavior)
  • If you blow up the Power OR Command Center while the SA-10 is OFF, it never turns on. (Correct Behavior)

Here is the relevant IADS LUA.

do
--REDFOR 
	--Basic Stuff
		redIADS = SkynetIADS:create('Enemy IADS')
		redIADS:addSAMSitesByPrefix('RSAM')
		redIADS:addEarlyWarningRadarsByPrefix('REW')
		redIADS:addRadioMenu()
		
	--Command Centers
		local EWPow1 = Unit.getByName('RPOW-1')
		local EastCommandCenter = StaticObject.getByName("Command Center")
		redIADS:addCommandCenter(EastCommandCenter):addPowerSource(EWPow1)
		--redIADS:addCommandCenter(StaticObject.getByName("Not Command Center"))
	
	--IADS Groups
		--Start Conditions
		--Group 1
			--EWR
				redIADS:getEarlyWarningRadarByUnitName("REW-1"):addPowerSource(EWPow1):addConnectionNode(EastCommandCenter)	

				--redIADS:addEarlyWarningRadar('RAWACS-1'):addConnectionNode(EastCommandCenter)
			
			--SA-2
				redIADS:getSAMSiteByGroupName('RSAM-SA-2-1'):addConnectionNode(EastCommandCenter):setAutonomousBehaviour(SkynetIADSAbstractRadarElement.AUTONOMOUS_STATE_DARK)
				local PDSA15 = redIADS:getSAMSiteByGroupName('RSAM-SA-15-PD-1')
				redIADS:getSAMSiteByGroupName('RSAM-SA-2-1'):addPointDefence(PDSA15)
				
			--Second SAM Type
			
		--Group 2	
			--EWR
			--First SAM Type
			--Second SAM Type
			
redIADS:activate()

The intended behavior is the SA-10 goes dark regardless of whether it was ON or OFF at the time of CC/Power destruction.

from skynet-iads.

Quinareth avatar Quinareth commented on September 27, 2024

I have performed the same testing with simple mission, included:
SA-5 site (IADS)
Command Center (IADS)
EWR (IADS)

One very different thing - I destroyed CC by friendly fire from F-18C, so, no contacts were displayed in debug.

  • CC counted as destructed - good.
  • Active CC is zero - good.
  • For some reason EWR site didn't go down as it was intended by script - bad.
  • SA-5 site went dark as intended - good.

Below the script I've used for the mission. Quite simple.

do

redIADS = SkynetIADS:create('IADS')

local iadsDebug = redIADS:getDebugSettings()
iadsDebug.IADSStatus = true
iadsDebug.radarWentDark = true
iadsDebug.contacts = true
iadsDebug.radarWentLive = true
iadsDebug.noWorkingCommmandCenter = true
iadsDebug.samNoConnection = true
iadsDebug.jammerProbability = true
iadsDebug.addedEWRadar = true
iadsDebug.harmDefence = true

redIADS:addEarlyWarningRadarsByPrefix('EWR')

redIADS:addSAMSitesByPrefix('SAM')

local commandCenter = StaticObject.getByName('Command_Center')
redIADS:addCommandCenter(commandCenter)

redIADS:getEarlyWarningRadarByUnitName('EWR_Test'):setAutonomousBehaviour(SkynetIADSAbstractRadarElement.AUTONOMOUS_STATE_DARK)

redIADS:getSAMSiteByGroupName('SAM_Test_site'):setAutonomousBehaviour(SkynetIADSAbstractRadarElement.AUTONOMOUS_STATE_DARK):setHARMDetectionChance(30):setGoLiveRangeInPercent(85)



redIADS:activate()

end

Earlier testing included power sources connected to CC - same behaviour, EWRs didn't go dark when CC is not powered.
HOWEVER, that worked good when EWR were connected to the nodes - EWRs went dark as it was coded after node destruction.

from skynet-iads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.