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

Need a bit of help.

Hello everyone,  I think this is my first post here so if I do anything wrong please forgive and correct me. I am working on a custom sheet for my Outbreak: Undead game and wanted to include the roll button on each skill to roll and then display (either in a template or not) the results. (in this case I have figured out how to show degrees of success using a macro). The problem I am running into is, I need the roll to ask for several modifiers (specifically a training value and a multiplier) and then calculate the results.  The problem gets more headache inducing because my macro or inline roll or even template roll works when I use a specific attribute (Balance in this case as I am testing it on the Balance skill before i add the rest to the sheet). But when I try to add in the modifiers, it spits back either nothing (and even breaks my chat) or, if I try to use another attribute that is the total of the Balance attribute plus the modifiers, it gives me a syntax error.  If there is anyone who is more familiar with syntax and calculations or making templates that will calculate properly, i would be greatly appreciative.  The macro im using is below, but it is without adding the mods and calculations involving them. (Rick is the character name) This displays degrees of success or failure based upon his Balance attribute and a d100 roll. [[(floor(abs((@{Rick|Balance}-(1d100cf>@{Rick|Balance}cs<@{Rick|Balance}))/10)))]]
1507670275
Silvyre
Forum Champion
Hi, Rick C. You might try adding nesting inline rolls to your macro like so: [[ floor(abs((@{Rick|Balance} - 1d100cf>[[@{Rick|Balance}]]cs<[[@{Rick|Balance}]]) / 10)) ]] This can help guard against syntax errors when expanding your macro. I hope this helps!
Thank You Silvyre that solved the problem now I just have to make it display in a format I like. Woohoo, time to figure out how to make a custom template.
1507685812
Silvyre
Forum Champion
Great! Good luck!
Well..... now I have another slight problem. I calculated the balance attribute incorrectly, so I went back and changed the calculations to use to proper attributes to derive the balance attribute. It displays properly on the character sheet but when i click the button to roll it, it still uses the previous value (I made sure to change all references to the attributes within the button results and the like as far as i can tell)
1507691104

Edited 1507691179
Silvyre
Forum Champion
I would start troubleshooting that by checking the value of each Attribute by entering them all into the Text Chat and seeing if the values returned to the Text Chat are all the values you expected. If so, then you're likely dealing with a calculation/logic/syntax error. If not, you may be looking at some duplication of listed Attributes or Attribute definitions or some other issue.
Alright, I will try that and post the results here if everything returns as normal.
With that information i discovered the original @{Balance} attribute was duplicated. I deleted it and everything fixed. Thank you again.  On another note, would anyone be willing to help me clean up my code (I am not sure if it needs it but its been years since I have done this)