From 953a4ad57320fdf2bd33c27a5dfc6c26c85b23bd Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:01:14 -0800 Subject: [PATCH] Fix Seraphim carrier/T3 Sub and Cybran carrier AA missing their targets (#6427) ## Reasoning for the changes The Seraphim carrier hits air targets less reliably than it should. It has the same weapon as the Seraphim SAM (by name and visuals), but doesnt have any of the expected tracking properties. The muzzle velocity and pitch range is also slightly different. Cybran carrier's projectile has tracking which turns off the weapons' target leading. The tracking is not strong enough for the projectiles to correct their aim with the high velocity of the projectiles. The Cybran carrier actually has a worse hit rate than the Seraphim carrier because of the combination of turning off leading and too weak tracking. The Seraphim T3 subhunter does not get any tracking as the balance team decided the anti air is already quite strong and does not need further buffs as it is not the main purpose of the unit. ## Description of the proposed changes Copy the Seraphim SAM projectile physics to the carrier projectile. Also copy it to the Cybran carrier's projectile to improve its hit rate. Copy the Seraphim SAM muzzle velocity and turret pitch to the carrier so it can aim straight upwards. --- changelog/snippets/balance.6427.md | 2 ++ engine/Core/Blueprints/WeaponBlueprint.lua | 4 ++-- projectiles/CAAAutocannon03/CAAAutocannon03_proj.bp | 7 ++++--- .../SAALosaareAutoCannon03_proj.bp | 12 ++++++------ units/XSS0303/XSS0303_unit.bp | 8 ++++---- units/XSS0304/XSS0304_unit.bp | 4 ++-- 6 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 changelog/snippets/balance.6427.md diff --git a/changelog/snippets/balance.6427.md b/changelog/snippets/balance.6427.md new file mode 100644 index 0000000000..2d3a3276ab --- /dev/null +++ b/changelog/snippets/balance.6427.md @@ -0,0 +1,2 @@ +- (#6427) Add strong tracking capabilities (like the Seraphim SAM) to the AA of the Cybran and Seraphim carriers so that they do not miss their shots. + - Cybran carrier had an especially poor hit rate at the edge of its range because its weak tracking disabled its ability to lead targets. diff --git a/engine/Core/Blueprints/WeaponBlueprint.lua b/engine/Core/Blueprints/WeaponBlueprint.lua index e39a10afe3..72e96979f5 100644 --- a/engine/Core/Blueprints/WeaponBlueprint.lua +++ b/engine/Core/Blueprints/WeaponBlueprint.lua @@ -161,7 +161,7 @@ --- script: `Weapons = { FrontTurret01 = Class(TDFGaussCannonWeapon) {} }` --- If the Label does not match the weapon will not be workable. Defaults to `"Unlabelled"`. ---@field Label string ---- for tracking weapons, if the weapon should lead its target when aiming +--- for weapons without a tracking projectile, if the weapon should lead its target when aiming ---@field LeadTarget? boolean --- if set, requires a player to directly issue an attack / launch order for the unit to fire. Is set for all SMLs and --- stationary TMLs. Requires _some_ kind of delay between the firing (such as a charge delay) or queued orders are not @@ -351,7 +351,7 @@ --- the speed at which the secondary turret can turn in its yaw direction ---@field TurretDualYawSpeed number --- if this weapon uses the recent firing solution to create projectile instead of the ---- aim bone transform +--- aim bone transform when it fires. ---@field UseFiringSolutionInsteadOfAimBone? boolean --- the kind of weapon this is ---@field WeaponCategory WeaponCategory diff --git a/projectiles/CAAAutocannon03/CAAAutocannon03_proj.bp b/projectiles/CAAAutocannon03/CAAAutocannon03_proj.bp index cf3119e001..6805460de6 100644 --- a/projectiles/CAAAutocannon03/CAAAutocannon03_proj.bp +++ b/projectiles/CAAAutocannon03/CAAAutocannon03_proj.bp @@ -20,10 +20,11 @@ ProjectileBlueprint{ Physics = { DestroyOnWater = true, InitialSpeed = 35, - LeadTarget = false, - Lifetime = 1.5, + LeadTarget = true, + Lifetime = 4, + OnLostTargetLifetime = 0.7, TrackTarget = true, - TurnRate = 25, + TurnRate = 240, UseGravity = false, VelocityAlign = true, }, diff --git a/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp b/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp index 1de18afbfa..dc95d557b3 100644 --- a/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp +++ b/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp @@ -21,13 +21,13 @@ ProjectileBlueprint{ }, Interface = { HelpText = 0 }, Physics = { - CollideEntity = true, - CollideSurface = true, DestroyOnWater = true, - InitialSpeed = 20, - LeadTarget = false, - RotationalVelocity = 0, - StayUpright = true, + InitialSpeed = 120, + LeadTarget = true, + Lifetime = 4, + OnLostTargetLifetime = 0.7, + TrackTarget = true, + TurnRate = 240, UseGravity = false, VelocityAlign = true, }, diff --git a/units/XSS0303/XSS0303_unit.bp b/units/XSS0303/XSS0303_unit.bp index 921409ab6a..fa918823e3 100644 --- a/units/XSS0303/XSS0303_unit.bp +++ b/units/XSS0303/XSS0303_unit.bp @@ -271,7 +271,7 @@ UnitBlueprint{ MaxRadius = 100, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 2, - MuzzleVelocity = 90, + MuzzleVelocity = 100, ProjectileId = "/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp", ProjectileLifetimeUsesMultiplier = 1.25, RackBones = { @@ -306,7 +306,7 @@ UnitBlueprint{ TurretBonePitch = "Right_Turret_Barrel", TurretBoneYaw = "Right_Turret", TurretDualManipulators = false, - TurretPitch = 0, + TurretPitch = 25, TurretPitchRange = 80, TurretPitchSpeed = 180, TurretYaw = 0, @@ -331,7 +331,7 @@ UnitBlueprint{ MaxRadius = 100, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 2, - MuzzleVelocity = 90, + MuzzleVelocity = 100, PrefersPrimaryWeaponTarget = true, ProjectileId = "/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp", ProjectileLifetimeUsesMultiplier = 1.25, @@ -366,7 +366,7 @@ UnitBlueprint{ TurretBonePitch = "Left_Turret_Barrel", TurretBoneYaw = "Left_Turret", TurretDualManipulators = false, - TurretPitch = 0, + TurretPitch = 25, TurretPitchRange = 80, TurretPitchSpeed = 180, TurretYaw = 0, diff --git a/units/XSS0304/XSS0304_unit.bp b/units/XSS0304/XSS0304_unit.bp index c888641faf..ffa09c0bc5 100644 --- a/units/XSS0304/XSS0304_unit.bp +++ b/units/XSS0304/XSS0304_unit.bp @@ -393,7 +393,7 @@ UnitBlueprint{ MuzzleSalvoDelay = 0, MuzzleSalvoSize = 2, MuzzleVelocity = 90, - ProjectileId = "/projectiles/SAALosaareAutoCannon03/SAALosaareAutoCannon03_proj.bp", + ProjectileId = "/projectiles/SAALosaareAutoCannon01/SAALosaareAutoCannon01_proj.bp", ProjectileLifetimeUsesMultiplier = 1.25, RackBones = { { @@ -426,7 +426,7 @@ UnitBlueprint{ TurretBonePitch = "Front_Turret_Barrel01", TurretBoneYaw = "Front_Turret", TurretDualManipulators = false, - TurretPitch = 0, + TurretPitch = 25, TurretPitchRange = 85, TurretPitchSpeed = 180, TurretYaw = 0,