DEGENESIS-FoundryVTT icon indicating copy to clipboard operation
DEGENESIS-FoundryVTT copied to clipboard

Reverse ego/wounds/trauma values

Open Dentatum opened this issue 1 year ago • 1 comments

Hey!

It seems the majority of modules and Foundry stuff that track ego/wounds/trauma are not compatible with systems like this, so been wondering if a 'reverse' version of these attributes could be created for tracking purposes, and be available in the resources list.

Thank you!

Dentatum avatar Feb 05 '24 21:02 Dentatum

I will look into it, but with low priority.

greedyj4ck avatar Feb 05 '24 21:02 greedyj4ck

I added three getters to actor entity:

get fleshwoundsReversed() {
    return (
      this.system.condition.fleshwounds.max -
      this.system.condition.fleshwounds.value
    );
  }

  get traumaReversed() {
    return (
      this.system.condition.trauma.max - this.system.condition.trauma.value
    );
  }

  get sporeReversed() {
    return this.system.condition.spore.max - this.system.condition.spore.value;
  }

Please test it after V12 main release, and check if the 3rd party modules can work with getters, not with template values.

Note: implementing it at template level would be kind of pointless. If getters wont work, we will get back to the topic during migration to data models.

greedyj4ck avatar May 11 '24 18:05 greedyj4ck