jodli / CreativeMod

A creative mode mod for Factorio
https://mods.factorio.com/mod/creative-mod
GNU Lesser General Public License v3.0
14 stars 13 forks source link

Add random amount output option to matter source #4

Closed danielniccoli closed 1 year ago

danielniccoli commented 5 years ago

It would be great if we could set the matter source to output the filters at random to create a more uneven distribution on the belt. It would be helpful to e.g. emulate the output of a number of mining drills, when optimizing assembly builds, mergers etc.

╭───────╮┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
│  mat  │   ▓   ▓▓        ▓   ▓  
│  src  │> ┄ ┄ > ┄ ┄ > ┄ ┄ > ┄ ┄ > ┄
│       │▓▓ ▓   ▓ ▓  ▓   ▓▓ ▓▓▓▓▓▓▓
╰───────╯┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

Bonus request: if that could be tweaked so we can change the weight of the randomness. That could be a number between 0 and 100, where 50 is balanced. In my example above that number would be 75 and output 75 % of the matter on the right lane.

jodli commented 5 years ago

Hi! There is a item called the "Random item source" that you can configure using the circuit network. You can configure both belts independently by using the 2 colors of the signal cable.

It's easier to understand with an image: image

Each tick the source chooses a random number for each color between 1 and the signal counts combined to decide if it outputs an item. You can also use different items in the signal and it outputs a random item.

Maybe this is kind of what you want to do?