Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Bonuses on tokens causing errors and ruler failure when entering region with terrain attached #209

Open
ctbritt opened this issue Sep 23, 2024 · 4 comments

Comments

@ctbritt
Copy link

ctbritt commented Sep 23, 2024

so i've been having issues with Elevation Ruler, Terrain Mapper, and Region Effects. Some tokens, when entering a region with Difficult (x2) default terrain, the ruler would stop showing and I'd get a couple of really big error messages.

I have tracked this down to the latest version of ER: 0.10.11. The issue seems to be the system.attributes.ac.bonus and any of the system.bonuses.x.x keys. If ac..bonus is set to "Add" a bonus like system.attributes.ac.bonus | add | 2, that is a string, and apparently ER or something is looking for an integer. If I change the add mode to custom i get the ruler back and no more errors.

If I have any effects that add system.bonuses.x.x and it's set to any mode (custom, add, override) ... it will give me those errors.

image image

In the below gif, the first token I move has a system.attributes.ac.bonus | custom | 1 and as you can see it still shows the ruler. I don't get any error messages.

https://share.cleanshot.com/LsLCQ0J7

the second token I move has two system.bonuses.x.x on it and as you can see, the ruler disappears and i get those errors above with every square I move.

So something in MovePenalty.js, I think, is expecting an integer, but getting a string and freaking out.

@caewok
Copy link
Owner

caewok commented Oct 2, 2024

I am not sure I understand this sentence: "If ac..bonus is set to "Add" a bonus like system.attributes.ac.bonus | add | 2, that is a string..."

2 is not a string in that scenario, and in any event, adding such an effect using only Elevation Ruler and Terrain Mapper works fine. So definitely a conflict with some other module.

However, I see several modules in your error message besides just ER, TM, and Region Effects. Can you narrow down the modules you are using to only the absolutely necessary ones for the error to appear?

@ctbritt
Copy link
Author

ctbritt commented Oct 3, 2024

ok. sorry be more clear.

With only these modules enabled:

  • ER
  • libwrapper
  • Region Active Effects
  • Terrain Mapper

Elevation rulers works fine, except when an actor has an active effect that modifies the system.attributes.ac.bonus key. If it's set to anything other than override, the ruler will not show up in the Difficult Terrain region. Like so:

https://share.cleanshot.com/8ztQd5Np

And there are no error message sin the console.

(I can change the mode to override and it's ok. I would prefer add, since they might have other bonuses to their AC. I suspect it's because the "add" mode converts the value to a string and this is somehow messing with the MovePenalty.js which looks for an integer.)

That's all if DAE is disabled. If DAE (and socketlib dependency) is enabled, and system.attributes.ac.bonus is set to add, it throws up ugly red errors like so:
CleanShot 2024-10-03 at 13 36 41
The ruler, again doesn't display as in the gif above.

If i set system.attributs.ac.bonus to override, the errors go away, but the difficult terrain is not measured or displayed, like so:
CleanShot 2024-10-03 at 13 46 19With DAE disabled, and system.attributes.ac.bonus set to override, it works normally, like so:
CleanShot 2024-10-03 at 13 40 47

So, to recap:

  • With DAE disabled and system.attributes.ac.bonus set to override: ER and TM and RAE work normally.
  • with DAE enabled and system.attributes.ac.bonus set to override: ER does not reflect the difficult terrain AE from the region. Shows as if the region isn't even there.
  • With DAE enabled and system.attributes.ac.bonus set to anything other than override: ER doesn't reflect the difficult terrain and doesn't show the ruler at all. Many red errors show up in the console.

@ctbritt
Copy link
Author

ctbritt commented Oct 3, 2024

I would add that these are two issues:

  1. the override vs add for system.attributes.ac.bonus. This only effects actors with that key modified.
  2. The DAE conflict: With DAE enabled, ER doesn't work with TM or RAE at all for any token, whether they have the system.attributes.ac.bonus AE or not. It acts like the difficult terrain region isn't there at all/.

@caewok
Copy link
Owner

caewok commented Oct 6, 2024

Try v0.10.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants