[MOD 0.16.x] Storage Energistics

Topics and discussion about specific mods
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

[MOD 0.16.x] Storage Energistics

Post by Nividica »

Image
About
Storage Energistics(SE) is an upcoming mod that adds new item storage and transportation mechanics which utilize the circuit network as a delivery medium.
  • Items are moved directly between connected nodes(chests), expending power in the process. Transportation is not limited by distance, however larger distances require increasing power.
  • Network Power requires conditioning and is not pulled directly from the electricity grid. Energy buffers must be placed and connected to the circuit network to provide the required power.
  • Item transfers are coordinated and controlled by a Network Controller. A minimum of one controller is required per network. Additional controllers provide no inherit benefits but can be used to share power between distinct networks.
  • Devices can be connected to both a red and green network. This allows that device to share its contents with, or request items from, either network.
  • Items can be provided to, or requested from, the logistics network via purpose-made chests.
Detailed information can be found on the Wiki

Items
ImageImageImage

Entities
ImageImageImageImageImageImageImage
Mod Portal
https://mods.factorio.com/mod/storage_energistics
Example Setups
Basic Network
FAQ
  • Is this intended to be a bot network replacement?
    Not exactly, while it can largely replace the logistics network, it can not fully replace it, and is designed to work with it.
  • How can I see all the items in the network?
    The easiest way is to press N(default) to open the overview window. You can also mouse over a power pole that is carrying the network to see the signal counts.
  • Where did the name come from?
    The name is inspired from a minecraft mod I used to work closely with, Applied Energistics, (shameless plug) as I am also the author of Thaumic Energistics
History
Versions
Beta Notes
I am looking for some user feedback! What do you think of the mod? Like/Dislike how it looks or functions? Think the power requirements make the mod OP or unusable? Leave a comment below and let me know!
Last edited by Nividica on Mon Jun 25, 2018 4:17 am, edited 1 time in total.
silentz0r
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 23, 2018 4:32 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by silentz0r »

Hey, this looks awesome, can i use it along side bob's/angel's?
Attal
Inserter
Inserter
Posts: 23
Joined: Fri Dec 23, 2016 9:49 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Attal »

Hi Nividica!

very nice job!

