Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probabilities Output Option #38

Open
Vlek opened this issue Jun 17, 2021 · 1 comment
Open

Probabilities Output Option #38

Vlek opened this issue Jun 17, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Vlek
Copy link
Owner

Vlek commented Jun 17, 2021

Feature request to add a command line flag, like -p/--probabilities, that will instead of rolling for a value, will output a list of all possible values and their percentage chance.

I.e.

roll -p 1d5
1: 0.20
2: 0.20
3: 0.20
4: 0.20
5: 0.20
@Vlek Vlek added the enhancement New feature or request label Jun 17, 2021
@Vlek Vlek self-assigned this Jun 17, 2021
@Vlek
Copy link
Owner Author

Vlek commented Jun 17, 2021

I think that this would be an awesome addition but hard to implement, near impossible without duplicating a Lot of the parsing code right now. The only feasible way I can think of doing this is by adding the probabilities to the suggested EvaluationResults objects. That way it can calculate the probabilities as it goes through our current parsing methods without requiring any rewrite.

Things I have to look into further:

  1. How will Keep notation effect this? Will it shift the probabilities up or down or something?
  2. What about modulus and square roots? I think these sorts of things are going to throw me for a loop. Will likely change things such that I cannot notate things as a range as the numbers may become out of order.
  3. I get that 1d6 + 1d6 is simply 2d6, but then how do we calculate something like (1d6 + 2) + 1d6? Or worse yet, 1d10 % 3 * 4d2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant