Auto-Quality Logistics


Converts quality of items based on configured logistic section filters. Read the description for usage.

Tweaks
2 months ago
2.0
148
Logistic network Cheats
Owner:
silverd_
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
2 months ago
Latest Version:
0.7.1 (2 months ago)
Factorio version:
2.0
Downloaded by:
148 users

I'm Not Like Other Mods

Use Case

There are many mods out there that upgrade or set qualities. None were to my complete satisfaction, and, mayhaps, that is true for you as well. This mod is most definitely a cheat, but it still attempts to have a semblance of progression to it.
The general purpose of this mod is when you don't particularly want everything to be quality, but want to just immediately have a limited subset of items of a specific (or, depending on settings, currently unlocked) quality tier.
It is for when you don't want to deal with, or, even to have, quality mechanics in general - but want, for example, only to craft personal quality Weapons/Vehicles, or just to have quality Asteroid Collectors - but without the requirement of quality ingredients, nor deal with any probabilities/item feeding through third-party entities just for those few cases.
For when you don't want your entire Space Platform Hub to have quality stuff, but only to have it instantly convert just its inserted Ammo to a quality tier so it can be used with your space guns.
If this sounds like something you want, this mod is for you!

Highlights

  • Converts specific items inside any entity (including Ammo/Weapon slots) that has a Logistic Request section. Including Buffer/Requester Chests, Space Platform Hubs, Cargo Landing Pads, Vehicles (Spidertrons!), etc.
  • Converts qualities of Hand-crafted items, but only configured, specific Hand-Crafted Items. See the How To Use/Crafting section for details how to configure the logistics for the mod.
  • Conversions are direct, with no probabilities, and no fuzzy logic behind any quality-tier nonsense. It only does exactly what you tell it to.
    Do you want your Spidertron to convert all normal Rockets to rare Rockets? Sure. Or do you want a logistic container to reset your quality Bullets back to normal? Absolutely.
  • Doesn't sneakily add any hidden surfaces, no new entities, no weird hidden combinators. Just works directly with anything and everything that has Logistic Requests.
    (This for sure has some painfully obvious downsides compared to other lovingly-made mods, but more on that later).
  • Hides Quality Modules (but not Quality-unlocking technologies, unless configured to), disables all quality-related module effects, all relevant recipes, and removes unattainable achievements based on configured Mod Settings: read on.
  • Converts specific items to either the specified quality, or to the highest currently unlocked quality when configured for a higher quality than what is currently unlocked.
    This makes it possible to pre-configure higher qualities, and the items will get upgraded once respective technologies are unlocked.
  • Settings to limit available Quality Technologies, unlock Qualities, and to enable Personal Logistic Requests so you can start crafting your quality weapons - or those electric poles right away.
    By default, Personal Logistic Requests are enabled. AQL can't convert qualities without Logistic Request sections, so even though Uncommon/Rare qualities are unlocked by AQL, when this setting is disabled, it will not be possible for AQL to upgrade items until either this is turned on, or the Robotic Logistics technology is researched by natural means (hence, progression!). Vehicle and Container logistics must first be researched separately in order for AQL to start converting qualities autonomously. Epic and Legendary qualities must be researched separately in order to be used as well, unless Unlock all qualities setting is enabled. It is also possible to make all qualities (except for Uncommon/Rare) to be outright unavailable, to prevent temptations for godlike powers.

How To Use

The Mod looks for Logistic Request Sections that have names starting exactly with "AQL" (color formats and picture labels are supported, but they must not have spaces between them).
Once an AQL-Section is set to an entity, the section can be configured using the item filters. AQL-Section filters must have their Minimum set to "0", a set Quality, and a Quality Comparator of "=". All of these are enforced. The filter's Quality is what determines the quality that the matching item will be converted to have.
If no quality is set to an item filter, that filter slot will do nothing. This also effectively only allows you to configure the filter's item, the quality that it will be converted to, and the maximum amount that the entity should have of that item's quality - to limit the conversion process, if needed.
The enforced Minimum value of "0" prevents AQL sections from requesting the specified items. The filters are used for converting matching item names, not for requesting quality items. Add other sections to the entity if you want it to request specific items.

Once some Item Filters are set to an AQL section and a matching item is inserted into the entity (inventory/weapons/ammo), it will get converted to the respective quality of that item's matching filter slot in the AQL section. If the filter slot has a higher configured quality than what you have unlocked, the item will get converted to the currently unlocked highest quality instead. Does not care about quality tiers when converting. A Rare item will get converted to Uncommon if the filter is set to Uncommon. Likewise, if a filter is set to Legendary and you only have Epic unlocked, the matching item will first get converted to Epic (from any other quality), and then again to Legendary once that is unlocked.
You can have multiple AQL sections per entity, but if there are identical items in them, there is no guarantee from which exact AQL section the item filter will get chosen.

AQL-Sections conversions can be disabled/enabled by toggling the AQL sections themselves. Turning off "Logistics" on the entity or disabling the entity via circuits does not stop AQL from converting items.
AQL can be globally toggled off/on by typing the /AQL command into the console. /AQL status prints out if it's enabled, along with some other basic stats. See /AQL help for debugging log outputs if something isn't working as you think it should (work on a Status GUI and a Shortcut Button is being considered).

