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

For Beginners

Alright, Is there ANYWHERE that has actual examples of what the macros style (format) actually means? I'm not unfamiliar with programming and both macros and scripts are just bits of code, but as many youtube videos as I've watched and as many forum posts as I've read or wikis I've looked at, there is a general assumption of knowledge that I just do not seem to posses. As an example: This is a common style (format) I've seen written:  @{target|token_name} What is the "target?" I assume the "token_name" is the actual name associated with the token, but if that is the case, are they not the same? If I have a character named "John," would he not be the target and would not his token also be named "John?" Is there a resource out there I'm missing with my search-fu? Thanks in advance, RY
1585603916
Andreas J.
Forum Champion
Sheet Author
Translator
<a href="https://wiki.roll20.net/Macros#Using_a_Targeted_Token_with_a_Macro" rel="nofollow">https://wiki.roll20.net/Macros#Using_a_Targeted_Token_with_a_Macro</a> The macro page &amp; <a href="https://wiki.roll20.net/Dice_Reference" rel="nofollow">https://wiki.roll20.net/Dice_Reference</a> are important pages for this kind of stuff. Roll20 have the official helpcenter, and then the wiki which contains more user-submitted pages &amp; guides.
1585605497
vÍnce
Pro
Sheet Author
To add; if you use "target" in the attribute call, you will be prompted to choose the token you want the attribute value to come from.&nbsp; So if I make a simple macro /em "I know exactly what I'm doing, @{target|token_name} exclaims." This macro will use the targeted token's name in the emmote. Using "selected" works similarly except it will use the attribute of the currently selected token.&nbsp;&nbsp; And yes, you can also use a name directly as well.&nbsp; ie&nbsp; @{bob|armor_class}&nbsp; Using more generic select and target are much more flexible than using a name, since these types of calls can be used for all characters/tokens. Hope this helps.
1585605946

Edited 1585606031
Hey Andreas, thanks for replying. I have already looked at the page you're referring me to and I'm looking at it again. So let me ask a very specific question: How would one format a macros that did nothing except whisper a character named John?
1585606032

Edited 1585606236
vÍnce
Pro
Sheet Author
/w john hello <a href="https://wiki.roll20.net/Text_Chat#Whispers" rel="nofollow">https://wiki.roll20.net/Text_Chat#Whispers</a>
Vince, thanks for adding in. So yes, that appears to be helpful. So a macros that did nothing except whisper a character named John would look like this? /w @{John|}?{What do you want to say?}
What I see you posted is a chat window command, which I understand. I was looking to make a whisper command available that would then give a prompt asking what it was to be whispered, which I obviously was not clear about initially.
1585606465

Edited 1585606709
vÍnce
Pro
Sheet Author
/w john ?{What do you want to say?} If you wanted the is to work more "generally" /w @{target|character_name} ?{What do you want to say?}
1585615152

