Published on

Entrench Trait in FoundryVTT

Author

I bought some Bastion Plate for my sword-n-board fighter. Two of its traits are set up properly in FoundryVTT: the saves for bulwark, and the hindering speed penalty. But that last trait, Entrench, doesn't appear to have any automation at all. What a disaster: that's a situational +1 to AC, so we definitely want to make sure it's included when NPCs are rolling to hit me, since that'll be easy to forget about.

For the bastion plate, the Entrench trait does the following, for melee attacks (there's another item for entrenching vs. ranged):

. . . while wearing it you can spend a single action to gain a +1 circumstance bonus to AC against a certain type of attack until the start of your next turn . . .

Since Entrench-ing requires taking an action, I asked my GM to make an effect for me. I'll put it on my hotbar, and when I take the Entrench action, I'll make sure to use it.

It sounds complicated to make an effect that gives +1 AC vs. melee strikes only, but it turns out to be very straightforward: this circumstance bonus only applies to rolls against it with the "melee" predicate. So it's really this simple:

A FoundryVTT effect called Entrenched: Melee, showing the rules tab. There is a rule element to give a +1 AC circumstance bonus when there is a predicate "melee" on the roll.

A FoundryVTT effect called Entrenched: Melee, showing the description tab. The duration is set to 1 round, at the start of the turn.

Here's the full JSON for the effect, if you want to import it into your Foundry game.

Full JSON for Import
{
  "name": "Entrenched: Melee",
  "type": "effect",
  "effects": [],
  "system": {
    "description": {
      "gm": "",
      "value": ""
    },
    "rules": [
      {
        "key": "FlatModifier",
        "selector": "ac",
        "value": 1,
        "type": "circumstance",
        "predicate": [
          "melee"
        ]
      }
    ],
    "slug": null,
    "_migration": {
      "version": 0.932,
      "lastMigration": null
    },
    "traits": {
      "otherTags": [],
      "value": []
    },
    "publication": {
      "title": "",
      "authors": "",
      "license": "OGL",
      "remaster": false
    },
    "level": {
      "value": 1
    },
    "duration": {
      "value": 1,
      "unit": "rounds",
      "expiry": "turn-start",
      "sustained": false
    },
    "start": {
      "value": 0,
      "initiative": null
    },
    "tokenIcon": {
      "show": true
    },
    "badge": null,
    "context": null,
    "unidentified": false
  },
  "img": "systems/pf2e/icons/equipment/armor/bastion-plate.webp",
  "folder": null,
  "flags": {
    "exportSource": {
      "world": "1-star-dungeon",
      "system": "pf2e",
      "coreVersion": "12.331",
      "systemVersion": "6.3.0"
    }
  },
  "_stats": {
    "coreVersion": "12.331",
    "systemId": "pf2e",
    "systemVersion": "6.3.0",
    "createdTime": 1725075384877,
    "modifiedTime": 1725076181526,
    "lastModifiedBy": "XsDGM6AGMQBAsrfB"
  }
}

After I road-test this a bit, I may PR it to the pf2e system. I think I'd want to add an action to Bastion Plate and the other, similar armour pieces. I'm sure I can find an example of items that add actions to the character?