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

Tracking Macro with a variable success chance macro

First edition Dnd Ranger has an outdoor tracking ability that has a 90% base chance to succeed, and several factors that will lower that target number. number of days old the tracks are -10% for each day Each hour of rainfall is -25% and for each person being tracked over 1 is +2% so to set this up i tried this and another and im failing somewhat miserably. &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{90% Base Chance= [[1d100 <=?{variable target number|90}]]}} This one is not as refined and does not ask for each query separately instead you enter the modified base chance after its been calculated. It does not seem to show if you actually succeeded.The Second was more like this &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{90% Base Chance= [[1d100 <={90+{?{Number of Days Passed|0}*-10}+{?{Hours of Rainfall|0}*-25}+{?{Number in party over 1|0}*2}]]}} The second method is preferred if it can or will work , as it will ask for each modifier separately and is default to a zero mod. Any way i seem to be over my head on this one. Thank you for your time
1508210938

Edited 1508211385
Roll20 doesn't use <= to mean less than or equal to it just has < which (confusingly) means less than or equal to, there also can't be a space before the < for the check to work. Another thing is that in the second macro for the maths of the chance to be calculated before being used in the check you have to inline the roll the percentage change on the right of the < . Finally for the maths to be properly calculated you need to encase the roll queries in round not curly brackets, in fact because multiplication is done before addition you don't need any brackets around the roll queries. If you use this as your macro it should hopefully work. &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{90% Base Chance= [[1d100<[[90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2]] ]]}} This will give you a 1 on a success and a 0 on a failure although it also gives a 1 if you have a negative chance so be wary of that. You can change the 1d100 to just d100 to stop this from happening however it will instead not output the roll template at all if the chance of success is negative. Edit: I found a solution to the negative chance giving a 1. If you replace the roll with [[1d100<[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]] if the chance is negative it will replace it with a 0 which will produce the correct output.
1508216485

Edited 1508216539
Old School Fool
Sheet Author
Thanks a million, &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{90% Base Chance=[[1d100<[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]]]}} Although i think ill add a note about 1 being a success or something , but it does whats needed. Thanks again
ahh you really got me in the right direction now... &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]% Base Chance=[[1d100cs<[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]]]}} This queries the base chance and shows that number on the base chance percentage , then applies those queries to the chance of success. It shows the percentage you succeed on and holds the value at 0 if to low. Thanks again , the bracketing get me ever time!
added a chance for failure to turn the roll red &{template:general}{{name=Nyloch Mal'Dynn}}{{subtag=Outdoor Tracking}}{{[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]% Base Chance=[[1d100cs<[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]cf>[[{90+?{Number of Days Passed|0}*-10+?{Hours of Rainfall|0}*-25+?{Number in party over 1|0}*2,0}kh1]]]]}}