unsoluble / smalltime

A small FoundryVTT module for displaying and controlling the current time of day.
MIT License
24 stars 15 forks source link

Scenes with darkness controlled by Smalltime exhibit "random" switch/stuck to darkness #65

Closed apoapostolov closed 3 years ago

apoapostolov commented 3 years ago

On scenes where SmallTime is set to control darkness levels I notice the following behavior:

EDIT: I have done testing with GM and multiple player accounts, forcing F5 refreshes. It seems a Player when loading can switch the scene to darkness and get stuck there, and then forces that darkness to all connected players + GM.

EDIT 2: Looks like confirmed issue, when players and GM reload scene they force switch to dark and to current time on the scene, and often it gets stuck. Players should never cause scene light updates, in general. GM should not cause scene light updates with F5 refreshes, but it may become option in Settings.

unsoluble commented 3 years ago

Hmm. I'm away for the day, won't be able to investigate till tomorrow at some point. Confirmed this happens with no other modules enabled? (And this is in PF2E, right?)

apoapostolov commented 3 years ago

Hello,

unsoluble commented 3 years ago

Yep, I can reproduce this in a clean PF2e world. Now just need to figure out what the hell PF2 is doing weirdly to try to work around it.

unsoluble commented 3 years ago

So I've eliminated the player-side problem; an actual Darkness change can't happen on player refreshes any more. But I'm still not sure what's causing the brief flash of an incorrect Darkness level, so that part still happens.

Have you ever noticed it getting stuck on the incorrect Darkness on GM refreshes? I can't reproduce that, tried hundreds of times at this point (happened maybe 1/20 on player logins). If it doesn't actually get stuck on GM refresh, I think I'll just leave it there with the brief flash being just another PF2 oddity.

apoapostolov commented 3 years ago

I think if it improves from 1/4 times to 1/20 times, that's already an update-worthy improvement. I will continue trying to reproduce it, without player involvement.

unsoluble commented 3 years ago

To be clear it shouldn't ever happen now on Player refreshes (in the build I haven't released yet). Just not 100% sure if it can still trigger on GM side.

apoapostolov commented 3 years ago

Looking forward to that version, then I will try to repro only on GM side and let you know.