Design Help Needed: Wireless Power

Topics and discussion about specific mods
Post Reply
User avatar
Rainboy
Inserter
Inserter
Posts: 22
Joined: Sat Sep 17, 2016 11:46 pm
Contact:

Design Help Needed: Wireless Power

Post by Rainboy »

Hi, I'm the author of Wireless Power, which is a mod for universal wireless power transfer. The tesseracts that the mod adds to the game come with efficiency penalties as the cost for the convenience of wireless power. However, there's a fairly fundamental flaw with the mod: factorio's power transfer is always 'free' no matter how large the network. I understand the reasoning for this: it's quite computationally expensive to calculate the costs for any realistic power transfer that tries to model the resistance of the wires.

So that brings me to my problem. This mod was designed with rail world in mind, where you have some central base and then many mining outposts. I'd like some way to mechanically encourage users of my mod to actually use tesseracts for these outposts beyond just the convenience factor. Thus, I need some UPS-efficient way to cause long chains of power poles to be very inefficient, without causing too much of an efficiency nerf to the normal factory - even if said factory is fairly large.

Design goals:
  1. UPS efficient algorithm. Ideally, only run mod scripts on entity placement/removal.
  2. Very inefficient to power machines which are very distant from the main power generation.
  3. Much less inefficient to power large groups of machines which are relatively close together.

Initially, I've come up with a few ideas which are, in my opinion, pretty sub-optimal. I suspect some variation of these will end up being the best I can manage, but I'm interested in hearing what else people can come up with.
  1. Mechanically cause power drain via a set of modules which are automatically inserted into machines which are far away from power generation.
    Drawbacks: Consumes a module slot for any machine deemed 'far away,' adds a bunch of nonsense code to make sure the modules can't be removed or end up in anyone's inventory, fails to hide what's going on from the user.
  2. Mechanically cause power drain via an invisible entity connected to the network. Many such entities would be created to handle different 'tiers' of power consumption, and a script would handle figuring out which one was connected to each electric network.
    Drawbacks: tier system is not very fine-grained, can't really handle machines which are off, need to figure out an algorithm to calculate which tier to use.
  3. As a middle ground between the above two, mechanically cause power drain via invisible entities connected to each machine or each power pole.
    Drawbacks: many more entities in the game, still can't handle machines which are off or power poles which are unused.
Thoughts?

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Design Help Needed: Wireless Power

Post by GrumpyJoe »

Not put much thought into it while having breakfast :lol:

But what about hidden energy consuming entities in large power poles?
A lamp that's always on, assemblers auto set to a void recipe
Call them cable resistance.

It would make the power draw through fake resistance linear and I'm not an electrical engineer, so I don't know how accurate a non tiered system would be, but that could be a start?


Another idea: limit possible cable connections.
If that is possible.. Maybe makes for a mod Interface request.
Make LPP only connectable to themselves and a transformator like entity that could look like a substation and has a hidden entity that draws power. That transformator could then be hooked up to subnets of substations and MPP without actually splitting power networks

User avatar
Rainboy
Inserter
Inserter
Posts: 22
Joined: Sat Sep 17, 2016 11:46 pm
Contact:

Re: Design Help Needed: Wireless Power

Post by Rainboy »

GrumpyJoe wrote:
Sun Apr 18, 2021 10:33 am
Not put much thought into it while having breakfast :lol:

But what about hidden energy consuming entities in large power poles?
A lamp that's always on, assemblers auto set to a void recipe
Call them cable resistance.

It would make the power draw through fake resistance linear and I'm not an electrical engineer, so I don't know how accurate a non tiered system would be, but that could be a start?


Another idea: limit possible cable connections.
If that is possible.. Maybe makes for a mod Interface request.
Make LPP only connectable to themselves and a transformator like entity that could look like a substation and has a hidden entity that draws power. That transformator could then be hooked up to subnets of substations and MPP without actually splitting power networks
I don't hate the idea of limiting consumption to large power poles (where large is anything that has less than 5x5 supply area). It might warrant some experimentation, but I worry that it will be quite difficult to balance since this approach does not take any machines into account. Mining outposts can be fairly energy intensive, especially with speed modules; a linearly increasing (with distance only) cost would have to be fairly steep to make outposts favor tesseracts over power poles - to the point that I expect it would discourage the use of large power poles altogether.

Your idea of limiting cable connections intrigues me. I think that would require an interface change, but it would be a way to isolate large from medium poles.

Post Reply

Return to “Mods”