[MOD 0.12.x] Force Fields - energy powered walls

Topics and discussion about specific mods
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by n9103 »

Can you change the priority of charge/discharge of the force fields and/or emitter within your script?
If so, then just have them adjust when the charge is depleted and reverse when it's filled.
(not sure exactly which priorities would result in desired behaviors however.)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Fatmice »

Rseding91 wrote: The recharging of the emitter is done by the hard-coded game logic - it's not something I can toggle on and off.
I'm not good with lua, but from scanning the control.lua, it seems the desired behavior could be obtained by taking a big chunk out of emitterTable["1"].energy into an intermediate variable and then do work on that.
Here some pseudocode:

if working_energy <= some_value && emitterTable["1"].energy == max_value {
working_energy = emitterTable["1"].energy / 2;
emitterTable["1"].energy= emitterTable["1"].energy - working_energy;
}

now subtract energy from work_energy to build wall sections/repair, etc.

some_value = minimum energy value needed to do initial build of any wall section which is 18 MJ.

Emitter charging mechanism is not touched and there should not be any pulse. This would mean if you build even a handful of these emitters, you better have accumulators >= the reserves of the emitters to prevent a nasty brown out.
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by YuokiTani »

sorry for this late entry - i hope it fits and is good enough.
if you need a other version or special gfx write me a message.

on/off variants and animation of variant 2.

ImageImage
ImageImage
Image

Damrus
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sat Aug 23, 2014 12:41 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Damrus »

those do look epic :O

The Lone Wolfling
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Tue Oct 28, 2014 3:33 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by The Lone Wolfling »

Hmm... Good mod thus far. A couple things:
  • There's a reproducible crash when shift-clicking an upgrade out of the upgrade slot ("control.lua:1226: Key caption has unknown type").
  • I keep getting a warning that "(player 1) has the GUI for this emitter open right now.". Only thing is, I'm in a single-player world. Perhaps disable the warning if it is the same person trying to open the GUI as the one that already has the GUI open?
  • Mining forcefield emitters doesn't seem to get back upgrades
  • Power usage spikes are, as people say, annoying.
    • Perhaps have an internal buffer (*not* the electric buffer) that draws power from the electric buffer every tick?
    • Perhaps just just set tick rate to 1 by default? (even with tick rate at 1 the performance is reasonable.)
    • Doing updates in a round-robin style (i.e. not all in the same tick every time) would mitigate it (i.e. if you have a tick rate of 20 and 10 emitters, 1 emitter will update every 2 ticks instead of all 10 every 20 ticks).
  • A copy/paste function (for range and width, adding/removing modules as necessary) would be awesome - either through the standard shift-click copy-paste (if that's possible) or though the emitter tool.
  • Ditto, being able to shift-click upgrades into (and out of, see above) the GUI slot on emitters.
  • Ditto, being able to control-click upgrades into emitters. (Like with modules)
  • What about updating the distance and range to the new maximum if you add a module of the respective type?
  • I would prefer if emitters were off by default, and you could turn them on and off. Currently constructing forcefield walls is wasteful of power and annoying to navigate until the initial walls decay.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Rseding91 »

The Lone Wolfling wrote:
  • There's a reproducible crash when shift-clicking an upgrade out of the upgrade slot ("control.lua:1226: Key caption has unknown type").
  • I keep getting a warning that "(player 1) has the GUI for this emitter open right now.". Only thing is, I'm in a single-player world. Perhaps disable the warning if it is the same person trying to open the GUI as the one that already has the GUI open?
  • Mining forcefield emitters doesn't seem to get back upgrades
Fixed all of those issues.
The Lone Wolfling wrote:
  • Power usage spikes are, as people say, annoying.
    • Perhaps have an internal buffer (*not* the electric buffer) that draws power from the electric buffer every tick?
    • Perhaps just just set tick rate to 1 by default? (even with tick rate at 1 the performance is reasonable.)
    • Doing updates in a round-robin style (i.e. not all in the same tick every time) would mitigate it (i.e. if you have a tick rate of 20 and 10 emitters, 1 emitter will update every 2 ticks instead of all 10 every 20 ticks).
It would be possible to use a internal buffer of energy but it wouldn't change the pulse of energy the emitters require to re-charge once that internal buffer ran out. Do people sit and stare at their power screen graphs or something? In all of my testing and use of the fields it felt no different than lasers that have huge bursts of energy draw and then go back down to idle.
The Lone Wolfling wrote:
  • A copy/paste function (for range and width, adding/removing modules as necessary) would be awesome - either through the standard shift-click copy-paste (if that's possible) or though the emitter tool.
It's not possible to do it through the standard game copy paste but I might be able to get something working in the tool GUI.
The Lone Wolfling wrote:
  • Ditto, being able to shift-click upgrades into (and out of, see above) the GUI slot on emitters.
  • Ditto, being able to control-click upgrades into emitters. (Like with modules)
Neither of those are currently possible (the "slots" on the GUI are just buttons with special visuals) but I could make the paste option in the config screen take the upgrades from your inventory if you had them. Also, that's what the "remove all upgrades" button is for.
The Lone Wolfling wrote:
  • What about updating the distance and range to the new maximum if you add a module of the respective type?
  • I would prefer if emitters were off by default, and you could turn them on and off. Currently constructing forcefield walls is wasteful of power and annoying to navigate until the initial walls decay.
[/list]
I could add both of those as options to the tool GUI.
If you want to get ahold of me I'm almost always on Discord.

vedrit
Filter Inserter
Filter Inserter
Posts: 292
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by vedrit »

I personally only find the power spiking mildly annoying. With my power set up (Which uses other mods) these spikes are actually useful in that they show me how much draw I can expect in the worst of terrible of bad circumstances. I just really want the off by default, on/off toggle.

The Lone Wolfling
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Tue Oct 28, 2014 3:33 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by The Lone Wolfling »

Rseding91 wrote: It would be possible to use a internal buffer of energy but it wouldn't change the pulse of energy the emitters require to re-charge once that internal buffer ran out. Do people sit and stare at their power screen graphs or something? In all of my testing and use of the fields it felt no different than lasers that have huge bursts of energy draw and then go back down to idle.
The frustration for me is mainly when initially placing them - if I try to place more than a few at once my power grid starts stuttering. Plenty of power output on average, but not enough peak output. As I said - round-robin updates would help with this. And it would help prevent stuttering, too.

The difference with these and lasers is that lasers don't cause stuttering. They will occasionally just flat-out kill the power grid if you don't have enough capacity, but they don't generally cause the lights to go out for 1 or 2 out of every 20 ticks.
Rseding91 wrote: It's not possible to do it through the standard game copy paste but I might be able to get something working in the tool GUI.
This would really help, if you can, thank you. Currently placing large walls gets... tedious.
Rseding91 wrote: Neither of those are currently possible (the "slots" on the GUI are just buttons with special visuals) but I could make the paste option in the config screen take the upgrades from your inventory if you had them.
The Lone Wolfling wrote:
  • What about updating the distance and range to the new maximum if you add a module of the respective type?
  • I would prefer if emitters were off by default, and you could turn them on and off. Currently constructing forcefield walls is wasteful of power and annoying to navigate until the initial walls decay.
I could add both of those as options to the tool GUI.
Ditto.

Nagshell
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Feb 25, 2015 1:53 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Nagshell »

I wanted to wall of with those walls, but I'd like to send train outside. I have to use normal gate for that? Any suggestions are welcome. ("Force gates would be awesome :P")

vedrit
Filter Inserter
Filter Inserter
Posts: 292
Joined: Sun Aug 03, 2014 2:25 am
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by vedrit »

Nagshell wrote:I wanted to wall of with those walls, but I'd like to send train outside. I have to use normal gate for that? Any suggestions are welcome. ("Force gates would be awesome :P")
Yes, you would have to use a regular gate

Schlubberwuz
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Jun 24, 2014 8:53 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Schlubberwuz »

is there any sequel for v12 anywhere?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Rseding91 »

Schlubberwuz wrote:is there any sequel for v12 anywhere?
I'll update it tonight :) Just been lazy.
If you want to get ahold of me I'm almost always on Discord.

Schlubberwuz
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Jun 24, 2014 8:53 pm
Contact:

Re: [MOD 0.11.x] Force Fields - energy powered walls

Post by Schlubberwuz »

Rseding91 wrote:
Schlubberwuz wrote:is there any sequel for v12 anywhere?
I'll update it tonight :) Just been lazy.

YES, you make me so happy :) thank you

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by Rseding91 »

Updated for 0.12.

There where a *lot* of changes I did in this update so there's a good chance I broke something. Let me know if you come across any bugs/errors :)


Also a fair warning to anyone using it in 0.12: it *will not* accept energy from other accumulators so you need to power them with steam engines or solar panels. This was a change in 0.12 and nothing I can fix right now. I'm looking at other ways to make the force fields accept power but right now you'll need to hook them up to steam engines/solar panels. Maybe consider it an extra challenge to use them or something.. I dunno :)
If you want to get ahold of me I'm almost always on Discord.

