Custom Foundry VTT macros and utilities for Pathfinder 1e
  • JavaScript 100%
Find a file
2026-09-01 14:15:15 -07:00
macros remove individual script 2026-09-01 14:07:49 -07:00
packs/macros feat: restructure RulyMod as a full Foundry VTT module with macro compendium pack 2026-09-01 14:12:58 -07:00
scripts fix: enforce outer libWrapper priority over NAS and declare optional dependency 2026-09-01 14:15:15 -07:00
tools feat: restructure RulyMod as a full Foundry VTT module with macro compendium pack 2026-09-01 14:12:58 -07:00
.gitignore feat: restructure RulyMod as a full Foundry VTT module with macro compendium pack 2026-09-01 14:12:58 -07:00
module.json fix: enforce outer libWrapper priority over NAS and declare optional dependency 2026-09-01 14:15:15 -07:00
package.json feat: restructure RulyMod as a full Foundry VTT module with macro compendium pack 2026-09-01 14:12:58 -07:00
README.md feat: restructure RulyMod as a full Foundry VTT module with macro compendium pack 2026-09-01 14:12:58 -07:00

RulyMod

Foundry Virtual Tabletop (Foundry VTT) module for Pathfinder 1e providing automation utilities, delayed damage interception, dynamic buff text enrichers, and a macro compendium pack.

Repository Information

  • Module ID: rulymod
  • Remote: ssh://forgejo@forge.rulytafzil.com:2222/Home/RulyMod.git
  • Tracked Branch: main

Features

1. Automatic World-Load Registration

When installed and enabled as a module, RulyMod automatically:

  • Registers the @Buff[...] custom text enricher on Foundry startup (init / ready).
  • Hooks into ActorPF.prototype.applyDamage via libWrapper for Guardian Sphere delayed damage interception.
  • Tracks updateCombat turn turnover for Never Defeated end-of-turn pool flushing.
  • Exposes window.RulyMod globally (applyBuff, resolveDelayedDamage, toggleTorch).

2. Macro Compendium Pack (RulyMod Macros)

Included out of the box in the Compendium sidebar (packs/macros):

  • Apply Buff: Configurable buff activator and charge/SP consumer.
  • Delayed Damage Wrapper: Manual wrapper registration check and utility.
  • Toggle Torch: Quick lighting emission toggle with torch flicker animations.
  • Delayed Damage (Legacy/Hybrid): Dual-channel fallback version.

Macro & Enricher Reference

Interactive Text Enricher (@Buff[...])

Embed @Buff tags into any item description, action footnote, chat card, or journal entry. Foundry automatically renders them as clickable buttons:

@Buff[Sentinel's Reserve]
@Buff[Sentinel's Reserve;charges=1]
@Buff[Sentinel's Reserve;sp=1;charges=1]
@Buff[Sentinel's Reserve;sp=1;charges=1]{Activate Reserve}
@Buff[tag=sentinelsReserve;sp=1;cost=1]

Supported Parameters (semicolon-separated):

  • buff= / tag= / first argument: Name, system tag, or item ID of the buff.
  • sp= / spCost=: Spell Points to deduct (default: 0).
  • charges= / cost=: Item/feature resource charges to deduct (default: 0).
  • source= / chargeSource=: Companion feat holding charges if separate from the buff.
  • mode=: "reactivate" (default), "activate", or "toggle".
  • {Custom Label}: Optional custom text label for the rendered button.

Delayed Damage & Never Defeated

  • Interception: Intercepts raw incoming damage before any temporary HP (Nevela's Automation Suite or core PF1e) is deducted.
  • Capacity: BAB * 3 by default, or overridden by actor flag delayedDamageCap.
  • End-of-Turn Resolution:
    • If the combatant ends their turn with damage in their pool and has at least 1 SP, prompts to spend 1 SP on Never Defeated.
    • If accepted: Flushes pool, minuses 1 SP, outputs chat card, takes 0 damage.
    • If declined or 0 SP: Applies delayed damage normally via applyDamage().

Development & Building Packs

To recompile macros from macros/*.js into the LevelDB compendium (packs/macros):

npm install
npm run build:packs