I've tryed it a bit ypur mod:
+ Great new idea with transportation
+ In can easily replace bots!
+ In can replace rails when you set ~zero energy consumption
+ configurable power consumption can be changed to infinite research "Low energy transportation"
+ what about game performance?
+ A bit strange decision to use accumulator for energy:
with solar+accu energy setup it charges only when solar panels are active (and don't when accumulators supply factory)
Image
thaelina
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed May 30, 2018 11:02 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by thaelina »

The wiki states for network interface chests that "If an item is added to the chest which does not match any filter, or causes the amount stored to exceed the request amount, that item is pushed to the network."
However in the attached setup, the interface chest only has 400 iron plates as a filter but the other items in the chest aren't being pushed to connected chests.

EDIT: After a little experiementing and turning off all the other mods, Im pretty sure it has to do with the stack sizes. It doesn't appear to play nice with larger stack sizes. Also on that same note, the filters don;t take into account much larger stack sizes.
Attachments
factorio_2018-06-24_18-06-01.jpg
factorio_2018-06-24_18-06-01.jpg (2.35 MiB) Viewed 8370 times
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by eradicator »

Hah, more former minecraft modders turning to factorio. Thy be welcome! (Though i have do admit i think i never got around playing with thaumic logistics even though i had it in my custom pack, shame on me.) And to be honest i never expected anyone do actually port AE to factorio, though it has been suggested a few times. Mostly performance concerns from my side.

Here's some stuff i noticed after fiddling for 10 mins (mod portal version 0.9.0):
  • Naming and color scheme is inverted compared to base factorio, "Provider Interface" has "Energistic Requests" GUI. (Probably due to minecraft naming being inverted?)
  • Energy Buffer does not charge when a (default configured) electric-energy-interface is on the same network.
  • Constant blinking of "not in logistic range" icon when not near roboports for provider/requester. (there might be a prototype flag against this...)
  • Can't dupe items with constant combinators, my hopes are shattered ;(.
Wanted to do some perf testing but your event handling breaks when trying to insta-revive ghosts. Build a blueprint after using the following:

Code: Select all

/c
 script.on_event(defines.events.on_built_entity,function(e)
  if e.created_entity.ghost_name then
   local _
   _,e.created_entity = e.created_entity.revive()
   script.raise_event(defines.events.on_built_entity,e) --[[will error "Player attempted to open unregistered entity" when not raising, as expected]]
   end
  end)
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

Attal wrote:Hi Nividica!

very nice job!

I've tryed it a bit ypur mod:
+ Great new idea with transportation
+ In can easily replace bots!
+ In can replace rails when you set ~zero energy consumption
+ configurable power consumption can be changed to infinite research "Low energy transportation"
+ what about game performance?
+ A bit strange decision to use accumulator for energy:
with solar+accu energy setup it charges only when solar panels are active (and don't when accumulators supply factory)
Image
Glad you enjoyed it!
I needed to go with the accumulator as the base entity so that I knew exactly how much power I had before attempting an item transfer. This allows me to attenuate amount sent based on momentary power amounts
  • Push 100 Iron Plates
  • Find next target
  • Calculate max power requirements ((100 * power-per-item) + (distance * power-per-chunk))
  • Does network have enough power?
  • No, only enough for 50 plates, reduce send count
  • Push 50 plates
  • Chest only accepted 30
  • Add (30 * power-per-item) + (distance * power-per-chunk)
  • Find next target
Without knowing the max amount of power I can work with, I would have to either attempt to draw the max power required, and put power back if not all can be transfered; push all items per chest that will fit, take what power I can, and extract the items there wasn't enough power for; or transfer the items in small stack while drawing the required power.

I will be working on performance tuning and streaming, so I may find a better way to draw power from the grid (likely via the controller)
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

thaelina wrote:The wiki states for network interface chests that "If an item is added to the chest which does not match any filter, or causes the amount stored to exceed the request amount, that item is pushed to the network."
However in the attached setup, the interface chest only has 400 iron plates as a filter but the other items in the chest aren't being pushed to connected chests.

EDIT: After a little experiementing and turning off all the other mods, Im pretty sure it has to do with the stack sizes. It doesn't appear to play nice with larger stack sizes. Also on that same note, the filters don;t take into account much larger stack sizes.
I have not experimented with various stack sizes, but I suspect that the issue is I load the stack sizes during boot and cache them. I will see if caching the stack size only on the first network transfer helps, or if asking for the stack size every time doesn't hurt UPS.
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

eradicator wrote:Hah, more former minecraft modders turning to factorio. Thy be welcome! (Though i have do admit i think i never got around playing with thaumic logistics even though i had it in my custom pack, shame on me.) And to be honest i never expected anyone do actually port AE to factorio, though it has been suggested a few times. Mostly performance concerns from my side.

Here's some stuff i noticed after fiddling for 10 mins (mod portal version 0.9.0):
  • Naming and color scheme is inverted compared to base factorio, "Provider Interface" has "Energistic Requests" GUI. (Probably due to minecraft naming being inverted?)
  • Energy Buffer does not charge when a (default configured) electric-energy-interface is on the same network.
  • Constant blinking of "not in logistic range" icon when not near roboports for provider/requester. (there might be a prototype flag against this...)
  • Can't dupe items with constant combinators, my hopes are shattered ;(.
Wanted to do some perf testing but your event handling breaks when trying to insta-revive ghosts. Build a blueprint after using the following:

Code: Select all

/c
 script.on_event(defines.events.on_built_entity,function(e)
  if e.created_entity.ghost_name then
   local _
   _,e.created_entity = e.created_entity.revive()
   script.raise_event(defines.events.on_built_entity,e) --[[will error "Player attempted to open unregistered entity" when not raising, as expected]]
   end
  end)
Hehe thanks for the welcome! I've decided to pass on minecraft modding to a fresh set of devs, and do some factorio modding on the side.

I decided to name the provider and requester chests after their logistics counterpart, as those two chests are designed to interact with the logistics network.
Does the storage and network interface(green) chests complain about not being in range of a bot net? Only the provider and requester chests should.
The energy buffer still needs some work, and may be replaced entirely if I can find a way around it.
And I have no idea about the script, I will have to dig into what ghost entites do/dont
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

silentz0r wrote:Hey, this looks awesome, can i use it along side bob's/angel's?
No idea to be quite honest. I have not performed any compatibility testing with other mods.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by eradicator »

Nividica wrote: I decided to name the provider and requester chests after their logistics counterpart, as those two chests are designed to interact with the logistics network.
Does the storage and network interface(green) chests complain about not being in range of a bot net? Only the provider and requester chests should.
The energy buffer still needs some work, and may be replaced entirely if I can find a way around it.
And I have no idea about the script, I will have to dig into what ghost entites do/dont
1) The GUI title does not match the chest name is what i meant.
2) Yes, only those two. BlinkBlink to insanity :P
3) Around might be difficult.
4) For the most part they "don't", they're just placeholders that wait to be revived. The problem is that if i revive them in script instead of building them with robots/hands then on_built_entity is not raised and the chests aren't registered. So i tried to work around that by raising the event manually. (Reason: I wanted to spam a few hundret chests to see how the performance is)
Last edited by eradicator on Wed Jun 27, 2018 2:01 am, edited 1 time in total.
User avatar
account_on_factorio
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Jun 27, 2018 12:29 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by account_on_factorio »

