Is there any way to link a token status marker (say the blue dot) to an attribute on a character sheet? So it will automatically go up or down as that attribute is modified? (Obviously without going past 9)
Is there any way to link a token status marker (say the blue dot) to an attribute on a character sheet? So it will automatically go up or down as that attribute is modified? (Obviously without going past 9)
Oosh said:
keithcurtis said:
It would be possible with the API. Not otherwise.
That sounds like a challenge....
By all means, complete that challenge and share the solution!
/sigh .... why do I do these things to myself.
It's pretty clunky, but I got it to work via console. It even picks up the command line from R20 chat. I can't say I feel much of a sense of achievement, since this is so amazingly clunky that it's, at best, a good advertisement for why you should just pony up and pay for API access.
@OP - sorry for derailing your thread. Someone will surely have a real solution for you soon... this was a fun exercise but I wouldn't recommend trying to use it :)
Anyway.... here's a non-API hack in some giffy action, I'll pastebin the code so as not to clutter up an otherwise-useful thread any further :)
And the (ugly, horrible) code is here. The command line is
!statusmonkey --tok <tokenId> --attr <attributeName> --marker <markerName> [--on <value for apply marker> --off <value for remove marker>]
<tokenId> must be typed/pasted in, as Roll20 parsing doesn't happen before the script grabs the text from the HTML textarea - @{attribute} calls won't work.
--on and --off are optional
--on defaults to "any value except an empty string or a 0"
--off defaults to "any value that isn't the "on" value"
example in the Gif:
!statusmonkey --tok -abcdefghij0123456789 --attr strength_save_prof --marker dead
Right.... I should do something useful. I blame Keith for all of it, he baited me!
Oosh might have said:
"They scoffed at me at the Royal Academy! Said it couldn't be done! That it was a perversion of science and dabbling in the domain of the gods! But I'll show them! I'll show them ALL!!!! MWUAHAHAHA!!!"