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

Define certain probability for categorical choice. #45

Open
mschnyde opened this issue Jun 3, 2020 · 1 comment
Open

Define certain probability for categorical choice. #45

mschnyde opened this issue Jun 3, 2020 · 1 comment
Labels
feature New feature or request question Interrogation on the functioning of the program

Comments

@mschnyde
Copy link

mschnyde commented Jun 3, 2020

Hello everyone,

If I define:

~[greet]
      ooh [hi|hello?/70] chatette community !

It will eather generate:

"ooh chatette community" with 50% chance
"ooh hello chatette community" with 50% * 70% chance
"ooh hi chatette community" with 50% * 30% chance

My question is the following:
Can I unbalance the probability of a categorical choice without having to use the "?" ?

I would want to specify something like this:

~[greet]
      ooh [hi|hello/70] chatette community !
@SimGus
Copy link
Owner

SimGus commented Jun 3, 2020

Hello :)

You are absolutely correct about your percentages there.

It is not possible at the moment to change the probability of generating each category in a choice, though as you pointed out, it is possible to approach such a feature using a random generation modifier.
As you imply this is not a perfect solution, since you might want the choice to always generate something, but still tune the probabilities. Plus, this workaround would be very ugly for a choice with more than 2 categories (you'd need to embed a choice into another I presume).

I'll write that down as a nice feature to add in an upcoming version, but at the moment this remains unsupported.
I'll notify you when this feature is implemented and close this issue.

Cheers!

@SimGus SimGus added feature New feature or request question Interrogation on the functioning of the program labels Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request question Interrogation on the functioning of the program
Projects
None yet
Development

No branches or pull requests

2 participants