earlSt1 / vtt-custom-nameplates

Custom Nameplates for FoundryVTT
GNU General Public License v3.0
1 stars 1 forks source link

Configuration Problems #13

Closed Red5MT closed 2 months ago

Red5MT commented 1 year ago

I have been having a lot of problems getting Custom Nameplates to save and apply the configuration.

For example, I will change the font, size, and color in the global settings, save, and then recheck the settings and find that they have reverted to the prior settings. I tried switching on scene-specific config, but then I could not turn it off. Also, after turning scene-specific on, I did not see any additional option in the scene configuration (I assume that is what is supposed to happen).

libwrapper is installed and both Custom Nameplates and libwrapper are the most recent version.

I also set up a new map with only Custom Nameplates and libwrapper enabled to do my testing. I also tried it without libwrapper just to see what might happen, but could not tell any difference.

Anyone else having problems? Perhaps something updated in libwrapper that is causing problems?

Using Windows 10, chrome, and Foundry v11.

earlSt1 commented 1 year ago

Hi, this sounds odd, ill check it out later.

When you hit save do you see any red errors in the F12 console?

Red5MT commented 1 year ago

OK, so I can assume the problem is purely on my side. These are so much fun to troubleshoot!!! :(

I checked my main game (around 50 modules) and did not see any error entries. There were a few warnings tied to other modules, but nothing I could see tied to Custom Nameplates.

I would certainly like to use the module, so I will do further testing on both the web client and the desktop installation with a clean world. I picked up foundry just a few weeks ago, so I am still finding my way around. I will poke around and get back to you.

Thanks.

EDIT: Not that it should matter, but to clarify my setup. I have the FoundryVTT installed on a Windows 11 PC (Ryzen 9 5900HX 8 Cores/16 Threads, 16GB RAM) I use solely as a gaming server. When I started this thread, I had only tested Custom Nameplates on my Windows 10 PC connecting to the server via chrome.

earlSt1 commented 1 year ago

Ahh yep, just updated to the latest v11 release and i'm getting the same problem, I can see an error my side too. I'll look into it

earlSt1 commented 1 year ago

Well i'm not sure if its related, but I've got the default setting for global styles wrong, so when you install the module for the first time, you get an error.

On the world thats been giving you problems, can you run the following macro, then refresh, to see if it fixes the issue? Note that this will reset the global style to the (correct) default,

await game.settings.set("custom-nameplates","global-style",{
    fontFamily: "Signika",
    fontSize: 24,
    fontColor: "#FFFFFF",
    shadowColor: "#000000",
    strokeColor: "#111111",
});
Red5MT commented 1 year ago

The script worked great. Tested for global and scene level and most everything worked as I would have expected.

The only feature I am not sure on is Auto Scale Font, so perhaps my expectation is incorrect. I expected that when it is enabled, the font size would not shrink or enlarge regardless of the zoom level. Currently when enabled, the font is not doing that. Is that the intention?

earlSt1 commented 1 year ago

Yeah thats what it should be doing (its doesnt keep the size exactly, but its pretty close).

So after enabling and refreshing, the auto-scale doesnt kick in when zooming, and the font size stays the same?

On Thu, 24 Aug 2023, 20:52 Red5MT, @.***> wrote:

The script worked great. Tested for global and scene level and most everything worked as I would have expected.

The only feature I am not sure on is Auto Scale Font, so perhaps my expectation is incorrect. I expected that when it is enabled, the font size would not shrink or enlarge regardless of the zoom level. Currently when enabled, the font is not doing that. Is that the intention?

— Reply to this email directly, view it on GitHub https://github.com/earlSt1/vtt-custom-nameplates/issues/13#issuecomment-1692317439, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADI2CKEZZHYZSMYIGFRX7YLXW6WGFANCNFSM6AAAAAA32MCEHU . You are receiving this because you commented.Message ID: @.***>

Red5MT commented 1 year ago

As far as I can tell, the auto-scale parameter is not functioning at all. I set out two tokens and set the names to always be visible. I then set the global font size to 70, saved, and then zoomed in and out. With and without auto-scale enabled, it looked the same. It was pretty easy to tell as the grid size of the scene was there for comparison.

Sorry to say, but I also thing the scene-specific check is not working as intended as well. Initially I tried to set up an auto-scale test on two exact scenes where the only difference was the auto-scale. For one scene, it appeared to work fine. For another, I was not able to get the scene-specific option to save even after refreshes, trying the macro, or logging in and out. Unfortunately, I was not able to discern the pattern.

earlSt1 commented 1 year ago

I then set the global font size to 70, saved, and then zoomed in and out. With and without auto-scale enabled, it looked the same.

Just to clarify did you refresh after saving?

As for the scene specific settings not saving, i didnt test that earlier so will have a look in a bit.

If its easier, and if your server is reachable over the internet, i can connect and have a look if you want? My discord is erceron if thats quicker to chat there too.

Red5MT commented 1 year ago

I did refresh after saving on the Nameplate Style dialogue when tinkering with the auto-scale and scene-specific.

I just did some more tests and perhaps the auto-scale is working as you intended. There appears to be 45 zoom levels in Foundry, at least that is the number of 'scroll-clicks' I get. The font is not scaling for me when you start fully zoomed in and slowly zoom out 35 clicks. At 36 to 40, the font size does appear to scale to some degree. You said it scales 'sorta', so is this what is intended?

I am new to foundry, so I do not yet have a solid grasp of securing the server from outsiders. The only way I see using my server to troubleshoot is to have you connect to it and give config access, which I am not comfortable doing...hope you understand.

I am actually glad it may be an issue with the module for v11 and not just me. Troubleshooting issues isolated to a single PC are a pain to work through.

I hope the info I provided will be enough for you to be able to duplicate what I have been seeing. I am also willing to continue helping with testing as time allows...and if push comes to shove, a discord conversation is certainly something we can set up.

earlSt1 commented 1 year ago

At 36 to 40, the font size does appear to scale to some degree. You said it scales 'sorta', so is this what is intended?

Yep that sounds right. The scaling code involved a lot of maths so i borrowed it from another module a few versions ago (v8 or v9). Unfortunately the module i borrowed the scaling code from didnt get any more updates, and i wasnt able to figure out how to get the scaling to improve, so its been like that for a few versions.

I havent really revisited this module for some time, other than making sure its compatible with the latest foundry release. There used to be a module that did a lot more than mine (Border Control), but the author has abandoned the nameplate side of the module, so people tend to use mine for auto scaling font.

I'll keep this issue open, as a reminder to myself to publish a release to fix the default global style, but it sounds like the module is working for you, just not how you would expect it would.

earlSt1 commented 1 year ago

I cant quite remember, but the scaling may be affected by the size of the font you pick, so a larger font size will scale less compared to a small font size

Red5MT commented 1 year ago

I think I was using a 70pt font to make it easy to recognize, so that tracks.

I don't expect to use the auto-scale or scene specific features myself. I just wanted to point out the issue and help where I could. Having the rest work will be very nice.

earlSt1 commented 1 year ago

I just wanted to point out the issue and help where I could. Having the rest work will be very nice.

Awesome, thanks! It's been quite a while since i ran a campaign on foundry so I dont run into issues with my module that often. Finding issues with the module when installing it from scratch is super useful. I'll see about testing the scene specific settings and try replicate what you've experienced tomorrow.

Red5MT commented 7 months ago

Hey earlSt1, any thoughts on when you might be pushing out an update for this module?

earlSt1 commented 2 months ago

Hi, sorry for the long hiatus, I'll start working on an update to make the module v12 compatible this week

earlSt1 commented 2 months ago

So a quick update from me, man there was quite a few bugs in the module.

Red5MT - It looks like there was quite a few issues with some properties not being set correctly, and autoscaling not applying correctly, so you weren't going mad. I have no idea what past me was thinking :smile:

I'll push a fix for v11 and include the fixes in v12

earlSt1 commented 2 months ago

Ok I've pushed a bugfix release for v11 (v2.1.5) and an initial v12 release (v2.2.0) which should solve a lot of these weird issues with the config window not saving things correctly. I'll close this issue for the time being but if youre still having problems feel free to open a new ticket.