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

[CSA][TokenMod][?CombatMaster?] Solution for Height Level Issue

1601631192

Edited 1601639914
Since Roll20 is a Top-Down 2D environment, we miss out on the height or depth factor.  The Aaron tried to resolve this in Token Mod at one point with having sequential, multiple statusmarkers with numbers on them.  But, to be fair, was never a good solution if you had a bunch of other statusmarkers already on the token. I recently saw a few different posts and it got my creative juices flowing on how to end this problem.  Well ... almost.  Shared NPC Statblocks and Mooks are still an issue - with no real solution.  (If Jim, Sue, and Bob are all using the Commoner character sheet, it can actually bork it all when Jim takes to the sky but reports that Sue is the one flying... and suddenly every commoner is named Sue.  Que Johnny Cash song here...) This solution has a few dependencies: You're a PRO subscriber and have access to API's You have TokenMod on your campaign, know how to use it, and allow access to your players You have ChatSetAttr (CSA) on your campaign, know how to use it, and allow access to your players You store your Macros portably in the Attributes & Abilities section of a character sheet, called ... MACROS ... or something or other.  This seemingly simple trick is often overlooked, and should never be - making your Macros portable between campaigns by transmogrifying the MACROS character is an AMAZING MUST! Once that's worked out, comes the first, most important thing to do - setup and run (on every character) the following Macro.  Make sure you get a confirmation that the script ran for each. !setattr {{ --charid @{selected|character_id} --the_tokens_name|@{selected|token_name} }} This sets up a "the_tokens_name" attribute so that we can always refer to the token's name from the character sheet rather than the token itself.  Good to know when you start changing it and wanna change it back, yeah? Next, let's get these people off the ground, setting up their Macros.  All 3 of these will be put in our main token chat menu later. First - Flying and Climbing.  Sorry - you can change the statusmarkers to whichever you have available, the ones listed are from my custom ones.  I highlighted them so you can change them to whatever you have.  We'll call this Macro " Adj-Height ": !token-mod {{ --set name|"@{selected|the_tokens_name} (?{Flying or Climbing?|Flying|Climbing} at ?{height} ft.)" statusmarkers|?{Climbing or Flying?|Flying,+ Fly::324773 |Climbing,+ Climb::324755 } --current-page }} /emas @{selected|the_tokens_name} is ?{Flying or Climbing?|Flying|Climbing} to ?{height} ft. Then, let's dunk 'em.  What goes up must also go down, right?  We'll call this Macro " Adj-Depth " !token-mod {{ --set name|"@{selected|the_tokens_name} (?{Swimming, Drowning, or Burrowing?|Swimming|Drowning|Burrowing} at -?{What Depth?} ft.)" statusmarkers|?{Drowning, Swimming, or Burrowing?|Swimming,+ Swim::324735 |Drowning,+ Drowning::329677 |Burrowing,} --current-page }} /emas @{selected|the_tokens_name} is ?{Swimming, Drowning, or Burrowing?|Swimming|Drowning|Burrowing} But we can't always sink into the depths of despair or have our head in the clouds - so lets get things back to normal ... Macro: " Rtn-to-Ground-Level " !token-mod --set name|"@{selected|the_tokens_name}" statusmarkers|- Fly::324773 |- Drowning::329677 |- Climb::324755 |- Swim::324735 --current-page /emas @{selected|the_tokens_name} ?{What was the token doing before this?|Flying,lands on the ground.|Climbing,descends onto flat land.|Swimming,gets to the surface.|Drowning,finally finds air!|Borrowing,emerges to the surface.} So, you could clutter everyone's token buttons by checking the "Show as a Token Button" box ... but .... nah.  Put it all in one menu with things like their Initiative Roll, End Turn, and other goodies.  Then, let them do the clicking! Part of our 8-Member group, " The Strays ", Modeling for you **Off Grounds** [Up](~Adj-Height) | [Cancel](~Rtn-to-Ground-Level) | [Down](~Adj-Depth) My Menu in the Shaped Sheet I, Personally, think that everything above can only be further enriched with Combat Master.  But it is optional.  Those 3 APIs are, for me anyway, among my top 3 faves, along with many others like AoETemplates, Death Tracker, LazyExperience, Welcome Package, Group-Init, and many others.  I kinda have a problem with being addicted to APIs ... (Step One complete ... stay tuned for Step Two ... eventually ... someday ... maybe .... ok, never, fine.) EDIT:  Replacement Options For My Custom Markers from Standard Set: Fly from  Fly::324773 to fluffy-wing Drowning from Drowning::329677 to purple Climb from Climb::324755 to brown Swim from Swim::324735 to blue EDIT: Took Aaron's reminder on --current-page being added.  Advised that token-mod could --ids against character_id , which I didn't know!  Gotta learn at least 1 thing a day or bury your nose in a book before 12:01am.  Otherwise you wasted an entire day being just as dumb as yesterday ;-) lol ... well ... at least in my case anyway ... lmao
1601634481
The Aaron
Roll20 Production Team
API Scripter
Nice!  Height in the name I pretty much what I've been moving to as well, for the reasons you listed.  Something you might find useful is that --ids can take a character ID as a parameter rather than a token ID, and will find all tokens representing that character. You can further refine that to just tokens on the current or active pages (see the help). 
The Aaron said: Nice!  Height in the name I pretty much what I've been moving to as well, for the reasons you listed.  Something you might find useful is that --ids can take a character ID as a parameter rather than a token ID, and will find all tokens representing that character. You can further refine that to just tokens on the current or active pages (see the help).  If only my players wouldn't use last names though ... sigh.  Often, to reduce the amount of room the names take, I usually reduce a token's name to just the first name or a nickname.  Counter-intuitive, since now I'm adding to the name length with height or depth, but those conditions are temporary.  It is useful to know, though, for other macros in the future. I will definitely be editing for --current-page ; which was an oversight on my part.  Thanks for reminding me!
1601642865
The Aaron
Roll20 Production Team
API Scripter
You really only need the current page or active pages flags when you're using a character ID. Token IDs are unique under all but the most bizarre (transmogrifier shenanigans) situations. 
1601652028
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You should either post this in its entirety to Stupid Tricks , or an abstract with a link to this thread. Very creative solution.
1601685089
Victor B.
Pro
Sheet Author
API Scripter
Nice.  Works with both.  Awesome
keithcurtis said: You should either post this in its entirety to Stupid Tricks , or an abstract with a link to this thread. Very creative solution. The only reason I wouldn't is because it requires API access (Pro Sub).  But if you feel inclined, abstract linking it is fine if you want to do so.  You can freely copy and refer if you wish. I don't want to take all the credit.  Somebody, somewhere, started this inspiration (I would link to it so they get their credit if I could find it) - I just found a way with both APIs to make it work.  I think in that one though, they toggled the names on and off - on when flying, off otherwise.  I definitely like seeing the names at all times; I always run 8-person campaigns ... and between the PCs and NPCs - it's better to be able to read the name of each token!
1601687013
Victor B.
Pro
Sheet Author
API Scripter
Take it *sinister voice* take it.....
1601688442

