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

Macro help

I'm still pretty new here, but getting better everyday.  My question is about a pair of token macros I use.  Don't even remember where I found them.  First macro is an ability check: &{template:simple}{{?{Roll Type?|Normal,normal|Advantage,advantage|Disadvantage,disadvantage}=1}}?{Ability?|Acrobatics,{{rname=Acrobatics}}{{mod=@{acrobatics_bonus}}} {{r1=[[1d20+@{acrobatics_bonus}]]}}{{r2=[[1d20+@{acrobatics_bonus}]]}}|Animal Handling,{{rname=Animal Handling}}{{mod=@{animal_handling_bonus}}} {{r1=[[1d20+@{animal_handling_bonus}]]}}{{r2=[[1d20+@{animal_handling_bonus}]]}}|Arcana,{{rname=Arcana}}{{mod=@{arcana_bonus}}} {{r1=[[1d20+@{arcana_bonus}]]}}{{r2=[[1d20+@{arcana_bonus}]]}}|Athletics,{{rname=Athletics}}{{mod=@{athletics_bonus}}} {{r1=[[1d20+@{athletics_bonus}]]}}{{r2=[[1d20+@{athletics_bonus}]]}}|Deception,{{rname=Deception}}{{mod=@{deception_bonus}}} {{r1=[[1d20+@{deception_bonus}]]}}{{r2=[[1d20+@{deception_bonus}]]}}|History,{{rname=History}}{{mod=@{History_bonus}}} {{r1=[[1d20+@{History_bonus}]]}}{{r2=[[1d20+@{History_bonus}]]}}|Insight,{{rname=Insight}}{{mod=@{Insight_bonus}}} {{r1=[[1d20+@{Insight_bonus}]]}}{{r2=[[1d20+@{Insight_bonus}]]}}|Intimidation,{{rname=Intimidation}}{{mod=@{Intimidation_bonus}}} {{r1=[[1d20+@{Intimidation_bonus}]]}}{{r2=[[1d20+@{Intimidation_bonus}]]}}|Investigation,{{rname=Investigation}}{{mod=@{Investigation_bonus}}} {{r1=[[1d20+@{Investigation_bonus}]]}}{{r2=[[1d20+@{Investigation_bonus}]]}}|Medicine,{{rname=Medicine}}{{mod=@{Medicine_bonus}}} {{r1=[[1d20+@{Medicine_bonus}]]}}{{r2=[[1d20+@{Medicine_bonus}]]}}|Nature,{{rname=Nature}}{{mod=@{Nature_bonus}}} {{r1=[[1d20+@{Nature_bonus}]]}}{{r2=[[1d20+@{Nature_bonus}]]}}|Perception,{{rname=Perception}}{{mod=@{Perception_bonus}}} {{r1=[[1d20+@{Perception_bonus}]]}}{{r2=[[1d20+@{Perception_bonus}]]}}|Performance,{{rname=Performance}}{{mod=@{Performance_bonus}}} {{r1=[[1d20+@{Performance_bonus}]]}}{{r2=[[1d20+@{Performance_bonus}]]}}|Persuasion,{{rname=Persuasion}}{{mod=@{Persuasion_bonus}}} {{r1=[[1d20+@{Persuasion_bonus}]]}}{{r2=[[1d20+@{Persuasion_bonus}]]}}|Religion,{{rname=Religion}}{{mod=@{Religion_bonus}}} {{r1=[[1d20+@{Religion_bonus}]]}}{{r2=[[1d20+@{Religion_bonus}]]}}|Sleight of Hand,{{rname=Sleight of Hand}}{{mod=@{sleight_of_hand_bonus}}} {{r1=[[1d20+@{sleight_of_hand_bonus}]]}}{{r2=[[1d20+@{sleight_of_hand_bonus}]]}}|Stealth,{{rname=Stealth}}{{mod=@{Stealth_bonus}}} {{r1=[[1d20+@{Stealth_bonus}]]}}{{r2=[[1d20+@{Stealth_bonus}]]}}|Survival,{{rname=Survival}}{{mod=@{Survival_bonus}}} {{r1=[[1d20+@{Survival_bonus}]]}}{{r2=[[1d20+@{Survival_bonus}]]}}}{{charname=@{character_name}}} Second macro is a saving throw: &{template:simple}{{?{Roll Type?|Normal,normal|Advantage,advantage|Disadvantage,disadvantage}=1}}?{Saving Throw?|STR,{{rname=Strength Save}}{{mod=@{strength_save_bonus}}} {{r1=[[1d20+@{strength_save_bonus}]]}}{{r2=[[1d20+@{strength_save_bonus}]]}}|DEX,{{rname=Dexterity Save}}{{mod=@{dexterity_save_bonus}}} {{r1=[[1d20+@{dexterity_save_bonus}]]}}{{r2=[[1d20+@{dexterity_save_bonus}]]}}|CON,{{rname=Constitution Save}}{{mod=@{constitution_save_bonus}}} {{r1=[[1d20+@{constitution_save_bonus}]]}}{{r2=[[1d20+@{constitution_save_bonus}]]}}|INT,{{rname=Intelligence Save}}{{mod=@{intelligence_save_bonus}}} {{r1=[[1d20+@{intelligence_save_bonus}]]}}{{r2=[[1d20+@{intelligence_save_bonus}]]}}|WIS,{{rname=Wisdom Save}}{{mod=@{wisdom_save_bonus}}} {{r1=[[1d20+@{wisdom_save_bonus}]]}}{{r2=[[1d20+@{wisdom_save_bonus}]]}}|CHA,{{rname=Charisma Save}}{{mod=@{charisma_save_bonus}}} {{r1=[[1d20+@{charisma_save_bonus}]]}}{{r2=[[1d20+@{charisma_save_bonus}]]}}}{{charname=@{character_name}}} Both of these macros work as intended.  However...I use 3D dice and always query advantage on the character sheets.  The problem is with the 3D dice, these macros always roll two D20's and I only want one to show, unless I select advantage or disadvantage.  I know that the first die to hit is one that is selected, but I can see my players being a little ticky-tack about seeing two dice and wondering about the selection.  I dont know enough about macros to change them and was wondering if someone who is a lot smarter than myself could help me modify these to get the results i'm looking for?  Any help is appreciated.
1574551016
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
3d Dice will always roll all of the possible dice. Roll templates are engineered to show you only the dice you need, depending on your settings. This is necessary due to the fact that the dice syntax has no if-then logic. It can't roll dice conditionally (i.e. IF  if I roll a natural 20 THEN  roll critical damage). Roll templates can show or hide dice, but they must be rolled. 3D dice are "dumb" indicators. They must display, whether needed or not. Therefor, unless you change your macros to always and only roll 1d20, the 3d dice will show. That being said, that macro looks like it could be written a great deal more efficiently, and possibly respect the roll style called for. What sheet are you using?
1574564001

