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 .
×
We are currently investigating server problems that may lead to lag or loading errors on the platform.

[TokenMod] [SelectManager] Trying to select tokens on different layers

1768581007

Edited 1768581689
I'm trying to write a macro for a specific use case in an upcoming encounter. I'm using TokenMod and SelectManager to select certain specific tokens, some of which are on the Token layer and others on the GM layer, and set their bar1_values to zero. I thought adding "--current-page" would do this, but I've put "--current-page" in various locations within the macro but it still won't affect tokens that are not on the current layer: !token-mod --set bar1_value|0 {&select BK*,BWK*,BHD*,BKSS*,Pymmorgloraddar*,Indurlyrammatar*,Vaeranthynd*} --current-page Note: I originally intended to write something that would take the bar1_value of each selected token, sum those values, then apply that sum to the bar_1 value of another specific token without exceeding that token's max HP. This was to simulate a variant of a  (D&D 5e)  Great Wyrm's "Chromatic Awakening" where on being reduced to less than a certain number of HP the Wyrm would drain his remaining minions' hit points to save itself.   After realizing that would probably involve writing a script and that's beyond my current skill set :) , I decided to just using a macro to drop the HPs of the minions to zero before I manually change the Wyrm's HP total.
1768596721
timmaugh
Forum Champion
API Scripter
Your difficulty is likely coming from the tokens on the GM layer. SelectManager defaults to only selecting from the objects layer, but a GM can override that with a criteria statement: +layer in [objects,gmlayer] So the entire {&select} tag set would be: {& select BK*,BWK*,BHD*,BKSS*,Pymmorgloraddar*,Indurlyrammatar*,Vaeranthynd*,  +layer in [objects,gmlayer]} That should do it. As for the idea that the Wyrm would siphon points from its minions, would you want that to be a "YOU'RE getting drained to zero... and YOU'RE getting drained to zero...", or would you want it to be something more like, "You're giving a point... and YOU'RE giving a point... and YOU'RE giving a point... and YOU'RE -- oh, you're dead; that's going to go on your permanent record, you know... and YOU'RE giving a point..." ? In other words, given 5 minions of 20 points each: 20  20  20  20  20 ...if the Wyrm needed 30 points to get up to full strength, would the end of the process see 1 minion dead and one at 10 pts: 0  10  20  20  20 ...or would the end of the process see all the minions diminished by 6 points: 14  14  14  14  14 ?
1768601965

Edited 1768602415
Thanks Timmaugh! That solves the problem with my macro. As for the rest, in this particular scenario, I want the consequences of sacrificing the Wyrm's minions to be severe: this beast is psychopathic in the extreme and sacrificing his kobold, ogre and half-dragon minions as well as his three surviving children  to save his own hide is totally on brand for him. He will wait until he's below 50 hp before using this ability (his max hp is 580). The party's (6 PCs) average level is 15 with plenty of magic; they can regularly inflict 50-100 damage per round (collectively). However, the options you presented got me thinking again about a script that could drain health (a bar value) from a set of "source" tokens and add it to that of a "target" Token. Both options that you presented sound workable but the second - the drain evenly distributed among all minions - makes more sense to me. I thought of a third - because might as well dream big - set limits on the "drain" from the source tokens, like a "minimum" drain (say 4hp) and a max of half the bar(x)_max. That would cause minions with low max hp to be wiped out while allowing thise with higher max hp a chance to survive. A script like that  wcould prove useful for future BBEGs with vampire tendencies.
1768686400
timmaugh
Forum Champion
API Scripter
hmm... I have some ideas. Let me see if I can get something worked up.