kandashi / Active-Token-Lighting

MIT License
23 stars 25 forks source link

Editing presets not saving in Foundry v11 #142

Closed kaelad02 closed 1 year ago

kaelad02 commented 1 year ago

In Foundry v11, try and edit a preset. I cloned the torch preset and then edited it to change the light's color. Then I applied the preset to a token and the light's color was the original amber and not the color I changed it to.

Buuuurce commented 1 year ago

Had this same problem, tried it in SWADE (3.0.6) and Shadowrun (0.11.2).

kaelad02 commented 1 year ago

@Buuuurce On Discord, in addition to the light color not working you also said Vision Mode didn't work. It's working for me, tested on both dnd5e and SWADE. Can you confirm whether it's working or not for you? And if you wouldn't mind confirming the version of this module you were using. I'm guessing it's 0.6.0 or later.

Buuuurce commented 1 year ago

@Buuuurce On Discord, in addition to the light color not working you also said Vision Mode didn't work. It's working for me, tested on both dnd5e and SWADE. Can you confirm whether it's working or not for you? And if you wouldn't mind confirming the version of this module you were using. I'm guessing it's 0.6.0 or later.

Version 0.6.2 The extra problem I'm having is when I add an ATL based effect to an item and give the item to a character, when the effect has a source I can't use stuff that changes vision modes or adds light, but if I make a standalone effect they work (tested this when I redid the effects I was using for NVGs/Flashlights due to the aforementioned problem with presets, I ended up giving the PCs the item, dragged the effects from the item to the sheet then deleted the original effects granted by the item.)

kaelad02 commented 1 year ago

When you had effects on items, what system were you using? And did you see the effect transferred to the actor (i.e. did it show up on the character sheet's Effects tab)?

I'm just trying to make sure that's an issue with ATE rather than the effect not transferring at all. I know in dnd5e you have to make sure to equip/attune to the item before it'll transfer the effect.

kaelad02 commented 1 year ago

If it was SWADE, it looks like they're using the newer transfer model where the effects don't have to be copied from the item to the actor. I took a peek at their code and they're turning legacyTransferral off:

// v11 Active Effect handling
CONFIG.ActiveEffect.legacyTransferral = false;

I haven't added code to support that mode yet. Although I don't know SWADE that well, it's nice to know of a system I can use to test it with.

Buuuurce commented 1 year ago

Forgot to specify it was SWADE, yes, Shadowrun only had the problem with presets. I used "ATL.sight.visionMode" override to lightAmplification; the effect shows up when you add the item with the effect, but activating it does nothing unless you copy it by dragging the effect from the item to the sheet. Items with normal effects that modify SWADE stats work normally, for the most part.

kaelad02 commented 1 year ago

Fixed in version 0.7.0, both the preset bug and SWADE on v11 compatibility with that new transferral mode