Skip to content

Conversation

@arbron
Copy link
Collaborator

@arbron arbron commented Jan 23, 2026

Modifies how armor class data is stored to use multiple formulas rather than only having a single formula that is evaluated. This change means that all enabled formulas are evaluated fully and the one that provides the highest base AC is used.

This also allows armor class formulas to define whether they are usable when the character is wearing armor or wielding a shield. This makes all of the existing unarmoed defense formulas work as expected.

In order to ensure that the previous flat calculation properly overrides the full AC it has been moved to a separate override value. The existing flat input is retained to provide a place for players to manually enter a value that can be used in formulas (like the Natural Armor formula).

Migrations are in place to move the existing actor data to use the new data structure and shims are added to ensure existing active effects that target AC will continue working. The removed calc and formula fields are still set by the winning calculation so no shims are required.

Closes #6121
Closes #6646

Modifies how armor class data is stored to use multiple formulas
rather than only having a single formula that is evaluated. This
change means that all enabled formulas are evaluated fully and the
one that provides the highest base AC is used.

This also allows armor class formulas to define whether they are
usable when the character is wearing armor or wielding a shield.
This makes all of the existing unarmoed defense formulas work as
expected.

In order to ensure that the previous `flat` calculation properly
overrides the full AC it has been moved to a separate `override`
value. The existing `flat` input is retained to provide a place
for players to manually enter a value that can be used in formulas
(like the Natural Armor formula).

Migrations are in place to move the existing actor data to use the
new data structure and shims are added to ensure existing active
effects that target AC will continue working. The removed `calc`
and `formula` fields are still set by the winning calculation so
no shims are required.

Closes #6121
Closes #6646
@arbron arbron self-assigned this Jan 23, 2026
@arbron arbron added the api label Jan 23, 2026
@arbron
Copy link
Collaborator Author

arbron commented Jan 23, 2026

Currently a draft to show the change to the data models and migrations required. Will need to re-write the AC configuration dialog before this can be merged.

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

Labels

Projects

None yet

2 participants