Frstrm / TokenLightCondition

Determine the lighting conditions of a token based on placed lights and token lights
MIT License
1 stars 4 forks source link

System agnostic ? #35

Closed HenriDeh closed 1 year ago

HenriDeh commented 1 year ago

Hello,

Any chance you can make this mod system agnostic? Or work with all systems that have the dim/bright distinction ? I'd like to use this mod with PF2e but it does not show up in the module settings. I think this should be straightforward to do.

Frstrm commented 1 year ago

I'll take a look at the option to remove the system:dnd5e module entries. However, not being familiar with or playing other systems myself ( and any variance as to what they consider to be dim/dark ), I will stipulate that I will only be testing against dnd5e.

HenriDeh commented 1 year ago

I tried to make my own fork of the mod and removed the 5e system entry in the .json. It did not work, so there's perhaps something different at the API level. Which is surprising because illumination really is the same in PF2e as in D&D5e, besides the naming perhaps.

Frstrm commented 1 year ago

If you look at the console, you can see that the module appears to be working in regards to determining light conditions, however it's not generating the effects on the token/actor. It is setting the flags on the actor as expected. I am seeing that the tokenHud does appear to be setting the correct value. image

Frstrm commented 1 year ago

pf2e appears to treat effects as 'items' thus explains why the standard dnd5e 'after effects' method doesn't work.

HenriDeh commented 1 year ago

Ha okay, would this require extensive changes to support the system? I'd understand if you don't care enough about other systems to add this.

Frstrm commented 1 year ago

It's easy enough to make it 'agnostic', but would require more changes to support a different effect setup ( adding, removing, etc. ). Your fork, should get you at a minimum access to the tokenHud indicator. There has been enough pf2e interest to devote some time to look at it, but It may be a bit before I can find time atm.

HenriDeh commented 1 year ago

Okay great, looking forward to this. Being in dim light is mechanically important in PF2e, and it's hard to tell visually if a token is in dim or bright light. So I'm really glad I found this mod. I would contribute myself if I knew JS :/

Frstrm commented 1 year ago

Support for system pf2e added with version 0.6.0 Seems to be ok, with my limited testing in that system. Will be dependent on the pf2e community to give feedback for any required fixes.

HenriDeh commented 1 year ago

Nice, I'll test that soon ! Thanks a lot.