espositos / fvtt-tokenactionhud

Creating a token action HUD module for Foundry VTT
31 stars 38 forks source link

Add support to spellpoint rule for PF1 #279

Open mkahvi opened 3 years ago

mkahvi commented 3 years ago

Spell points are kind of not any specific system but support system for multiple similar or similar enough systems in PF1. Use of spellpoints currently makes TAHUD treat as if the character has no spells available at all.

The spellbook configuration is in actor.data.data.spells.${spellbook}.spellPoints with importantly the .useSystem boolean for detecting the system being used for that particular spellbook and .value for remaining points.

Spells themselves have item.chargeCost for number of spell points they use, which should correspond with evaluated total of item.data.data.spellPoints.cost.

The chargeCost is by default positive number for determining how much is subtracted, but this allows basic math, so negative number can be used for recharging the points.


For experimenting with the system, you need to disable auto calculate spell slots in spell config and enable use spell points.

Screenshot 2021-06-20 143133