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 .
×

Question about Macros

1. Is this the place for this topic to be at or should it be in the API section? 2. Is there a list, a table or something, of the Macro commands and their uses? I've been muddling through them with no success, and have cobbled together macros based on pre-made ones on character sheets. I can't find a single database for the things, I've checked the wiki, the API section for the system I'm using, and more, and nothing. I can't find it! It's just driving me insane, and trying to figure out what the commands are without a guide is producing errors and annoying issues. I would greatly appreciate a link or a list of these things.
1417636750
The Aaron
Roll20 Production Team
API Scripter
This is the right place. The API forum is for the Javascript API Here is the wiki docs about the macros: <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> Macros and Abilities are simply a collection of commands that you might otherwise type into chat. If you were to type a command in chat, hit shift-enter, type another, hit enter, that would be identical to executing a macro. Abilities are almost the same as Macros. In a Abilities, you are assumed to be in the scope of the character the Character they are on. So, if you were referencing the Dex Attribute on the Character Bob, for a macro you would need to type @{Bob|Dex}, but an Ability would only need @{Dex}. Hopefully that will get you started. If you have specific questions, or need more details, just reply away. People will come help you as they see your message. =D
Alright, and good to know about that I have this in the right place.. However, what I mean to say is the nitty gritty commands of the Macros. Currently I'm trying to make an all-purpose constitution check in a DnD 3.5 campaign so the GM can simply input a character name, and then they'll get the Constitution check. However.. There's no list, not one that I can find, about what commands do what. For example, I've been trying to use the command as follows: ?{CharacterName} @{[CharacterName|con-base}, which is a butchered command I've lifted from the attack macro supplied to me by the character sheet. It doesn't work, and I don't know if it's because I have the wrong command for inputting a string, or if I've messed up the statement, or what. I don't know what the ?{} command does, and there's no resource I can find that can help me. That's.. Basically my problem in the tiniest nutshell I can create.
1417637759
Lithl
Pro
Sheet Author
API Scripter
?{Some text} is a roll query, which pops up an input box (with the label "Some text") when you run the command. You can also specify a default value for the box, eg ?{Some text|0} (the input box will be filled with a zero). If you have multiple queries in a command with the same label text, you'll only have to input the value once, and it'll be copied multiple times. However! You're not going to be able to use queries like that to specify a character name to use for pulling up an attribute, due to the order of operations . Roll queries are executed after abilities, macros, and attributes get handled by the engine. If you want to create a general purpose macro to reference an attribute, you'll want either @{selected|con-base} (which will take the con-base attribute from the character linked to the currently selected token), or else @{target|con-base} (which will give you the opportunity to click on a token, and then take the con-base attribute from the linked character).
Ah, now that's what I'm looking for! thank you, Brian. It's just frustrating. I couldn't find the link you put in your post, which looking over is almost exactly what I need, simply by looking at the Macro wiki page. I can't do macros if I don't know how they work, is all. thanks again.
1417638169
The Aaron
Roll20 Production Team
API Scripter
?{} is called a variable by the wiki (but I just call it a query). The character sheets' macros are very confusing, and probably not great as an instructive case. There are some system specific guides you might find useful (here's the 3.5 one): <a href="https://wiki.roll20.net/Dungeons_and_Dragons_3.5" rel="nofollow">https://wiki.roll20.net/Dungeons_and_Dragons_3.5</a> Macros are just collections of commands, so looking at the individual commands will likely be most helpful. In particular besides the features on the Macro page, the Dice syntax will be important (especially the inline roll syntax). So, for your con check macro, you probably won't be able to prompt for a character name. ?{} substitution occurs before dice are rolled, but it would take a multi-pass system to expand the query and then use that to expand and attribute reference, and Roll20 doesn't do that. There are alternatives though. The easiest is a Character Ability instead of a macro. In a Character Ability, the character is assumed, you it would just be (roll): /r 1d20+@{con-base} or (inline): Con Check [[1d20+@{con-base}]] You could create a macro that uses either the Selected Token : Con Check [[1d20+@{selected|con-base}]] or the Target Token : Con Check [[1d20+@{target|con-base}]] Once you've read those wiki pages and experimented with them a bit, it should get easier. And of course, you can always post here for assistance. =D
1417638264
The Aaron
Roll20 Production Team
API Scripter
(Damn, Ninja'd by Brian.. again... =D )
... You know what, taking another look at it, Apparently I'm blind. The Dice Syntax page is the other piece of the puzzle I needed, but apparently I was staring at the Macro page for too long and didn't see the things you're pointing out to me. Well, don't I feel silly. Thank you, again!
1417638620
The Aaron
Roll20 Production Team
API Scripter
No worries! =D
Bit of self-promotion, but I'd suggest checking out <a href="https://wiki.roll20.net/Macros_-_Pathfinder_Exampl" rel="nofollow">https://wiki.roll20.net/Macros_-_Pathfinder_Exampl</a>... It has a ton of practical examples and scenarios for how to use the different macro commands available.
Need a macro or script for specifying the color of the dice to be rolled. I am in a 3d6 game where the colors chosen mean different things. Is this possible with roll20? I know default color of "roll 3D dice" is the players name highlight/color, but is there a way to specify this int he command line? Thanks and let me know if this is best posted to a different forum.
1417664846
Finderski
Pro
Sheet Author
Compendium Curator
Are the dice summed or just looked at based on individual die color? Because you could do something like: Red: [[1d6]], Blue: [[1d6]], Green: [[1d6]]. But if they do need to be summed and you need the colors, then you'd likely have to do something like: /r 1d6[Red]+1d6[Blue]+1d6[Green] That won't use the 3D dice, but it will give you the colors that you need, even if it is textual. Alternatively, there's probably something you could do with rollable tables, maybe?
To color-code dice you would either need the API or create Rollable Tables with Colored Pictures representing the different Die Faces. The macro system doesn't contain any formatting options.