Poles with limited power distribution
-
- Manual Inserter
- Posts: 2
- Joined: Sat Aug 31, 2019 7:01 pm
- Contact:
Poles with limited power distribution
So I want to give poles a realistic-ish trait of having a limit to how much power they can give. For example, one small pole can give no more than 300 kW (numbers irrelevant, i will balance them), so it will distribute these 300 kW equally to all entities connected to it regardless of how much you actually produce in general. But I can't find a good way to do it, "electric-pole" prototype doesn't use limits, other prototypes also work a bit different and I'm new to modding. Is there a way to do so?
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Poles with limited power distribution
https://mods.factorio.com/mod/flownetwork
This mod apperently does it somehow. No clue beyond that. It probably uses power interfaces and excessive scripting.
This mod apperently does it somehow. No clue beyond that. It probably uses power interfaces and excessive scripting.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Poles with limited power distribution
No.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Poles with limited power distribution
Lulz, a 0.13 mod, where did you dig *that* up :D. (Hey, that means the portal exists longer than i thought.)Ranakastrasz wrote: Sat Aug 31, 2019 7:45 pm https://mods.factorio.com/mod/flownetwork
This mod apperently does it somehow. No clue beyond that. It probably uses power interfaces and excessive scripting.
Quick look at code...looks like it calculates all energy transfer itself and uses red-circut wire to remember the connections (because it has to delete the real ones to prevent them from interfering). Probably extremely slow, bugprone and user un-friendly.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Manual Inserter
- Posts: 2
- Joined: Sat Aug 31, 2019 7:01 pm
- Contact:
Re: Poles with limited power distribution
Well, it seems that it worked back then. And it does exactly what I want. But yeah, I can't figure out what happens in control.lua at all.eradicator wrote: Sat Aug 31, 2019 7:57 pmLulz, a 0.13 mod, where did you dig *that* upRanakastrasz wrote: Sat Aug 31, 2019 7:45 pm https://mods.factorio.com/mod/flownetwork
This mod apperently does it somehow. No clue beyond that. It probably uses power interfaces and excessive scripting.. (Hey, that means the portal exists longer than i thought.)
Quick look at code...looks like it calculates all energy transfer itself and uses red-circut wire to remember the connections (because it has to delete the real ones to prevent them from interfering). Probably extremely slow, bugprone and user un-friendly.
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Poles with limited power distribution
I had seen it, or something like it before. And I went and searched for "Factotio Power Network Mod" and a bunch of synonyms til I found it. There might be another, but I couldn't find one.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Poles with limited power distribution
It could possibly be done BUT the performance cost of the scripting required would make it unviable. A better option would be to go to the interface requests forum and ask for a throughput_limit = χ kw
It would be a lot easier to implement on the c++ side than with the limited abilities of lua.
It would be a lot easier to implement on the c++ side than with the limited abilities of lua.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Poles with limited power distribution
Lots of things "work" in theory, but are too slow to be fun. This one will definetly not be fast enough for you to enjoy the game unless you're fine with <60UPS before launching your first rocket.EffectiveLimit wrote: Sat Aug 31, 2019 8:12 pm Well, it seems that it worked back then. And it does exactly what I want. But yeah, I can't figure out what happens in control.lua at all.
That would be closed without even a comment. The whole electric network code is based on the assumption that there is no limit. Look at the "make fluid behave like electricity" threads where people argue to remove the flow limit to get more UPS.mat1k wrote: Sat Aug 31, 2019 10:31 pm A better option would be to go to the interface requests forum and ask for a throughput_limit = χ kw
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.