Moerill / token-mold

MIT License
24 stars 33 forks source link

FV11 compatibility #167

Closed spidermoiz closed 11 months ago

spidermoiz commented 1 year ago

Token mold has completely stopped working with foundry V11

Foundry version V11 build 300 DND version 2.2.1

r-valyar commented 1 year ago

It will be great if this module is updated to Foundry v11, quite powerful module!

r-valyar commented 1 year ago

@Moerill is this great module going to see the light of update? :)

JayDGee commented 1 year ago

Would be lovely if this became compatible with version 11. I'm really missing it in my current setup. Had some great little improvements that I don't need but would love back if possible.

JayDGee commented 12 months ago

Gettign the message The module "token-mold" contains "dependencies" which is deprecated in favor of "relationships.requires"

Hopefully that is easy to resolve and that this project is stil worken on. If its not being worked on, thank you for the time you did spend on it. It was very helpful.

modzy2 commented 12 months ago

Just for the HP rolling, If it helps, the actorData is no longer associated with a token, it now has a "delta" section in which can be set the changes from the actor for that token. For example, to set the HP it needs (in _rollHP in token-mold.js):

  setProperty(data, "delta.system.attributes.hp.value", val);
  setProperty(data, "delta.system.attributes.hp.max", val);

instead of setting actorData.system.attributes.hp.value and .max (or the pre-v10 properties)

I'm no js programmer, the existing code is trying to cater for the various foundryvtt versions but now there are 3 models. currently it only tests less then 10 vs >=10, now it needs a different property value for <10, =10, and >10

For now I've just inserted the two lines above after the current setProperty lines in _rollHP in my token-mold.js to make the HP work.