Edited 1574564534
For my character sheets, I`m using the  5th Edition OGL Character Sheet.  Also...I guess players can select if they want to use 3D dice or not?  I`m still designing my campaign, and have yet to DM a game.  If I make an ability check or saving throw straight from the sheet and select a normal roll, it rolls one die..(what I want).  If I use the macro for the same checks, it rolls 2 dice.  I'm certainly not married to these macros, if you have better versions of these, I'd be happy to try them.  
1574581380

Edited 1574581396
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
First off, a chat menu would be much easier to write. I really don't like complicated drop downs, they make my eyes water. :) Chat menus almost never require arcane html substitution. The second recommendation is using the built-in sheet macros, since your existing one doesn't take advantage of sheet preferences or universal modifiers. Try this. This does the first two skills, but you can extrapolate. It works for both PCs and NPCs: &{template:npcaction} {{rname=@{selected|character_name}}} {{description=[Acrobatics](~selected|acrobatics) | [Animal Handling](~selected|animal_handling)}} This does saving throws, again, just the first two: &{template:npcaction} {{rname=@{selected|character_name}}} {{description=[Strength](~selected|strength_save) | [Dexterity](~selected|dexterity_save)}}
Thanks Keith, I tried both of your methods with just the two skills you have here.  I like the chat menu option.  If I understand correctly, to use these templates I just need to add the rest of the skills and saving throws?  Using the sheet macros is fine, just having to open the character sheet every time to make a ability check or saving throw is kinda blah....I know nothing of scripting or coding so hand holding for me is appreciated.  Also...I use your light crumb method of space lighting.  Works brilliantly.
1574618515
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yeah, just fill them out to complete. This is one case where the official sheet follows a consistent naming structure, so hopefully there are no surprises. Just watch for capitalization (none in the ability names), and replace any spaces with underscores. You can check out the Shaped sheet if you are interested. It's less compatible with the most recent Compendium entries, but extremely powerful and has a lot of this stuff built-in. I'd still be using it, but my players love the Charactermancer and leaner design.
Many thanks, Keith!  Got them all finished.  Really like the way they look. 
1574639238
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Cool. If you want to make them look even prettier (at least on your end) you can try this Stylus Style . It changes the appearance of OGL roll templates like this:
Hi Keith...in playtesting ...I have noticed an issue I'm sure you can solve.  The macros are working just as intended for my player characters, however, for NPC`s and mooks...the macro doesn't take into account proficiency bonus' for skills.  It will calculate only the ability modifier with no bonus.  I noticed this as I was simulating some encounters.  To verify, I used an Aboleth which has History +12, Perception +10.  For these two abilities, it will only account for INT +4 and WIS +2.  Saving throws are affected as well.  I used an Aboleth from the in-game SRD. Still using the  5th Edition OGL Character Sheet.  Rolls from the sheet are fine. I really like the macros...any way we can fix it?
1574752135
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sometimes the Official sheet makes simple tasks needlessly hard. I was wrong about the consistent naming structure. Put "npc_" in front of each skill roll name, and that will calculate properly. Format for the saving throws is less consistent. For some reason, not only does it want "npc_" in the front, it abbreviates the ability name, unlike the pc sheet. So a con save on the the npc sheet is "npc_con_save" for example. They should extrapolate from these rules.
I have tried your suggestion with a couple of ability scores.  It will calculate properly for NPC sheets now, but nixes the bonuses on the players sheets.  Have not tried saving throws yet, but I imagine I'll get the same result.  I was using these as token actions from the macro menu.  Maybe I should have two different macros...one for PC's and one for NPC's and just add them to each individual token? 
1574788215

