Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help] Get player colour for use in token mod

What i want to be able to do is set a token to have an aura in the same colour as the player has for their ping tool. (the square in the bottom - sorry not sure exactly what its called) If i can get the hex of their colour, im pretty sure i know how to do the second stage of applying it to the aura, its getting the colour that is the challenge. What i am hoping for is some way of going selected token -> assigned player id (there should only be one player assigned) -> players hex colour -> put that colour in the aura. (if i can get that working id want to do it via potentially targeting different tokens to get the colour and apply the aura, but again the token being used to find the colour would only have one player assigned) From my attempts i have found that there are ways for the api to get the player colour just i dont understand how to be able to do anything with it myself. So if anyone can point me in the correct direction on how to find a players hex colour that would be much appreciated!
1655679883

Edited 1655680068
Kurt J.
Pro
API Scripter
The latest version (2.0.1) of ScriptCards can do this. You would need to install it from the GitHub repo ( <a href="https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API" rel="nofollow">https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API</a> ) as it is not on OneClick yet. !script {{ --#hidecard|1 --#sourcetoken|@{selected|token_id} --&amp;Color|[*[*S:controlledby]:color] --!t:s|aura1_color:[&amp;Color]|aura1_radius:5|showplayers_aura1:false }} This would silently create an aura on the selected token matching the controlling player's color, set the aura to a 5 foot radius, and show it to the players.
Ooh thanks. I shall go diving into that API &nbsp; Kurt J. said: The latest version (2.0.1) of ScriptCards can do this. You would need to install it from the GitHub repo ( <a href="https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API" rel="nofollow">https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API</a> ) as it is not on OneClick yet. !script {{ --#hidecard|1 --#sourcetoken|@{selected|token_id} --&amp;Color|[*[*S:controlledby]:color] --!t:s|aura1_color:[&amp;Color]|aura1_radius:5|showplayers_aura1:false }} This would silently create an aura on the selected token matching the controlling player's color, set the aura to a 5 foot radius, and show it to the players.
1655810420
Kurt J.
Pro
API Scripter
Snooze said: Ooh thanks. I shall go diving into that API &nbsp; Kurt J. said: The latest version (2.0.1) of ScriptCards can do this. You would need to install it from the GitHub repo ( <a href="https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API" rel="nofollow">https://github.com/kjaegers/ScriptCards/tree/main/ScriptCards_API</a> ) as it is not on OneClick yet. !script {{ --#hidecard|1 --#sourcetoken|@{selected|token_id} --&amp;Color|[*[*S:controlledby]:color] --!t:s|aura1_color:[&amp;Color]|aura1_radius:5|showplayers_aura1:false }} This would silently create an aura on the selected token matching the controlling player's color, set the aura to a 5 foot radius, and show it to the players. the very last bit of the --! line should be "true" instead of "false" :) I was testing turning it on and off and left the false in there when I pasted.