[Not Implemented] Add random function

Requests for new Custom Stories or discussion of your new Custom Story ideas.
Forum rules
Please follow all Eek! Forum rules.
peter980
Posts: 1601
Joined: Thu Feb 15, 2018 1:50 am

[Not Implemented] Add random function

Currently, only CoinFlip check is implemented (50%) chance. It would be good if there is way for more gradual random function.
eekdon
Posts: 1546
Joined: Tue Feb 13, 2018 4:29 pm

Re: [Not Implemented] Add random function

Yeah I can put in a ticket for this.
Image
dev_n
Posts: 20
Joined: Sun May 10, 2020 9:09 pm

Re: [Not Implemented] Add random function

Can you check on the status of that ticket? ;)

It takes a lot of effort to generate a random number with uniform probability through coin flips. Kind frustrating when you consider the outcome of the coinflip function was already determined by calculating a random number.
eekdon
Posts: 1546
Joined: Tue Feb 13, 2018 4:29 pm

Re: [Not Implemented] Add random function

Yeah I know, it's annoying. I can't promise it'll get done in 0.17.x as we're dealing with a lot at the moment, but I will put it in the to-do list for 0.18.x.

Can you and Peter980 further clarify exactly what would work best? Sounds like a RandomizeIntValue game event, which will take two manually input integers, and product a random value between those two would work fine.
Image
peter980
Posts: 1601
Joined: Thu Feb 15, 2018 1:50 am

Re: [Not Implemented] Add random function

Yes, that would be perfect.
The special case of (0,1) would be current coinflip, while (0,100) would simulate chance in percents.
eekdon
Posts: 1546
Joined: Tue Feb 13, 2018 4:29 pm

Re: [Not Implemented] Add random function

Alrighty, thank you!
Image
dev_n
Posts: 20
Joined: Sun May 10, 2020 9:09 pm

Re: [Not Implemented] Add random function

Yes (0,100) would be great, thanks!
dev_n
Posts: 20
Joined: Sun May 10, 2020 9:09 pm

Re: [Not Implemented] Add random function

If it would be easier, it could be parameterless, just return an int between 0 - 100 that you could compare to with a less than / greater than.

For instance, a criterea might look like {RandomNumber LessThan 30} if you wanted a 30% chance of that event occuring.
eekdon
Posts: 1546
Joined: Tue Feb 13, 2018 4:29 pm

Re: [Not Implemented] Add random function

Here is what I am shooting for. Pretty easy, we just got bogged down with other stuff. Should take care of all your needs.

Image
Image
PartyBob
Posts: 15
Joined: Fri Feb 19, 2021 8:51 am

Re: [Not Implemented] Add random function

Just popping this one back up into visibility. This function would be really useful, as the series of coinflips method is really inefficient for getting randomization.
Post Reply