PDA

View Full Version : What is the token scale increment using the mouse wheel?



cwsoots
July 7th, 2023, 20:12
I'm considering modifying the size of the tokens in my collection so that certain tokens are sized more consistently when placed on the maps (e.g., standardizing all medium tokens to appear the same size). I realize that I can scale tokens manually using Ctrl-mouse wheel, but I would like to avoid that for some of my tokens. I am also aware that FGU now scales creatures of size tiny or smaller, and that I will still need to scale some larger tokens manually (particularly ones that are designed to exceed their bounded space).

My question is regarding manual scaling using the mouse wheel. Does anyone know what the percentage or factor of size is for every mouse wheel notch/detente during manual token scaling? For example, if I place a token that is sized to 100% of the grid and then use the mouse wheel to scale it one notch, is each notch equivalent to an increase or decrease of 5%, 10%, 15%, etc.?

This would be helpful to understand to ensure that the tokens are sized correctly. I searched for a previous answer but could not find one on this topic specifically. Thanks!

Zacchaeus
July 7th, 2023, 21:28
Well just by doing a little experiment it seems to be 25%. I added a medium NPC token and after 4 clicks it make it take up 4 squares. But can't you change how much things scroll in your mouse settings? I may have a different setting from you. No idea how much, if any, impact that has.

Nylanfs
July 7th, 2023, 21:35
Yep.

58122

Zacchaeus
July 7th, 2023, 22:20
Yep.

58122
I’m not sure that answers the question?

Nylanfs
July 8th, 2023, 13:09
Just that it "could" be different for each computer, the Windows default is 6 lines.

Zacchaeus
July 8th, 2023, 15:09
Just that it "could" be different for each computer, the Windows default is 6 lines.

Indeed, but it was the image that confused me. I though maybe you'd posted that in error or were replying to another post.

Griogre
July 8th, 2023, 15:28
He was showing off he still has an old discord name with 4 numbers? ;)

cwsoots
July 9th, 2023, 23:19
Thanks for the replies! Without a more definitive answer on a percentage or factor per line (or % per notch), I experimented using Zacchaeus' method until it reached a measurable size (e.g., medium to large), and counted the number of notches to do the math. I realize that I'm going down the rabbit hole on this topic, but I know there's a conclusive answer to be found. :)

With my PC set to 3 lines per notch and the token scaled to 100% of the grid upon placement, it required seven notches from medium to large (or twenty-one lines). I also changed my lines per notch to a higher number and it did not change the number of notches to alter the scale. I would assume that FGU counts mouse wheel notches instead of text lines when scaling, but I could be wrong. Given that assumption, each notch (on my PC) resulted in a 14.29% increase in size going from one (1x1) square to four (2x2) squares.

What's curious is that Zacchaeus and I got different results. Can we have a developer confirm whether FGU reads mouse wheel notches or text lines for the mouse scaling, and what the math is for each notch? There must be a formula in the code, I would assume, to determine how much the image is scaled based on how much the mouse wheel moves.

superteddy57
July 10th, 2023, 03:54
Your best bet is to see onWheelHelper function in CoreRPG > scripts > manager_token.lua. You can throw debugs into the code and mouse wheel on the token in the CT. It gets the scale of the token and then adjusts it based on:
local adj = notches * 0.1;
if adj < 0 then
newscale = newscale * (1 + adj);
else
newscale = newscale * (1 / (1 - adj));
end

Then it takes that newscale and sets the token to it.

Nylanfs
July 10th, 2023, 12:30
I have no idea how the wrong image got attached. And I never checked to see what I uploaded. ;)

Nylanfs
July 10th, 2023, 12:34
<--- so old school he still has an ICQ # & an AIM

cwsoots
July 10th, 2023, 19:11
Your best bet is to see onWheelHelper function in CoreRPG > scripts > manager_token.lua. You can throw debugs into the code and mouse wheel on the token in the CT. It gets the scale of the token and then adjusts it based on:
local adj = notches * 0.1;
if adj < 0 then
newscale = newscale * (1 + adj);
else
newscale = newscale * (1 / (1 - adj));
end

Then it takes that newscale and sets the token to it.

Thanks, Dominic! I appreciate the technical response, even if it is beyond my LUA knowledge to understand it completely. :) I found the code you mentioned in the PAK file, but I'll need to learn how to "throw debugs into the code" before I play around to reverse engineer the math. I appreciate your time to feed my curiosity.