I am currently working to rebalance the point defense and auton lines for my mod. In doing so, I created a test device for a hypothetical 'Longreach II'. It uses three superimposed projectiles with Multitargeting. The idea is that when faced with multiple shots at close range the weapon will engage each target separately with 1/3rd of its total damage. The item and weapon use the following code:
<ItemType UNID="&itLongreachIIAutocannon;"
name= "Longreach II autocannon"
attributes= "autoDefense, commonwealth, majorItem"
level= "8"
frequency= "uncommon"
value= "60000"
mass= "4000"
description= "This improved development of the Longreach fires three clustered recoilless cannons when facing a single target but can decouple each weapon to fire independently when faced with multiple inbound projectiles."
>
<Image imageID="&rsItems1;" imageX="0" imageY="192" imageWidth="96" imageHeight="96"/>
<AutoDefenseDevice
targetcriteria= "mEA"
weapon= "&vtLongreachII;"
interceptRange= "20"
fireRate= "15"
/>
</ItemType>
<!-- Longreach I autocannon weapon -->
<ItemType UNID="&vtLongreachII;"
name= "Longreach II autocannon"
level= "6"
virtual= "true"
>
<Weapon
type= "missile"
damage= "kinetic:3d8+8; momentum2"
multitarget= "true"
fireRate= "15"
missileSpeed= "90"
lifetime= "27"
interaction= "20"
powerUse= "350"
effect= "&efKineticBoltDefault;"
sound= "&snRecoillessCannon;"
>
<Configuration>
<Shot angle="0"/>
<Shot angle="0"/>
<Shot angle="0"/>
</Configuration>
</Weapon>
</ItemType>
However, when Multitarget activates it appears to be ignoring the set TargetCriteria when aiming the separated rounds. The initial shot will always aim at the main projectile, however the re-aimed rounds will target ships (and probably stations) as well based on the standard auto-targeting code. This should not occur: target criteria should be respected so that the PD device only targets what it has been told to target.
Image is an annotated example during a test in which three Drake-class missileships were spawned to test the multitargeting system. THe system only activated on missiles, but would attack other targets at the same time if they were close.
Related (and unfixed) bug I reported in 2015: Point-defense fragments do not inherit target criteria if using AutoAcquireTarget
Added a second screenshot (MultiTargetPDBug2.png) showing an incorrect activation of secondary targeting. Aiming appears to be fairly wild. In this case a single shot is aimed incorrectly as a drake is turning, but even with drifting targets the code appears to be confused and aiming incorrectly fairly frequently. This may be an interaction between systems or an additional bug with Multitarget. THe screenshot also shows the failure to respect TargetCriteria. Future path of projectiles has been annotated.
Sometimes, depending on distance, multitarget on weapons assumes classic spread3 as used by the IM90 and fires secondary shots five degrees to the side.
The multiTarget
attribute on the weapon does not obey the targetCriteria
attribute on the device because the device simply creates a shot of the weapon aimed at the target.