[MOD][WIP .15] High Voltage 0.0.7 : Energy over distance

Topics and discussion about specific mods
Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Version 0.0.5
  • Fixed a bug where a transformer was disconnected but accidentally remembered its previous connection.
  • Made it possible for other mods to secretly swap out big poles (which Rampant does) without entirely breaking the connection. As long as entities are swapped and wire connections are maintained in one tick, the connection should re-establish.
bbgun06 wrote:Here is the save. Note that this wasn't actually connected to the power station, although it acted like it was on one side.
I think I solved this bug and this situation should no longer happen.
Dreadicon wrote:This mod looks FANTASTIC! I wanted to do something like this myself, but never could figure out how to do it in an adequately performant manner with the current API. Next game I'll add this (because I like to make my life hell what with Angel's + Bob's + Platforms + Rampant AI + RSO with distance cranked up to 11). I'm already considering shipping power between 'safe' regions using tanker cars filled with steam ;) So this will add an interesting layer on top of that.
Yes, railing steam in is exactly what I do, it is more stable than a long-range power cable. Trying to rely more on local energy so that a failure cascade doesn't end mining everywhere immediately.

Image

Thanks for the good words - it's a bit of a hack but it works well so far. Getting close enough to be called 'stable'; been playing with it for a while without serious bugs now.

If you are going for the hell-world I can recommend three of my other mods: Pollutor (pollution multiplier - more pollution means they come attack you from farther, ideal for the vast RSO worlds); Slow Down which increases mining time (meaning you need more patches for the same income-per-second); Foul Wind which makes pollution blown in the wind's direction. The last one works well with the MoWeather mod which adds some stronger winds and effects.

User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by db48x »

Pro tip: plan ahead for where you're going to put your roboport network. You can see in this screenshot that we didn't; we had to extend some of our networks a few tiles to reach. Sometimes it was no trouble, other times it was a puzzle. I discovered that the 30-tile range is not from the furthest power pole to the distribution box, but from the furthest pole to any pole within the distribution box's power range; that got us a few extra tiles in a few cases (I suppose it could also be a bug). Other times the fix was repositioning the distribution box by a few tiles, or adding a few more diagonal links in the power grid to straighten out the path. Quite fun!

Image

Here's a closeup of some of the newest parts of the factory. You can see that we found a spare high voltage delivery line! We were sure that we had run out.

Image

One more possible bug report we have is that the power overlay you're drawing is slowing the FPS of the game down. In that screenshot above you can see that it's down to ~30fps. There might be room for optimization there, perhaps by updating the overlay fewer times per second.

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Continuing to be excellent images! Yeah, the roboport should just push some of the limitations the mod makes you work around :D

Short reply as I have to be off - could you post the save file so I can check what exactly slows it down? Evidently I never got to a base this large. I am not sure what could be this slow but I will look into it soon(-ish)!

User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by db48x »

Jeroen D Stout wrote:Continuing to be excellent images! Yeah, the roboport should just push some of the limitations the mod makes you work around :D

Short reply as I have to be off - could you post the save file so I can check what exactly slows it down? Evidently I never got to a base this large. I am not sure what could be this slow but I will look into it soon(-ish)!
Of course! Here it is.
Attachments
high voltage mod.zip
(9.19 MiB) Downloaded 99 times

TK_Neg
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Apr 30, 2017 6:04 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by TK_Neg »

Bug report, I suppose? Deconstruction planner and bots both are unable to interact with the unpowered small wooden poles, or ' Unknown Key:"entity-name.small-electric-pole-disabled" '. works just fine if they do have power though. I'm not far enough along that I can test with the bigger poles yet - i'm using a bot start mod. Enjoying the mod though, it definitely changes how one sets up a base!

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Cheers, db48x!
TK_Neg wrote:Bug report, I suppose? Deconstruction planner and bots both are unable to interact with the unpowered small wooden poles, or ' Unknown Key:"entity-name.small-electric-pole-disabled" '. works just fine if they do have power though. I'm not far enough along that I can test with the bigger poles yet - i'm using a bot start mod. Enjoying the mod though, it definitely changes how one sets up a base!
This reminds me to give poles names, too :)

I think there might be a bug with bots, where they cannot pick up (custom) entities that turn into a different type of item. Another mod has a similar problem, I just found, but this might have to go via the actual devs as the developer of that mod also did not have a solution. So I'll see if the dev of the other mod and I will make a bug report.

