schlosrat / token-health

FoundryVTT module
5 stars 10 forks source link

Request: Support for Starfinder #50

Closed Ironxxx closed 2 years ago

Ironxxx commented 3 years ago

Unless I'm being thick I can't make this work with Starfinder. Starfinder has attributes.hp.temp which are removed first if the player has any.. Then, generally, attributes.sp.value (stamina). Once stamina is at zero, attributes.hp.value is reduced.

I can use stamina as the temporary hit points but can't get it working using all three at once.

Sercoach commented 3 years ago

I got it to work, but you need to split between stamina damage and HP damage. I set HP as the primary damage and Stamina as the secondary and if an attack would spillover I have to apply the damage in chunks.

Ironxxx commented 3 years ago

Yeah thats what I did first. I now have Primary as HP / attributes.hp.value / attributes.hp.max and attributes.sp.value as the Temporary 1st Health Pool Then I have Secondary as Temps / attributes.hp.temp / attributes.hp.tempmax This means that pressing Enter it will always target the SP then HP and Shift Enter will always target HP If you know you have Temps you can manually click on Temps and knock those off but they come up so rarely I found its better to have them set as the option.

BTW, in SF you can also Right Click on damage in the chat window and you get a pop up asking you what damage or healing to apply. I just found this out today, this method takes from Temps, then SP then HP as it should.

VelniasQ commented 2 years ago
if (game.system.id === 'sfrpg') {
    DEFAULT.HITPOINTS_ATTRIBUTE_1 = 'attributes.hp.value';
    DEFAULT.MAX_HITPOINTS_ATTRIBUTE_1 = 'attributes.hp.max';
    DEFAULT.ALT_MAX_HITPOINTS_ATTRIBUTE_1 = 'attributes.sp.max';
    DEFAULT.TEMP_HITPOINTS_ATTRIBUTE_1 = 'attributes.sp.value';
  }
schlosrat commented 2 years ago

Thanks Dmitry. I've incorporated your code above into settings.js and it will roll out with the next update.

From the sound of things though it seems like this system really wants to have three pools of health. That would be a more complex update, but not infeasible. It may take some time to get to since there seems to be a workaround and my focus at the moment is updating for FVTT 9

schlosrat commented 2 years ago

Done version 0.5.2