kandashi / Active-Token-Lighting

MIT License
24 stars 24 forks source link

Values from Active Effects get added like strings #15

Closed RayakiTheTurtle closed 3 years ago

RayakiTheTurtle commented 3 years ago

When I add two active effects altering the same flag, e.g. dimSight, the values do not get added like numbers but they get appended like strings. For example "Add 10 to dimSight" and "Add 20 to dimSight" results in "1020 in dimSight".

Steps to reproduce:

  1. Create a new world, system dnd5e.
  2. Activate modules "Active Token Lighting", "DAE" and "libwrapper".
  3. Create new actor.
  4. Add new active effect to actor with two attributes.
    • "flags.ATL.lighting.dimSight" - Mode "Add" - Value 10 - Prio 20
    • "flags.ATL.lighting.dimSight" - Mode "Add" - Value 20 - Prio 20
  5. Submit Changes.
  6. Result: On the actor token, the value for dimSight is "1020" and not as expected "30".

Screenshot: 2021-02-03 19_46_07-Foundry Virtual Tabletop • A Standalone Virtual Tabletop Application

Versions:

Edit: fixed a number

kandashi commented 3 years ago

thanks for the catch, i'll look into this

kandashi commented 3 years ago

So it appears that you cannot use this sort of addition with flag data at all. I will add this to the list of known issues