Auto-Loader

by raley

Inspired by the ammo-loader+ mod. Adds a linked-chest that fills turrets with ammo and fuel-burners with fuel. Works with quality items, has shared storage per surface, and works in spaaaaace.

Content
3 days ago
2.1
19
Cheats
Owner:
raley
Source:
https://github.com/aarons/factorio-au...
Homepage:
N/A
License:
MIT
Created:
4 days ago
Latest Version:
1.1.0 (3 days ago)
Factorio version:
2.1
Downloaded by:
19 users

Auto-Loader Chest

This is an alternative version of the excellent Ammo-Loader+ mod. Place fuel and ammo in the chest and then turrets and fuel-burners (trains, furnaces, boilers, etc.) will automatically get refilled.

What's different?

The ammo-loader+ mod doesn't currently work with quality ammo and fuel. I looked at submitting a patch, but it required more work than expected to support. There have also been a lot of changes to the factorio API since the mod was first published (9+ !!!) years ago. It's still an amazing mod and works very well if you aren't using quality ammo/fuel or picky-dollies.

Features

This mod was written from scratch and utilizes Factorio's core functionality as a replacement for features that exist in ammo-loader+. So there are a few things that ammo-loader+ does that this mod does not: refunding ammo to chest, entity filters, and upgrading ammo to higher damage ones pro-actively.

On to the features:

Linked Chests

The auto-loader chest shares inventory with all other auto-loaders on a given surface.

This makes it trivial for the mod to determine where to pull ammo and fuel from. We don't need to scan multiple chests, avoid distance calculations, and don't need to make decisions about where to pull from when chests have different inventories.

Stack-Size Multipliers

Linked-chests can have stack-size multipliers, or slot-filters, but not both. Both would be beneficial for this mod. But in this case, stack-size multipliers won out since we only have the one linked-chest inventory on a given surface.

This allows for large inventory counts and no issues with high consumption scenarios (such as Rampant++, which I tested this on for about a hundred hours :D).

The slot count and stack size multiplier of the chest is configurable. The chest can have 10 slots that support 5 stacks of inventory in each slot... or 100 slots with 100k stacks per slot :D

Constrained Per-Surface

The chest only fills entities on the same surface. So chests on Nauvis will only fill entities on Nauvis.

This helps manage things like specialized fuels or ammo getting used only on the surface where they're needed. We don't have to provide a user interface or more complicated filtering mechanism by doing it this way.

You can place chests on space platforms.
If using a mod like factorissimo, just know that each building is it's own surface.

Combinator Support

The chests can be wired up to combinators to help manage the inventory.

Use this to help keep a certain amount stocked, or to quickly fill in a fallback ammo if the primary one is running out.

First in, First out

The chest uses the first matching slot or item that's valid for the consumer. So if you have multiple fuel types and ammos:
- for an empty turret, it will pick from the first ammo in the chest
- for a refill turret, it will try to refill the matching ammo. If not matching ammo exists it will wait until the turret runs out, then replace with the next ammo.

If you want to prioritize consumption of higher quality ammo for example, you would use combinators to load the chest with preferred types, and only add in lower tier ammo when the preffered type runs low.

Feedback

It's always great hearing from folks who enjoy a mod, or have suggestions/requests. Please feel free to reach out!