Edited 1574788770
This is what I have done. Kept both sets of macros.  I use the originals for the PC's and the newer macros for NPC's for mooks and the like and put them on the macro bar.  It actually is a lot cleaner this way...for me, anyway...I`ve also searched for an answer on being able to rearrange macros in the token action bar.  I see there is tab to slide a macro up or down on the attributes/abilities tab, but when I move it..nothing happens with the macro order.
1574792251
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yeah, I keep two sets of report macros on the Official D&D sheet, because of the dual nomenclature. Rather than add these to every sheet, though I would suggest making them Macros in the Collections tab. Mark them as Token Macros. Give permissions for the PC reporting macro to "All Players". Players will see a Token Action button whenever they select their token. You as GM will have two showing whenever you select a token, but you probably have a good idea which one to use. I call mine "Character" for PCs, and "Statblock" for NPCs. That way, you only have two macros to maintain, instead of adding one to every sheet. Updating them would be nightmarish.
1574792375
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Oh, and for the Macro Order, go to your settings tab and deselect "Alphabetically sort Token Actions". they will then appear in sheet order. Ones on the sheet will show first, and universal token actions written as macros on the collections tab (as in the above post), will appear second, also in display order.
Hi Keith, hope all is well with you.  I have using your chat menu templates for NPC saves and abilities with great success.  I do have one question, though.  Is there a way to hide the NPC selected when I roll the initial macro?  The chat menu always shows the name or type of NPC or monster and I'd like to keep that stuff private.  Maybe a simple alteration in a line or two.  Or can I make the chat menu just a GM whisper?  Sorry for the thread resurrection....   
1579467633

Edited 1579467824
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just put  /w gm  in front of each macro. It will then whisper to the GM. Further, each character sheet has an individual setting for showing the name in the template or not. It's in the settings. Bottom option below:
Thanks Keith!  Much appreciated