Ammo Loader+


More than just a turret loader. Auto load everything from turrets to artillery wagons to furnaces and even the player themselves. Auto upgrade ammo and fuel without tedious manual replacement. Infinite range and compatible with Factorissimo2.

Content
23 days ago
0.14 - 2.0
25.1K
Logistics

i (Lots of effort) Use linked chest prototype to reduce ups demand

3 months ago
(updated 3 months ago)

First of all, I don't actually know much about coding, but from what I do know... This mod cycles between all possible entities that need ammo every tick and delivers it to them with super long inserters? That sounds like the best way before linked chests were a thing, but now they exist. Would it be possible to use invisible linked chests and inserters that cant be interacted with inside every turret instead? Of course this brings the issue of how do multiple ammo loaders work at once, and to that I respond with drumroll please... just make ammo loaders able to store only 1 type of ammo at once and all of the ammo loaders share a inventory identical to linked chests (they also cant be taken out of with inserters or loaders).

2 months ago

Hi there! Sorry I'm a little late, but thank you for using the mod!

This is actually an intriguing suggestion!

I have actually played around with various implementations of the mod using linked chests since they were added to the API, but there were several problems that stopped me from switching to them.

1.) The most UPS intensive part of this mod by far, surprisingly, is inventory checks. The invisible inserters are not managed at all by the LUA code (except pointing them in the right direction), and thus use factorio's native (and very optimized) implementation. Checking if a turret has a better provider available, checking if a chest can still provide the ammo the mod wants it to, etc, account for far more UPS usage.

2.) I found it difficult to use linked chests to mitigate these problems specifically, since most of the ways I tried still required me to check the turret and chest inventories to assign a provider to a consumer. Implementations using the linked chests used only marginally less UPS. Another reason for this fact has to do with #3:

3.) even with linked chests, there still has to be an entity that moves the ammo to the turrets. Because of the way factorio works, you can't link the turrets inventory directly to a linked chest. This means you either have to replace the turrets inventory programmatically (which is much more UPS intensive than the invisible inserters), or you have to have an inserter for each turret that reaches to the linked chest, essentially creating the same problem you had before.

Still, your suggestion has a lot of merit. If I allowed the mod to trust the user to set up and direct the chests to the entities they wanted filled, instead of doing it automatically, I could reduce the inventory checks significantly which would greatly reduce the UPS usage. It would just mean a little more set up for the user, and they would have to ensure their chest stay full rather than rely on The mod to automatically fall back to other ammo.

I wonder if this change would be well received though, since it means more management from the user? I may try and implement this and have it as an optional toggle for a while to see how it is received.

Thank you for your suggestion! It's giving me a lot to think about!

Let me know if you think of anything else, and I hope I can rely on you to play test this sort of implementation if I manage to make it happen!

a month ago

Update quickly!!Update quickly!!

a month ago

need this!~

a month ago

need this!~

a month ago

to yall responding on this telling the mod author to update quickly: porting a mod to 2.0 is a lot of work, and based on the pattern of recent updates to this mod, i would assume silentcrim has real life stuff going on that prevents them from working on their mods. i say we should let silentcrim take their time with updating and not stress them out too much

a month ago

to yall responding on this telling the mod author to update quickly: porting a mod to 2.0 is a lot of work, and based on the pattern of recent updates to this mod, i would assume silentcrim has real life stuff going on that prevents them from working on their mods. i say we should let silentcrim take their time with updating and not stress them out too much
We have time, space will not fly away XD

a month ago

Call author!!

a month ago

Ok guys, I just released version 2.0.1 as an initial attempt at a port to Factorio 2.0. The core mod mechanics seemed not to cause crashes during my playtesting, but I'm sure I have more work to do before the mod can be considered completely compatible.

I fully expect this release to be buggy/incomplete/not optimized. I did enough to get the mod working again, but Space Age is too expansive for me to playtest it completely. I'll need help from you guys to let me know of any incompatibilities/crashes you come across!

Lastly, the ammo upgrading feature seems to be broken still. I will try to get it working again in the next update. As of now, turrets will use up all ammo they have before switching to better ammo.

Let me know (in a separate thread) if you come across anything while playing!

a month ago

Ok guys, I just released version 2.0.1 as an initial attempt at a port to Factorio 2.0. The core mod mechanics seemed not to cause crashes during my playtesting, but I'm sure I have more work to do before the mod can be considered completely compatible.

I fully expect this release to be buggy/incomplete/not optimized. I did enough to get the mod working again, but Space Age is too expansive for me to playtest it completely. I'll need help from you guys to let me know of any incompatibilities/crashes you come across!

Lastly, the ammo upgrading feature seems to be broken still. I will try to get it working again in the next update. As of now, turrets will use up all ammo they have before switching to better ammo.

Let me know (in a separate thread) if you come across anything while playing!
OMG,tks!!!!!!

New response