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 Help

1458148268
Tom
Pro
Sheet Author
I'm in the process of updating my campaign to a new page, which gives me a chance to pitch all the various iterations of old macros and have everything sync with the character sheet I'm using.  But I'm running into some issues and I'm hoping someone with a better eye for this stuff can help. Here is my initiative macro.  It's a bit more complicated that usual in that it requires the player to select his or her macro before it will work (a nice test to make sure everything is on the screen). /em rolls initaitive /r {[[(@{selected|reflexes}+@{selected|agility}-@{selected|wounds}-@{selected|surprise}-@{selected|torpid}-@{selected|craven}+?{Modifier|0}) d1kh10]]d10!sd}>[[7-@{selected|INITspec}]] +[[{0, floor(((@{selected|reflexes}+@{selected|agility}-@{selected|wounds}-@{selected|surprise}-@{selected|torpid}-@{selected|craven}+?{Modifier|0})-10)/2)}kh1]] bonus successes &{tracker} The macro incorporates the "rule of 10".  The first part will only roll up to 10 dice.  The second part figures the excess number of dice to be rolled and gives the player 1 "bonus success" for ever 2 dice over 10 that would otherwise be rolled.  So if the player had a dice pool of 16 dice, the macro would roll 10 dice and give the player 3 bonus successes. When I put all this in, I don't get an error message.  Just nothing outputs.  I've looked for an order of operations error, but can't find one. I tested the process with a more simplified version: /em makes a ?{What Skill?} roll /r [[(?{Dice Pool|1}-@{selected|wounds}+?{Modifier|0})d1kh10]]d10!sd>7 +[[{0, floor(((?{Dice Pool|1}-@{selected|wounds}+?{Modifier|0})-10)/2)}kh1]] bonus successes And again, nothing outputs. Could it have something to do with the "selected" indicator? Can any of you figure out what I'm doing wrong here?  It would be a HUGE help! Thanks!
Lose the "/r" you are doing inline rolls and calling for a roll in the same command, 
1458149554
Tom
Pro
Sheet Author
No.  That doesn't get me anywhere.  There's still no output. Besides, the first portion of the macro isn't an inline roll.  It's meant to show the results in the chat window.  The inline part just calculates the # of dice to be rolled.
1458150065
Silvyre
Forum Champion
What's the value of @{wounds}?
1458150141
Tom
Pro
Sheet Author
Usually 0.  But it could be 1, 2, or 3.
1458150605

Edited 1458150642
Silvyre
Forum Champion
Try removing the curly braces after /r and before > I don't know why the parser doesn't like them, but in any case, they should be optional (also remove the space before d1)
1458150816
Tom
Pro
Sheet Author
Done.  But no change. I do get a flash prompt that the system is "Rolling the dice" (little black flash in the chat window), but there is still no output.
1458155445
The Aaron
Pro
API Scripter
Check the javascript console.  Depending on how dice are nested, you can end up getting errors there for badly formatted dice expressions nested in attributes.
1458163639
Silvyre
Forum Champion
Tom said: Usually 0.  But it could be 1, 2, or 3. Not a calculated Attribute, then? You get a number and not an inline roll when you copy/paste/enter @{selected|wounds} into the text chat? If this doesn't work for you /r [[(?{Dice Pool|1}-0+?{Modifier|0})d1kh10]]d10!sd>7 try Clearing your Chat Archive (not Clearing your Current Chat Log )
1458181815
Tom
Pro
Sheet Author
Silvyre, Sorry.  It is a calculated attribute.  There are probably three other attributes that feed into it behind the scenes.  Is that the issue?
1458188788
Silvyre
Forum Champion
It probably is the issue, and if it is, it should be solved by nesting it within an additional pair of [[inline roll brackets]].