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

Macro on weapon description

1647708448

Edited 1647710337
Hi, One of my player has a cursed weapon, this weapon on every attack has a little % of make son damage to the attacker. I would like to make this process automatic, the % is 95% and the damage is 2d6, now in the weapon description i have: [[1d100>95]] [[2d6]] There is a way to concate concatenate the two expression in a sort of if->then? My solution at the moment is:  [[1d100>95]]*[[2d6]] necrotic damage if the boolean is 0 no damage otherwise 1*2d6 ps sorry for my english, it is not my first language.
I would probably create a macro on their sheet that is a damage template for the curse damage and then in the characters attacks in the description, it would roll a d100 and offer an api chat button that fires off the custom token action.  To get around the fact you can't do if/then statements without the API, just use the human brain.  If the roll is in the margin, hit the button, if its not, ignore the button.  The how to, for doing all of this is a lil complex.  Remember the name of the custom token action you make on the third tab of their sheet, then insert something like the following into all the attack templates with that weapon: [Curse Damage](!
%{CharName|AbilityName})
1647713033
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is about the only kind of if/then that is actually, easily doable with the dice rolling syntax: [[[[1d100>95]]*[[2d6]]]] necrotic damage to break it down: [[1d100>95]] generates 1 success if the roll is 95 or higher [[2d6]] is the damage roll the whole expression is placed in brackets so that it generates a number instead of displaying the formula. if the roll is 95 or higher, the first part returns a 1 which is multiplied by the 2d6 roll to return damage. if the roll is 94 or below, it returns 0 successes, and the zero is multiplied by the 2d6 roll to return, zero.