From 853a80b11cde4af690c4e8a910b4ee9ca74734cf Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 13:49:51 -0600 Subject: [PATCH 01/21] Update Hooks.Cloak.cpp --- src/Ext/Techno/Hooks.Cloak.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 85e268dfaf..ee2ff5e04e 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -174,3 +174,30 @@ DEFINE_HOOK(0x4579A5, BuildingClass_ShouldNotCloak_Sensors, 0x6) return Continue; } + +// NOTE: Overrides incorrect Ares hook at the same address. +DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) +{ + enum { Skip = 0x6FCA4F, Continue = 0x6FCA36, NotApplicable = 0x6FCA5E }; + + GET(WeaponTypeClass*, pWeapon, EBX); + + if (!pWeapon->DecloakToFire) + return NotApplicable; + + GET(TechnoClass*, pThis, ESI); + + R->EAX(pThis->CloakState); + return Continue; +} + +DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) +{ + GET(TechnoClass*, pThis, ESI); + GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); + + if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) + pThis->Transporter->Uncloak(true); + + return 0; +} From b7173e7bb144c15567095d3d373382e5e2022d92 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:51:25 -0600 Subject: [PATCH 02/21] Update Fixed-or-Improved-Logics.md --- docs/Fixed-or-Improved-Logics.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 8f36ad37e4..f22b433982 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -343,6 +343,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed. - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally. - Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat. +- Fixed an Ares patch preventing passengers inside opentopped transports to not fire out when transport is cloaked. ## Newly added global settings From cc45b9165f28d80ef4f965da1333a40b50780ae9 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 17:12:26 -0600 Subject: [PATCH 03/21] Uncloak true -> false --- src/Ext/Techno/Hooks.Cloak.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index ee2ff5e04e..5e5f09de9f 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -197,7 +197,7 @@ DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) - pThis->Transporter->Uncloak(true); + pThis->Transporter->Uncloak(false); return 0; } From fec7dc114c598d632bf2673e642cec110850c275 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 17:50:46 -0600 Subject: [PATCH 04/21] Test passenger weapons not forcing transport to decloak --- src/Ext/Techno/Hooks.Cloak.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 5e5f09de9f..2a988875c3 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -195,9 +195,23 @@ DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) { GET(TechnoClass*, pThis, ESI); GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); + GET_STACK(const int, weaponIndex, STACK_OFFSET(0x20, 0x8)); + // Only decloak the transporter when the passenger's weapon actually causes decloak. if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) - pThis->Transporter->Uncloak(false); + { + if (weaponIndex >= 0) + { + if (auto const pWeaponStruct = pThis->GetWeapon(weaponIndex)) + { + if (auto const pWeaponType = pWeaponStruct->WeaponType) + { + if (pWeaponType->DecloakToFire) + pThis->Transporter->Uncloak(true); + } + } + } + } return 0; } From a7d0b5da35ea19cbce6de2635e398284f8218100 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 18:33:14 -0600 Subject: [PATCH 05/21] Update Hooks.Cloak.cpp --- src/Ext/Techno/Hooks.Cloak.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 2a988875c3..6caa78102e 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -193,25 +193,5 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) { - GET(TechnoClass*, pThis, ESI); - GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); - GET_STACK(const int, weaponIndex, STACK_OFFSET(0x20, 0x8)); - - // Only decloak the transporter when the passenger's weapon actually causes decloak. - if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) - { - if (weaponIndex >= 0) - { - if (auto const pWeaponStruct = pThis->GetWeapon(weaponIndex)) - { - if (auto const pWeaponType = pWeaponStruct->WeaponType) - { - if (pWeaponType->DecloakToFire) - pThis->Transporter->Uncloak(true); - } - } - } - } - return 0; } From b6f74eaaf1ad94e3f93981f992128702948beb75 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 18:54:52 -0600 Subject: [PATCH 06/21] Update docs --- docs/Fixed-or-Improved-Logics.md | 2 +- docs/Whats-New.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index f22b433982..a8e62caf3f 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -343,7 +343,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed. - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally. - Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat. -- Fixed an Ares patch preventing passengers inside opentopped transports to not fire out when transport is cloaked. +- Passengers in open-topped transports can no longer decloak the transporter when firing weapons with `DecloakToFire=yes`. The transporter will only decloak if it fires its own weapons. ## Newly added global settings diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 5830a0e28a..ed92f35ea9 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -643,6 +643,8 @@ Fixes / interactions with other extensions: - Fixed the issue that technos cannot spawn survivors due to non-probabilistic reasons when the tech type was destroyed (by NetsuNegi) - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed (by NetsuNegi) - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally (by NetsuNegi) +- Passengers in open-topped transports can no longer decloak the transporter when firing weapons with `DecloakToFire=yes`. The transporter will only decloak if it fires its own weapons. + ``` From 1be41fcaff17ff372a90415a04f4117a9c6f76fb Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Fri, 20 Feb 2026 19:02:13 -0600 Subject: [PATCH 07/21] Update CREDITS.md --- CREDITS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CREDITS.md b/CREDITS.md index 2c4b4013a4..563e38a032 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -748,3 +748,5 @@ This page lists all the individual contributions to the project by their author. - **Dmitry Volkov** - extensive and thorough testing - **Rise of the East community** - extensive playtesting of in-dev features - **11EJDE11** - Prevent mpdebug number from being drawn when visibility toggled off +- **RAZER**: + - Revert Ares patch to allow passengers inside cloaked transports which are opentopped fire out From 6ec665774be1612de9d95f2d89535d2b52eee780 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:42:56 -0600 Subject: [PATCH 08/21] Add OpenTopped.DecloakToFire option Introduce a new OpenTopped.DecloakToFire setting (global Rules and per-TechnoType) to control decloak-to-fire behavior for open-topped units. Load/serialize the option in RulesExt and TechnoTypeExt, add nullable per-type value with global fallback (Rules default false), and update Cloak hook to check the per-type setting before applying the fix. --- src/Ext/Rules/Body.cpp | 2 ++ src/Ext/Rules/Body.h | 2 ++ src/Ext/Techno/Hooks.Cloak.cpp | 13 +++++++++++-- src/Ext/TechnoType/Body.cpp | 2 ++ src/Ext/TechnoType/Body.h | 2 ++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index 10682c7f3f..25fb55105e 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -343,6 +343,7 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI) this->FallingDownTargetingFix.Read(exINI, GameStrings::General, "FallingDownTargetingFix"); this->AIAirTargetingFix.Read(exINI, GameStrings::General, "AIAirTargetingFix"); + this->OpenTopped_DecloakToFire.Read(exINI, GameStrings::General, "OpenTopped.DecloakToFire"); this->SortCameoByName.Read(exINI, GameStrings::General, "SortCameoByName"); @@ -654,6 +655,7 @@ void RulesExt::ExtData::Serialize(T& Stm) .Process(this->IvanBombAttachToCenter) .Process(this->FallingDownTargetingFix) .Process(this->AIAirTargetingFix) + .Process(this->OpenTopped_DecloakToFire) .Process(this->SortCameoByName) .Process(this->MergeBuildingDamage) .Process(this->BuildingRadioLink_SyncOwner) diff --git a/src/Ext/Rules/Body.h b/src/Ext/Rules/Body.h index ad8d11572e..27da4009fa 100644 --- a/src/Ext/Rules/Body.h +++ b/src/Ext/Rules/Body.h @@ -293,6 +293,7 @@ class RulesExt Valueable FallingDownTargetingFix; Valueable AIAirTargetingFix; + Valueable OpenTopped_DecloakToFire; Valueable SortCameoByName; @@ -553,6 +554,7 @@ class RulesExt , FallingDownTargetingFix { false } , AIAirTargetingFix { false } + , OpenTopped_DecloakToFire { false } , SortCameoByName { false } diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 6caa78102e..99ec537590 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -1,4 +1,5 @@ #include "Body.h" +#include namespace CloakTemp { @@ -180,13 +181,21 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) { enum { Skip = 0x6FCA4F, Continue = 0x6FCA36, NotApplicable = 0x6FCA5E }; + GET(TechnoClass*, pThis, ESI); + + auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->GetTechnoType()); + const bool applyFix = pTypeExt->OpenTopped_DecloakToFire.isset() + ? pTypeExt->OpenTopped_DecloakToFire.Get() + : RulesExt::Global()->OpenTopped_DecloakToFire; + + if (!applyFix) + return 0; + GET(WeaponTypeClass*, pWeapon, EBX); if (!pWeapon->DecloakToFire) return NotApplicable; - GET(TechnoClass*, pThis, ESI); - R->EAX(pThis->CloakState); return Continue; } diff --git a/src/Ext/TechnoType/Body.cpp b/src/Ext/TechnoType/Body.cpp index f672c3157c..25b7c3d8e4 100644 --- a/src/Ext/TechnoType/Body.cpp +++ b/src/Ext/TechnoType/Body.cpp @@ -858,6 +858,7 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->OpenTopped_ShareTransportTarget.Read(exINI, pSection, "OpenTopped.ShareTransportTarget"); this->OpenTopped_UseTransportRangeModifiers.Read(exINI, pSection, "OpenTopped.UseTransportRangeModifiers"); this->OpenTopped_CheckTransportDisableWeapons.Read(exINI, pSection, "OpenTopped.CheckTransportDisableWeapons"); + this->OpenTopped_DecloakToFire.Read(exINI, pSection, "OpenTopped.DecloakToFire"); this->OpenTransport_RangeBonus.Read(exINI, pSection, "OpenTransport.RangeBonus"); this->OpenTransport_DamageMultiplier.Read(exINI, pSection, "OpenTransport.DamageMultiplier"); @@ -1561,6 +1562,7 @@ void TechnoTypeExt::ExtData::Serialize(T& Stm) .Process(this->OpenTopped_ShareTransportTarget) .Process(this->OpenTopped_UseTransportRangeModifiers) .Process(this->OpenTopped_CheckTransportDisableWeapons) + .Process(this->OpenTopped_DecloakToFire) .Process(this->OpenTransport_RangeBonus) .Process(this->OpenTransport_DamageMultiplier) diff --git a/src/Ext/TechnoType/Body.h b/src/Ext/TechnoType/Body.h index 37143bb02e..ab4ac66178 100644 --- a/src/Ext/TechnoType/Body.h +++ b/src/Ext/TechnoType/Body.h @@ -166,6 +166,7 @@ class TechnoTypeExt Valueable OpenTopped_ShareTransportTarget; Valueable OpenTopped_UseTransportRangeModifiers; Valueable OpenTopped_CheckTransportDisableWeapons; + Nullable OpenTopped_DecloakToFire; Valueable OpenTransport_RangeBonus; Valueable OpenTransport_DamageMultiplier; @@ -578,6 +579,7 @@ class TechnoTypeExt , OpenTopped_ShareTransportTarget { true } , OpenTopped_UseTransportRangeModifiers { false } , OpenTopped_CheckTransportDisableWeapons { false } + , OpenTopped_DecloakToFire {} , OpenTransport_RangeBonus { 0 } , OpenTransport_DamageMultiplier { 1.0 } From fdb880d6992f97b3a4243fe842852029b92003e1 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:02:43 -0600 Subject: [PATCH 09/21] Make this behavior normal by default --- src/Ext/Rules/Body.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ext/Rules/Body.h b/src/Ext/Rules/Body.h index 27da4009fa..325c518100 100644 --- a/src/Ext/Rules/Body.h +++ b/src/Ext/Rules/Body.h @@ -554,7 +554,7 @@ class RulesExt , FallingDownTargetingFix { false } , AIAirTargetingFix { false } - , OpenTopped_DecloakToFire { false } + , OpenTopped_DecloakToFire { true } , SortCameoByName { false } From 81ba9f6e656605e3a5f313399d14859f7432bf8b Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:24:34 -0600 Subject: [PATCH 10/21] Update Body.cpp --- src/Ext/Rules/Body.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index b2737ed77c..828cf3cca2 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -417,6 +417,7 @@ void RulesExt::ExtData::LoadAfterTypeData(RulesClass* pThis, CCINIClass* pINI) { INI_EX exINI(pINI); + this->OpenTopped_DecloakToFire.Read(exINI, GameStrings::General, "OpenTopped.DecloakToFire"); } // this runs between the before and after type data loading methods for rules ini From 52a4aabedf7ebd58ff344f72f31eb23ae5268231 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:36:23 -0600 Subject: [PATCH 11/21] Revert "Update Body.cpp" This reverts commit 81ba9f6e656605e3a5f313399d14859f7432bf8b. --- src/Ext/Rules/Body.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index 828cf3cca2..b2737ed77c 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -417,7 +417,6 @@ void RulesExt::ExtData::LoadAfterTypeData(RulesClass* pThis, CCINIClass* pINI) { INI_EX exINI(pINI); - this->OpenTopped_DecloakToFire.Read(exINI, GameStrings::General, "OpenTopped.DecloakToFire"); } // this runs between the before and after type data loading methods for rules ini From c0a5889422d739908a9c69d9b54a0683c5c3b590 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:36:32 -0600 Subject: [PATCH 12/21] Revert "Make this behavior normal by default" This reverts commit fdb880d6992f97b3a4243fe842852029b92003e1. --- src/Ext/Rules/Body.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ext/Rules/Body.h b/src/Ext/Rules/Body.h index cb3691ef94..078044691d 100644 --- a/src/Ext/Rules/Body.h +++ b/src/Ext/Rules/Body.h @@ -556,7 +556,7 @@ class RulesExt , FallingDownTargetingFix { false } , AIAirTargetingFix { false } - , OpenTopped_DecloakToFire { true } + , OpenTopped_DecloakToFire { false } , SortCameoByName { false } From 1cc2c9d513cb1a754d5b2f514060cf99683d77e5 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:28:08 -0600 Subject: [PATCH 13/21] Update Hooks.Cloak.cpp --- src/Ext/Techno/Hooks.Cloak.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 99ec537590..04f789f998 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -202,5 +202,16 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) { + GET(TechnoClass*, pThis, ESI); + GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); + + auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->GetTechnoType()); + const bool applyFix = pTypeExt->OpenTopped_DecloakToFire.isset() + ? pTypeExt->OpenTopped_DecloakToFire.Get() + : RulesExt::Global()->OpenTopped_DecloakToFire; + + if (applyFix && checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) + pThis->Transporter->Uncloak(true); + return 0; -} +} \ No newline at end of file From bf21a76410c429a04a2e136d8f58c2e01f9e4548 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:38:22 -0600 Subject: [PATCH 14/21] Revert "Update Hooks.Cloak.cpp" This reverts commit 1cc2c9d513cb1a754d5b2f514060cf99683d77e5. --- src/Ext/Techno/Hooks.Cloak.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 04f789f998..99ec537590 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -202,16 +202,5 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) { - GET(TechnoClass*, pThis, ESI); - GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); - - auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->GetTechnoType()); - const bool applyFix = pTypeExt->OpenTopped_DecloakToFire.isset() - ? pTypeExt->OpenTopped_DecloakToFire.Get() - : RulesExt::Global()->OpenTopped_DecloakToFire; - - if (applyFix && checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) - pThis->Transporter->Uncloak(true); - return 0; -} \ No newline at end of file +} From 77cf61b48345c376c188dab73fc7047eb96a7ccd Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:17:00 -0600 Subject: [PATCH 15/21] Update Hooks.Cloak.cpp --- src/Ext/Techno/Hooks.Cloak.cpp | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 99ec537590..764e52a0c3 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -181,26 +181,35 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) { enum { Skip = 0x6FCA4F, Continue = 0x6FCA36, NotApplicable = 0x6FCA5E }; - GET(TechnoClass*, pThis, ESI); - - auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->GetTechnoType()); - const bool applyFix = pTypeExt->OpenTopped_DecloakToFire.isset() - ? pTypeExt->OpenTopped_DecloakToFire.Get() - : RulesExt::Global()->OpenTopped_DecloakToFire; - - if (!applyFix) - return 0; - GET(WeaponTypeClass*, pWeapon, EBX); if (!pWeapon->DecloakToFire) return NotApplicable; + GET(TechnoClass*, pThis, ESI); + + if (pThis->InOpenToppedTransport && pThis->Transporter) + { + auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->Type); + if (pTransporterTypeExt->OpenTopped_DecloakToFire.Get(RulesExt::Global()->OpenTopped_DecloakToFire)) + return NotApplicable; + } + R->EAX(pThis->CloakState); return Continue; } DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) { + GET(TechnoClass*, pThis, ESI); + GET_STACK(bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC)); + + if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) + { + auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->Type); + if (pTransporterTypeExt->OpenTopped_DecloakToFire.Get(RulesExt::Global()->OpenTopped_DecloakToFire)) + pThis->Transporter->Uncloak(true); + } + return 0; -} +} \ No newline at end of file From 46b47b1653a3ddf893ba8f4b375c1928299382e3 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:30:25 -0600 Subject: [PATCH 16/21] Update Hooks.Cloak.cpp --- src/Ext/Techno/Hooks.Cloak.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ext/Techno/Hooks.Cloak.cpp b/src/Ext/Techno/Hooks.Cloak.cpp index 764e52a0c3..9cf0a71c51 100644 --- a/src/Ext/Techno/Hooks.Cloak.cpp +++ b/src/Ext/Techno/Hooks.Cloak.cpp @@ -190,7 +190,7 @@ DEFINE_HOOK(0x6FCA26, TechnoClass_CanFire_RevertAresOpenTopCloakFix, 0x6) if (pThis->InOpenToppedTransport && pThis->Transporter) { - auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->Type); + auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->GetTechnoType()); if (pTransporterTypeExt->OpenTopped_DecloakToFire.Get(RulesExt::Global()->OpenTopped_DecloakToFire)) return NotApplicable; } @@ -206,10 +206,10 @@ DEFINE_HOOK(0x6FCD1D, TechnoClass_CanFire_OpenTopCloakFix, 0x5) if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter) { - auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->Type); + auto const pTransporterTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Transporter->GetTechnoType()); if (pTransporterTypeExt->OpenTopped_DecloakToFire.Get(RulesExt::Global()->OpenTopped_DecloakToFire)) pThis->Transporter->Uncloak(true); } return 0; -} \ No newline at end of file +} From 467c0b98aab98b88116812ce591322eb7b730b18 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:55:12 -0600 Subject: [PATCH 17/21] Update docs --- docs/New-or-Enhanced-Logics.md | 2 ++ docs/Whats-New.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 83f2fafb5d..9a0af6956c 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1556,6 +1556,7 @@ DrainMoneyDisplay.OnTarget.UseDisplayIncome= ; boolean - `OpenTopped.AllowFiringIfDeactivated` can be used to customize whether or not passengers can fire out when the transport is deactivated (EMP, powered unit etc). - `OpenTopped.ShareTransportTarget` controls whether or not the current target of the transport itself is passed to the passengers as well. - You can also customize range bonus and damage multiplier for passenger inside the transport with `OpenTransport.RangeBonus/DamageMultiplier`, which works independently from transport's `OpenTopped.RangeBonus/DamageMultiplier`. +- `OpenTopped.DecloakToFire` can customize if a transport has to uncloak to have passengers fireout if transport is also OpenTopped. ```ini [SOMETECHNO] ; TechnoType, transport with OpenTopped=yes @@ -1565,6 +1566,7 @@ OpenTopped.WarpDistance= ; integer, default to [CombatDamage] - OpenTopped.IgnoreRangefinding=false ; boolean OpenTopped.AllowFiringIfDeactivated=true ; boolean OpenTopped.ShareTransportTarget=true ; boolean +OpenTopped.DecloakToFire=true ; boolean, defaults to [General] -> OpenTopped.DecloakToFire=True [SOMETECHNO] ; TechnoType, passenger OpenTransport.RangeBonus=0 ; integer diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 8e8962f2c6..b685b3cc01 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -643,7 +643,7 @@ Fixes / interactions with other extensions: - Fixed the issue that technos cannot spawn survivors due to non-probabilistic reasons when the tech type was destroyed (by NetsuNegi) - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed (by NetsuNegi) - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally (by NetsuNegi) -- Passengers in open-topped transports can no longer decloak the transporter when firing weapons with `DecloakToFire=yes`. The transporter will only decloak if it fires its own weapons. +- Fixed ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized. ``` From c686422830336603713877ea79b74831135f5b7b Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:56:19 -0600 Subject: [PATCH 18/21] Update CREDITS.md --- CREDITS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CREDITS.md b/CREDITS.md index e5229dec5f..44d70b704a 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -750,5 +750,6 @@ This page lists all the individual contributions to the project by their author. - **Rise of the East community** - extensive playtesting of in-dev features - **11EJDE11** - Prevent mpdebug number from being drawn when visibility toggled off - **RAZER**: - - Revert Ares patch to allow passengers inside cloaked transports which are opentopped fire out - Wall overlay unit sell exploit fix + - Revert Ares patch to allow OpenTopped transport customization. + From 3fadd900cadc68f0fe6e7ad166f4755040ef819d Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:26:56 -0600 Subject: [PATCH 19/21] Update New-or-Enhanced-Logics.md --- docs/New-or-Enhanced-Logics.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 9a0af6956c..595dfdc02f 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -1559,6 +1559,9 @@ DrainMoneyDisplay.OnTarget.UseDisplayIncome= ; boolean - `OpenTopped.DecloakToFire` can customize if a transport has to uncloak to have passengers fireout if transport is also OpenTopped. ```ini +[General] +OpenTopped.DecloakToFire=true ; boolean + [SOMETECHNO] ; TechnoType, transport with OpenTopped=yes OpenTopped.RangeBonus= ; integer, default to [CombatDamage] -> OpenToppedRangeBonus OpenTopped.DamageMultiplier= ; floating point value, default to [CombatDamage] -> OpenToppedDamageMultiplier @@ -1566,7 +1569,7 @@ OpenTopped.WarpDistance= ; integer, default to [CombatDamage] - OpenTopped.IgnoreRangefinding=false ; boolean OpenTopped.AllowFiringIfDeactivated=true ; boolean OpenTopped.ShareTransportTarget=true ; boolean -OpenTopped.DecloakToFire=true ; boolean, defaults to [General] -> OpenTopped.DecloakToFire=True +OpenTopped.DecloakToFire= ; boolean, defaults to [General] -> OpenTopped.DecloakToFire [SOMETECHNO] ; TechnoType, passenger OpenTransport.RangeBonus=0 ; integer From c50ea0d5beb9cc3e4298d3376deca6e9c7558e15 Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:39:50 -0600 Subject: [PATCH 20/21] Update Whats-New.md --- docs/Whats-New.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Whats-New.md b/docs/Whats-New.md index b685b3cc01..c5860aa138 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -643,7 +643,7 @@ Fixes / interactions with other extensions: - Fixed the issue that technos cannot spawn survivors due to non-probabilistic reasons when the tech type was destroyed (by NetsuNegi) - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed (by NetsuNegi) - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally (by NetsuNegi) -- Fixed ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized. +- Fixed ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized (by RAZER) ``` From 16632239550f9152f0a150d57e4778b05c012acc Mon Sep 17 00:00:00 2001 From: RAZER <79311432+CnCRAZER@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:42:29 -0600 Subject: [PATCH 21/21] Update Fixed-or-Improved-Logics.md --- docs/Fixed-or-Improved-Logics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 6c78b8c2ec..dbaa9e7ef4 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -343,7 +343,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the bug that vehicle survivor can spawn on wrong position when transport has been destroyed. - Fixed the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally. - Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat. -- Passengers in open-topped transports can no longer decloak the transporter when firing weapons with `DecloakToFire=yes`. The transporter will only decloak if it fires its own weapons. +- Fixed ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized. ## Newly added global settings