Project Red Transportation - MV Storage and Autocrafting

Introduction
Project Red: Transportation (PRT) is earliest option for AE2-style full request autocrafting.

What functionality does it have?


 * 1) Search items in all attached chests by name string (costs 1 MV circuit per attached chest)
 * 2) Request autocrafting - make components on demand and all subparts (costs 1 MV circuit per recipe)
 * 3) Stock keeping (from central storage only - a bit buggy with crafting machines) (costs 1 MV circuit per 9 items in a single output)

Yes, it is 2-3x worse than AE2. If you are EV or almost EV, it is worth it to simply rush AE2. The storage option is quite cheap and good for organization, and the autocrafting system is more expensive and mostly worth if you hate microcrafting and want to request circuits with a single click.

Inventory Search System
PRT makes a searchable / requestable storage easy to set up. It requires only these things:


 * 1) The biggest chests you can make (diamond, compressed, etc.) This is because each interface pipe costs diamonds and each broadcaster chip costs an MV circuit.
 * 2) One item broadcaster chip per chest
 * 3) One routed interface pipe per chest
 * 4) One routed request pipe (in total)
 * 5) (Optional) One more chest for output (routed request will throw items on the ground if you don't do this)

You can see an example setup in the image on the right.

Make sure you add an item broadcaster chip above each chest or the system will not function. Configure the card first by opening it with right click, then closing it (the default is empty blacklist, which is what we want). Then right click on the routed interface (purple) pipe to place it inside. You can right click on the routed interface pipe to see all cards placed inside.

When you want to request something, right click on the orange pipe. This will open a UI that looks like the image on the right.

Now you have a fully searchable storage! You can integrate this with PRT autocrafting later.

Chip Details and A Dire Warning
WARNING: I HIGHLY recommend not using active chips (item responder, dynamic item responder, item overflow, and item extractor). They are buggy and counterintuitive to debug. Half of the complaints I get about PRT are people trying to use these chips (the other half are due to the current expensive nature of the mod). Anything you can achieve with active chips you can achieve with passive chips described below. I also HIGHLY recommend ignoring the current questline as it recommends active chips. (I will fix this later.)

These are the primary chips/pipes you'll be using:


 * Circuits
 * Item Broadcaster Chip (Tells the PR network that an item can be pulled from the adjacent inventory.)
 * Item Crafting Chip (Tells PR system to dump items in adjacent inventory and expect some other item back from the same inventory. This is the chip you should use for on-demand crafting.)
 * Stock Keeper Chip (Allows you to specifically demand X amount of Y items be stocked in this inventory. Great for fluid extractor stocking and inventories that can overfill with one item, eg. forestry carpenters. They do not play well with crafting chips, unfortunately, so these should only target your main storage.)
 * Item Terminator Chip (You need at least one of these on your network for "overcrafts." For example, you request 3 diodes but the craft makes 4 - the last diode will go to the terminator chip.)
 * Pipe
 * Routed Interface Pipe (Connects the PRT system to inventories and has space for 4 chips to insert. Only connect to 1 machine at a time!! PRT has no way of selecting between adjacent inventories and will pick one at random.)
 * Item Transport Pipe (Use inbetween routed interface pipes - much cheaper. Pipe is dumb and will not route things intelligently when there are multiple possible turns.)
 * Routed Junction Pipe (Use these at intersections so items get routed correctly.)

How do I get PRT Ingredients?
Rule 1 of any autocrafting system - the first system you set up should be making more of the autocrafting system. So make sure you have chips and circuits automated first.

Now, looking at specific items:


 * Illumar
 * You only need three total illumar colors: magenta (item broadcaster), lime (crafting chip), and blue (stock keeper).
 * Blue can be easily obtained from lapis lazuli.
 * Lime can be obtained from cactus + bone meal.
 * Magenta is slightly harder - you need red dye. I recommend finding a rose bush in world, which you can use bone meal on to drop more of itself. Then this is just lapis + bone meal.
 * Bones are easy to obtain from GT++ fish traps, which also outputs a small amount of diamonds for later.
 * You can also use bees or Thaumcraft rainbow cactus for dyes.
 * Gold / Redstone / Glowstone Dust / Silicon
 * All of these are byproducts of glowstone dust producing flowers like glowflower or glieonia (from Thaumcraft). Set them up - you're going to need them anyway for chrome for HV.
 * You can also directly get redstone from redlon (Thaumcraft) or redwheat.
 * Cobblestone -> gravel -> sand -> glass -> glass dust -> silicon dioxide is a great source of silicon.
 * Diamond
 * GT++ Fish traps are a renewable early game source of diamonds.
 * Alternatively, you can dig up a diamond vein.
 * Glass
 * Sand + Oxygen -> 2 Glass (MV Arc Furnace)

PRT's Sharp Corners
PRT is probably 2-3x worse than an equivalent AE2 system in terms of amount of resource load and programming patterns. This section explains why. It is still worth it due to its extremely early tier availability, but don't expect things to be as easy as AE2.


 * 1) Inventories/machines cannot send items to the same pipe section they started in
 * 2) *Each Routed Interface Pipe can only reliably interact with one adjacent inventory/machine.
 * 3) *For some reason processes which send to themselves are disallowed. For example, 1 wiremill cannot do ingot -> fine wire - the intermediate wire needs to be sent to another wiremill.
 * 4) *Additionally, you cannot connect a machine directly to the same routed interface the input items are on. This is because PR does not have a method of distinguishing between which machine/inventory to send things to.
 * 5) *(Note that the sided access on crafting chips is *solely* for which direction it acts like it is accessing the connected machine from. It does not specify the direction of the inventory it is using.)
 * 6) Limited machine reuse
 * 7) *When a craft request is sent, PRT dumps all items at once into the relevant machines. It will wait outside machines with full inventories, so it is ok to reuse machines which cannot conflict like bending machines, wiremills, etc.
 * 8) *However, machines with large inventories and easy-to-conflict recipes like assembling machines cannot be reused (unless you are sure you will avoid a conflict).
 * 9) *This makes cleanroom automation basically not viable with PRT. The difficult parts are needing multiple circuit assembling machines (due partially to self-sending restrictions as well) and not having a clear way to swap out lenses.
 * 10) *However, you can automate all circuit subparts like SMDs.
 * 11) Hard to cancel crafts
 * 12) *Unlike AE2, there is no listing of active crafts. Instead, active machines are shown with a pulsing sphere overlaid on the pipe.
 * 13) *To cancel a craft, you need to slot out chips or break pipes for all involved machines. (Doing it partially may cause the craft to recover and keep requesting.)
 * 14) *You will also need to take the items out of machines so it doesn't block future crafts.
 * 15) No crafting table crafts without external machines
 * 16) *There is no molecular assembler equivalent for crafting table crafts in PRT.
 * 17) *As a result, you have to use the annoying slow/tiered assembling machine motor crafts, or craft them by hand.
 * 18) *Once you progress enough in PRT, you can set up autocrafting for EnderIO crafters. These are expensive and will only do one craft, but pretty quickly (~1s per craft). They also don't use GT tool durability, which is cool.
 * 19) *Note that Slice N'Splice input is bugged and will try to pull silicon plates into its red alloy plate slot if no red alloy plates are available. As a result, for Z Logic Controller craft stability, I had to keep a buffer of red alloy plates on the system. Maybe you could use a stock keeper for this...?
 * 20) Crafting extension cards are buggy / don't work, so need filters for MB crafts
 * 21) *If you don't use crafting extension cards, PR expects the input and output for a crafting chip to be in the same block. This is fine for machines. However, it is awkward for multiblocks.
 * 22) *The crafting extension card is supposed to be a fix for this - it tells the PR system to expect the output to be in a different pipe section. However, I was unable to get this to work properly.
 * 23) *As a result, you may need to use filters to solve this problem. You can also take advantage of the auto-filtering behavior of machines, although you will need to use a screwdriver to re-enable this in the newest builds (2.1.2.1+).
 * 24) Drawer controller items are not reported correctly
 * 25) * Like the holo glasses, PRT only sees a stack of items at a time in a drawer. This applies to drawer controllers as well. As a result, for very large crafts, it is a good idea to put the precursor materials in your diamond/compressed chests beforehand so the PRT system can see all of them.
 * 26) *This was fixed on June 9th https://github.com/GTNewHorizons/ProjectRed/pull/18 so if you're running latest dev this is fine.
 * 27) Stock keeper / crafting chip interaction
 * 28) *In my experience, setting a Stock Keeper Chip for something that's only available on a Crafting Card causes minor issues.
 * 29) *Specifically, the stock keeper tries to pull every second, but the craft takes longer than that. As a result, many items end up being crafted even though only 1-2 items were needed.
 * 30) *This is fine in the long term; those overcrafted items will still be used (and if they aren't, you can just slap an Item Broadcaster Chip onto the system). But it can be bad if rare components are used; you'll spend more of them than you need for individual crafts.
 * 31) Routed interface pipe chip limit
 * 32) *Routed interface pipes can only accept 4 chips at a time. This limits how many crafts you can do per machine. You can take up more sides, of course, or route through a chest, but eventually it gets very tricky to add more. This is also the case (although less so) with AE2, so it's just part of setting up autocrafting.
 * 33) Requesting fluids
 * 34) *Like AE2, there is no good way to send fluids through the system.
 * 35) *Personally I like using EnderIO ender fluid conduits (EFCs) in HV for fluid supply and keep bars of each plastic, then extrude it into the correct shape (plate, ring) on demand since plastic extrusion is very fast.
 * 36) *If you are still in MV, you unfortunately will need to use quad/nonuple GT pipes with GT fluid filters.
 * 37) **Remember that filling the pipe with fluids is only an initial cost, not an ongoing cost.
 * 38) **When setting up a GT fluid filter, you need to right click directly on the face with a cell of that fluid. This may require breaking some blocks. I recommend using universal or large cells for temporary fluid storage from blocks you're breaking.
 * 39) **Currently the cost for GT fluid filters is really annoying (2 LV circuits) so I got the cost lowered to 1 LV circuit in newest dev. https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10781
 * 40) Laggy at mega-scale
 * 41) *While it is difficult to make a large enough PRT system that this starts becoming a problem, you should not use PRT after AE2 becomes available.
 * 42) *It is much laggier due to using item entities in pipes and causes bursty lag when autocrafting as it does not spread out computation over multiple ticks.
 * 43) *For context, my skyblock run was built in Sampsa's void world. Their OW was ZPM at the time and we managed to use as much MSPT as the OW with a quite large PR system in HV/EV (200ish machines, 3 drawer controller walls, multiple multiblocks connected). It still stayed under 20 TPS, just wouldn't have easily scaled further.
 * 44) Tanks sometimes work weirdly with PRT
 * 45) *This is more of an unconfirmed issue, but some people have reported issues with broadcasters having issues detecting output cells from fluid tanks.
 * 46) *This issue can be mitigated by pushing the output to a different block (like a chest or a barrel) and then hooking up another pipe to that.
 * 47) * As mentioned at the top of the article, I don't really recommend using PRT for fluids. There are often easier solutions. For something like desulfuring it's ok, but don't put your whole chem on it (please).

PRT Example: Passive crafting LV->MV circuits using Stock Keeper Chips
Note that the following example uses Stock Keeper Chips, but the same general rules apply to an Item Crafting Chip.

However, unlike the Stock Keeper, the Crafting Chip will not pull/push items for the craft until something else on the network requests them, like a Routed Request Pipe.