When using the stamina variant rule, PCs' health pool is split into hit points and stamina points (which function similarly to hit points), with stamina points being damaged first before hit points. In the current version of the module, stamina is ignored, and only hit points are used. This means the Health% display doesn't accurately reflect a PC's overall well-being, and also means the flash on damage effect does not occur if the damage only reduced stamina and not hit points.
My suggestion is to instead use the total sum of HP and Stamina for all HP-related functions for actors that have stamina. This way if you have (for a contrived example) 20/20 HP and 0/20 Stamina, the Health% display option would show you at half health (yellow color), as your combined HP (20) + Stamina (0) (total 20) is half of your combined max HP (20) + max stamina (20) (total 40).
Stamina is stored in system.attributes.hp.sp.value, and maximum stamina is system.attributes.hp.sp.max. So this is probably a matter of first checking if the actor has these properties, and then if so, using the sum of hp.value + hp.sp.value in situations where you would use hp.value, and using hp.max + hp.sp.max in situations where you would use hp.max.
Note that only PCs use stamina, so NPCs do not have the above mentioned stamina properties. For NPCs, you will have to use only the hp.value and hp.max attributes, as in the base rules.
When using the stamina variant rule, PCs' health pool is split into hit points and stamina points (which function similarly to hit points), with stamina points being damaged first before hit points. In the current version of the module, stamina is ignored, and only hit points are used. This means the Health% display doesn't accurately reflect a PC's overall well-being, and also means the flash on damage effect does not occur if the damage only reduced stamina and not hit points.
My suggestion is to instead use the total sum of HP and Stamina for all HP-related functions for actors that have stamina. This way if you have (for a contrived example) 20/20 HP and 0/20 Stamina, the Health% display option would show you at half health (yellow color), as your combined HP (20) + Stamina (0) (total 20) is half of your combined max HP (20) + max stamina (20) (total 40).
Stamina is stored in
system.attributes.hp.sp.value, and maximum stamina issystem.attributes.hp.sp.max. So this is probably a matter of first checking if the actor has these properties, and then if so, using the sum ofhp.value + hp.sp.valuein situations where you would usehp.value, and usinghp.max + hp.sp.maxin situations where you would usehp.max.Note that only PCs use stamina, so NPCs do not have the above mentioned stamina properties. For NPCs, you will have to use only the
hp.valueandhp.maxattributes, as in the base rules.