PDA

View Full Version : Why do the initiative indicators seem smaller on round tokens?



celestian
October 9th, 2017, 20:17
So something that has become an issue for my old eyes is noticing which token has initiative. here is a example of what it looks like with the default "O" (letter o) token for an orc.

https://i.imgur.com/j3sJza6.png

Notice the size of the white ring.

Now here is the PC token with initiative.

https://i.imgur.com/7mZxwmU.png

Token size is set to 80% in the campaign settings if that matters.

What causes this? Anyway to fix it so the white "aura" is the same size?

Moon Wizard
October 9th, 2017, 20:43
The targeting indicator is based on the maximum non-transparent radius on the token. I’m guessing there is something different detected on those tokens that makes the client think the non-transparent region is larger.

JPG

celestian
October 10th, 2017, 04:51
The targeting indicator is based on the maximum non-transparent radius on the token. I’m guessing there is something different detected on those tokens that makes the client think the non-transparent region is larger.

JPG

Hum, I'll play around with the token creation tool and see if I can tweak it and get a result I can cope with.

Do you have any recommendations for that? I really like those bigger white indicators.

Moon Wizard
October 10th, 2017, 04:58
I haven’t looked at that code in a couple years, so no idea what the determining factor is without spending some detailed time debugging and trying to figure out what the differences are.

Regards,
JPG

Griogre
October 10th, 2017, 06:19
Just a guess, but the relative size of the actual graphic in pixels to the size of the square often effects token widgets. Those old letter tokens were about 28 pixels and the PC token is likely almost twice as large pixel wise. So the letter tokens are being rescaled to a larger than base size much more severely than the PC token - in fact the PC token is likely shrunk instead of enlarged. You can see that in the "blur" on the letter token and on the black boarder around the token, while the edge of the PC token is sharp and not blurry. What size in pixels is the sample grid?

You can check to see if that is reason by making a grid size of like 200 pixels and redropping the tokens to see if the glow around the PC token gets bigger relatively speaking.

Andraax
October 10th, 2017, 13:26
Might also want to see if there is a transparent "border" around the token with the larger white background.

damned
October 10th, 2017, 13:45
methinks Griogre is probably closest...

celestian
October 10th, 2017, 16:38
Just a guess, but the relative size of the actual graphic in pixels to the size of the square often effects token widgets. Those old letter tokens were about 28 pixels and the PC token is likely almost twice as large pixel wise. So the letter tokens are being rescaled to a larger than base size much more severely than the PC token - in fact the PC token is likely shrunk instead of enlarged. You can see that in the "blur" on the letter token and on the black boarder around the token, while the edge of the PC token is sharp and not blurry. What size in pixels is the sample grid?

You can check to see if that is reason by making a grid size of like 200 pixels and redropping the tokens to see if the glow around the PC token gets bigger relatively speaking.

This seems to be the case. I rescaled the token from 128x128 to 64x64 and it made the ring bigger. It's good to know this but I'm not going to be able to go through all zillion of my tokens and change them ;( Going to see if I can find the code that does this and figure out if it's possible to tweak it to use the size of the token and not the size of the image.

LordEntrails
October 10th, 2017, 19:03
This seems to be the case. I rescaled the token from 128x128 to 64x64 and it made the ring bigger. It's good to know this but I'm not going to be able to go through all zillion of my tokens and change them ;( Going to see if I can find the code that does this and figure out if it's possible to tweak it to use the size of the token and not the size of the image.
Or change it to be based on the size of the grid. i.e. if the grid is 50 pixels make the white ring 8 pixels (or something), and if it's 100 pixels make it 16 pixels (or such).

Nylanfs
October 10th, 2017, 19:10
Won't work on large creatures, has to be tied to the size of the token.

LordEntrails
October 11th, 2017, 00:11
Good catch, except it could then be multiplied by the number of squares and/or maybe the scale factor of the token. But I'm sure whoever, if anyone, is going to do an extension they'll figure it out :)

celestian
October 11th, 2017, 06:52
So I've been digging around the code in CoreRPG to try and find this. I can't seem to find where it fiddles with/sets the initiative ring. Are we sure this isn't some thing baked into FG proper? I suspected it would be somewhere around "nextActor()" in manager_combat.lua but nothing in there traces to something that would do this unless I just missed it.

I also browsed around manager_token.lua and closest I think I could get is "updateActiveHelper()" specifically tokenCT.setActive();

This seems to be the place it happens.



function setActive( state )
Determines whether the token is currently marked active. Active markers can be used by the host to indicate a single token in a container, e.g. to represent it is currently active in a turn sequence.

Parameters

state (boolean)
Returns true if this token is presently marked active, false otherwise.


I'll dig some more after some sleep.

Trenloe
October 11th, 2017, 15:34
Are we sure this isn't some thing baked into FG proper?
I think it is in the base application code.