How can I detect/sort charged versus uncharged items?

  • 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

bortels

New Member
Jul 29, 2019
3
0
0
So - I'm trying to make a long-distance item charger. Idea is I can drop a partially discharged batpack (I'm playing direwolf20) into my ender bag, and back at base it's sucked up and dropped in a charger, then put back when it's full. (I already do similar with stuff from my quarry - everything goes into an ender chest, and at base it's sucked out, sorted, then dealt with appropriately - I'm just trying to extend this to deal with what happens if I throw uncharged items in to get recharged)

What I can't figure out is any way to automatically look at an item with charge (a drill, chainsaw, or such) and tell if it's full, or needs to go in the charger. I made a CC interactive sorter, but apparently the charge level isn't part of the metadata it gets.

FTB has everything under the sun - can anyone think of a way to detect if an item is charged, and send it a different way if not? Otherwise, I'm going to have to default to just throwing everything into a charger over and over, and it's just not elegant.
 

Magicferret

New Member
Jul 29, 2019
142
0
0
I did a few tests because I was interested and as I thought Redpower works a treat. You can use a retriever to a tube on top of your IC2 storage unit, with a full batpack in the retriever's inventory. If you watch a batpack charge with NEI's item IDs on you can see its damage value decreasing from 27 when it's empty down to 1 when it's full. Your retriever will only pull out items with the correct damage value 'cos Redpower is clever like that. A filter would work too but would block the top of your IC2 storage which is needed for both inputting empty items and extracting full ones.

The only drawback to this method is having to have 2 copies of an item so you have one to put in the retriever, not a problem with a batpack but you're not going to be charging your gravisuit this way unless you're stinking rich. :p
 

madaffacca

New Member
Jul 29, 2019
153
0
0
Redpower and timers/remote. I know it feels stupid, but just count. First pulse to suck the item, count to the amount of time needed (around 10-15 seconds, depending on the item and the charging station) and pulse again tu suck the charged item back in the enderchest. No waste of item to "educate" a filter, no complicated contraptions. Just 2 filters, a wireless remote or a timer, a couple of recievers and you're done!
 
  • Like
Reactions: Magicferret

Magicferret

New Member
Jul 29, 2019
142
0
0
That's actually a great idea, you could even have items just enter the charging station for 15 seconds worth of charge at a time, and if you think they need another 15 seconds worth when they come back you could just send them round again. Sometimes quick and dirty is better than high tech. :)
 

madaffacca

New Member
Jul 29, 2019
153
0
0
bill_gates_quote.jpg


Bill Gates taught me all I know
 

AQJ

New Member
Jul 29, 2019
42
0
0
Actually an MFE (or any IC2 storage block) can be set to emit redstone when full, which will set off your system to pull out the charged item.

I've used a similar system before to charge energy crystals, and pump them around to my machines.
(it needed a crystal in the retriever, the filter and one in every MFE)

^This

Set the MFE to "Emit when Full" and hook it up to a transposer, that way as soon as there is again full charge (which would mean nothing is draining power any more aka full tool) it will pulse.
 

bortels

New Member
Jul 29, 2019
3
0
0
Problem is (and it's not a giant issue, to be fair) - "emit when full" will emit when the MFE (or MFSU, which is what I'm using since I have the gravisuite armor) is full - not when the item is full (unless I'm mistaken - i'll try it). In that case, my armor could go in, charge in 20 seconds, then sit for 20 minutes or longer while the MFSU slowly recharged to full.

What I was hoping for is some way to read the MFSU energy level (if not the item) - I could watch it drop, and when it started back up, I'd know the item was fully charged.

I think the "just put it in and sleep for 20 seconds" is probably more sane, but I still want to figure out a way to 'do it right' - if such a way exists. Silly thing is - my armor recharges my other tools, so it's less useful than it was a week ago when I started thinking about it :)
 

netmc

New Member
Jul 29, 2019
1,512
0
0
Bortels, The "emit when full" is exactly what you want. when you place a tool in the mfsu, it will pull some energy out of the mfsu, and the mfsu will no longer be at full energy, so no redstone signal. the moment the tool is charged, the energy start filling back up in the mfsu. then once the mfsu is fully charged again, it will emit a redstone signal causing the filter/transposer to pull the item out of the mfsu and return it to your chest/bag.

This may not work best with a grav suit because of the massive power requirements, but for tools/packs and what not, it will work perfectly.

edit: I've been thinking about eu detector cable, chained mfsu, etc. but nothing compes to mind with stock ic2.

