Limiting amount of a certain resource in an AE network

  • 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

zilvarwolf

New Member
Jul 29, 2019
541
0
0
Yeah, so I'm wondering if there's a way to tell an AE system to never keep more than X amount of a certain (or any) resource, without preformatting every single storage space?

For example I would want to limit the amount of Cobble to 64 stacks and having any cobble above that amount voided instead of put in an overflow chest. This might be beewax or honeydrops or whatever, really. I tend to overproduce a lot.

Any ideas welcome :)
I don't think you need any level emitters for this.

I have, for things I never want to keep more than 4096 of, a wall of barrels. Each barrel has a storage bus attached to the top. The storage bus is set to priority 3. The storage bus is set to only accept one item.

I also have a storage bus set to priority 2 pointing to a void chest/ME condenser/trash can(I don't like this solution..I think trash cans end up being too slow), or some other method of auto destruction. That storage bus is set to receive anything that is configured to go to any of the barrels. All drives in the drive bays are priority 1.

Whenever trigger items come in, they're routed Barrel -> Void Chest -> Drives. The only way you get an overflow is if your void chest cannot accept more input. If you feel that's going to be an issue, split the load over multiple void chests. (That was actually my issue with the trash can, apparently it couldn't accept items fast enough, it allowed items to go into drives, and that threw the whole system off. I have not had the same problem with void chests, nor with the ME Condenser).

If you want to keep less than 64 stacks, don't use a barrel...use a chest. If you want more than 64 stacks, use a DSU or multiple barrels.
 

PhilHibbs

Forum Addict
Trusted User
Jan 15, 2013
3,174
1,128
183
Birmingham, United Kingdom
I'm thinking of suggesting precisely what Twisto said would be a nice feature.
"Set a level for any block ID" is hardly a fully-developed feature specification. What exactly would it do when that level is reached or exceeded?

It would be nice to have internal variables and a programmable system a bit like the MFR PRC, so you could for instance set an export bus to emit logs into a furnace if the amount of logs is greater than 500 and the amount of charcoal is lss than 500, or if the amout of logs is greater than the amount of charcoal.
 

budge

New Member
Jul 29, 2019
273
0
0
Allow me to take a stab at it.

Tentative name: Level controller
GUI: Top line string entry named "Amount:". Function: Tells level controller desired limit
Next line: 63-square grid similar to storage bus preformatting. Function: Tells level controller what items to take action on
Right side of UI: Toggle for export type. One at a time/stack at a time
External: Regular six-sided block with texture similar to ME Interface. Also similar to Interface, can be left default or wrenched to a specific direction.

Use: Attempts to maintain specified quantity of each item defined in its 63-slot interface for the entire network to which it is attached. When a specified item has more total quantity in storage than the desired limit, the level controller ejects items of that type to the first detected inventory in default configuration, or in the direction it is facing. Edit: If the grid is left blank, should it maintain a quantity for ALL items in the network? Or would that cost too much CPU time? Hmm.

It occurs to me that bigtwisty's method could mostly accomplish this entirely through Computercraft/OpenPeripherals. I may attempt to do this sometime.
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
I'm keeping a stock of 2048 items in my AE system without needing level emitters. Using a series of mekanism crates to store common crud. AE system has the storage bus to access the contents.
Then there's another chest with a storage bus on it that is a higher priority then my disk drive, but lower priority then the storage buses on the crates. So if my crate has 2048 cobble in it, and I try putting more cobble into my AE system, it will spit it out into that chest instead of storing it onto a disk. Then I can pump out of that chest for voiding/other purposes.
I'm using diamond pipes to filter the common crud to the crates, anything else direct to the AE system.
Much more expensive to setup due to all the storage buses, but quite satisfying to get it all working.
 

budge

New Member
Jul 29, 2019
273
0
0
That can work too, but it requires very careful planning and more effort. If you drop in even one unformatted disk somewhere, your system may misbehave. This may be an intended gameplay mechanic on Algorithm's part (better system requires more work), though, which is why I don't expect him to implement the "level controller" idea.

His comments on refused features tend to be along the lines of "if it can be done with existing tools, then a new machine is unnecessary." Can't blame him.
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
I only have the one 4k disk so far in my system, and it has a couple of free types on it. The "cobble" won't store on there at all. But I know what you mean, when I tried with on resource, it kept refusing to go into the overflow chest. Had to disconnect all those crates and chest from the system to see what was on the disk, and I found some of that resource already on the disk, which as a result ignores the priority. Strip them off the disk, and they then went into the overflow. That kept me puzzled for a good while last night :D Good fun, and a side effect was a tidier build :p
 

PhilHibbs

Forum Addict
Trusted User
Jan 15, 2013
3,174
1,128
183
Birmingham, United Kingdom
Then there's another chest with a storage bus on it that is a higher priority then my disk drive, but lower priority then the storage buses on the crates. So if my crate has 2048 cobble in it, and I try putting more cobble into my AE system, it will spit it out into that chest instead of storing it onto a disk.
Sorry, I don't think I understand... unless one of those "then"s is supposed to be a "than". Or maybe both of them?
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
I'll post my numbers, might help :D

Storage Bus on Crates Priority = 1
Disk Drive Priority = -64
Crate Overflow Chest (for voiding/whatever) = -32 (Storage bus is restricted to contents of crates, chest will always have room)
Disk Drive Overflow Priority = -512 (if my Disk Drive gets full this chest holds the overflow of resources I want)