Glad you are enjoying the mod, though :D the bots require a lot of electricity which should be a bit more challenging to distribute now!

nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by nuhll »

Cool idea, about it would do it in a other way.

What about poles can only carry specific amount of energy? But should go endless.

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

I believe the devs are looking into the deconstruction planner problem.
nuhll wrote:Cool idea, about it would do it in a other way.

What about poles can only carry specific amount of energy? But should go endless.
To be fair, IRL electricity also has a falloff... but the main reason it works like this is that it is a mod doing computations, which is very slow compared to the original game, so I can only really simulate a few lines. The high voltage lines made sense, from that perspective.

Meanwhile, my wall is taking an interesting shape:

Image

I am playing with a pollution mod that means biter evolution is already at 70%; I am constantly getting waves. Because of power limitations the whole wall has these little 'cells' of powerbox + lines to the lasers:

Image

Each cell has to have some accumulators that can power the lasers long enough for the transformers to kick in. Because the AI is modded and keeps trying to attack in different places the accumulators are constantly busy. It is a really interesting and almost scary sight.

Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Ratzap »

I thought I'd give this a try and tossed it into a mod set I had ready to play a platforms game. The 2 mods together make for an extremely tedious start phase though so I may not continue.

It's an interesting concept but hits the same computational problems that something trying to model heat decay would (for example).

nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by nuhll »

Jeroen D Stout wrote:I believe the devs are looking into the deconstruction planner problem.
nuhll wrote:Cool idea, about it would do it in a other way.

What about poles can only carry specific amount of energy? But should go endless.
To be fair, IRL electricity also has a falloff... but the main reason it works like this is that it is a mod doing computations, which is very slow compared to the original game, so I can only really simulate a few lines. The high voltage lines made sense, from that perspective.

Meanwhile, my wall is taking an interesting shape:


I am playing with a pollution mod that means biter evolution is already at 70%; I am constantly getting waves. Because of power limitations the whole wall has these little 'cells' of powerbox + lines to the lasers:


Each cell has to have some accumulators that can power the lasers long enough for the transformers to kick in. Because the AI is modded and keeps trying to attack in different places the accumulators are constantly busy. It is a really interesting and almost scary sight.
Yeah your right, but it would be probably performance wise better to just limit the energy which can be transfered per pole.

Like smal one 1mw, medium 100mw, big 1gw. Thats something what was since i saw factorio in my mind. But i dont know if its possible.

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Unfortunately it isn't, everything connected by copper wire is treated as a single circuit that cannot be throttled. So the game cannot tell the difference between a circuit made out of different poles.

Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Ratzap »

I pushed on and got circuit networks plus electrical distribution 1 unlocked but it's impossible to continue. I went to hook up resource patches and realised that since there was no platform area close, I couldn't get power in.

The power box and transformer would need to be marked as exempt from the platform rule in order for this mod to work with platforms. I suspect the platforms author would need to to that so I'll crosspost in his thread.

TK_Neg
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Apr 30, 2017 6:04 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by TK_Neg »

Multiplayer desync and failure to reconnect after six attempts. Happened immediately when I connected a red wire from a big pole to a transformer.

The mods in use: https://u.nya.is/lvaavd.zip
The desync report(contains maps): https://u.nya.is/cydakk.zip

Hope this helps!

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Ratzap wrote:The power box and transformer would need to be marked as exempt from the platform rule in order for this mod to work with platforms. I suspect the platforms author would need to to that so I'll crosspost in his thread.
Yes, I will have to pass on the bucket from me to that mod for that. I cannot really make the mod compatible at all costs. I have been trying to get it to play nice with the Rampant mod already!

Keep in mind you can use piped steam to power everything... even in my own soon-to-be megabase I am piping lots of steam instead of generating everything locally.
TK_Neg wrote:Multiplayer desync and failure to reconnect after six attempts. Happened immediately when I connected a red wire from a big pole to a transformer.

The mods in use: https://u.nya.is/lvaavd.zip
The desync report(contains maps): https://u.nya.is/cydakk.zip

Hope this helps!
That's pretty unfortunate... I will have to see what I can do about this, if anything. I am not sure how to even debug this. I will look into this though I'm not sure how.

