[AddOn v1.23] Energy Coupler v0.21.1 - Convert EUs <-> BuildCraft Energy

  • My setting:
    Generator-cable-batbox(currently loaded)-cable coupler-wooden pipe-stone pipe(machine attached to check if its working) - tp pipe - receiving tp pipe - gold pipe - machineAnd machine aafter tp doesnt receive and power, there is no power animation going to tp pipe also.


    Does it wotk for you?

  • My setting:
    Generator-cable-batbox(currently loaded)-cable coupler-wooden pipe-stone pipe(machine attached to check if its working) - tp pipe - receiving tp pipe - gold pipe - machineAnd machine aafter tp doesnt receive and power, there is no power animation going to tp pipe also.


    Does it wotk for you?

    The only thing I have tried it on thus far is with a pump and the bucket filler addon. Both appear to work with this mod just fine. Are you using rev27 for TP pipes?

  • Yes, every mod was reinstalled like 3 days ago with newest available version. I'll run some tests later this night (cuz of IC2 Im playing whole nights and sleeping at university...) and maybe Ill be able to point not working part.

  • Yes, every mod was reinstalled like 3 days ago with newest available version. I'll run some tests later this night (cuz of IC2 Im playing whole nights and sleeping at university...) and maybe Ill be able to point not working part.

    I just remembered I was using the HV Energy Coupler, It could be possible you are not generating enough power?

  • Rather doubt it, rafinery, which was connected be4 tp pipe was just fine, but rafinery after tp pipe wasnt working at all (even if I deleted first rafinery). Had 2 batboxes connected and none of it was uncharging, which is obvious for me its not working. Gonna check with higher EU\s (btw 1 combustion engine is 10 eu, so one generator should do same good work)

  • Sorry for not editing above post - Im not registered.


    U know what? Tried to reproduce bug, which made me to instal coupler addon again and I simply cant. Its working (which makes me really happy).

  • again me. I guess its time to register...


    As I understood, BC=2,5IC


    So 1 combustion engine is fine to power rafinery (full speed). Also combustion engine gave me 10 EU, same as geothermal generator. So 1 geo generator should power rafinery just fine... but it doesnt. Actually I need 5 geo generators to power 3 rafineries (to get it to full speed I need additional power stored at MFE). Could I check if it isnt maybe dividing power in both ways Mean 100 EU->20BC>4EU (while writing this Im wondering why didnt I check it exacly that way...). Anyway Ill try to go sleep. would be kind is U check code for me (I guess U find me little anoying right now, but w/e)

  • again me. I guess its time to register...


    As I understood, BC=2,5IC


    So 1 combustion engine is fine to power rafinery (full speed). Also combustion engine gave me 10 EU, same as geothermal generator. So 1 geo generator should power rafinery just fine... but it doesnt. Actually I need 5 geo generators to power 3 rafineries (to get it to full speed I need additional power stored at MFE). Could I check if it isnt maybe dividing power in both ways Mean 100 EU->20BC>4EU (while writing this Im wondering why didnt I check it exacly that way...). Anyway Ill try to go sleep. would be kind is U check code for me (I guess U find me little anoying right now, but w/e)


    IC2 1.23, BuildCraft 2.2.3 Energy Coupler 0.19.


    Test setup:


    Combustion Engine with one bucket Fuel -> Wooden Power Pipe -> Gold Power Pipe -> Refinery: Combustion Engine does not power the refinery at full speed (bars are purple, not green)
    Geothermal Generator -> copper cable -> Energy Coupler -> Wooden Power Pipe -> Gold Power Pipe -> Refinery: Refinery operates at the same speed, bars are moving at purple, same as the Combustion engine.

  • Sorry, I've checked my downloads and stupid me was trying to install the client version of the coupler *facepalm*.


    Thanks for your help, it works fine now.


    No worries. I've done the same thing while copying development builds into the correct locations, which is the only reason I knew what that error was.

  • in testing i am seeing i am losing allot of eus


    i was testing this mod and i seem to only be getting 1/10 of the eus back
    this is my set up an mfsu into a high voltage coupler though gold conductive pipes into another high voltage coupler back into another mfsu . if i put in 1 million eus i only get like 150, back



    1,000,000 eu > :MFS-Unit: :Glass Fibre: hvc,gcp,hvc :Glass Fibre: :MFS-Unit: > 150,000 eu


    any ideas


  • Interesting. I did some digging and I think I found the problem. Wooden power pipes only store 1000 BC Energy. After that, any energy that gets added is just thrown away silently. It seems that the coupler is throwing too much energy at the wooden power pipes and the excess is getting thrown away. The effect is more pronounced with more energy. I think I have a fix, but I'm going to do some more testing. There's still going to be some loss because of the way BC Power pipes handle loss. I think I have it at 95% though.



    Update: After doing some testing and an interesting bit of math, it turns out the Wooden Power pipes are basically a bottleneck. The way they work, (and I could be reading the code wrong), is they can store 1000 BC Energy units, which are then output depending on how much is currently stored. The logic is thus: If the amount stored is >40, divide the amount by 40 and add 4. If the amount is <40 but >10, divide the amount by 10, and if <10 output 1. So, 1000/40+4 = 29BCE. So it would appear that the maximum output of a wooden pipe would be ~72.5EUs/tick (29x2.5). Therefore, it looks like a HV Energy Coupler is pretty useless when converting EUs to BCE, since it would output more per tick than a wooden pipe can handle.


    I'm wondering now if I should create a wooden pipe without that output bottleneck.

  • Maybe just create multiple outputs of coupler, one side is input, all others outputs. That would create ability to transfer 72.5*5 EU (360 EU). Add bottleneck to coupler (max energy used=72.5*number of outputs). If some1 would want to convert more, he/she should use more couplers. Also HV one is useful, its the olny one that can accept 512EU/t from BC

  • Instead of a diesel generator why not put it into a fuel can using a canning machine? Easier to do and uses existing infrastructure.

  • It would be a wonderful improvement if the coupler could detect that the target was 'full' and not transfer any further energy. Whenever I turn these on to power anything in buildcraft they seem to simply sink whatever the maximum energy is directly in to the target machine or wooden pipe.

  • It would be a wonderful improvement if the coupler could detect that the target was 'full' and not transfer any further energy. Whenever I turn these on to power anything in buildcraft they seem to simply sink whatever the maximum energy is directly in to the target machine or wooden pipe.


    Unfortunately, I don't think that will happen unless there is a change in the way BuildCraft Machines request energy. I'll demonstrate with the code from BuildCraft's Quarry:


    Code
    public TileQuarry() {
      powerProvider = PowerFramework.currentFramework.createPowerProvider();
      powerProvider.configure(20, 25, 25, 25, MAX_ENERGY);
    }


    Here, the configure parameters are thus: 1 - latency, 2 - minEnergyReceived, 3 - maxEnergyReceived, 4 - minActivationEnergy, 5 - maxStoredEnergy.
    So the quarry is set to receive a minimum and maximum of 25 BC Energy. MAX_ENERGY is a constant that is set to 7000 for the quarry. So the Quarry's power provider will store up to 7000 BC Energy.


    Hopefully the non-programmers are still with me...anyway, when pipes are transfering energy, they look for IPowerReceptor blocks to deliver energy to. If they find one, they ask it how much energy they want by using the powerRequest method, which is actually shared across all BuildCraft Factory blocks (Quarry, Pump, Refinery, etc):


    Code
    public int powerRequest() {
      if (isActive()) {
        return getPowerProvider().maxEnergyReceived;
      } else {
        return 0;
      }		
    }


    So, all Factory blocks will request maxEnergyReceived which, in the Quarry's case as seen above is 25. Furthermore, here's how the Quarry's powerProvider acts when it receives that energy from the source:


    Code
    public void receiveEnergy (int quantity) {
      energyStored += quantity;
    
    
    
    
      if (energyStored > maxEnergyStored) {
        energyStored = maxEnergyStored;
      }
    }


    What that means is the Quarry's power provider will take the energy, add it to its stored energy, then it checks to see if that value is more than 7000. If it is, it just silently sets the energy stored to the maximum, basically discarding it.


    Anyway, that's a basic overview, there are a few more things going on but that's basically how pipes hand off the energy to blocks.

  • Ok, I just posted v0.20. This version changes some functionality, so please back up your save and read this before upgrading.


    A redstone signal will now turn the coupler on/off instead of changing the direction of the conversion. Because of the change, I've added a GUI that allows you to select the direction.
    Theoretically, currently placed couplers should default to converting EUs to BC Energy. So any blocks you had placed with redstone current to convert to BC Energy will have to be changed in the GUI to convert to BC Energy and then have the redstone current removed in order for them to work again. Placed couplers without redstone current shouldn't need any change. Hopefully.


    I also fixed the major conversion loss bug that d1red pointed out. EU to BCE to EU conversion should now be at about %97 for HV and MV and at about 92% for LV. Don't know why it's different for LV, but I think it has something to do again with Wooden Power Pipes. I had to throttle conversion from EU to BCE to about 72 EUs/tick, otherwise the Wooden Power Pipe gets filled and silently throws the excess away. This makes HV Couplers kind of useless for converting to BCE. Not sure how to get around that one yet.


    I'm also in the process of moving everything off of IC2 classes. There are some things I haven't quite worked out yet, but that mostly has to do with SSP which is pretty involved. The IC2 Platform and NetworkManager classes make it a lot easier to deal with. So until I can work out my own classes to handle SSP, I'm stuck using them right now...but I'm getting there.

  • @McFistyBuns I tried power converters for now because I noticed this was not ported for bukkit yet. Ohh BTW do you mind if it gets ported I can put request in.



    But I noticed this with power converters and wondering if you noticed odd strange random numbers with your mod:



    Check last post just scroll up a tad:



    http://www.minecraftforum.net/…pid__9855750#entry9855750

    Check out Our Brand New GT New Horizons Server .:Here:.
    Check out Our Brand New GT New Horizons Let's Play Series .:Here:.