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 Table not displaying in order made

Hello! I'm having some issues displaying my Macro correctly. I want the table to be displaying in numerical order, from 1. Some of the results of the roll will be grouped together so they should display on the same line currently my code is this: &{template:default} {{name= @{selected|DiceNumb}d@{Mass Combat Template|DiceSize} Ranged Attack Roll}} {{2 - 4=Wide Open! The target of this attack may immediately move towards the attacker, automatically succeeding if a move roll is required. All attacks this round made against the attacker are done so with advantage. }} {{5=Mismanagement. Due to poor leadership, the attacker cannot move this round and loses out on its attack next round.}} {{6 - 7=Defiant. The target weathers the storm with few losses.}} {{8=Shaken. The target must make a Morale check or break.}} {{9=Rain of Doom. The target is destroyed (subject to Armour save, if any))}}} {{Dice Roll=[[@{Mass Combat Template|DiceNumb}d@{Mass Combat Template|DiceSize}+@{Mass Combat Template|MCShootMod}]]}} {{Trait= @{Mass Combat Template|MCTrait}}} Resulting in this: Is there anyway to force the order so that the results are instead 2-4, 5, 6-7, 6-7, 8, 9+? Thank you.
1694294850

Edited 1694294901
GiGs
Pro
Sheet Author
API Scripter
The default roll template moves numbers to the start, and sorts them in order. '2 - 4' and '6 - 7' are not recognised as numbers - because they include spaces and -. If you want to get the order correct, you need to make roll20 stop identifying 5, 8, and 9 as numbers. Putting a space before each number will do the trick.
1694294990
GiGs
Pro
Sheet Author
API Scripter
You might also want to widen that first column so Dice Roll isnt spread over 2 rows.
1694361327
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
TIL: the default template sorts fields numerically. !
1694362434
GiGs
Pro
Sheet Author
API Scripter
keithcurtis said: TIL: the default template sorts fields numerically. ! I think this applies for any roll template that uses allProps . I'll have to test that :)
1694365486

Edited 1694367524
GiGs
Pro
Sheet Author
API Scripter
My limited testing seems to confirm its an allprops quirk.
Thank you GiGs! How would I go about widening the first column? Just more spaces?
1694484602
GiGs
Pro
Sheet Author
API Scripter
More spaces won't do anything. HTML usually ignores leading and trailing spaces (except for things like this). I was assuming you created the sheet, and so you could widen it by changing the roll template HTML. If you aren't in control of the sheet, the best thing you can do is sent a message to whoever is maintaining it and telling them that first column is too narrow.