edit : If the DW20 pack contain advanced power systems? (aka charging bench) If so, you could connect an eu detector cable in front of a charging bench. Then detect when eu is no longer flowing to the charging bench, then emit a redstone signal. This will let you know when you equipment is full and no longer pulling power. Since this isn't an mfsu, it doesn't have to completely charge back up based on your power gen rate.
so MFSU -> eu detector cable -> charging bench.
 

Enigmius1

New Member
Jul 29, 2019
499
0
0
Bortels, The "emit when full" is exactly what you want. when you place a tool in the mfsu, it will pull some energy out of the mfsu, and the mfsu will no longer be at full energy, so no redstone signal. the moment the tool is charged, the energy start filling back up in the mfsu. then once the mfsu is fully charged again, it will emit a redstone signal causing the filter/transposer to pull the item out of the mfsu and return it to your chest/bag.

Unless you have a setup that is constantly topping up the MFSU, in which case your method will either not work, or will have a seizure with the emptyfullemptyfullemptyfullemptyfull that you get in an MFSU hooked up to a power source when charging trivial items like batpacks.

Easiest way to charge items is with a retriever and a filter. I do it with BT batteries all the time and it would work a treat for anything else that has distinctive charge states. The key is to ship empty item (not partially depleted items) because it makes it much easier to manage their movement.
 

ItharianEngineering

New Member
Jul 29, 2019
473
0
0
Well the problem with that Enigmius1 is that he would need a copy of all his tools for the retriever and filter, which we are trying to avoid in this case since they can be expensive items. Like if you wanted to recharge a quantum suit, needing a copy for each machine is really troublesome and wasteful. This is when I wish RP2 used the false-items for the machines.

Using the emit if full with the MFSU is also bad if you have a slow energy supply to it, the item might recharge in 30 seconds but your network can't refill the MFSU for another 10 minutes because you are running it off just a few generators or something it would be a problem.

If he was using the Mindcrack pack he could use Gregtech's Charge-o-Mat which inputs the top and outputs the side so simple to setup, but you still have the issue of it knowing what to pull out, but he isn't so yea.

Now you can use buildcraft gates. It has parameters for charing empty items, partially charged items, and charging full items. You just have to tell it to pull the item out once it is trying to charge a full item.
Sometimes I think we overlook buildcraft gates because we have Redpower 2 now. I know I didn't even think about it until just now myself.
 

Peppe

New Member
Jul 29, 2019
836
0
1
I tried build craft gates on a setup today and it did not detect my tools or nanosuit. Probably a bug of some kind.

So i came up with a decent cheap alternative. A hopper on a top of an mfe. Wooden output pipe on the side of the mfe - redstone engine with dust from the MFE. MFE emit when full. So items charge up and get pulled out when the MFE recharges to max. Tried a transposer here instead, but it clogged on charging a full item.

A gate controlling another redstone engine + wooden pipe on the chest with items i want charged. Engine only runs when items are in the chest. So you have about 2 seconds to take out recharged items before they get looped back again to the MFE. Being full they won't stay in the loop long.

I had a optifine crash though and lost an item i had in the charging loop (kept a spare jetpack in there). So i could dump my near empty pack and grab the full one as 90% of the time that is what i need to charge when out exploring. At least i think it was the crash as there was no way an item could pop out of the pipes.

For another 2 ender pearls though i can add wireless control, which i think will be better. Wireless remote activates pulling items out of the chest and they pile into the hopper. Once all the items are out of the chest you can turn off the signal and put the remote back in the chest.
 

Enigmius1

New Member
Jul 29, 2019
499
0
0
Well the problem with that Enigmius1 is that he would need a copy of all his tools for the retriever and filter, which we are trying to avoid in this case since they can be expensive items. Like if you wanted to recharge a quantum suit, needing a copy for each machine is really troublesome and wasteful. This is when I wish RP2 used the false-items for the machines.

He asked about charging his badpack. That's all he asked about. Specifically, he asked about how to detect charged vs. uncharged items. Redpower filters/retrievers/etc. allow a person to do just that, but it requires that you have an extra version of the item on hand to "teach" the machine what to pull.

Now you can use buildcraft gates. It has parameters for charing empty items, partially charged items, and charging full items. You just have to tell it to pull the item out once it is trying to charge a full item.
Sometimes I think we overlook buildcraft gates because we have Redpower 2 now. I know I didn't even think about it until just now myself.

