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 Syntax Help Please

I wrote a simple macro with the default template.  However, several lines in the macro are showing up in the chat window out of order.  I can't figure it out and it's driving me crazy.  Can anyone please shed light on why two of the lines are printing in the chat window out of order? This is the macro I wrote.... &{template:default} {{name=Random Hit Location}} {{20= Head / Neck *and* **+[[1d6!]] Damage**}} {{18-19= Upper Arm / Shoulder *and* **+3 Damage**}} {{16-17= Lower Arm / Elbow *and* **+2 Damage**}} {{15= Hand / Wrist *and* **+1 Damage**}} {{11-14= Torso *and* **+[[1d4]] Damage**}} {{10= Vitals ***and*** **+[[1d4!]] Damage**}} {{06-09= Abdomen ***and*** **+[[1d4]] Damage**}} {{04-05= Knee / Thigh ***and*** **+3 Damage**}} {{02-03= Lower Leg ***and*** **+2 Damage**}} {{01= Foot / Ankle ***and*** **+1 Damage**}} {{Location Hit= [[1d20]]}} This is a screen shot showing how it reorders when it appears in the chat window...
1505488103
The Aaron
Pro
API Scripter
hmm. that is strange.. This version will work: &{template:default} {{name=Random Hit Location}} {{ 20= Head / Neck *and* **+[[1d6!]] Damage**}} {{ 18-19= Upper Arm / Shoulder *and* **+3 Damage**}} {{ 16-17= Lower Arm / Elbow *and* **+2 Damage**}} {{ 15= Hand / Wrist *and* **+1 Damage**}} {{ 11-14= Torso *and* **+[[1d4]] Damage**}} {{ 10= Vitals ***and*** **+[[1d4!]] Damage**}} {{ 06-09= Abdomen ***and*** **+[[1d4]] Damage**}} {{ 04-05= Knee / Thigh ***and*** **+3 Damage**}} {{ 02-03= Lower Leg ***and*** **+2 Damage**}} {{ 01= Foot / Ankle ***and*** **+1 Damage**}} {{ Location Hit= [[1d20]]}} It has something to do with them being numbers instead of strings.  Apparently there is something in the default template that assumes numbers should be sorted ascending and put first.  Placing a space in front of each label (except name) causes it to treat them as strings and leave them in the order they are specified.
Cool.  Thank you!  It's much appreciated.  :)
1505488854
The Aaron
Pro
API Scripter
No worries!  Happy Rolling!