PDA

View Full Version : Change the "Active Token" highlighter.



villadelfia
June 2nd, 2016, 18:33
Currently, the white circle is very hard to see when using round tokens, is there a way, via extensions or whatever, to change the highlighter to something else, for example a white square.

Zacchaeus
June 2nd, 2016, 18:38
Currently, the white circle is very hard to see when using round tokens, is there a way, via extensions or whatever, to change the highlighter to something else, for example a white square.

Wouldn't it then be hard to see if you were using square tokens?

Moon Wizard
June 2nd, 2016, 19:02
It's currently hard coded into client, so it's something we'll have to look at as we rebuild client for the next major version. There's no announced timeline.

You can also add to the wish list in my sig.

Cheers,
JPG

Trenloe
June 2nd, 2016, 19:22
A couple of options to help spot which token is active are mentioned here: https://www.fantasygrounds.com/forums/showthread.php?31699-Alternative-to-NPC-numbering-in-combat-tracker&p=271039&viewfull=1#post271039

villadelfia
June 2nd, 2016, 19:27
Ok, I think I have found a hack to add a square marker:

1. Find the handler that fires when the token is active.
2. Modify it to "addUnderlay" a white square.

I'm stuck at 1 though, I'm an experienced programmer, but I'm having some trouble finding the token event handlers in 5e. I also don't know how to turn it into an extension.

villadelfia
June 2nd, 2016, 19:45
I got it: https://gfycat.com/MiserableWeeklyCanary

How do I make an extension out of that?

Trenloe
June 2nd, 2016, 20:44
but I'm having some trouble finding the token event handlers in 5e.
Token API described here: https://www.fantasygrounds.com/refdoc/tokeninstance.xcp

onActivation is the event you're looking for. You could use addUnderlay to add a coloured underlay and then removeAllUnderlays to remove it when the token is no longer activated.

villadelfia
June 2nd, 2016, 20:47
Had to do it slightly differently, I'm completely redrawing the underlays (reach, size...) when onActivation gets called. I needed to do this, otherwise it remove those whenever a turn was finished.

damned
June 3rd, 2016, 08:12
Well done villadelfia - I went to do this once before but couldnt work out how to do it.