Roll, Keep, Pass, Fail
Many moons ago, a friend of mine wrote some Python software to establish the likelihood of success at any given roll in L5R.
L5R, or "Legend of the Five Rings", is a pseudo-feudal-Japan RPG that uses a roll-keep system: you roll x ten-sided dice, and then you take the highest y of them. If the sum of all y dice is equal to or greater than an established target number, you succeed.
Having no comprehension of probability mechanics myself, I think his software is amazing, and I resolved to try to duplicate his findings myself. Of course, I don't know Python. I know C. I know how to write programs in C that run an order of magnitude faster than Python scripts. And I know a thing or two about dragging out a programming project for ages and ages.
So after awhile, I finally made some progress on the software. I think a major setback was the pissing contest I got into over our respective choices of pseudorandom number generators. He chose Python's builtin rand() function. I chose pulling bits out of some AES encryptions. That set me back. But I think I'm comfortable now with my choice of randomization, and I can actually start thinking about the game mechanics.
Of course, now my problem is finding a way to output all this data. Right now I have:
roll=4,keep=3,tn=5,final=18 (PASS) roll=4,keep=3,tn=10,final=21 (PASS) roll=4,keep=3,tn=15,final=25 (PASS) roll=4,keep=3,tn=20,final=12 (FAIL)
And I have to turn this into some percentages somehow. Hmmm. Wish I had a better understanding of math.
No comments:
Post a Comment