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 .
×

Ability Macro's altering other Tokens?

Hello there! I have a question regarding whether not what I'm thinking is possible. I'd much rather ask first than spend hours attempting it, then quit out of frustration. Here's my thoughts... 1: Is it possible to make a Character Sheet Token Action (Ability Macro) alter another tokens status.     -You know when you click on a token, you have the red, green, and blue orbs pop up, along with the settings symbol and the 'status' symbol? That's what I'm shooting for. I am aware it's possible to have FX trigger in an ability macro, where you can target in a direction from a token and cast some interesting spell for kicks and giggles. Though, it'd save a step for the GM if the player is able to target the enemy token and it just applies a specific status piece onto the token. An example is Faerie Fire. The spell allows enemies to be highlighted with either green, blue, or violet light. Each and every token can have a colorful circle placed on them in the 'status' section, and it'd be neat if that just went into effect after the player, say, clicked on a token.      -OR, say an enemy token's hp reduces down to zero. Typically, I'd click on the token, go to the green orb and type in "-#" or just "0", then I'd go to the 'status' section and apply the skull&crossbones symbol to show everyone this guy is dead. Is there a way to automatically trigger the status (Skull&crossbones) if the tokens hp = 0? I know it's not much, but it'd be nice to know if it is possible. 2: Is it possible to make a Character Sheet Token Action (Ability Macro) place a character/token.     - Much like the above idea. Example: I've created an NPC Character Sheet titled Dancing Lights (which is a 5e Spell). I've enable the player who has the spell, access to the NPC Sheet. The Sheet has a token for a green orb than emits light and has an aura for the party to see. So! Naturally, the player can do the whole, drag and drop spell image onto the map (great for me), but it'd also be neat to know if the player can simply click on the Ability Macro, and it automatically places/drops the token onto the map.  Are either of these even feasible? I tried searching but whenever you search with "Token" and "Macro" in the description, you're only going to get "how to make token ability macros work!" which is not my goal right now lol.
1591134231

Edited 1591134316
GiGs
Pro
Sheet Author
API Scripter
Both of your questions have the same answer: it's possible, but only by using an API script.  In the first example, your ability probably includes a command to trigger chatSetAttr, which can change attribute values. Likewise, triggering the status can only be done with a script - there are a few that do this kind of thing, I believe. In the second example, your ability would trigger a script that places a token on the map. There's a script with a name something like Summon that can do this.
Hey Gigs, Thank you for your quick response. I suppose I'll need to dive into API scripting then. One thing that I've found difficult is finding a link to the character sheet nomenclature. Much like the example you provided, "chatSetAttr", I presume there are numerous built-in functions, but where is the list of functions? WITH detailed description. I always find the scripts already written for download. I'd like to write them myself.  Might you know such a site? Thanks in advance! 
1591138375
GiGs
Pro
Sheet Author
API Scripter
chatsetattr is the name of a script. You'll find it in the one-click library: go to your campaigns launch page, click Settings -> API Scripts, and explore the dropdown on that page. The roll20 wiki is the place to find all the information about in-built functions.
Here's a great intro to API scripting video that walks you through writing a script that summons a spiritual weapon token to the VTT: <a href="https://www.youtube.com/watch?v=S_D0QrIE1Zo" rel="nofollow">https://www.youtube.com/watch?v=S_D0QrIE1Zo</a>