Not sure how but I broke the other thread, its not allowing posts or edits. So below is the code figured out by Silvyre unfortunately it doesn't work. Not to sure how to get it to work. When I roll a d20 ( which I changed it a bit I've added a ? to the d20 since it's suppose to default to two d20s along with the ability to purchase more d20s via game rules). Regardless the results appear that it doesn't correctly count the successes. For instance 2d20, result 4 and 14, should result in 3 successes. If the target number is the default of 15 and 5. 4<15 and 4<5 = 2 successes. 14<15 but 14<5 does not work leaving 1 success. It appears to be counting the result of one die (sometimes, I'm not even sure how it's sometimes) and not others. What am I doing wrong here? I'm just looking for something simple (or not....) to use for Star Trek Adventures using the 2d20 system that will allow me to run the game more smoothly. If someone has experience in the 2d20 system I could really use the help here. [[ {{ceil((?{A|15} - d20cs<?{A}cf<?{B|5} + 1e-2) / (?{A} - ?{B})), 2 + 0d0}kl1, 0d0}kh1 ]]
My code changes look like:
[[ {{ceil((?{Skill Check|0} - ?{Number of d20s|2}d20cs<?{Skill Check}cf<?{Difficulty|0} + 1e-2) / (?{Skill Check} - ?{Difficulty})), 2 + 0d0}kl1, 0d0}kh1 ]]