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

Help me with a macro that references a roll and then multiplies that value by two different numbers

Like title says, I have a macro that generates this number &{template:default} {{name=XXXXX!}} {{XXXXXX=[[{4d6}]]}}{{XXXXXX=[[{24d6}]]}} Now, what I need to add to make first and second roll, each be multiplied by 2 different numbers? I have tried [[[$[[0]]*5]]} for example and it does not work, it just shows the reused roll and extra brackets I just need to multiply the reused roll by 5 and by 1.5 , is it possible? was told to use PowerCards, but same, $roll cant seem to be multiplied either :( Any help will be appreciated!
1731487903
Gauss
Forum Champion
So you want to multiply 4d6 by 5 and 1.5?  If so:  &{template:default} {{name=XXXXX!}} [[[[[[4d6]]*5]]*1.5]] [[[[[[24d6]]*5]]*0.5]] {{X1=$[[0]]}} {{X2=$[[3]]}} {{X3=$[[2]]}} {{X4=$[[5]]}} Note: if you have XXXXXX as the name for both the 4d6 and the 24d6 sections that will collide and not allow the second one to post, so I named them X1 and X2. X3 is 4d6*5*1.5, X4 is 24d6*5*1.5. 
Do you want to the rolls to two individual rolls to each be rolled by 5, and then the original roll by 1.5, or multiplied in sequence by 5 and 1.5? Both can be done, and Gauss's solution above works for the latter. Now, if it's the former, you again need to do it in sequence, but with a few extra steps: &{template:default} {{name=XXXXX!}} [[[[[[4d6]]*5]]*1.5/5]] [[[[[[24d6]]*5]]*1.5/5]] {{X1=$[[0]]}} {{X2=$[[1]]}} {{X3=$[[2]]}} {{X4=$[[3]]}} {{X5=$[[4]]}} {{X6=$[[5]]}}
1731559209

Edited 1731559501
ohh ty, what I am trying to make is for Knave RPG 2.0, a small macro that calculates the distance of encounters, due to the fact that my whole group is european or uses the metric system, I wanted to make the distances generated be auto calculated into meters, so I turned the formula for distance in feet from knave into squares of distance, which gives a Number.  For ease of reference, that number is the distances measured in squares in the grid map, but also for thoroughness to make that number be multiplied by 5, to represent feet and by 1.5 to represent meters. Example:  10 Feet measures in the grid 2 squares, each measuring  5 feet, in meters it would be 2 squares, each measuring 1.5 meters for a total of 3 meters. So roll gives this : Encounter in Squares in the grid (Short Distances) :  First Value for extra info the first value multiplied by 5 which will equal total feet: First Value * 5 for extra info the first value multiplied by 1.5 which will equal total meters: First Value * 1.5 Encounter in Squares in the grid (Big distances): Second Value for extra info the first value multiplied by 5 which will equal total feet: Second Value * 5 for extra info the first value multiplied by 1.5 which will equal total meters: Second Value * 1.5 ---------------------------------------------- Macro as I am using it now is thus (dont mind the spanish text) Start Macro: &{template:default} {{name=Distancias de Encuentros!}} {{Distancia en Espacios Cerrados en casillas de 1,5 metros o 5 pies=[[{4d6}]]}}{{Distancia Espacios Abiertos en casillas de 1,5 metros o 5 pies=[[{24d6}]]}}{{Sorpresa: Si un encuentro ocurre desde 16 casillas o menos del grupo, SAB contra SAB. Si un lado gana por 5 o más, sorprende al otro. El lado que sorprende actuará primero en combate y obtiene un bono de +5 en todas las pruebas de combate durante la primera ronda}} {{Rolear a continuacion tabla de Reacciones!!}}  End Macro. So I want to know how to add in the short encounter range (4d6 squares) and long distance range (24d6 squares) a way to inform meters/feet using simply the original results from 4d6 and the 24d6 rolls, not make new ones, just use those two values, and multiply each for 5 and 1.5 as a referencial value for mental gauging of distance in feet/meters, as the formula is for ease of use in the gridmap in squares. The rolls u both proposed dont do that, I dont know how to just reuse a roll to be multiplied by a specific number and then just leave it there, logically I think it should be easy, but I still dont get how to do it. Even AI gives me broken code :( , for some reason the multiplier multiplies a different roll from the original one. ------------------------------- Logic is this:  Close range equals minimum of 20 to maximum of 120 feet Close range is equal to minimum of 6 to maximum of 36 meters Close range is equal to minimum of 4 to maximum of 24 in 5 foot or 1.5 meter squares Far range equals minimum of 120 to maximum of 720 feet Far range is equal to minimum of 36 to maximum of 216 meters Far-range equals minimum of 24 to maximum of 144 in 5-foot or 1.5-meter tiles
Then that is precisely what my macro does, you'll just have to reorder and put text next to the results, as: &{template:default} {{name=range}} [[[[[[4d6]]*5]]*1.5/5]] [[[[[[24d6]]*5]]*1.5/5]] {{Short Range=$[[1]] feet $[[2]] meters $[[0]] squares }} {{Long Range=$[[4]] feet $[[5]] meters $[[3]] squares}}