Schlubberwuz
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Jun 24, 2014 8:53 pm
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by Schlubberwuz »

thank you :D

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by orzelek »

You managed to get them charged form steam engines?

I tried that with compressed chests and only thing that can charge them are solar panels.
In my tests steam engines would not charge accumulators - even vanilla ones.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by Rseding91 »

orzelek wrote:You managed to get them charged form steam engines?

I tried that with compressed chests and only thing that can charge them are solar panels.
In my tests steam engines would not charge accumulators - even vanilla ones.
Are you using modded steam engines or base game ones?
If you want to get ahold of me I'm almost always on Discord.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by orzelek »

Rseding91 wrote:
orzelek wrote:You managed to get them charged form steam engines?

I tried that with compressed chests and only thing that can charge them are solar panels.
In my tests steam engines would not charge accumulators - even vanilla ones.
Are you using modded steam engines or base game ones?
First time I had DyTech running so it might have been a modded one.
Second test was with bob's mods steam engines - I didn't investigate a lot with those.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by Rseding91 »

orzelek wrote:First time I had DyTech running so it might have been a modded one.
Second test was with bob's mods steam engines - I didn't investigate a lot with those.
Most likely you where using steam engines that had modified usage priorities which would cause the behavior you're describing. If you use the base game steam engines they should work fine (or modded ones that don't mess with the usage priority).
If you want to get ahold of me I'm almost always on Discord.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x] Force Fields - energy powered walls

Post by orzelek »

Rseding91 wrote:
orzelek wrote:First time I had DyTech running so it might have been a modded one.
Second test was with bob's mods steam engines - I didn't investigate a lot with those.
Most likely you where using steam engines that had modified usage priorities which would cause the behavior you're describing. If you use the base game steam engines they should work fine (or modded ones that don't mess with the usage priority).
From my checking it seems that at least bob's mods steam engines are secondary priority same as base ones.
From what I remember DyTech removed others also so his should also be secondary.

I'll retest it when I have all the techs to build accumulators in my current game.

Post Reply

Return to “Mods”