Fill4Me

by kovus
Fill4Me will automatically insert fuel and/or ammunition from your main inventory into entities when you place them. It is mod-agnostic and will learn about items & entities in other mods. It is an alternative to the Autofill mod.
a month ago
0.16 - 0.17
52275
Owner: kovus
Source: N/A
Homepage: https://gitlab.com/FishBus/Fill4Me
License: BSD-3-Clause
Created: 1 year, 3 months ago
Latest Version: 0.7.1 (a month ago)
Factorio version: 0.16 - 0.17
Downloaded: 52275 times

Fill4Me

Fill4Me will automatically insert fuel and/or ammunition from your main inventory into entities when you place them. It is a replacement for AutoFill. It will attempt to put the best quality ammunition or fuel you have in your inventory into the entity, with certain limits on quantities.

Fill4Me is ready to work with other mods, and automatically determines at load time what the best ammunition & fuels are for entities. It will re-evaluate these decisions when new mods are loaded or mods are unloaded, ensuring that you put the best ammunition or fuels you have on-hand into your entities, including custom fuels and ammunition. Entities which have multiple ammunition types will have some of each type loaded into them.

Just in case you missed that: Fill4Me will work with any ammunition or fuel that can be inserted into any entity from any mod, and will accommodate mod changes between save/load.

New commands

Fill4Me does not have much of a GUI at current, as there's not much of a need for one. There is a tool button (top-left) which enable/disables Fill4Me at current.

  • /f4m.toggle - Enable/Disabled Fill4Me.
  • /f4m.max_percent - Sets the maximum percent of an on-hand resource to place into an entity. (Default 12%)

Known issues

Fill4Me is unable (due to a lack of data in Factorio) to properly prioritize ammunition which utilize smoke or cloud-style effects, such a poison clouds, acid clouds, etc. In these cases it attempts to evaluate them via a secondary method, but it is just guessing.

Updates

  • 0.5.0 Add ability to set (via mod settings) maximum ammo/fuel values that will be autofilled. This is of interest for fuel, since it means you can tell it to no longer use fuels with a value over 100 million (Rocket fuel is 100mil) and stop inserting nuclear fuel and uranium fuel cells into entities.
  • 0.4.4 Added mod setting to hide the enable/disable button.
  • 0.4.3 Grabbed Martin's small change to make this work on 0.17.
  • 0.4.2 Attempt to work around issue found when using bobsmods where a created_entity may be invalid.
  • 0.4.1 Fix Fill4Me's event changes to work when configuration changes (eg, load from save with updated version of mod).
  • 0.4.0 Prevent Fill4Me from accidentally causing an insert into a vehicle to overflow into the vehicle's trunk. Make Fill4Me's interaction with script_raised_built events from other mods happen on a tick later, to let the other mod do it's potential work on that entity. Fixes & works around an issue with the Vehicle Wagon mod.
  • 0.3.0 Fix issue when handling prototypes that define an ammotype, but no action.
  • 0.2.0 Adds support for script_raised_built events where created_entity & player_index are defined (just like regular on_built_entity events). This can resolve issues where other mods are replacing the entity being built at the time of construction (provided they raise the appropriate event).