Custom Foundry VTT macros and utilities for Pathfinder 1e
- JavaScript 100%
| macros | ||
| packs/macros | ||
| scripts | ||
| tools | ||
| .gitignore | ||
| module.json | ||
| package.json | ||
| README.md | ||
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.applyDamagevialibWrapperfor Guardian Sphere delayed damage interception. - Tracks
updateCombatturn turnover for Never Defeated end-of-turn pool flushing. - Exposes
window.RulyModglobally (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 * 3by default, or overridden by actor flagdelayedDamageCap. - 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