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: a little help!

Hey guys, I have a tiny problem creating a macro. One of my PCs has a weapon that when it gets the maximum result in a d10 (10), it adds 2 extra to the damage. I have created a macro, can anyone help me add a command line to the macro so that it auto-adds 2 when it takes a 10 on the d10 of the weapon? Thx in advance.  /emas "Jürgen" damage with his Glaive! &{template:default} {{name=Slashing damage}} {{Damage=[[ 1d10 + 5 + ?{Colossus Slayer?|No, 0|Yes, 1d8}]]}} 
1604229838

Edited 1604229853
David M.
Pro
API Scripter
One possibility would be to create a rollable table e.g. "GlaiveDam", with the entries 1,2,3,4,5,6,7,8,9,12. Then, your damage roll would be [[1t[GlaiveDam] + 5 + ?{Colossus Slayer?|No, 0|Yes, 1d8}]]
1604231143
GiGs
Pro
Sheet Author
API Scripter
David's rollable table suggestion is the only way I can think of doing this without a custom API script (requiring Pro subscription).
Ohhhh my bless...... it works :D........
Would there be any way to instead of using a rollable table? For example, roll a 1d12 and avoid 10 and 11?
1605030526
GiGs
Pro
Sheet Author
API Scripter
You can use the reroll operator: 1d12r10r11 This will reroll rolls of 10 and 11.
Thx bro.... :)
Would there be any formula so that when in 1d10 you get the maximum result (10) you add 2 extra?  /emas @{selected|token_name}  &{template:simple} {{rname=Damage}} {{r1=[[ 1d10 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} [``Critical hit``](!
#d10-slashing)
1605046944
GiGs
Pro
Sheet Author
API Scripter
Unfortunately, no.
1605047490

Edited 1605047989
ok adding a value is NOT possible. But, could you roll a 1d2r1?? for example? when you take a 10 in the 1d10 dice? The original code is  /emas @{selected|token_name} damages with its khopesh! &{template:simple} {{rname=Damage}} {{r1=[[1t[Khopesh-brutal] + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} [``Critical hit``](!
#d10-slashing) 1t[Khopesh-brutal] is a 1d10 basically taking 10 as 12. So if there was any chance, instead of 1t[Khopesh-brutal] it would be 1d10. [Khopesh-brutal]: is a rollable table to take 1-9 values and 10 as 12. Ok its works fine, but in the screen doesn't appears any 3d dice. Basically it works perfectly, and it's a question of aesthetics or being traditional to watch the dice rolling in the screen.  
Maybe treating the d10 (10) as a critical dice??? change to 12 + bonus?
1605052578

Edited 1605052790
maybe with the command 1d10ro>10 (limiting new reroll to a 2)? Nop, that option doesn't work  :P
1605053501
Oosh
Sheet Author
API Scripter
I guess you could hijack the crit detection in the {atkdmg} template: &{template:atkdmg} {{rname=Damage}} {{r1=[[1d10cf0 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{crit1=[[2]]}} It looks a bit horrible though. Is there any reason you're using the {simple} template, out of interest? You're removing the automatic crit functionality of the sheet by doing so is all - increasing your own workload.
I use the simple template because it is perhaps the one I am most familiar with, not because of anything special. I've barely been on the roll20 for 5-6 months, maybe I still have a lot to learn, although I put in a lot of effort and read a lot :P..... I've managed to create several complicated macros by myself based on tutorials and reading.  I think the best option to see the 3d dice on the screen is this option below (technically 1d10 turns into a effective d10 (only 10 different rolls are possible, 1-9 and 12). Then always the maximum result (10 on a d10) turns into 12.  /emas @{selected|token_name} damages with its khopesh! &{template:simple} {{rname=Damage}} {{r1=[[ 1d12r10r11 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} [``Critical hit``](!
#d10-slashing)
Oosh said: I guess you could hijack the crit detection in the {atkdmg} template: &{template:atkdmg} {{rname=Damage}} {{r1=[[1d10cf0 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{crit1=[[2]]}} It looks a bit horrible though. Is there any reason you're using the {simple} template, out of interest? You're removing the automatic crit functionality of the sheet by doing so is all - increasing your own workload. Your code is very good, it's close to what I was looking for. What I wish is that every time 1d10 dice rolls a 10, it adds 2. With your code I've only touched up one thing, and it seems to work. {{crit1=[[ 1d2r1 ]]}} &{template:atkdmg} {{rname=Damage}} {{r1=[[1d10cf0 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{crit1=[[ 1d2r1 ]]}}
Rober M. said: Oosh said: I guess you could hijack the crit detection in the {atkdmg} template: &{template:atkdmg} {{rname=Damage}} {{r1=[[1d10cf0 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{crit1=[[2]]}} It looks a bit horrible though. Is there any reason you're using the {simple} template, out of interest? You're removing the automatic crit functionality of the sheet by doing so is all - increasing your own workload. Your code is very good, it's close to what I was looking for. What I wish is that every time 1d10 dice rolls a 10, it adds 2. With your code I've only touched up one thing, and it seems to work. {{crit1=[[ 1d2r1 ]]}} &{template:atkdmg} {{rname=Damage}} {{r1=[[1d10cf0 + 5 + ?{Blood Vegeance?|No, 0|Yes,1d[[ 8 + ([[ {@{Jürgen|hp},999}<[[floor(@{Jürgen|hp|max}/2)]] ]]*2) ]] } ]]}} {{normal=1}} {{charname=Slashing}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{crit1=[[ 1d2r1 ]]}} Ok, your code works perfectly, no need for "my change" as it is the same. Your code works PERFECTLY, you are great :P bro
1605073132
Oosh
Sheet Author
API Scripter
No problem! It certainly isn't what the {atkdmg} template was intended for, but it works :) I can't think of anyway to actually get the +2 added to the total though...