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

Help with Macros

if anyone could help that would be great. im not using api so this is what im trying to do: 1.Get a feat to print or a sentence to print like a feat 2.@{selected|bar1} minus 5 3. Get a token aura of 5ft 4.roll an attack that adds a custom skill mod 5. rolls dmg 3d8 and on crit double if this wont work thats find but if you know how help is very much welcomed, this is for a custom 5e game (Naruto 5e)
Shydudewhat said: 1.Get a feat to print or a sentence to print like a feat I'm not sure what this means. Do you have a screenshot of what a feat looks like? 2.@{selected|bar1} minus 5 [[@{selected|bar1} - 5]] 3. Get a token aura of 5ft It's not possible to set token settings from a macro or chat command without the API. 4.roll an attack that adds a custom skill mod It depends on which character sheet you are using.  Most likely you'll need to add the custom skill mod to the attack itself on the character sheet. There's no way to add a custom skill mod to a roll from chat.  The other option is to recreate the roll, by rollling it from the character sheet, then pressing the up arrow in chat, copying that, and modifying it, and using that in a new macro. 5. rolls dmg 3d8 and on crit double If you want a single roll to do this automatically, I don't believe there's a way.  Your character sheet may be set up with damage modifiers on crits. You could use a query macro like this: [[?{Crit|No,3|Yes,6}d6]] [[[[3d6]]*?{Crit|No,1|Yes,2]]} if this wont work thats find but if you know how help is very much welcomed, this is for a custom 5e game (Naruto 5e) What character sheet are you using? Or is it a custom character sheet?
I am using the 5e sheet with some mods, and the feat print is this-so instead of it saying i said it, it would print like a feat 
The main reason for this, is because im a text based player and i dont wanna ruin the pace of the encounter, so i wanna have my jutsu automated so my turn can go alittle faster
1618527630

Edited 1618528444
If it's a custom character sheet, then it'll depend on whether your character sheet still uses the same ability calls as the D&D 5E by Roll20 Sheet, but here is what the command might be: %{selected|repeating_traits_$3_output} You can see a more complete list for the D&D 5E by Roll20 sheet here .
so last 2 things How can i put a query that references other abilities in this: ?{Actions|Attack|Cast a Jutsu|Dash|Disengage|Dodge|Help|Hide|Ready action|Search|Use an Object} without it saying Actions, attack, ect How can i reference custom attributes i added in
also would there be a way to have a query to pick from bar1 or bar3  [[@{selected|bar1} - 5]]
1618530967

Edited 1618531156
Shydudewhat said: so last 2 things How can i put a query that references other abilities in this: ?{Actions|Attack|Cast a Jutsu|Dash|Disengage|Dodge|Help|Hide|Ready action|Search|Use an Object} without it saying Actions, attack, ect How can i reference custom attributes i added in You won't be able to, because of the Order of Operations . You'll want to look into a Chat Menu instead. The closest you can easily get is one of these two. The first one will simply print the text you need then copy and paste back into chat. The second one will create a button that you click on to make the roll. !?{Action|@{selected|repeating_traits_$0_name},selected|repeating_traits_$0_output|@{selected|repeating_traits_$1_name},selected|repeating_traits_$1_output} %{?{Action}} !?{Action|@{selected|repeating_traits_$0_name},selected|repeating_traits_$0_output|@{selected|repeating_traits_$1_name},selected|repeating_traits_$1_output} [Click](~?{Action})
Shydudewhat said: also would there be a way to have a query to pick from bar1 or bar3  [[@{selected|bar1} - 5]] [[?{Which Bar?|1,@{selected|bar1}|3,@{selected|bar3}} - 5]]
1618531936