I am also working on a new update, which makes it harder to debug an older version. The update should fix a massive framedrop that I haphazardly introduced when trying to accommodate the Rampant mod - apparently I accidentally am updating the power networks when it is not needed. I should update the mod quite soon.

User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by db48x »

Jeroen D Stout wrote: I am also working on a new update, which makes it harder to debug an older version. The update should fix a massive framedrop that I haphazardly introduced when trying to accommodate the Rampant mod - apparently I accidentally am updating the power networks when it is not needed. I should update the mod quite soon.
Awesome! When we tried to play our map yesterday, we found that I was the only one who could maintain 60 UPS. Even on my computer High Voltage is using 12-13ms out of the 16ms frame budget.

Also there's apparently a problem with substations, though I haven't yet tried them myself.

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

High Voltage 0.0.6
  • Small poles get a small distance penalty, medium poles a bonus. This means medium poles now convey over 1.5× the distance, small poles .75×. This was always intended behaviour but accidentally was switched off.
  • Substations should work but instead of the regular 30 distance they need 20 distance or less. They have the same quality as medium poles.
  • High voltage connexions are now slightly more noisy. Building some accumulators to get 100% energy at all times is essential.
  • Transformers no longer store energy. They should also no longer appear in the electric energy network.
  • Fixed a bug which updated every high power pole every tick, wasting speed.
Here is the new power distance in effect:

Image

I also have an idea to update the connexion through high voltage less often which should make the tick cost even less.

If anybody has some interesting ideas for features, I would love to hear!
db48x wrote:I discovered that the 30-tile range is not from the furthest power pole to the distribution box, but from the furthest pole to any pole within the distribution box's power range; that got us a few extra tiles in a few cases (I suppose it could also be a bug)
I think that is a bug, if I am understanding it correctly. Even the inmost poles should get their distance based on their distance to the powerbox?

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Neemys »

I'm Building Platform mod author and just so people that use High Voltage know, I've made a compatibility config in my mod with High Voltage. It will be live on mod portal in the next release (1.1.9) in a couple of days but impatient people that play single player can grab the code on my git repo : here. By default, the transformer and power box are not restricted anymore. The config, when unticked will block the Transformer and the power box to be placed outside platform.

And I remember everyone, if you need a compatibility with platforms and another mod, just ask in my thread



@Jeroen D Stout

Even if I try to keep compatibility script up to date in my mod I can't check every day for new or edited entity in all mod. If you add a new entity or rename old one, send me a mp and I will update the compatibility script in my mod ASAP ;)

Interesting mod by the way, I migth add it on my next modded game.
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

Jeroen D Stout
Inserter
Inserter
Posts: 33
Joined: Fri May 05, 2017 2:09 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Jeroen D Stout »

Version 0.0.7:
  • Transformers store a tiny amount of energy to prevent the GUI from glitching (but they can never release it).
Stupid hotfix on my end, somehow storing 0J inside an accumulator made the GUI a bit glitchy.
Neemys wrote:Even if I try to keep compatibility script up to date in my mod I can't check every day for new or edited entity in all mod. If you add a new entity or rename old one, send me a mp and I will update the compatibility script in my mod ASAP ;)

Interesting mod by the way, I migth add it on my next modded game.
Thank you for checking in and so rapidly updating! Very nice work on your own mod, too. I will (hopefully) send a PM if I do add another entity that should be exempt.

If you do try it, do let me know what you think!

TK_Neg
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Apr 30, 2017 6:04 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.7 : Energy over distance

Post by TK_Neg »

Looks like I'll need to try updating my server and seeing if that fixes the desync problem. I didn't realize I was running an older version at the time - it was current when it started :)

Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD][WIP .15] High Voltage 0.0.5 : Energy over distance

Post by Ratzap »

Jeroen D Stout wrote:Version 0.0.7:
Thank you for checking in and so rapidly updating! Very nice work on your own mod, too. I will (hopefully) send a PM if I do add another entity that should be exempt.

If you do try it, do let me know what you think!
I updated my save and set up some networks to mine resources. The buildings place correctly away from platforms but the transformers all show a red disconnection arrow blinking on and off on the right hand side while working. It's running a dozen miners so ~300kw constant draw if that. There's plenty of power available but I don't have tech for accumulators so I can't try putting local storage in.

Post Reply

Return to “Mods”