Hi out there,
I made some test with this very interesting mod

scenario: distance about 6000 ( blocks, meters , coordinates ) connected by red wire using mod:distance plus>transmission pole(s)
an RED wires
sending from vanilla logistics to 25 x high.cap.storage chests using
storage.network.interface > distance 6000 > storage.chest
factorio 16.27 , amd ryzen 6core , allways 60 FPS/UPS
my results so far:
- my "system" transferes about 200 Items / sec (netwoks ticks are set to 1)
- on sender side, i have to use 10 energy.buffers to fulfill power requirements
- if manually fill network.interface.chest ( ctrl_left click) with 1.6k items, the transfer stops , stuck
all enegy.buffers are full
reducing to 1000k items, all of them where transfered

I know that the mod is in an "early stage" , so i may help for improvements

what i missed so far
- a message like "running out of power"
- any tool to see, what is stored in high.cap.storage chests ONLY
for example : an device which reads the content of energistic storage , and with a filter you see the amount
I use smart.display.redux for displaying information
- a very high, very expensive big storage chest-house fo 100 k Items , needed for build rockets in reasonable time
- a possibility to move all the contens of the storage chests , like storage.cells of applied.energistice in MINECRAFT
if you delete a storage chest, the content is saved "somewhow-somewhere" , and if you re-place on different location,
the contens will be there
( is is done by the factorissomo2 mod, so it's possible)

the mod has a great use for me, to build a central store, and the base and sub-bases have access, instead of using multible trains
or a ton of roboports and bots to deliver requested items , because they are to slow ( on huge distances)

and, last but not least
where will be the main discussion
here : factorio forum
or:mod discussion :https://mods.factorio.com/mod/storage_e ... discussion
both needs a differnt account

:arrow: keep on coding, :roll: greetings from munich
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

eradicator wrote:
Nividica wrote: I decided to name the provider and requester chests after their logistics counterpart, as those two chests are designed to interact with the logistics network.
Does the storage and network interface(green) chests complain about not being in range of a bot net? Only the provider and requester chests should.
The energy buffer still needs some work, and may be replaced entirely if I can find a way around it.
And I have no idea about the script, I will have to dig into what ghost entites do/dont
1) The GUI title does not match the chest name is what i meant.
2) Yes, only those two. BlinkBlink to insanity :P
3) Around might be difficult.
4) For the most part they "don't", they're just placeholders that wait to be revived. The problem is that if i revive them in script instead of building them with robots/hands then on_built_entity is not raised and the chests aren't registered. So i tried to work around that by raising the event manually. (Reason: I wanted to spam a few hundret chests to see how the performance is)
I updated the chest names to better reflect their function.
I ended up going with a hidden entity + buffer to deal with power.
I think I know how to fix the script thing, found some new events related to scripting.
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

Howdy!
account_on_factorio wrote:if manually fill network.interface.chest ( ctrl_left click) with 1.6k items, the transfer stops , stuck
I took a closer look at how partial requests(not enough power for everything) were being handled and realized that it could not do it. This should be fixed in the next version.
account_on_factorio wrote:a message like "running out of power"
Agreed
account_on_factorio wrote:and with a filter you see the amount
I can look into adding filters to the network overview window
account_on_factorio wrote:a possibility to move all the contens of the storage chests , like storage.cells of applied.energistice in MINECRAFT
I have had zero luck figuring out how to do this, however to hear another mod has done it gives me hope.
account_on_factorio wrote:where will be the main discussion
I prefer here
account_on_factorio wrote:(netwoks ticks are set to 1)...allways 60 FPS/UPS
Wow. I am impressed, that is quite a bit of work to do every tick.
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

eradicator wrote: Wanted to do some perf testing but your event handling breaks when trying to insta-revive ghosts. Build a blueprint after using the following:

Code: Select all

/c
 script.on_event(defines.events.on_built_entity,function(e)
  if e.created_entity.ghost_name then
   local _
   _,e.created_entity = e.created_entity.revive()
   script.raise_event(defines.events.on_built_entity,e) --[[will error "Player attempted to open unregistered entity" when not raising, as expected]]
   end
  end)