It is important to note that Auto-Quality Logistics does not modify the default behavior of logistics. What it does is it removes matching item names from the entity, sets the quality of those items to those that are set in the AQL sections' filters, and puts them back into the entity. It does not do anything else, and does not function on individual inventories - but on the entity as a whole (just like CTRL-Click does). If an entity has an empty Ammo slot, and Ammo is in the trunk, then after converting, the game will put it into the Ammo slot if applicable. Or, if ammo slots are already full with other tiers, it will put the new quality version into the trunk instead. AQL does not bother to check where the item belongs in the entity and does not merge anything itself - it leaves that up to the game to save on API processing time.
Any side-effects of these limitations are due to the game's internal logic. It is up to you to find clever ways how to (ab)use it.

Example Usage

  • Convert Ammo to Quality & Keep: Make an AQL section (e.g., name it AQL-Tank) with the desired Ammo filter and set the filter's Quality to what you want that specific Ammo's quality to be convert to. Set the Maximum to "inf.". Then, when the matching Ammo is inserted, it will get converted to the filter's quality, and will be put back into the entity.
    Quality ammo will be merged into the ammo slot only if that quality ammo is already equipped, or if an ammo slot is empty.
    On logistic containers filtered Inserters can be used to make sure they only grab the desired quality versions of those items once they've been converted (there is a ~1 second delay before conversion takes place).
  • Convert Item & Passthrough: an AQL section with desired item filters and a Maximum set to "0". Will convert matching items to the specified qualities, which will then be immediately placed into the logistics trash to be picked up and distributed elsewhere by bots.
  • Convert & Keep Only a Few: an AQL section with desired items filter and a Maximum set to a specific value. Will convert matching items and stop once reached the specified amount. Will resume converting when the specified quality versions get removed by other means.
  • Request Normal & Convert to Quality: Add a Non-AQL section to request a Minimum amount of a normal item, and make an AQL section with that item filter set to a quality and a Maximum. This will request the Minimum amount of that normal item from the network, and AQL will convert those normal items until it has the specified Maximum of the quality.
  • These are just example usage of my limited knowledge of Logistics. I'm sure there are many other, and actally clever setups, you can come up with. And if you want something specific done, let me know, I'll see if I can add some functionality that you feel is missing!

Crafting & Character Logistics

AQL-Sections can be set to the player character. In this case, the AQL sections function a little bit differently. Instead of converting items that the character has in the inventory, it only converts items that are crafted by the character on-the-fly. This makes it safe to run around with a configured AQL section set to quality items, and to also pick those items up and put somewhere else without AQL interfering.
If you want to have a steady supply of quality Ammo but don't want to craft it constantly, convert it in a logistic container first, and then personal-request it with a Non-AQL section.
Spidertrons and other vehicles with AQL sections, for the purposes of AQL, function as normal logistic containers, converting all of the matching items inside of them.

Compatibility, Limitations, & Known Issues

Compatibility

  • AQL is incompatible with mods that remove quality. Kind of defeats the purpose.
  • There are mods out there that also upgrade qualities of hand-crafted items. While not a direct conflict, don't use both - it will be a mess. Meaning, if you like the other mods, don't make AQL crafting sections for your character. Simple.
  • Mods that add quality tiers were not tested. Even though I took care to not destroy any game data, and to parse through qualities to determine their progression order, I can't guarantee it will work for everything - especially for mods that add mid-tier qualities. I'm just not sure, let me know.
  • I am happy to report that I made AQL work with Spidertron Enhancements!, even when the Spidertron enters/exits a train with the character inside (yeah, it's a thing)!, all relevant data gets persevered and restored! (I like spiders, could you tell?)

Limitations & Known Issues

  • This mod was not conceived for factory-wide spread of quality. Do not use it if you want quality everything everywhere. The processing, while I took great care, still needs to periodically check logistic entities. Other mods use hidden Surfaces, Linked Chests, and Linked Belts (and rightfully so, for their use cases). This doesn't. While it's very fast and uses queues and caches, and likely is not even an issue, still try to be sparse with AQL sections. Use them in key logistic network intersections, for personal benefit, and for stuff that actually matters. Like Spidertrons. And anything and everything that they need.
  • Having a Constant Combinator with an AQL section connected to an entity does nothing. Not sure if it should, or if it's even worth checking for. Worse so, it can screw up a configured AQL section due to how limited the combinator's filtering is.
  • Like mentioned in the description, disabling an entity's Logistics checkbox, or through a circuit network, does not disable AQL functionality for the entity. Disable individual AQL sections instead, or globally with the /AQL command. I'm pretty sure it's better this way, anyway, as AQL conversions aren't exactly of a logistic type.
  • Please let me know in the Discussion sections any issues you run into, or what you think would be a good feature addition/change. This took a lot of sweat and days to release in a pre-1.0 state, so I'm more than happy to hear any criticisms. Negative, positive, whatever. Everything and anything helps to make my work better.
    And thank you so much for reading!

My Other Mods