Edited 1618532047
Jarren K. said: You won't be able to, because of the Order of Operations . You'll want to look into a Chat Menu instead. Here's code for a chat menu that will display up to 10 Traits on a PC character sheet with large pink buttons: /w gm &{template:npcaction} {{rname=@{selected|token_name}}} {{name=Traits & Feats}} {{description=[-- Traits & Feats --](" style="display:none; display: block@{selected|repeating_traits_$0_name|max};)[@{selected|repeating_traits_$0_name} ](~@{selected|character_name}|repeating_traits_$0_output" style="display:none; display: block@{selected|repeating_traits_$0_name|max};)[@{selected|repeating_traits_$1_name} ](~@{selected|character_name}|repeating_traits_$1_output" style="display:none; display: block@{selected|repeating_traits_$1_name|max};)[@{selected|repeating_traits_$2_name} ](~@{selected|character_name}|repeating_traits_$2_output" style="display:none; display: block@{selected|repeating_traits_$2_name|max};)[@{selected|repeating_traits_$3_name} ](~@{selected|character_name}|repeating_traits_$3_output" style="display:none; display: block@{selected|repeating_traits_$3_name|max};)[@{selected|repeating_traits_$4_name} ](~@{selected|character_name}|repeating_traits_$4_output" style="display:none; display: block@{selected|repeating_traits_$4_name|max};)[@{selected|repeating_traits_$5_name} ](~@{selected|character_name}|repeating_traits_$5_output" style="display:none; display: block@{selected|repeating_traits_$5_name|max};)[@{selected|repeating_traits_$6_name} ](~@{selected|character_name}|repeating_traits_$6_output" style="display:none; display: block@{selected|repeating_traits_$6_name|max};)[@{selected|repeating_traits_$7_name} ](~@{selected|character_name}|repeating_traits_$7_output" style="display:none; display: block@{selected|repeating_traits_$7_name|max};)[@{selected|repeating_traits_$8_name} ](~@{selected|character_name}|repeating_traits_$8_output" style="display:none; display: block@{selected|repeating_traits_$8_name|max};)[@{selected|repeating_traits_$9_name} ](~@{selected|character_name}|repeating_traits_$9_output" style="display:none; display: block@{selected|repeating_traits_$9_name|max};)}}&{noerror} Here's the same code made to look pretty: /w gm &{template:npcaction} {{rname=@{selected|token_name}}} {{name=Traits & Feats}} {{description=[-- Traits & Feats --](" style="color: #7e2d40; font-weight: bold; text-decoration: none; background: none; background-color: transparent; border: none; padding: 0px; white-space: pre; display:none; display: block@{selected|repeating_traits_$0_name|max};)[@{selected|repeating_traits_$0_name} ](~@{selected|character_name}|repeating_traits_$0_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$0_name|max};)[@{selected|repeating_traits_$1_name} ](~@{selected|character_name}|repeating_traits_$1_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$1_name|max};)[@{selected|repeating_traits_$2_name} ](~@{selected|character_name}|repeating_traits_$2_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$2_name|max};)[@{selected|repeating_traits_$3_name} ](~@{selected|character_name}|repeating_traits_$3_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$3_name|max};)[@{selected|repeating_traits_$4_name} ](~@{selected|character_name}|repeating_traits_$4_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$4_name|max};)[@{selected|repeating_traits_$5_name} ](~@{selected|character_name}|repeating_traits_$5_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$5_name|max};)[@{selected|repeating_traits_$6_name} ](~@{selected|character_name}|repeating_traits_$6_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$6_name|max};)[@{selected|repeating_traits_$7_name} ](~@{selected|character_name}|repeating_traits_$7_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$7_name|max};)[@{selected|repeating_traits_$8_name} ](~@{selected|character_name}|repeating_traits_$8_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$8_name|max};)[@{selected|repeating_traits_$9_name} ](~@{selected|character_name}|repeating_traits_$9_output" style="background: none; background-color: transparent; border: none; padding: 0px; color: red; text-decoration: none; display:none; display: block@{selected|repeating_traits_$9_name|max};)}}&{noerror}
Jarren K. said: Shydudewhat said: so last 2 things How can i put a query that references other abilities in this: ?{Actions|Attack|Cast a Jutsu|Dash|Disengage|Dodge|Help|Hide|Ready action|Search|Use an Object} without it saying Actions, attack, ect How can i reference custom attributes i added in im sorry i meant abilities, so my whole plan was to hook it to Show in Macro Bar so i could quickly select my action weither it be jutsu, or the hide action and quickly get it in chat so i didnt spend 5min typeing   
the reason for this  [[?{Which Bar?|1,@{selected|bar1}|3,@{selected|bar3}} - 5]] is because of a feat that allows me to choose hp or Chakra for a jutsu and i wished for it to post how much of that i had left like so : Hit Points left: # or Chakra left: #
thanks anyway
Shydudewhat  said: im sorry i meant abilities, so my whole plan was to hook it to Show in Macro Bar so i could quickly select my action weither it be jutsu, or the hide action and quickly get it in chat so i didnt spend 5min typeing  I don't know where Actions, Attacks, Jutsu, Dash, etc. are listed on your sheet. Those are not listed on the D&D 5E by Roll20 sheet as abilities or actions that can be clicked on to do anything. What would be displayed for the 'Dash' or 'Hide' action as an example?
Shydudewhat said: the reason for this  [[?{Which Bar?|1,@{selected|bar1}|3,@{selected|bar3}} - 5]] is because of a feat that allows me to choose hp or Chakra for a jutsu and i wished for it to post how much of that i had left like so : Hit Points left: # or Chakra left: # Are you intending for the macro to subtract the result of the  [[?{Which Bar?|1,@{selected|bar1}|3,@{selected|bar3}} - 5]]  from your HP or Chakra? That's not possible without an API Script (requires the game creator to have a Roll20 Pro Subscription).  A macro can only read attribute values, not write to them, so it can only report what they currently are, or perform simple math on them, but it won't actually update or change the bar values.
Attributes & Abilities tab is where my jutsu would be- use macros to do the calulations to print the jutsu-also it doesnt really need to change it just print what my hp or chakra should be and i can enter it manually  hide would roll stealth doing the hide action- dash would take my speed multiply it by 2 and print my new total- what im going for would be easier to type out like code: Var choice = 0**this is a query** if (choice==0) { List attacks**just gives another query of pre selected attacks, which when picked just prints out that weapon attack from my sheet example shortsword** } else if (choice==1) { List jutsu **pre selected query for this example  its would just let us pick from pre made jutsu that are macro's that roll and print what it does**} else if (choice==2) { var Dash = Speed*2 print.ln.dash **if my base speed is 30 it prints "60 feet of total movement" } else if (choice==3) { print.ln.charName + "Disengage (If you take the Disengage action, your movement doesn’t provoke opportunity attacks for the rest of the turn.)" } else if (choice==4) { print.ln."I take the Dodge action, I focus entirely on avoiding attacks. Until the start of my next turn, any attack roll made against me has a disadvantage if I can see the attacker, and I make Dexterity saving throws with advantage. I lose this benefit if I am incapacitated (as explained in Conditions) or if my speed drops to 0" } else if (choice==5) { print.ln "I give the help action to " **allowing me in chat to type their name** } else if (choice==6) { roll stealth } else if (choice==7) { lets me chose from |Attack|Cast a Jutsu|Dash|Disengage|Dodge|Help|Hide|Search|Use an Object, then states "i readied "example Attack" for when" then i can type what im waiting for next would be search which would state "I search for" then i type what i search for last would be "I use" then i type the object i use