Skip to content

Comments

Upgrade baseModifier fields to support resolvable values#20539

Open
kanongil wants to merge 1 commit intofoundryvtt:v13-devfrom
kanongil:better-special-stats
Open

Upgrade baseModifier fields to support resolvable values#20539
kanongil wants to merge 1 commit intofoundryvtt:v13-devfrom
kanongil:better-special-stats

Conversation

@kanongil
Copy link
Contributor

This is a compliment to #20515 to allow SpecialStatistic baseModifier.{check, mod, dc} fields to support resolvable values. This makes it much more versatile, and enables to create level-dc and merged stats.

To create a level DC:

{
  "key": "SpecialStatistic",
  "slug": "level",
  "label": "PF2E.LevelLabel",
  "baseModifier": {
    "dc": "match(when(lte(@actor.level, 20), 14 + floor(max(@actor.level, 0) * 1.345)), 40 + (min(@actor.level, 25) - 20) * 2)"
  }
}

To support Predictable!:

{
  "key": "SpecialStatistic",
  "slug": "deception-or-hard-level",
  "label": "Deception or Hard Level",
  "baseModifier": {
    "dc": "max(@actor.skills.deception.dc.value, 2 + match(when(lte(@actor.level, 20), 14 + floor(max(@actor.level, 0) * 1.345)), 40 + (min(@actor.level, 25) - 20) * 2))"
  }
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant