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

Bump and It's a Trap

Just thinking this through right now, haven't tampered with it. Would it be possible to use its a trap with bump? You put the slave token as a trap on the GM's layer linked to the master token on the Objects layer. The trap-slave token is keyed to not be triggered by the master token id. When other tokens break the radius of the it triggers an api such as chatsetattr or token mod to apply the aura effect it represtnes (fire damage, cold damage, fear penalities, protection bonuses, etc).
1619631630
The Aaron
Roll20 Production Team
API Scripter
It will require modification to Bump permitting specifying the TokenID to affect (with appropriate security), or possibly a program interface for it's a trap (or a trap theme) to instruct Bump to do something.  I'm down for both those enhancements and will try to take a look at that soon.
1619632594
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Adding TokenID to Bump would be really nice. (admittedly, I'd like to add its capabilities to Reporter...)
Hey, if you two are looking at it I can stop. Thank god. LOL.
1619637597
The Aaron
Roll20 Production Team
API Scripter
I bet Tim could do this with some meta-script work...
1619647456

Edited 1619647592
timmaugh
Pro
API Scripter
TL;DR Yep, I believe I can help. Given that you have installed SelectManager, Plugger, Muler, and ZeroFrame, you can (with a very little bit of setup) run this line out of It's A Trap: !token-mod --set name|"Boom-Shocka-Locka" {& select get.TRAP_ID}{& mule TrapList}{&eval}bump(){& /eval}{&0 get sm} (You may need to escape that as per the It's a Trap documentation... I will leave that as homework). =D Longer Explanation So... If you want to run Bump as a part of triggering the trap, you will have to restore a selected token to the bump call... that's SelectManager. It doesn't matter if you are on the Objects Layer or the GM Layer, and you don't have to specify the appropriate token for the layer you are on. In other words, if you know what the token id is of your trap token, you can do something like: !bump {& select -MYzJr9MytaS4Cxls_UM} (Note: again, all examples are shown as if they were clean calls, without the escaping that IaT requires... you will need to add that part) That will automatically flip those slaved tokens no matter what layer configuration they are in. I'm not sure if the TRAP_ID that IaT substitutes into the line is the same ID as the token that represents the trap, but if it is, you could use that in place of the actual ID: !bump {& select TRAP_ID} If the TRAP_ID is NOT the same as the token ID, you can translate the TRAP_ID through a Muled variable table to retrieve the token id to retrieve for the {&select...} . That would require Muler (and probably ZeroFrame, too)... see below. Last, if It's A Trap only allows for a single call to another API script, and you want to do both a bump and a token-mod (for instance), then you need to wrap the extras up as {& eval} statements -- which is the Plugger meta-script. Imagine putting the bump command *within* token-mod. It will run first -- at meta-script priority -- then token-mod will run: !token-mod --set name|"Boom-Shocka-Locka" {& select TRAP_ID}{& eval}bump(){& /eval} In this case, you would want to make sure that the TRAP_ID represented the token that token-mod actually needed to work on (the one destined for the Objects layer). If it actually represents the *other* token, then we for sure need to use the Mule to return the slaved token. Here's how to do that: 1. Set up a Mule (an ability, probably on a macro-mule character), named "TrapList" 2. When you set up a Trap, store the token id of the token-to-restore (the one that is revealed when the trap is sprung) as the value of a variable. The variable's name should be the TRAP_ID (or token id) of the trap token (the one that will be on the Object layer, but invisible). You can do this with a command line, but it's really just easier to copy/paste them in: CONTENTS OF TRAPLIST MULE: ------------------------------------------------ -MYzJr9MytaS4Cxls_UM=-MYzJfCNIaMhqtn1ANBI -MYzJr9Myta123456789=-MYzJfCNIaMabcdefghi Then add the Muler syntax to your line... {& mule TrapList}     ...and... get.TRAP_ID ...and since you have to have the variable retrieved before SelectManager selects the token for you, put in an order statement for ZeroFrame to make sure they operate in the correct order for this call: {&0 get sm} When you're all said and done, you have a line that looks like this: !token-mod --set name|"Boom-Shocka-Locka" {& select get.TRAP_ID}{& mule TrapList}{&eval}bump(){& /eval}{&0 get sm} CAVEAT: One thing I have to look at is whether that selected token is handed off to the {& eval} script when it is called. I *know* it is if the eval-ed script is registered as a plugin to ZeroFrame... but I think it might also be available if you have SelectManager installed and configured to automatically hand off/restore the selected tokens from the last set of selected tokens (ie, those established when the token-mod call is made and the {& select...} token is parsed). I will add the ability to use a defer/escape character with the {& eval} statement tonight... so that if you needed to, you could make sure that the constructions you escaped in that way wouldn't be parsed until the downstream, eval-ed script runs... e.g., a second {& select ...} statement
Would it be possible to instead of showing the purple aura, indicating that players cant see it at all, to show an image we could use from our user library, ie a "?" for instance, to let players know there is something there(hasn't tried to hide yet, like in fog or darkness etc), but not what or who it is. Atm we have to download then upload images from the monster manual etc, create a rollable token, then add say a "?" mark image to automate with say token-mod.
1620569283
The Aaron
Roll20 Production Team
API Scripter
Hmm. It would be pretty easy to make a version of Bump that does that all the time by changing out the slave image URL. It would be possible to add a feature to bump that lets you choose what the slave image should look like, but that's a bit more difficult. You could probably use TokenMod to change out the slave image once it's bumped. I don't think Bump cares about the image after creation of the slave token, I'll have to check. 
1620660378
The Aaron
Roll20 Production Team
API Scripter
So, I just tried out swapping out the transparent image after bumping a token, and it works really well.  Just upload an image to your library to use as a question mark token, then drag it onto the map, then select the transparent token bump created, run this command and click on the ? token on the map: !token-mod --set imgsrc|@{target|token_id} --ids @{selected|token_id} Then you'll have a question mark token that acts just like a bumped token. Here's the image I used:
1620695815

Edited 1620697885
Ivo
Pro
Looks perfect, I will give it a try, thanks so much! Ok so tested, works great. I,ve set up a token macro that changes the image source of the bump to a "?" and another to change it back to the bump transparent image(got the url and uploaded to my own library, seemed to be a 1x1 transparent image). If I select a group of tokens and use the token action, it will do all of the selected tokens, just what  I needed!!!. So now when someone gets blinded etc, I can do a blanket select and ? whenever that players turn comes up, making it just that little bit harder to guess who is who :) Thanks Aaron
1620740889
The Aaron
Roll20 Production Team
API Scripter
No no problem!