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

Adding Macro's to 'Trap' Tokens

Hello All. Working with some purchased modules and addons and on the map layer there are various Traps marked by T icons or a Cross in a Box. Is there a way to basically add a token macro to this token on the GM Layer to roll the damage of the trap but without having to make a character sheet for the trap?
1523714836

Edited 1523714866
MyRoll20Stuffs
API Scripter
Not sure if you can link a macro to a token, but you can make a button for each trap. You can edit the following to your needs. Make a macro for it and add the button to your GM buttons if you want easy access to it: &{template:pf_generic} {{header_image=[Pit Trap 30 ft](<a href="http://image.ibb.co/jqTyGn/falling.png" rel="nofollow">http://image.ibb.co/jqTyGn/falling.png</a>)}} {{name=Pit Trap: 30 ft Drop}} {{Damage Type: Bludgeoning}} {{Damage:[[3d6]]}} Will output this: You can make icons like the falling one I used at this site:&nbsp; <a href="http://game-icons.net/" rel="nofollow">http://game-icons.net/</a> Just upload the icon you make (make sure to resize it as they are saved very large) to imgur or ibb or another image hosting site and copy the URL and replace the URL in the macro example I gave with an appropriate icon URL.
Ok sorry to sound Naieve........but how does one add GM buttons?
Look at the below image (CLICK TO ENLARGE): 1) Click the Macros Button at the top of the right pane 2) Click the Add button to add a macro 3) Check the box to add it to the GM Bar
Ok I know that as the Macro Bar. I am with you. Unfortunately the result is not what I was quite looking for. Was hopoing to keep the macro attached to a 'Token' so not to clutter the Macro Bar. Thanks anyway
1523717481

Edited 1523717508
MyRoll20Stuffs
API Scripter
Unfortunately when you make a macro and add it to the token buttons (A token action macro button, what you're looking for) it adds it to ALL tokens. You can't specify a singular token to add a macro to without help from the API.
I wou;dn't mind that too much as I could make multiple macro's for each trap type but it seems you need to have a character sheet as well. I was trying to avoid that but may be the only way to do it. Just means searching through lots of Macro's
1523721044
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would suggest using a&nbsp; Chat Menu . You can restrict it to macros that are actually coming up in the current scenario. A chat menu is easier to manage when you you a&nbsp; Macro Character Sheet . You only have to make one of these instead of one for each trap.
So Keith, you are saying basically to make a character sheet and use that to create a chat menu and also store all the various macro's on that sheet.
1523721927

Edited 1523722032
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There is a way to do this sans character sheet. Here's the process: You can store anything in the bars of a token* . This gives you 6 pseudo attributes that you can use with just tokens. How you use them is up to you and what exactly you are going to be doing. For something like a basic trap, I might do something like this: Set the token to isDrawing, otherwise the information we're going to enter will overflow the circles and you'll wind up with a very ugly looking interface. Bar1: DC 15 Reflex Bar1|max:[[1d8]] Piercing Bar2:Additional Effects: Marked with a tracker Bar2|max: Bar3:Description:The northern wall is a hologram hiding several dart guns that fire small darts that do minimal damage, but tag any creatures hit with bio trackers allowing the Xyrtzil to track visitors to their compound. Bar3|max:You hear a soft "Wuft" as several darts fly at you from what you had assumed was a solid wall So, we now have our trap's information stored in the token. We will now make a generic macro in the collections tab as a token action macro: /w gm &{template:default} {{name=@{selected|token_name}}} {{@{selected|bar1}}} {{@{selected|bar1|max}}} {{@{selected|bar2}}} {{@{selected|bar2|max}}} {{@{selected|bar3}} /desc @{selected|bar3|max} This will give us output like this: You can of course use your sheet's roll templates for a nicer appearance. *Well, almost anything, line breaks (even html coded ones) don't play well
1523723419
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Scott C., that is a great way to do GM note tokens for people without the API! It has to go in the Stupid Tricks thread.
1523724649

Edited 1523725008
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, yep, I use it for room tokens as well so I can easily output a refresher to myself for what the room is, a description to the party, and even character specific whispers (such as the paladin who knows that there is some evil aura emanating from that otherwise normal looking wall). I actually thought it was in the Stupid tricks thread, I'll go post it now. Edit: And, added to the stupid tricks thread
1523726632
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Cool. Yes, I use the GMnote script for that sort of stuff, but I can see the appeal to formatting the data according to field.
you could you use one macro with a drop down menu to choose the type of trap for weapons it would look like this ?{Attack type?| sword, &{template:default} {{name=attack with sword}} {{attack=[[1d20+@{attack}]]}} {{damage=[[@{sword}]]}}| axe, &{template:default} {{name=attack with axe}} {{attack=[[1d20+@{attack}]]}} {{damage=[[@{axe}]]}} } you need the attributes in your journal sword (damage value) axe (damage value) attack (attack value)
1523728044
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yeti said: you could you use one macro with a drop down menu to choose the type of trap for weapons it would look like this ?{Attack type?| sword, &{template:default} {{name=attack with sword}} {{attack=[[1d20+@{attack}]]}} {{damage=[[@{sword}]]}}| axe, &{template:default} {{name=attack with axe}} {{attack=[[1d20+@{attack}]]}} {{damage=[[@{axe}]]}} } you need the attributes in your journal sword (damage value) axe (damage value) attack (attack value) While certainly possible, these drop downs are a PITA to implement due to the html encoding that you need to do (and the encoding will be lost if you make them as a generic macro in collections - see Keith's macro character suggestion above for a work around to this).
1523729575

Edited 1523729722
Scott C. said: There is a way to do this sans character sheet. Here's the process: You can store anything in the bars of a token* . This gives you 6 pseudo attributes that you can use with just tokens. How you use them is up to you and what exactly you are going to be doing. For something like a basic trap, I might do something like this: Set the token to isDrawing, otherwise the information we're going to enter will overflow the circles and you'll wind up with a very ugly looking interface. Bar1: DC 15 Reflex Bar1|max:[[1d8]] Piercing Bar2:Additional Effects: Marked with a tracker Bar2|max: Bar3:Description:The northern wall is a hologram hiding several dart guns that fire small darts that do minimal damage, but tag any creatures hit with bio trackers allowing the Xyrtzil to track visitors to their compound. Bar3|max:You hear a soft "Wuft" as several darts fly at you from what you had assumed was a solid wall So, we now have our trap's information stored in the token. We will now make a generic macro in the collections tab as a token action macro: /w gm &{template:default} {{name=@{selected|token_name}}} {{@{selected|bar1}}} {{@{selected|bar1|max}}} {{@{selected|bar2}}} {{@{selected|bar2|max}}} {{@{selected|bar3}} /desc @{selected|bar3|max} This will give us output like this: You can of course use your sheet's roll templates for a nicer appearance. *Well, almost anything, line breaks (even html coded ones) don't play well I'll certainly give this one a go. However I can't find where you are getting the "Isdrawing" thing, is that in "Token Represents"?
1523730785
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Right click on the token, it's under the advanced option in the right click menu that pops up
Cheers. I'll give it a go now
If you were pro you could use the "it's a trap!" api though that can be tricky, scott c.'s mthod is a good compromise
Kirv Goldblade said: If you were pro you could use the "it's a trap!" api though that can be tricky, scott c.'s mthod is a good compromise I have no access to API. :(