Edited 1585617033
Ok, following with something slightly more complex: I want a player to click a button on the macro bar that brings up a dialog box that says Whisper? and then has the list of players (and GM) for them to choose from. Once they click on the name, they get a prompt asking "What do you want to say?" There are five players and myself as GM. I built six macros that are all as follows: Whisper-CharacterX /w CharacterX ?{What do you want to say?} I then built a wrapper macro that looks like this: /w gm &amp;{template:default} {{name=Whisper who?}} {{Whisper=[CharacterV](! #Whisper-CharacterV) [CharacterW](! #Whisper-CharacterW) [CharacterX](! #Whisper-CharacterX) [CharacterY](! #Whisper-CharacterY) [CharacterZ](! #Whisper-CharacterZ) [GM](! #Whisper-GM)}} The whole set up works great and I was able to put it on each of the characters and make it whisper just them. My questions stem from the fact that I stole this whole thing off of the Taking20 Masters Series and in that, there were several extra characters in the wrapper macro that I initially entered and then they simply vanished. To be specific, it initially would have looked like this in every instance: [CharacterZ](!&amp;#13;#Whisper-CharacterZ) Why did they disappear? What was their purpose? Finally, can the default template (which I assume produces the purple box with neon pink button) something that can be changed? Thanks again for the help.
1585616723
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
What you are building is usually called a&nbsp; Chat Menu . I would strongly recommend using a&nbsp; Macro Character Sheet &nbsp;to build the macros. (Technically, being built on a sheet, they would be called Abilities). The inks explain the advantages. As for the last question, yes you can. There are an awful lot of custom styles on the&nbsp; Show Off Your Style , and Show Off Your Style 2: The Stylening! &nbsp;Threads. I would recommend: Inline Links on OGL Roll Templates Default Roll Template Enhancement
1585674560

Edited 1585674600
Hi Keith, Thanks for the response and helpful links. I'm afraid I'm still no closer in understanding the "whys" behind much of the macro code. My quest will continue since I'm not playing any of the standard games and therefore have to modify many of the scripts and macros to fit what I am doing. Regardless, I would like to ask you a simple question. I looked a several of the posts in the Style links you provided. To pick one off the top of my head that I liked is&nbsp;the compact macro bar. My question is, where does the code go that is posted there? Thanks, RY
1585679402

Edited 1585680293
vÍnce
Pro
Sheet Author
Are you referring to this&nbsp; Emojis in macro buttons &nbsp;tip? I believe you just change the name of the macro in the quickbar to a simple emoji. One you have a macro button on the bar, right-click, rename, and paste your emoji in the field.&nbsp;♥ While it appear there may be issues embedding emojis in the forum, I think you can simply copy/paste emojis to the vtt and they work.&nbsp; Maybe someone else can comment on that...
1585680300

Edited 1585680354
Nah, I was referring to the More Compact Macro Toolbar and the More Compact Token Action Toolbar
1585682496
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Installation instructions are in the top post of each of those threads. Also, if you install the extension, most styles have an [Install] link after their name in the top post that will take you tot he Userstyles.org page where you can one-click install them.
I just installed all those styles for stylus and they are AMAZING!!!!&nbsp; My screen real estate has been returned.&nbsp; Now :-) I can go build a bunch more buttons to fill it up.
1585705548
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It looks really weird when I turn them off to make a screenshot.
1585706184
vÍnce
Pro
Sheet Author
keithcurtis said: It looks really weird when I turn them off to make a screenshot. Lol.&nbsp; I always forget to do that and then feel compelled to redo my screenshot so know one is confused by my layout, colors, etc.
Just to clarify, the "one-click install" is only true if one already has Stylish installed. While it is admittedly only a few extra clicks and two of the clicks are the same button, because I did not have Stylish installed and did not know what Stylish was and there was a giant click-bait ad button also on the page that said "Install," when I initially clicked on Stylish and it was suddenly wanting to make changes to my browser, I backed out confused. I'd suggest adding a note mentioning that if someone does not have Stylish installed, the first click will offer to install the necessary browser extension. Just my 2 pennies.
1585755013
vÍnce
Pro
Sheet Author
Make sure it's STYLUS and not stylish. Stylish has a record of being associated with malware/spyware...
1585755532
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also note that Userstyles.org was created when Stylish was still the only solution. If Userstyles says it is going to use Stylish to install a style, it will actually use Stylus, if Stylus is your active extension.
Well the one-click install led to a link to STYLISH which I just uninstalled. I did a search, found and added the Stylus extension, but that is most certainly not what I got initially.
1585782388
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ah, you need to have Stylus installed first . The install command just sends a command that either Stylish (or its more upstanding successor, Stylus) intercepts. From what I understand, Stylus is 90% built on the Stylish code, just with the snooping bits removed. It was created after the story broke on Stylish. Also, I'm given to understand that Stylus itself has cleaned up its act, but once bitten, twice shy.
Needing Stylus installed first is the tip I'd recommend adding. Anyway, Keith, is there a way to make the macro/token bar names for macros coming from a macros character sheet not have the character sheet name on them other than renaming them on the bar after-the-fact? i.e. I called my macros character sheet "Macro Character Sheet" and now the Whisper Menu is listed as "Macro Character Sheet Whisper Menu." Obviously I can use a shorter name for the Macro Character Sheet, such as MCS, but even those three letters on all the macros are absorbing real estate.
Also, can rollable tables be put in a macros character sheet?
1585792963
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
RobbaYaga said: Needing Stylus installed first is the tip I'd recommend adding. Anyway, Keith, is there a way to make the macro/token bar names for macros coming from a macros character sheet not have the character sheet name on them other than renaming them on the bar after-the-fact? i.e. I called my macros character sheet "Macro Character Sheet" and now the Whisper Menu is listed as "Macro Character Sheet Whisper Menu." Obviously I can use a shorter name for the Macro Character Sheet, such as MCS, but even those three letters on all the macros are absorbing real estate. Actually, the installation instructions in the top post of each thread say: To install a style, first install the extension.&nbsp; As for the name in template, either use a template that doesn't display a character name (this will vary by sheet—I use npcaction for the D&amp;D 5th Edition by Roll20 sheet), or go into the settings tab for your macro sheet and turn off the option to include the character name in templates.
1585793038
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
RobbaYaga said: Also, can rollable tables be put in a macros character sheet? The tables themselves cannot; they live on the Collections tab. But you can write macros (actions) that call Rollable Tables.
Ok, probably last post on this topic. If tables cannot be included, must they be transported to new games via cut and paste? I've seen some people with dozens and dozens of embedded tables and WOW that would be a lot of work to move.
1585837834
Kraynic
Pro
Sheet Author
I'm not sure how others do it, but I do this by having a "base" game for each system I run.&nbsp; I don't invite any players to my base game, it is just a template.&nbsp; I set up my rollable tables, global macros, and any handouts that I will always want available there and just copy that game when I start something new.&nbsp; With a pro subscription, you can use the transmogrifier to move them from game to game also, so it can be as simple as drag and drop with that subscription perk.
Thanks for the replies!
RobbaYaga said: If tables cannot be included, must they be transported to new games via cut and paste? I've seen some people with dozens and dozens of embedded tables and WOW that would be a lot of work to move. The Transmogrifier (a Pro-level subscription feature) can move Rollable Tables between your games. More on the wiki here: <a href="https://wiki.roll20.net/Transmogrifier" rel="nofollow">https://wiki.roll20.net/Transmogrifier</a>
1585874919
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There is also a table export script that can import and export from tabulated files.