From 2c538845b8ba712c57e3fefbcfc32758472f4527 Mon Sep 17 00:00:00 2001 From: Basilisk3 <126026384+Basilisk3@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:16:29 +0200 Subject: [PATCH] Improve/fix the Tempest's anti-torpedo weapon (#6077) --- changelog/3810.md | 2 ++ units/UAS0401/UAS0401_script.lua | 5 ---- units/UAS0401/UAS0401_unit.bp | 51 ++++++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/changelog/3810.md b/changelog/3810.md index 693a2e08d3..6c06f2c4bc 100644 --- a/changelog/3810.md +++ b/changelog/3810.md @@ -114,6 +114,8 @@ - (#6091) Count cargo for veterancy when a transport or carrier is killed +- (#6077) Improve the targeting of the Tempest's anti-torpedo weapon. + ## Contributors With thanks to the following people who contributed through coding: diff --git a/units/UAS0401/UAS0401_script.lua b/units/UAS0401/UAS0401_script.lua index 17c9c6fd32..1b8b3f1c2f 100644 --- a/units/UAS0401/UAS0401_script.lua +++ b/units/UAS0401/UAS0401_script.lua @@ -26,11 +26,6 @@ UAS0401 = ClassUnit(ASeaUnit, ExternalFactoryComponent) { Weapons = { MainGun = ClassWeapon(ADFCannonOblivionWeapon) {}, Torpedo01 = ClassWeapon(AANChronoTorpedoWeapon) {}, - Torpedo02 = ClassWeapon(AANChronoTorpedoWeapon) {}, - Torpedo03 = ClassWeapon(AANChronoTorpedoWeapon) {}, - Torpedo04 = ClassWeapon(AANChronoTorpedoWeapon) {}, - Torpedo05 = ClassWeapon(AANChronoTorpedoWeapon) {}, - Torpedo06 = ClassWeapon(AANChronoTorpedoWeapon) {}, AntiTorpedo01 = ClassWeapon(AIFQuasarAntiTorpedoWeapon) {}, AntiTorpedo02 = ClassWeapon(AIFQuasarAntiTorpedoWeapon) {}, }, diff --git a/units/UAS0401/UAS0401_unit.bp b/units/UAS0401/UAS0401_unit.bp index 58148b1d48..2e83b07aa3 100644 --- a/units/UAS0401/UAS0401_unit.bp +++ b/units/UAS0401/UAS0401_unit.bp @@ -426,7 +426,7 @@ UnitBlueprint{ Label = "AntiTorpedo01", LeadTarget = false, MaxRadius = 45, - MinRadius = 5, + MinRadius = 10, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1, MuzzleVelocity = 80, @@ -436,7 +436,6 @@ UnitBlueprint{ { MuzzleBones = { "Anti_Torpedo_Muzzle01", - "Anti_Torpedo_Muzzle02", }, RackBone = "Anti_Torpedo_Muzzle01", }, @@ -448,7 +447,53 @@ UnitBlueprint{ RackSalvoReloadTime = 0, RackSalvoSize = 1, RangeCategory = "UWRC_Countermeasure", - RateOfFire = 1, + RateOfFire = 0.7, + TargetCheckInterval = 1.0, + TargetRestrictDisallow = "UNTARGETABLE", + TargetRestrictOnlyAllow = "TORPEDO", + TargetType = "RULEWTT_Projectile", + TrackingRadius = 1.0, + Turreted = false, + WeaponCategory = "Defense", + }, + { + AlwaysRecheckTarget = false, + BallisticArc = "RULEUBA_None", + CollideFriendly = false, + Damage = 3, + DamageType = "Normal", + DisableWhileReloading = true, + DisplayName = "Quasar Anti Torpedo", + FireTargetLayerCapsTable = { + Sub = "Water", + Water = "Water", + }, + FiringTolerance = 180, + Label = "AntiTorpedo02", + LeadTarget = false, + MaxRadius = 45, + MinRadius = 10, + MuzzleSalvoDelay = 0, + MuzzleSalvoSize = 1, + MuzzleVelocity = 80, + ProjectileId = "/projectiles/AIMAntiTorpedo02/AIMAntiTorpedo02_proj.bp", + ProjectileLifetime = 1.5, + RackBones = { + { + MuzzleBones = { + "Anti_Torpedo_Muzzle02", + }, + RackBone = "Anti_Torpedo_Muzzle02", + }, + }, + RackFireTogether = false, + RackRecoilDistance = 0, + RackReloadTimeout = 10, + RackSalvoChargeTime = 0, + RackSalvoReloadTime = 0, + RackSalvoSize = 1, + RangeCategory = "UWRC_Countermeasure", + RateOfFire = 0.7, TargetCheckInterval = 1.0, TargetRestrictDisallow = "UNTARGETABLE", TargetRestrictOnlyAllow = "TORPEDO",