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

If Then Else in Macro

I know this question has been asked before, but not of recently, and I am not sure whether it is possible in the meantime... What I want to do is the following: Roll a die. If it is even, roll a d6 If it is odd, roll a d8 I know it could be done like this: &{template:default} {{name= Roll for Odd/Even}} {{[[1d([[1d2 % 2]]*2+6)]]}} But I'd like to change the name of my roll depending on the odd/even value. Or even have multiple rolls (templates): Roll A = &{template:default} {{name= Roll for Odd/Even}} {{[[1d2 % 2]]}} - If roll A = 0 then roll B Roll B = &{template:default} {{name= Roll was Even}} {{[[1d6]]}} - Else roll C Roll C = Roll B = &{template:default} {{name= Roll was Odd}} {{[[1d8]]}} Is any of this idea possible with macro's?
1589405134

Edited 1589405266
No, macros do not offer IF...THEN...ELSE or conditional processing. You will need access to the API for that, which requires a game's creator to have an active Pro subscription. Edit: Some conditional logic can be done by Roll Templates in character sheets, but to create and/or load a custom character sheet also requires a Pro subscription.