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

stuck on macro

hello I'm new and I'm trying to make a macro for warhammer 4e in a general way but I got stuck because I can't get the whole result if it doesn't give me the text of the formula &{template:default} {{name=Test Attack}} {{attack=[[1d100]]}} {{EL=Floor([[$[[0]]/10-?{HA|0}]])}} 
1673387174

Edited 1673387365
GiGs
Pro
Sheet Author
API Scripter
Your post doesnt give a specific question, so I'm not sure what your issue is. But looking at your macro, I see a problem. You can't do this: Floor([[$[[0]]/10-?{HA|0}]])}} The $[[0]] property is not a number, it's just a display thing, think of it as text. You can't do maths with it. One way to do what you're trying to do is to move the arithmetic out of the rolltemplate (but keep it on the same line) and use $[[0]] and $[[1]] to display the results. Like this: &{template:default} {{name=Test Attack}} [[ floor([[1d100]]/10)-?{HA|0}]] {{attack=$[[0]]}} {{EL=$[[1]] }} You might also want the HA to be displayed &{template:default} {{name=Test Attack}} [[ floor([[1d100]]/10)-[[?{HA|0}]] ]] {{attack=$[[0]]}} {{HA=$[[1]]}} {{EL=$[[2]] }} Each number you want to be displayed in the output must be an inline roll [[ ]], and the inline rolls are numbered 0, 1, 2, in the order they appear - from the nested depth out.