Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
853a80b
Update Hooks.Cloak.cpp
CnCRAZER Feb 20, 2026
b7173e7
Update Fixed-or-Improved-Logics.md
CnCRAZER Feb 20, 2026
cc45b91
Uncloak true -> false
CnCRAZER Feb 20, 2026
fec7dc1
Test passenger weapons not forcing transport to decloak
CnCRAZER Feb 20, 2026
a7d0b5d
Update Hooks.Cloak.cpp
CnCRAZER Feb 21, 2026
b6f74ea
Update docs
CnCRAZER Feb 21, 2026
1be41fc
Update CREDITS.md
CnCRAZER Feb 21, 2026
6ec6657
Add OpenTopped.DecloakToFire option
CnCRAZER Feb 22, 2026
5182b67
Merge branch 'develop' into ares-fix-opentopped-transports
CnCRAZER Feb 22, 2026
fdb880d
Make this behavior normal by default
CnCRAZER Feb 22, 2026
399ab51
Merge branch 'ares-fix-opentopped-transports' of https://github.com/C…
CnCRAZER Feb 22, 2026
81ba9f6
Update Body.cpp
CnCRAZER Feb 22, 2026
52a4aab
Revert "Update Body.cpp"
CnCRAZER Feb 22, 2026
c0a5889
Revert "Make this behavior normal by default"
CnCRAZER Feb 22, 2026
1cc2c9d
Update Hooks.Cloak.cpp
CnCRAZER Feb 23, 2026
bf21a76
Revert "Update Hooks.Cloak.cpp"
CnCRAZER Feb 23, 2026
77cf61b
Update Hooks.Cloak.cpp
CnCRAZER Feb 25, 2026
46b47b1
Update Hooks.Cloak.cpp
CnCRAZER Feb 25, 2026
467c0b9
Update docs
CnCRAZER Feb 25, 2026
c686422
Update CREDITS.md
CnCRAZER Feb 25, 2026
3fadd90
Update New-or-Enhanced-Logics.md
CnCRAZER Feb 25, 2026
c50ea0d
Update Whats-New.md
CnCRAZER Feb 25, 2026
1663223
Update Fixed-or-Improved-Logics.md
CnCRAZER Feb 25, 2026
5aff73b
Update Whats-New.md
CnCRAZER Feb 25, 2026
62883aa
Update CREDITS.md
CnCRAZER Feb 26, 2026
0ea509b
Update docs/Whats-New.md
CnCRAZER Feb 26, 2026
4fb7dae
Merge branch 'develop' into ares-fix-opentopped-transports
Coronia Mar 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,3 +768,4 @@ This page lists all the individual contributions to the project by their author.
- **RAZER**:
- Wall overlay unit sell exploit fix
- Multiplayer gamespeed fix for RealTimeTimers
- Revert Ares patch to allow OpenTopped transport customization
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,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 ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized.

## Newly added global settings

Expand Down
5 changes: 5 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1555,16 +1555,21 @@ 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.

In `rulesmd.ini`:
```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
OpenTopped.WarpDistance= ; integer, default to [CombatDamage] -> OpenToppedWarpDistance
OpenTopped.IgnoreRangefinding=false ; boolean
OpenTopped.AllowFiringIfDeactivated=true ; boolean
OpenTopped.ShareTransportTarget=true ; boolean
OpenTopped.DecloakToFire= ; boolean, defaults to [General] -> OpenTopped.DecloakToFire

[SOMETECHNO] ; TechnoType, passenger
OpenTransport.RangeBonus=0 ; integer
Expand Down
2 changes: 2 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,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)
- Fixed ares hook which stopped OpenTopped transports from firing if cloaked. This can now be customized (by RAZER & Morton)

```

### 0.4.0.3
Expand Down
2 changes: 2 additions & 0 deletions src/Ext/Rules/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -656,6 +657,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)
Expand Down
2 changes: 2 additions & 0 deletions src/Ext/Rules/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ class RulesExt

Valueable<bool> FallingDownTargetingFix;
Valueable<bool> AIAirTargetingFix;
Valueable<bool> OpenTopped_DecloakToFire;

Valueable<bool> SortCameoByName;

Expand Down Expand Up @@ -555,6 +556,7 @@ class RulesExt

, FallingDownTargetingFix { false }
, AIAirTargetingFix { false }
, OpenTopped_DecloakToFire { false }

, SortCameoByName { false }

Expand Down
39 changes: 39 additions & 0 deletions src/Ext/Techno/Hooks.Cloak.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "Body.h"
#include <Ext/Rules/Body.h>

namespace CloakTemp
{
Expand Down Expand Up @@ -174,3 +175,41 @@ 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);

if (pThis->InOpenToppedTransport && pThis->Transporter)
{
auto const pTransporterTypeExt = TechnoExt::ExtMap.Find(pThis->Transporter)->TypeExtData;
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(const bool, checkIfTargetInRange, STACK_OFFSET(0x20, 0xC));

if (checkIfTargetInRange && pThis->InOpenToppedTransport && pThis->Transporter)
{
auto const pTransporterTypeExt = TechnoExt::ExtMap.Find(pThis->Transporter)->TypeExtData;
if (pTransporterTypeExt->OpenTopped_DecloakToFire.Get(RulesExt::Global()->OpenTopped_DecloakToFire))
pThis->Transporter->Uncloak(true);
}

return 0;
}
2 changes: 2 additions & 0 deletions src/Ext/TechnoType/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,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");

Expand Down Expand Up @@ -1580,6 +1581,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)

Expand Down
2 changes: 2 additions & 0 deletions src/Ext/TechnoType/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class TechnoTypeExt
Valueable<bool> OpenTopped_ShareTransportTarget;
Valueable<bool> OpenTopped_UseTransportRangeModifiers;
Valueable<bool> OpenTopped_CheckTransportDisableWeapons;
Nullable<bool> OpenTopped_DecloakToFire;
Valueable<int> OpenTransport_RangeBonus;
Valueable<float> OpenTransport_DamageMultiplier;

Expand Down Expand Up @@ -587,6 +588,7 @@ class TechnoTypeExt
, OpenTopped_ShareTransportTarget { true }
, OpenTopped_UseTransportRangeModifiers { false }
, OpenTopped_CheckTransportDisableWeapons { false }
, OpenTopped_DecloakToFire {}
, OpenTransport_RangeBonus { 0 }
, OpenTransport_DamageMultiplier { 1.0f }

Expand Down
Loading