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

using a macro to create chat buttons

July 29 (4 years ago)

Edited July 29 (4 years ago)

I have a macro that works fine

GM-Bluff

/w gm %{selected|Bluff-Check}


now I'm trying to copy a macro sent to me by another DM

GM-Skill

/w [Bluff](!#GM-Bluff)


It produces a button that doesn't trigger the roll... It works fine in the other DM's game and I can't see a difference in our syntax



so if I put a space in the macro between the ! #, it at least recognized that a token needs to be selected, but still doesn't run the macro

/w gm [Bluff](! #GM-Bluff)

July 29 (4 years ago)

Edited July 29 (4 years ago)

Replace !# with !
# and it should work (it's going to be replaced by a line-break-like character after closing the macro window).

July 29 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Here is a good guide to working with Chat Menus. I'd also suggest looking over using a Macro Character Sheet. The first will help you work out a lot of syntax cases, the second will give you a better way to mange your automation and eliminate a LOT of html substitutions like above.

July 29 (4 years ago)

Edited July 29 (4 years ago)
Oosh
Sheet Author
API Scripter

edit - ninja'd by keith


Linking to Collections macros is covered here in the wiki - the syntax you need is what Juan posted above.

Opening a Collections macro with HTML entities will revert them, and if you save the macro it will no longer function. Best practice is to store these macros on a character sheet, instructions here.

This changes the syntax of the button link, covered in both links above - [Button](~sheetname|abilityname) . You can store the linked abilities on the sheet, but still make the menu in the Collections tab if you wish to make it available to all players.

thanks that worked.... now the only problem is once I save if I try to edit I have to retype the whole thing which is slightly irratating.

July 29 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

The problem isnt when you save. It's when you reopen a macro. if you save the macro but keep it open, and make further edits, you'll be fine.

However, Keith earlier suggested using a Macro Character Sheet. that is specifically to avoid this problem. Abilities stored on character sheets do not have this issue - it only happens with Macros.