Skip to content

raidboss: Allow overwriting triggerSet with the same ID#863

Merged
Souma-Sumire merged 6 commits intoOverlayPlugin:mainfrom
Souma-Sumire:allow-override
Jan 15, 2026
Merged

raidboss: Allow overwriting triggerSet with the same ID#863
Souma-Sumire merged 6 commits intoOverlayPlugin:mainfrom
Souma-Sumire:allow-override

Conversation

@Souma-Sumire
Copy link
Collaborator

@Souma-Sumire Souma-Sumire commented Dec 22, 2025

This allows user js files to fully override build-in triggerSet behaviors by using the same ID.

It enables a streamlined way to deactivate all built-in triggers, ensuring that data variables are no longer subject to unexpected modifications.

This implementation finally makes script management completely predictable, solving a challenge I have faced for a long time.
I sincerely hope this feature can be merged.

@github-actions github-actions bot added raidboss /ui/raidboss module needs-review Awaiting review labels Dec 22, 2025
@etnAtker
Copy link

I strongly support merging this PR.

This brings triggerSet behavior in line with what users actually expect: user customization should win over built-ins. The current "first wins" logic silently ignoring later definitions makes it impossible to cleanly patch a built-in set.

Switching to "last loaded wins" is much more intuitive. Just like with individual triggers, using the same ID is a clear signal that I intend to replace the original. Since load order is deterministic, this doesn't introduce any randomness.

I'd much rather deal with accidental ID collisions (which we can log) than the current behavior where overrides just silently fail. I write and share triggers for my group constantly when new content drops, and this has been a specific pain point for a long time. Would love to see this fixed.

@FloresWayne
Copy link

Strongly support this change.

Allowing user triggerSets to override built-in ones with the same ID finally makes raidboss behavior predictable and controllable.

For advanced users maintaining custom scripts, this is far cleaner than relying on partial disables or fragile workarounds.

This solves a long-standing pain point — hope to see it merged.

@DieMoe233
Copy link

I also agree with this PR—the current loading logic isn't as convenient as expected, and users often have to double-check their custom files.

@valarnin
Copy link
Collaborator

I think this is a good change and support it as well. I would like to examine the logic changes in more detail though when I get some time -- please hold for my review at the least.

@jacob-keller
Copy link

Throwing my hat in the "support merging this PR"

@github-actions github-actions bot added the config ui/config, ui/[module]/config label Dec 25, 2025
@github-actions github-actions bot added docs /docs, /screenshots, *.md 💬ko 💬cn labels Dec 28, 2025
Copy link
Collaborator

@valarnin valarnin left a comment

Choose a reason for hiding this comment

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

These changes look good in general and the logic makes sense, but some thoughts/questions:

  1. Was raidemulator tested with these changes? I don't think there will be any issues, but some of the popup-text overrides in raidemulator are fragile.
  2. Currently these overrides will only work for user/raidboss.js or user/raidboss/*.js overrides, because there's a test rule to have unique triggerset IDs. This means that devs that want to use typescript can't leverage this functionality. Should we designate a "custom" folder for dev-specific triggersets which is excluded from some or all tests and gitigore'd, e.g. ui/raidboss/data/99-custom/*?

@github-actions github-actions bot removed the needs-review Awaiting review label Dec 29, 2025
@github-actions github-actions bot added the needs-review Awaiting review label Jan 4, 2026
@Souma-Sumire
Copy link
Collaborator Author

  1. Was raidemulator tested with these changes? I don't think there will be any issues, but some of the popup-text overrides in raidemulator are fragile.

Tested via raidboss config and raidemulator:

user/My Trigger.js
Options.Triggers.push({
  id: "TheMinstrelsBalladZodiarksFall",
  zoneId: ZoneId.TheMinstrelsBalladZodiarksFall,
  triggers: [
    {
      id: "ZodiarkEx Kokytos",
      type: "StartsUsing",
      netRegex: { id: "6C60", capture: false },
      infoText: "big AOE from user js",
    },
  ],
});
raidemulator imageimage
config imageimage
raidboss imageimage

@Souma-Sumire
Copy link
Collaborator Author

2. Currently these overrides will only work for user/raidboss.js or user/raidboss/*.js overrides, because there's a test rule to have unique triggerset IDs. This means that devs that want to use typescript can't leverage this functionality. Should we designate a "custom" folder for dev-specific triggersets which is excluded from some or all tests and gitigore'd, e.g. ui/raidboss/data/99-custom/*?

Added.
image

@github-actions github-actions bot added the test /test, /ui/test label Jan 5, 2026
@github-actions github-actions bot removed the needs-review Awaiting review label Jan 13, 2026
@Souma-Sumire Souma-Sumire merged commit 8fd83d9 into OverlayPlugin:main Jan 15, 2026
13 checks passed
@Souma-Sumire Souma-Sumire deleted the allow-override branch January 15, 2026 18:55
github-actions bot pushed a commit that referenced this pull request Jan 15, 2026
…ID (#863)

This allows user js files to fully override build-in `triggerSet`
behaviors by using the same ID.

It enables a streamlined way to deactivate all built-in triggers,
ensuring that data variables are no longer subject to unexpected
modifications.

This implementation finally makes script management completely
predictable, solving a challenge I have faced for a long time.
I sincerely hope this feature can be merged. 8fd83d9
github-actions bot pushed a commit to ShadyWhite/cactbot that referenced this pull request Jan 15, 2026
…ID (OverlayPlugin#863)

This allows user js files to fully override build-in `triggerSet`
behaviors by using the same ID.

It enables a streamlined way to deactivate all built-in triggers,
ensuring that data variables are no longer subject to unexpected
modifications.

This implementation finally makes script management completely
predictable, solving a challenge I have faced for a long time.
I sincerely hope this feature can be merged. 8fd83d9
github-actions bot pushed a commit to ShadyWhite/cactbot that referenced this pull request Jan 15, 2026
…ID (OverlayPlugin#863)

This allows user js files to fully override build-in `triggerSet`
behaviors by using the same ID.

It enables a streamlined way to deactivate all built-in triggers,
ensuring that data variables are no longer subject to unexpected
modifications.

This implementation finally makes script management completely
predictable, solving a challenge I have faced for a long time.
I sincerely hope this feature can be merged. 8fd83d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💬cn config ui/config, ui/[module]/config docs /docs, /screenshots, *.md 💬ko raidboss /ui/raidboss module test /test, /ui/test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants