From 0267057234e14117e94234e746f2eb0fe5bbd2ce Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:19:21 -0700 Subject: [PATCH 01/13] Make Cybran Carrier turn towards its target All 4 of its AA weapons can only hit within 30 degrees in front of it due to HeadingArcCenter and HeadingArcRange. Tested with spy plane and 27 degrees allows it to keep firing while turning. --- units/URS0303/URS0303_unit.bp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/units/URS0303/URS0303_unit.bp b/units/URS0303/URS0303_unit.bp index 105a3c53f7..2967dc1e89 100644 --- a/units/URS0303/URS0303_unit.bp +++ b/units/URS0303/URS0303_unit.bp @@ -248,6 +248,8 @@ UnitBlueprint{ RackSlavedToTurret = true, RangeCategory = "UWRC_AntiAir", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 27, TargetPriorities = { "NAVAL MOBILE", "ALLUNITS", @@ -310,6 +312,8 @@ UnitBlueprint{ RackSlavedToTurret = true, RangeCategory = "UWRC_AntiAir", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 27, TargetPriorities = { "EXPERIMENTAL", "AIR MOBILE TECH3 BOMBER", @@ -377,6 +381,8 @@ UnitBlueprint{ RackSlavedToTurret = true, RangeCategory = "UWRC_AntiAir", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 27, TargetPriorities = { "EXPERIMENTAL", "AIR MOBILE TECH3 BOMBER", @@ -444,6 +450,8 @@ UnitBlueprint{ RackSlavedToTurret = true, RangeCategory = "UWRC_AntiAir", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 27, TargetPriorities = { "EXPERIMENTAL", "AIR MOBILE TECH3 BOMBER", From 62b7f9da7a5191da39dbdc4032f351a27d2bda34 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:29:38 -0700 Subject: [PATCH 02/13] Turn Monkeylord towards enemy Its bolters fire together only within 45 degrees in front. 39 degrees arc range allows it to lead the target and fire on it while turning. --- units/URL0402/URL0402_unit.bp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/units/URL0402/URL0402_unit.bp b/units/URL0402/URL0402_unit.bp index 9ddac01947..4f485182af 100644 --- a/units/URL0402/URL0402_unit.bp +++ b/units/URL0402/URL0402_unit.bp @@ -378,7 +378,8 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_IndirectFire", RateOfFire = 10/7, --10/integer interval in ticks - SlavedToBody = false, + SlavedToBody = true, + SlavedToBodyArcRange = 39, TargetPriorities = { "TECH1 MOBILE", "TECH2 MOBILE", @@ -444,7 +445,8 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_IndirectFire", RateOfFire = 10/7, --10/integer interval in ticks - SlavedToBody = false, + SlavedToBody = true, + SlavedToBodyArcRange = 39, TargetPriorities = { "TECH1 MOBILE", "TECH2 MOBILE", From 16a249e5968d6e045c6a46e6b83cea6e94df5c5b Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:31:22 -0700 Subject: [PATCH 03/13] Prevent ML from turning while the laser is firing Auto turning can get annoying when microing in close range and trying to maintain desired rotation for maneuvering around the enemy formation. --- units/URL0402/URL0402_unit.bp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/units/URL0402/URL0402_unit.bp b/units/URL0402/URL0402_unit.bp index 4f485182af..f7a9ceca21 100644 --- a/units/URL0402/URL0402_unit.bp +++ b/units/URL0402/URL0402_unit.bp @@ -310,6 +310,8 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_DirectFire", RateOfFire = 10/1, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 180, TargetPriorities = { "EXPERIMENTAL", "SUBCOMMANDER", From 228227c6cc1199f2f83a0f81398a6b6ed1c1385d Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:39:12 -0700 Subject: [PATCH 04/13] Automatically turn othuum towards its target Its weapons are limited by heading arc to firing together within 45 degrees in front of itself. --- units/XSL0303/XSL0303_unit.bp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/units/XSL0303/XSL0303_unit.bp b/units/XSL0303/XSL0303_unit.bp index 60c5cb2eb0..3fef20bc98 100644 --- a/units/XSL0303/XSL0303_unit.bp +++ b/units/XSL0303/XSL0303_unit.bp @@ -248,6 +248,8 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_DirectFire", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 44, TargetPriorities = { "TECH3 MOBILE", "TECH2 MOBILE", @@ -310,6 +312,8 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_DirectFire", RateOfFire = 10/5, --10/integer interval in ticks + SlavedToBody = true, + SlavedToBodyArcRange = 44, TargetPriorities = { "TECH3 MOBILE", "TECH2 MOBILE", From 49357d30243980fe5ac6b8984e3ef9eb3fc96e34 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:22:41 -0700 Subject: [PATCH 05/13] Update HeadingArc weapon bp annotations --- engine/Core/Blueprints/WeaponBlueprint.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/Core/Blueprints/WeaponBlueprint.lua b/engine/Core/Blueprints/WeaponBlueprint.lua index fee33642f0..8662cbd04e 100644 --- a/engine/Core/Blueprints/WeaponBlueprint.lua +++ b/engine/Core/Blueprints/WeaponBlueprint.lua @@ -142,10 +142,10 @@ ---@field Flare WeaponBlueprintFlare --- used to force packing up a weapon before being able to fire again ---@field ForceSingleFire? boolean ---- controls what the weapon is allowed to target in reference to the heading of the unit +--- controls what the weapon is allowed to target in reference to the heading of the unit. Defaults to 0 ---@field HeadingArcCenter number --- controls what the weapon is allowed to target in reference to the arc center, ---- this is degrees on either side +--- this is degrees on either side. Defaults to 180 ---@field HeadingArcRange number --- does not consider the weapon when attacking targets if it is disabled ---@field IgnoreIfDisabled? boolean From 68e8c2b6dd964a851a7a2e9e53c7cde209cb5055 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:23:19 -0700 Subject: [PATCH 06/13] Remove extra Sera frig HeadingArc values --- units/XSS0103/XSS0103_unit.bp | 2 -- 1 file changed, 2 deletions(-) diff --git a/units/XSS0103/XSS0103_unit.bp b/units/XSS0103/XSS0103_unit.bp index caa8be0771..8b170dc627 100644 --- a/units/XSS0103/XSS0103_unit.bp +++ b/units/XSS0103/XSS0103_unit.bp @@ -253,8 +253,6 @@ UnitBlueprint{ FireTargetLayerCapsTable = { Water = "Air" }, FiringRandomness = 0, FiringTolerance = 1, - HeadingArcCenter = 0, - HeadingArcRange = 360, Label = "AntiAir", MaxRadius = 48, MuzzleSalvoDelay = 0, From 5d83c9666ebb6344dfff55da5f226c77697fcd76 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Sat, 7 Sep 2024 14:20:40 -0700 Subject: [PATCH 07/13] Create balance.6437.md --- changelog/snippets/balance.6437.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/snippets/balance.6437.md diff --git a/changelog/snippets/balance.6437.md b/changelog/snippets/balance.6437.md new file mode 100644 index 0000000000..901865f2d9 --- /dev/null +++ b/changelog/snippets/balance.6437.md @@ -0,0 +1,3 @@ +- (#6437) Automatically rotate Cybran Carrier, Othuum, and Monkeylord towards their targets when idle or attacking so that all their weapons can fire. + - Monkeylord will not automatically rotate when the laser is firing, to make it get in the way of micro less. + - The units rotate in place when aiming like this. From dc6839709b43270a6e5760ca12b5d83ccbda2068 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:08:30 -0700 Subject: [PATCH 08/13] Fix wording in snippet --- changelog/snippets/balance.6437.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/snippets/balance.6437.md b/changelog/snippets/balance.6437.md index 901865f2d9..89f65d7902 100644 --- a/changelog/snippets/balance.6437.md +++ b/changelog/snippets/balance.6437.md @@ -1,3 +1,3 @@ - (#6437) Automatically rotate Cybran Carrier, Othuum, and Monkeylord towards their targets when idle or attacking so that all their weapons can fire. - - Monkeylord will not automatically rotate when the laser is firing, to make it get in the way of micro less. - - The units rotate in place when aiming like this. + - Monkeylord does not automatically rotate when the laser is firing, to avoid interfering with micro. + - Units rotate in place while aiming, so formations do not get disrupted. From 1cd1c7c51cc3d6fc1b6aea5deae6b2d89384c2a8 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:15:21 -0700 Subject: [PATCH 09/13] Clarify auto-rotation related blueprint annotations --- engine/Core/Blueprints/UnitBlueprint.lua | 4 +++- engine/Core/Blueprints/WeaponBlueprint.lua | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/engine/Core/Blueprints/UnitBlueprint.lua b/engine/Core/Blueprints/UnitBlueprint.lua index af1e1d7fde..cbafa5ca2c 100644 --- a/engine/Core/Blueprints/UnitBlueprint.lua +++ b/engine/Core/Blueprints/UnitBlueprint.lua @@ -127,7 +127,9 @@ ---@class UnitBlueprintAI ---- under what angle the unit attacks its target after getting an attack order +--- At what angle (to either side) the unit attacks its target after getting an attack order. +--- If one of the unit's weapons has a target and has `SlavedToBody = true`, it will rotate when idle and attacking. +--- Overrides Weapon `SlavedToBody` and `SlavedToBodyArcRange` behavior. ---@field AttackAngle number --- automatically surface to attack ground targets ---@field AutoSurfaceToAttack boolean diff --git a/engine/Core/Blueprints/WeaponBlueprint.lua b/engine/Core/Blueprints/WeaponBlueprint.lua index 8662cbd04e..17ebd6a951 100644 --- a/engine/Core/Blueprints/WeaponBlueprint.lua +++ b/engine/Core/Blueprints/WeaponBlueprint.lua @@ -287,10 +287,12 @@ --- if the weapon goes directly from its `IdleState` to its `RackSalvoFiringState` without --- going through its `RackSalvoFireReadyState` first ---@field SkipReadyState? boolean ---- if the weapon is "slaved" to the unit's body, thus requiring it to face its target to fire +--- If the weapon causes the unit to rotate towards the weapon's target. With multiple slaved weapons, +--- the first slaved weapon in the blueprint that currently has a target is used for turning. +--- If `UnitBlueprintAI.AttackAngle` is true, then this causes the unit to rotate when attacking while idle. ---@field SlavedToBody? boolean ---- Range of arc in both directions to be considered "slaved" to a target. With multiple weapons, ---- the first weapon in the blueprint that currently has a target is used for turning. +--- Degrees to either side of the unit's heading outside of which the weapon will rotate the unit towards the target. +--- Defaults to 1. Behavior gets overriden by `UnitBlueprintAI.AttackAngle`. ---@field SlavedToBodyArcRange? number --- flag to specify to not make the weapon active if the primary weapon has a current target ---@field StopOnPrimaryWeaponBusy? boolean From 764007ff06cc750184e972970adbb7821c82be72 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:19:45 -0700 Subject: [PATCH 10/13] Clarify what causes `SlavedToBody` to rotate. --- engine/Core/Blueprints/WeaponBlueprint.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/Core/Blueprints/WeaponBlueprint.lua b/engine/Core/Blueprints/WeaponBlueprint.lua index 17ebd6a951..c2195fc485 100644 --- a/engine/Core/Blueprints/WeaponBlueprint.lua +++ b/engine/Core/Blueprints/WeaponBlueprint.lua @@ -287,8 +287,8 @@ --- if the weapon goes directly from its `IdleState` to its `RackSalvoFiringState` without --- going through its `RackSalvoFireReadyState` first ---@field SkipReadyState? boolean ---- If the weapon causes the unit to rotate towards the weapon's target. With multiple slaved weapons, ---- the first slaved weapon in the blueprint that currently has a target is used for turning. +--- If the weapon causes the unit to rotate towards the weapon's target when the target is outside of `SlavedToBodyArcRange`. +--- With multiple slaved weapons, the first slaved weapon in the blueprint that currently has a target is used for turning. --- If `UnitBlueprintAI.AttackAngle` is true, then this causes the unit to rotate when attacking while idle. ---@field SlavedToBody? boolean --- Degrees to either side of the unit's heading outside of which the weapon will rotate the unit towards the target. From 00a0198e9a0a07d0fcdf91b093710ef06bb26f1f Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:14:36 -0800 Subject: [PATCH 11/13] Revert "Prevent ML from turning while the laser is firing" This reverts commit 16a249e5968d6e045c6a46e6b83cea6e94df5c5b. --- units/URL0402/URL0402_unit.bp | 2 -- 1 file changed, 2 deletions(-) diff --git a/units/URL0402/URL0402_unit.bp b/units/URL0402/URL0402_unit.bp index f7a9ceca21..4f485182af 100644 --- a/units/URL0402/URL0402_unit.bp +++ b/units/URL0402/URL0402_unit.bp @@ -310,8 +310,6 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_DirectFire", RateOfFire = 10/1, --10/integer interval in ticks - SlavedToBody = true, - SlavedToBodyArcRange = 180, TargetPriorities = { "EXPERIMENTAL", "SUBCOMMANDER", From f53297f9886e8481f969d887bb47d9df9070eb8c Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:14:39 -0800 Subject: [PATCH 12/13] Revert "Turn Monkeylord towards enemy" This reverts commit 62b7f9da7a5191da39dbdc4032f351a27d2bda34. --- units/URL0402/URL0402_unit.bp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/units/URL0402/URL0402_unit.bp b/units/URL0402/URL0402_unit.bp index 4f485182af..9ddac01947 100644 --- a/units/URL0402/URL0402_unit.bp +++ b/units/URL0402/URL0402_unit.bp @@ -378,8 +378,7 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_IndirectFire", RateOfFire = 10/7, --10/integer interval in ticks - SlavedToBody = true, - SlavedToBodyArcRange = 39, + SlavedToBody = false, TargetPriorities = { "TECH1 MOBILE", "TECH2 MOBILE", @@ -445,8 +444,7 @@ UnitBlueprint{ RackSlavedToTurret = false, RangeCategory = "UWRC_IndirectFire", RateOfFire = 10/7, --10/integer interval in ticks - SlavedToBody = true, - SlavedToBodyArcRange = 39, + SlavedToBody = false, TargetPriorities = { "TECH1 MOBILE", "TECH2 MOBILE", From b4b199b7f090632131590cc5df83e6f10c2b21ca Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:16:37 -0800 Subject: [PATCH 13/13] Update balance.6437.md --- changelog/snippets/balance.6437.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/changelog/snippets/balance.6437.md b/changelog/snippets/balance.6437.md index 89f65d7902..c8db082bba 100644 --- a/changelog/snippets/balance.6437.md +++ b/changelog/snippets/balance.6437.md @@ -1,3 +1,2 @@ -- (#6437) Automatically rotate Cybran Carrier, Othuum, and Monkeylord towards their targets when idle or attacking so that all their weapons can fire. - - Monkeylord does not automatically rotate when the laser is firing, to avoid interfering with micro. +- (#6437) Automatically rotate Cybran Carrier and Othuum towards their targets when idle or attacking so that all their weapons can fire. - Units rotate in place while aiming, so formations do not get disrupted.