Random Number on Selector Combinator

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Illiander42
Filter Inserter
Filter Inserter
Posts: 545
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Random Number on Selector Combinator

Post by Illiander42 »

Selector Combinator can do random input, but we don't have enough different signals to turn that into a random number.

Can we get a "random number" option, or is there a design call to only do things you can't do otherwise?
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Random Number on Selector Combinator

Post by Muche »

It is already possible to build a pseudorandom number generator, see e.g. viewtopic.php?p=610098.
User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 623
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: Random Number on Selector Combinator

Post by Gergely »

I second this. It would be really great if selector combinator had a [0,N) random option with N being an input signal or a constant. It could also support the Each wildcard giving one roll per input signal.
Last edited by Gergely on Fri Apr 04, 2025 10:57 am, edited 1 time in total.
eugenekay
Filter Inserter
Filter Inserter
Posts: 462
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Random Number on Selector Combinator

Post by eugenekay »

Illiander42 wrote: Sat Feb 08, 2025 2:00 ambut we don't have enough different signals to turn that into a random number.
Screenshot 2025-04-03 173852.png
Screenshot 2025-04-03 173852.png (220.65 KiB) Viewed 144 times

You can chain multiple of these together to get arbitrarily random numbers from 0-99; 0-9,999; 0-999,999; or you can remove signals to get a smaller range. Or you can add "Quality" variants of each signal to expand the range even further while maintaining an even Numerical distribution.

If you want to dynamically set the Random range (example: between 10 and 90), use a Decider Combinator to "Filter" the signals according to their Values before feeding them to the Selector.

Good Luck!
Post Reply

Return to “Ideas and Suggestions”