Skip to content

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Oct 22, 2025

This change fixes historic bonus weapons not triggering reliably. The issue is that whenever a historic bonus weapon is triggered (e.g. a firestorm) it resets the historic bonus count for all weapons using the same template. This means that if a firestorm is triggered while another firestorm is half way to triggering, that other firestorm's progress will be reset.

In addition, historic damage instances now more accurately expire based on the weapon template's HistoricBonusTime rather than the global HistoricDamageLimit. Historic damage involved in triggering a historic weapon cannot be used in subsequent attempts.

Example

Four MiGs must strike a target within a certain radius to trigger a firestorm. Each missile contributes +1 to the historic bonus count of NapalmMissileWeapon, which must reach 8 to create the firestorm.

Now imagine a scenario where there are two squadrons of four MiGs each, Squad A and Squad B. Both squads strike different targets at the roughly same time.

Squad A MiG 1 increases the historic bonus count to 2.
Squad A MiG 2 increases the historic bonus count to 4.
Squad B MiG 1 increases the historic bonus count to 6.
Squad B MiG 2 increases the historic bonus count to 8.
Squad A MiG 3 increases the historic bonus count to 10.
Squad A MiG 4 increases the historic bonus count to 12.
Of the 12 historic bonus instances, 8 are determined to be in the same location, and thus a firestorm is triggered for Squad A.
The triggering of Squad A's firestorm resets the historic bonus count to 0.
Squad B MiG 3 increases the historic bonus count to 2.
Squad B MiG 4 increases the historic bonus count to 4.
No firestorm is triggered for Squad B.

Demonstration of the bug

BAD_FIRESTORM.mp4

Note: When testing with Inferno Cannons, it is preferable to test without the HeightDieUpdate modules in the InfernoTankShell and InfernoTankShellUpgraded weapon objects for 100% accuracy. See #1564 from the patch repository for more info.

@Stubbjax Stubbjax self-assigned this Oct 22, 2025
@Stubbjax Stubbjax added Bug Something is not working right, typically is user facing China Affects China faction Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Oct 22, 2025
@xezon xezon added the Buff Makes a thing more powerful label Oct 24, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New modified implementation looks much better. 👍

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

If I am not mistaken Historic Weapon is also missing xfer. I have tracked it here: #1754

@xezon xezon changed the title bugfix: Fix unreliability of historic bonus weapons bugfix(weapon): Fix unreliability of historic bonus weapons Oct 28, 2025
@xezon xezon added the Approved Pull Request was approved label Oct 28, 2025
@xezon xezon merged commit 5dff203 into TheSuperHackers:main Oct 29, 2025
19 checks passed
@Stubbjax Stubbjax deleted the fix-historic-weapons branch November 3, 2025 04:03
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…Hackers#1727)

This change fixes historic bonus weapons not triggering reliably. The issue is that whenever a historic bonus weapon is triggered (e.g. a firestorm) it resets the historic bonus count for all weapons using the same template. This means that if a firestorm is triggered while another firestorm is half way to triggering, that other firestorm's progress will be reset.

In addition, historic damage instances now more accurately expire based on the weapon template's HistoricBonusTime rather than the global HistoricDamageLimit. Historic damage involved in triggering a historic weapon cannot be used in subsequent attempts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Pull Request was approved Buff Makes a thing more powerful Bug Something is not working right, typically is user facing China Affects China faction Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only 3 Fire Storms can be active at the same time

2 participants