Edited 1601688801
One of the drawbacks with this method is that common shared Character Sheets ("Commoner", for example) will universally apply the "the_tokens_name" attribute.  So ALL Commoners: the_tokens_name = Joe And this is a common problem that happens when you set status markers through macros too, you set one and they all go off.  Or things like having a few adult dragons on the Shaped sheet, and rolling for a breath weapon.  One rolls - they are all rolling for recharge.  And then there is the "out of uses" factor from the API .... oh don't get me started ... anyway ... I wish there was a way to tie the token to an array number and that CSA could reflect that number when applying, tokenmod when drawing into chat. For Example, though I know this wouldn't be correct: set attribute = the_tokens_name.[???] (Ex: the_tokens_name.[0] -or- the_tokens_name.[1] - etc,  if the_tokens_name.[0] is already taken.  Keep adding attributes in sequence, starting at 0 - like any well-behaved array would.) set a note in the GM Notes section of the token that refers to the correct array (Ex: TmA=[0] ) Be able to use both to draw from for resetting the name back in tokenmod (Ex: --name|@{selected|the_tokens_name} .@{selected|tokenmod_gm_notes_array_number} ) By doing that, the_tokens_name.[0] = Jim the_tokens_name.[1] = Sue the_tokens_name.[2] = Bob
Victor B. said: Take it *sinister voice* take it..... LOL - ur just wrong Vic ... LMAO
1601740330
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wolf Thunderspirit said: keithcurtis said: You should either post this in its entirety to Stupid Tricks , or an abstract with a link to this thread. Very creative solution. The only reason I wouldn't is because it requires API access (Pro Sub).  But if you feel inclined, abstract linking it is fine if you want to do so.  You can freely copy and refer if you wish. I don't want to take all the credit.  Somebody, somewhere, started this inspiration (I would link to it so they get their credit if I could find it) - I just found a way with both APIs to make it work.  I think in that one though, they toggled the names on and off - on when flying, off otherwise.  I definitely like seeing the names at all times; I always run 8-person campaigns ... and between the PCs and NPCs - it's better to be able to read the name of each token! There are plenty of tricks in  Stupid Tricks  that use the API. The only requirement is that they just not be a "here's an API that does this thing" entry. It has to be a creative use of the API, something not immediately apparent or intended or that requires set up to do more than it does out of the box. Ex. a lot of tricks use token-mod or ChatSetAttr. This qualifies. As for credit, there are a lot of tricks that say "I can't remember where I learned this."