I was able to insta-built blueprints(and any other ghost entity) with the following:

Code: Select all

/c
 script.on_event(defines.events.on_built_entity,function(e)
  if e.created_entity.type == "entity-ghost" then
   local _
   _,e.created_entity = e.created_entity.revive()
   script.raise_event(defines.events.on_built_entity,e)
   end
  end)
I had issue with the script you provided, as it always complained that the entity was not a ghost, even when it was a plopped blueprint.
I got this one to work, so long as you don't try to build a ghost entity on top of the player.

Had no issues with interacting with the chests once insta-built. However it has revealed to me that request filters do not survive being blueprinted.
User avatar
account_on_factorio
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Jun 27, 2018 12:29 am
Contact:

Re: [MOD 0.16.x] Storage Energistics testing

Post by account_on_factorio »

to make it more understandable
some pics:
Image
:?: no pic in preview

so they are there :
send : https://imgur.com/6q39qyJ
receive : https://imgur.com/JdQsDxh
map: https://imgur.com/YUFzbD5


- if i try to put more items in interface.chests, ore use more interface chests , the transfer stucks,
if reduce to < 1000 ( maybe <1024 ) transfer is about 300 / sec

regards
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by eradicator »

Hrrnnnngg. Took me way to long a look at that to realize what's wrong with mine (@ghost.name). Recursiveness always strikes from inside ^^. So the bug was in my script all along :P.

Also found something else: My test setup is just a single interface+storage chest. If the interface is filled up completely while the energy buffer is empty it doesn't restart transport even when energy becomes available again.

My test setup still won't work though, only one storage chests is ever used. Here's the blueprint (repeated about 100 times):
Blueprint
notransport.jpg
notransport.jpg (130.15 KiB) Viewed 8192 times
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

Version 0.9.1 released with the following changes:
Bugfixes:
- Energy buffers can now charge from accumulators.
- Fixed opening equipment grid caused a crash.
- Restored partial transfer support. If network does not have power to transfer full request, request is reduced until power requirements met.
- Network overview is now closed when hitting escape. Thanks for the tip npo6ka!
Changes:
- Changed provider and requester chest names for clarity.
- Chunk distance calculation now include a check for neighbor chunks. If chunk is neighbor, no additional power is required.
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by Nividica »

eradicator wrote:Also found something else: My test setup is just a single interface+storage chest. If the interface is filled up completely while the energy buffer is empty it doesn't restart transport even when energy becomes available again.

My test setup still won't work though, only one storage chests is ever used. Here's the blueprint (repeated about 100 times):
The partial transfers were not functioning as I intended; If you did not have enough power, the request chain was abandoned. Fixed that in the update.
I played around with your blueprint, and had quite a bit of fun setting up various tests.
My average UPS was 59.0 with this running, along side the rest of my world/map/factory,
Nividica
Inserter
Inserter
Posts: 25
Joined: Wed Mar 23, 2016 2:55 pm
Contact:

Re: [MOD 0.16.x] Storage Energistics testing

Post by Nividica »

account_on_factorio wrote: - if i try to put more items in interface.chests, ore use more interface chests , the transfer stucks,
if reduce to < 1000 ( maybe <1024 ) transfer is about 300 / sec
Partial transfers are restored with the update, let me know if it still completely hangs.
User avatar
account_on_factorio
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Jun 27, 2018 12:29 am
Contact:

Re: [MOD 0.16.x] Storage Energistics

Post by account_on_factorio »

B I N G O

as you see on pic, I can feed now 400 Items per sec, they are transferred
Manually fill the interface.chests (ctrl-left) , all of them are transferred in instantly

https://imgur.com/gallery/wCCSgan

ther was some interesting thing happened:
due to see the difference, I saved the game, switched to .9.1 , reload the game ,
and the FPS/UPS dropped to 20 , saved, reloaded, 20
saved, reloaded , back on 60

overall , at least 200% improvement in transfer speed ,

what I still wish to have:
some chest, connected to vanilla AND energistic storage, which pulls ONLY from energistics storage and do NOT need connection
to vanilla logistics
why: lets asume, you need some items far far away ( >10.000 coords) from your vanilla logistics, but you are connected
to energistic "store" via red/green wire , you are able to request or send (somewhow) some items ( resources, belts, machines etc)

I always have a seperate BACKUP power line with red-wires to every important point on the map, because the funny biters sometime
eat up the main power line

by the way: the most UNLOGIC thing in factorio is: you can transfer tons of gigawatt on a single cupper wire without burning it down

:mrgreen: keep on coding ,
regards from munich
Post Reply

Return to “Mods”