BC gates aren't as useful as some people make them out to be. Half the time I see someone talking about how useful they are, they're using them in a contrived situation where they had to specifically tailor the situation in order to make the gates useful, meanwhile another solution exists that is more intuitive and not nearly so contrived.
 

Peppe

New Member
Jul 29, 2019
836
0
1
Here is the setup i am going with until i have the pearls to spare on wireless redstone to control the item pump out of the chest into the charging unit.

Front:
MHkCU.jpg


Lower left iron and gate control pull of items out of the MFE. Checks for items in inventory and redstone signal -- signal is from full MFE. And gate is ideal here, so the engine only runs in slowest state. A basic gate tied to the MFE will run a full red engine most of the time which can pull items out before the gate's state changes when a new items starts charging.

U5kXJ.png


Upper right gate is just a basic gate checks for items in inventory. Ideally replace this with a wireless reciever and wireless remote. Manually run until your items are out and then turn off, so you can go off and do something and come back to a chest of charged items.

This back piece was 2 hoppers, but concerned a optifine crash maybe spit out items in this part of the loop i replaced with redpower 2 relay and tube:
dO23S.jpg


It should hold up to 10 items (9 visible, 1 in the hidden clogged tube slot). Will auto send things down the tub when it can otherwise it will hold in its inventories. So you can dump up to 11 -- maybe 12 items into the system (10 in the relay 1 in the MFE) for charging and even with the basic gate and a red-stone engine they should all charge as the relay buffers them.
 

ItharianEngineering

New Member
Jul 29, 2019
473
0
0
Well you are quite right about the BC gates. I don't usually recommend them, but it seemed useful in this case since it would avoid the need of copies that using the Filter/Retriever setup requires. Upon further testing though it turns out the only thing the gate can detect is RE-Batteries and no other item charging, so not very useful at all. I personally like using filters and retrievers for things myself like my wonderful tunnel bore, but with IC2 it isn't as nice if you ever wanted to expand it to charge other tools or more advanced packs, since you would suddenly need 2 extra copies for it to work. It is very doable with early gear but it feels really wasteful with higher tech items, until you are swimming in resources.
 

ItharianEngineering

New Member
Jul 29, 2019
473
0
0
Well I stand corrected about the gates in this case. Seems they are useful. Wonderful idea :D not as perfectly automated as filters/retrievers but much better because of not needing copies of everything. I'm going to just put this in my world now :)
 

Peppe

New Member
Jul 29, 2019
836
0
1
Forgot to mention -- for anyone new to remote system -- you need a chunk loader at your charging unit and power source in those loaded chunks :p

Testing it now as I hunt more enderman and love it. Do highly recommend having a spare jetpack in the loop in addition to the one you wear. Wait maybe 5-10 seconds and the full one will be in the chest and then you dropped your used one in and continue on. At least for how I play -- 90% of the time i just need a new jetpack.
 

ItharianEngineering

New Member
Jul 29, 2019
473
0
0
The problem I seem to have with that setup is that the MFE is recharging the Jetpack too fast because it is resupplying power faster than a jetpack refuels. In order for it to work I have to purposely choke the MFE so it doesn't stay full at all points. It does sometimes catch and work though which is strange.
 

Peppe

New Member
Jul 29, 2019
836
0
1
that is probably true on the MFE. Mine is only getting like 48 EU a tick. I'll have to test out the config in creative.
Does the MFE charge at 128 EU/t? I can't think of another way to give an item charging time without getting more complicated.

Chest output side changed to all redpower:
Wireless receiver -> toggle latch -> timer
HAwM1.jpg


Basically use the remote to pull items out for a few second then use it again to stop. When things have charged they will stay in the chest.

EnmRn.jpg


nLkgd.jpg
 

Peppe

New Member
Jul 29, 2019
836
0
1
One solution appears to be gold or diamond 'or' gates on the MFE output. Use redstone engine or aucratic diamond/gold 'or' gate.

They can look for an item type -- fully charged items have different sub id. Plus they only use ghost items.

You can pick 4 items with gold gates or 8 with diamond.

I think you could pull from all 4 sides of the MFE, so 16 - 32 item types you can charge, but if you ever put something in that isn't in your gate already it will clog at the MFE. Maybe use a wireless override option to protect against that.


Edit:
Example diamond/gold 'or' gate setup:

Select 'items in inventory' then put the item you want to look for in the spot that unlocks. Emit redstone if using redstone engine or use the energy pulse looking thing if aurarchic gate.
pqF9P.png


Way better than the iron gate system :p