Lightman's Currency Tech

Lightman's Currency Tech

160k Downloads

Battery shop energy output does not work

HonzaVinCZ opened this issue ยท 11 comments

commented

Energy output for Battery shop does not work. Tested with all sides.

lightmanscurrency-1.18-1.0.3.4
lctech-1.18-0.0.2.0
ImmersiveEngineering-1.18.1-7.1.0-145

2022-02-12_22 02 48

2022-02-12_22 02 57

2022-02-12_22 03 05

2022-02-12_22 03 14

commented

I do not know why it does not function, but I did notice during development that Immersive Engineering doesn't automatically attempt to drain the power from the Battery Shops (power input still works for some odd reason though...), which is part of why it's still flagged as a beta build. It does, however, function with nearly any other mods energy cables/pipes (I tested it with the Pipez mod, and it extracts power as intended. I would've tested it with Thermal, but there's no 1.18 version of it out yet). I took a look into Immersive Engineering's code, but it's ridiculously complicated and I honestly can't make heads or tails out of it so the odds of this getting fixed on my end is unlikely to say the least...

Edit: Honestly speaking, I may just disable the ability for purchased power to be drained via cables, and force players to utilize the battery slot for purchasing/selling energy. If I do, I'll just leave the input/output settings for charging the battery to refill stock, or extracting purchased energy from the battery. Might even add custom settings to set a desired power range to "recharge if under ###FE, drain if over ###FE", or something along those lines.

commented

Sometimes one needs help of others. Try visiting IE Discord, I'm sure they must've solve similar problem already. It might be a bug, I don't know.

Edit: I think the current recharge is fine, best to keep it still at full capacity.

commented

question is it supposed to be that the server doesnt have ani input sides? and would it be possible to have a remote drain port like you select in a trader that you wich to send item/fluid/energy to a receaver of the buyers ownership?

commented

tested with pipez:
wehn placing trader and pipes on top and bottom you have to replace the pipes after selecting the sides for in/output it doesnt force a update on the pipes on itself

commented

tested with pipez: wehn placing trader and pipes on top and bottom you have to replace the pipes after selecting the sides for in/output it doesnt force a update on the pipes on itself

That is not case with IE as I just tested. Even replacing the connectors after enabling output does not help. However input works right away after enabling input.

Edit: Input is not closed if you enable and then disable it. You have to replace the connector to not accept energy.

Tested with IE

commented

Edit: I think the current recharge is fine, best to keep it still at full capacity.

The main purpose of these settings would be for players setting up an energy trader that both buys and sells energy (since it can have 4 energy trades), allowing them to customize the desired energy storage range to have enough room for the purchased energies, while still maintaining enough energy in storage for the energy sales. The default settings would set it to charge itself fully.

tested with pipez:
wehn placing trader and pipes on top and bottom you have to replace the pipes after selecting the sides for in/output it doesnt force a update on the pipes on itself

Yeah, I forgot to have it force a block update tick when the energy trader inputs are updated (as the fluid traders do to update the fluid pipes). I also can't seem to find where I had that code for the fluid traders, cause I know I added that at some point. Maybe it didn't get ported to the 1.18 version? I'll have to look into getting this working again.

That is not case with IE as I just tested. Even replacing the connectors after enabling output does not help. However input works right away after enabling input.
Edit: Input is not closed if you enable and then disable it. You have to replace the connector to not accept energy.

This is likely a side-effect of me forgetting to force the block update when the inputs/outputs are updated. That said, now that I looked at their simplest machine (the capacitor), I think I know what to do to get the energy output working.

question is it supposed to be that the server doesnt have ani input sides? and would it be possible to have a remote drain port like you select in a trader that you wich to send item/fluid/energy to a receaver of the buyers ownership?

Universal Traders have never had any input/output sides, as they don't technically have a physical presence in the world. At some point I'm planning on adding machines to LC Tech that allow for automated interactions with Universal Traders (both as a customer, and as the owner), and I'll probably include remote re-stocking/draining as an owner interaction option.

commented

Update:
Got the energy trader to properly export power to immersive engineering power connectors! Nearly had a heart attack when I saw that the numbers in the test capacitor didn't 100% line up, but then I remembered that immersive engineering is "Immersive" and thus has power-loss on their wires, cause, you know, that's a thing that happens irl.

Still need to run some tests to make sure that the block update fixes the other issues with the input still working when the input settings are changed, and then I should be good to go with the next patch.

Edit: For unknown reasons, the automatic export seems to cause problems with the Pipez mod, and will thus likely do the same with others, so I'm adding an option to enable it in the Energy input/output setting tab.
Edit 2: Never mind, edit 1. The problem was that the MV connector attached to the input had some spare energy in it, and thus added an additional 1024FE to the trader when it starts draining.

commented

I've got the block update working, however IE still has some strange interactions with it, including the energy input still working regardless, so I'm likely going to have to completely change how the TradeFluidHandler and TradeEnergyHandler handle fluid/energy inputs such that they reference back to the energy settings every time an input/output is attempted. Might be better in the long run anyways, but I personally prefer my method as it likely uses less internal memory.

commented

Ok, got everything working as intended. Just need to backport the changes to 1.16, and it should be good to go! Also added a new drain setting, that allows you to disable the "purchase to external drainage" option, in favor of energy outputs draining all stored energy (so that players buying energy can drain the newly purchased energy, etc.)

commented

Fixed in v0.0.2.1.

commented

Holy... Great job, Lightman! Thank you for such progress info, I love it.