Skip to content

Conversation

Cerapter
Copy link
Contributor

@Cerapter Cerapter commented Aug 9, 2025

This PR extends the usage of modular beyond just changing the damage type to B, P, or S.

  • The existing B-P-S switcher modular trait is kept as-is so that no migration is necessary.
  • Several parts of the code where it is assumed that the modular selection can only be a damage type is changed to be just a string (which should be the key of the modular config, see below).
  • A new PF2E config is introduced, called modularConfigs, that matches traits to sets of modular configs, which they themselves match a string key to an optional damage type (optional because SF2's shock truncheon), an array of traits (that can be empty), and a label that is effectively the localisation of the key of the config.
  • Added the modular trait to Switchscythe, with the Switchscythe-specifics.

Though not present here, I've tested this with a few setups, like having a thrown trait in the modular trait, or with combination weapons.
Here's a visual demonstration:

modular_showcase.mp4

There are a few spots where I'm not sure if I approached this correctly -- WeaponTraitToggles's applyChanges() and WeaponPF2e's toThrownUsage(), I'm not too sure about, the latter I think might benefit more from a reorganisation from when data is handled? But I don't know enough about the system to feel out how it would best be reorganised, so consider this a "half-draft" PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants