Random item

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Sourivore

New Member
Jul 29, 2019
20
0
0
Hello.
I have several crafting recipes in my ae2 and want to craft a random item when some kind of event occurs eg. Redstone

Ideas are welcome.

Thanks a lot.
 
computercraft should be able to do it, might need the add on that provides the me bridge
 
ME Export bus, Set to Craft Only, On Redstone/Redstone Pulse. Something like that? (not sure if it is exactly the same in AE2)
 
Computercraft should do the job but I don't have it in my modpack and I don't know anything else that can do things randomly.
 
Computercraft should do the job but I don't have it in my modpack and I don't know anything else that can do things randomly.
Oh so by random you actually mean you want it to craft a random item out of a pool of items?
 
Yes. I don't know which item to craft. It is choosen between recipes randomly.
Have several redstone torches and light one and only one randomly will also satisfy me (in this case I will export each item in a chest and play with redstone control on conduits to give me one)
Maybe a trick with some items ? I think that dropper choose an item randomly but maybe other mod items will produce random better ?
 
Yes. I don't know which item to craft. It is choosen between recipes randomly.
Have several redstone torches and light one and only one randomly will also satisfy me (in this case I will export each item in a chest and play with redstone control on conduits to give me one)
Maybe a trick with some items ? I think that dropper choose an item randomly but maybe other mod items will produce random better ?
So, basically, what you're looking for is a random number generator, correct?
If there are no more than nine different items you want to randomly choose from, a dropper may indeed be the best way to pick one at random. If you're OK with keeping a full stack's worth of each exactly nine items as a buffer, you could simply have an export bus craft and export each of them into the dropper, after seeding the dropper with one item of each type. The export bus will fill each stack in turn; and when the stack is full, it won't be able to export any more of those items.

If, instead, you don't want to buffer so many items all the time and instead only want to keep a few on hand, you'll have to make use of a more complicated item-stocking system, like that shown here. This system is for AE1, but the mechanics involved haven't changed too much. The main differences are that the power relay (which looks like an energy acceptor) is replaced with a quartz fiber, and you'll need to keep track of your channels. If you're stocking few enough types of items that you need no more than eight channels between the storage bus on your dropper and all the level emitters and ME Interfaces, you won't need a controller on the subnet.
 
Yes. I don't know which item to craft. It is choosen between recipes randomly.
Have several redstone torches and light one and only one randomly will also satisfy me (in this case I will export each item in a chest and play with redstone control on conduits to give me one)
Maybe a trick with some items ? I think that dropper choose an item randomly but maybe other mod items will produce random better ?
Hmm if the number of items in the pool is not too great, then you could set up ME export bus for each item in craft on pulse mode and then use project red Randomizers in a branching tree to give the desired number of outputs that match the number of export bus. Then just hook up a button(You might need to add a Pulse Former in between to turn the long signal of a button into a true short pulse, dunno) to the first randomizer and each time you click it it should craft a truly random item.

EDIT: You will need to add Pulse Formers between all Randomizers as they lock the output on continuously until a new is selected!

EDIT: actually, use the Bus Randomizer instead if you have it(apparently a new addition). The normal randomizer works non-exclusive so its outputs can be all on/off, 2 on/off or 1 on/off. The Bus Randomizer have an Exclusive Mode that makes sure that only 1 output can be active at the time. Add to that it works on Bundled cables so it will handle up to 16 outputs at the same time.
http://projectredwiki.com/wiki/Bus_Randomizer
 
Last edited: