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

Help Wanted With Pendragon Skill Macro

1643325727

Edited 1643325758
My macro-fu is pretty weak, as much as I hate to admit it I just cannot make head nor tail of how to make a menu macro :( Can someone please help me with an example of how to make the following two skill checks into a drop-down skill check menu macro, like we have in 5E? 1. Awareness &{template:rolls} {{header=^{awareness}}} {{dice=[[{1d20+({@{Sir Gerhart (Andy)|awareness}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{Sir Gerhart (Andy)|awareness}+(?{Mod.|0}),20}kl1[Threshold]]]}} {{fumbleVal=[[20+({@{Sir Gerhart (Andy)|awareness}+(?{Mod.|0}),0}kl1)]]}} 2. Boating &{template:rolls} {{header=^{boating}}} {{dice=[[{1d20+({@{Sir Gerhart (Andy)|boating}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{Sir Gerhart (Andy)|boating}+(?{Mod.|0}),20}kl1[Threshold]]]}} {{fumbleVal=[[20+({@{Sir Gerhart (Andy)|boating}+(?{Mod.|0}),0}kl1)]]}} I'd really appreciate an example of this working plus some sort of explanation, if at all possible? I have looked this up on the wiki and also examined the 5E skill check macro but it goes completely over my head. Thanks! Manny
1643335819

Edited 1643337917
Ok, so I (somehow) managed to get my brain in the correct space and completed the macro! For anyone else who wants to play Pendragon and would like a skill macro for it, please see below. I hope it helps someone out :-) NB: This is for 6th edition Pendragon , but if you're playing 5.2 or earlier, you can just add or update skills as required. 6th edition specifically rolls faerie lore into folk lore and heraldry into recognise, hence both faerie lore and heraldry are not in the below macro (but would be trivial to add). Edit : replaced the HTML numbers with nice names - many thanks to timmaugh (see below). &{template:rolls} {{header=?{Which skill? |awareness,awareness (@{selected|name})}} {{dice=[[{1d20+({@{selected|awareness}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|awareness}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|awareness}+(?{Mod.|0}),0}kl1)]]}} |boating,boating (@{selected|name})}} {{dice=[[{1d20+({@{selected|boating}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|boating}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|boating}+(?{Mod.|0}),0}kl1)]]}} |compose,compose (@{selected|name})}} {{dice=[[{1d20+({@{selected|compose}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|compose}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|compose}+(?{Mod.|0}),0}kl1)]]}} |courtesy,courtesy (@{selected|name})}} {{dice=[[{1d20+({@{selected|courtesy}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|courtesy}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|courtesy}+(?{Mod.|0}),0}kl1)]]}} |dancing,dancing (@{selected|name})}} {{dice=[[{1d20+({@{selected|dancing}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|dancing}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|dancing}+(?{Mod.|0}),0}kl1)]]}} |falconry,falconry (@{selected|name})}} {{dice=[[{1d20+({@{selected|falconry}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|falconry}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|falconry}+(?{Mod.|0}),0}kl1)]]}} |fashion,fashion (@{selected|name})}} {{dice=[[{1d20+({@{selected|fashion}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|fashion}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|fashion}+(?{Mod.|0}),0}kl1)]]}} |first_aid,first_aid (@{selected|name})}} {{dice=[[{1d20+({@{selected|first_aid}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|first_aid}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|first_aid}+(?{Mod.|0}),0}kl1)]]}} |flirting,flirting (@{selected|name})}} {{dice=[[{1d20+({@{selected|flirting}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|flirting}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|flirting}+(?{Mod.|0}),0}kl1)]]}} |folk_lore,folk_lore (@{selected|name})}} {{dice=[[{1d20+({@{selected|folk_lore}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|folk_lore}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|folk_lore}+(?{Mod.|0}),0}kl1)]]}} |gaming,gaming (@{selected|name})}} {{dice=[[{1d20+({@{selected|gaming}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|gaming}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|gaming}+(?{Mod.|0}),0}kl1)]]}} |hunting,hunting (@{selected|name})}} {{dice=[[{1d20+({@{selected|hunting}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|hunting}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|hunting}+(?{Mod.|0}),0}kl1)]]}} |intrigue,intrigue (@{selected|name})}} {{dice=[[{1d20+({@{selected|intrigue}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|intrigue}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|intrigue}+(?{Mod.|0}),0}kl1)]]}} |orate,orate (@{selected|name})}} {{dice=[[{1d20+({@{selected|orate}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|orate}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|orate}+(?{Mod.|0}),0}kl1)]]}} |play (@{selected|play_name}),play (@{selected|play_name}) (@{selected|name})}} {{dice=[[{1d20+({@{selected|play}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|play}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|play}+(?{Mod.|0}),0}kl1)]]}} |read (@{selected|read_name}),read (@{selected|read_name}) (@{selected|name})}} {{dice=[[{1d20+({@{selected|read}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|read}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|read}+(?{Mod.|0}),0}kl1)]]}} |recognize,recognize (@{selected|name})}} {{dice=[[{1d20+({@{selected|recognize}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|recognize}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|recognize}+(?{Mod.|0}),0}kl1)]]}} |religion (@{selected|religion_name}),religion (@{selected|religion_name}) (@{selected|name})}} {{dice=[[{1d20+({@{selected|religion}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|religion}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|religion}+(?{Mod.|0}),0}kl1)]]}} |romance,romance (@{selected|name})}} {{dice=[[{1d20+({@{selected|romance}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|romance}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|romance}+(?{Mod.|0}),0}kl1)]]}} |singing,singing (@{selected|name})}} {{dice=[[{1d20+({@{selected|singing}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|singing}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|singing}+(?{Mod.|0}),0}kl1)]]}} |stewardship,stewardship (@{selected|name})}} {{dice=[[{1d20+({@{selected|stewardship}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|stewardship}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|stewardship}+(?{Mod.|0}),0}kl1)]]}} |swimming,swimming (@{selected|name})}} {{dice=[[{1d20+({@{selected|swimming}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|swimming}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|swimming}+(?{Mod.|0}),0}kl1)]]}} |tourney,tourney (@{selected|name})}} {{dice=[[{1d20+({@{selected|tourney}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} {{threshold=[[{@{selected|tourney}+(?{Mod.|0}),20}kl1 [Threshold]]]}} {{fumbleVal=[[20+({@{selected|tourney}+(?{Mod.|0}),0}kl1)]]}} }
1643336959

Edited 1643336991
timmaugh
Pro
API Scripter
Hey, Manny... Two things you have to be aware of with macros like this. First, roll queries use this basic syntax: ?{Prompt|First option label,FirstOptionValue|Second option label,SecondOptionValue} All of that punctuation matters. ?{...|...,...|...,...|...,...} Once the parser passes the opening brace (the left brace), it it encounters any of the other punctuation listed, it interprets it as part of the structure of the roll. That means that when you try to use values in the roll query that, themselves, contain these punctuation elements, you'll break your query unless you take action. What you have to do is replace the actual punctuation of the embedded material with the HTML element. | = | } = } , = , Now, how many of them do you have to replace? Remember, they only matter if the parser encounters them. That means that if they're gone by the time the roll query is examined, the roll query parser won't encounter them. So the second thing you have to remember is the Roll20  order of operations . Attributes (as you have in your macros) are expanded before the roll query is parsed, so by the time the roll query runs, those elements (and the associated punctuation) are no longer there. Therefore, for attribute calls, you don't have to do HTML replacements just because they are in a query. HTML replacements are easy enough. Take the roll template parts: &{template:rolls} ...becomes... &{template:rolls} This one: {{header=^{awareness}}} ...doesn't actually contain an attribute call that Roll20 will parse, so all of those right braces must be replaced... {{header=^{awareness}}} The next template part is a bit trickier: {{dice=[[{1d20+({@{Sir Gerhart (Andy)|awareness}+(?{Mod.|0})-20,0}kh1),1d0+20}kl1 [Roll]]]}} The attribute call  @{Sir Gerhart (Andy)|awareness}   will be parsed and processed before the roll query, so there's nothing to replace, there. However, the inline roll won't happen until after the roll query. That means that the right braces of the keep-low mechanics have to be replaced, as do the commas just before each: ...-20,0}kl1),1d10+20}kl1... ...as does the double right brace of the end of the template part. However, also in there is an embedded roll query: ?{Mod.|0} While it is perfectly possible to embed a roll query in a roll query, each of the command punctuation listed above will need to be replaced in the embedded query. In this case, that means the vertical pipe and the right brace (if it were a more complex query with value/option pairs separated by commas, those commas would also require replacement): ?{Mod.|0} In the end, this template part should read: {{dice=[[{1d20+({@{Sir Gerhart (Andy)|awareness}+(?{Mod.|0})-20,0}kl1),1d10+20}kl1 [Roll]]]}} The next 2 template parts are very similar to this one. Finally when you have versions of these macro command lines with the appropriate HTML substitutions to make them work in a roll query, then you're going to want to plug them into your new roll query like this: ?{Which skill to roll?|Boating,...HTML-SubbedBoatingMacro...|Awareness,...HTML-SubbedAwarenessMacro} You can quickly see how this can get out of hand if you're listing many skills and have to handle the replacements for each. For this reason, many people opt for a chat menu, instead... or even an API solution... but that's not what you asked. Hopefully this helps.
Thanks for taking the time to explain it so clearly Tim, much appreciated! Also, I'll update my macro to use your far-nicer replacements, e.g.. &comma ;, as this is much clearer to read. I shall likely do the same with the Pendragon traits, hopefully that will be a much less painful process now I've been through the baptism of fire :-)
1643339222

Edited 1643342230
GiGs
Pro
Sheet Author
API Scripter
Check if the sheet has roll buttons for each skill, then you could do something like ?{Which skill? |awareness,%{selected|awareness} |boating,%{selected|boating} Though as Tim points out, you have to be careful of sytnax in the rolls being called, which can (and probably will) break the above approach. You could create a chat menu, like /whisper "@{selected|character_name}" {{name=Skill Roll Buttons}} {{[Awareness](~selected|awareness) [Boating](~selected|boating) }} Since this approach doesnt use a query, it probably doesnt need syntax replacement, but does depend on the sheet having properly named buttons for rolls. If you want to create your own roll macro, a user named Silvyre created the logic for a pendragon roll that handles all rolls (e.g. skills above 20) properly here: <a href="https://gist.github.com/Silvyre/8168086dfab852881db00e3d8219f054" rel="nofollow">https://gist.github.com/Silvyre/8168086dfab852881db00e3d8219f054</a> I wonder what happened to Silvyre, they used to be king of roll macros.
1643387359

Edited 1643488612
Thanks for the information GiGs. I've tried your examples: the second one works, at least with the two example skills, but it comes up in the chat window whereas ideally I want a token action the players can click on. It is good food for thought though, for potentially other uses. I've also reviewed Silvyre's logic and I only have a limited understanding of the syntax going on, although I do get the idea. I have tested the Pendragon macro I posted (which is based on the sheet code) and it does cater for skills above 20 modifying the critical threshold, as per the rules. For example, if you set a skill to 23 and add a +5 modifier then roll a 13 this is correctly noted as a critical success. In this case, fashion. All knights need to look cool!