Quality Control

by raley

Assemblers and furnaces earn quality upgrades for the entire factory.

Content
8 days ago
2.0
618
Factorio: Space Age Icon Space Age Mod
Logistic network Manufacturing Cheats
Owner:
raley
Source:
https://github.com/aarons/factorio-qu...
Homepage:
https://github.com/aarons/factorio-qu...
License:
MIT
Created:
a month ago
Latest Version:
1.6.0 (8 days ago)
Factorio version:
2.0
Downloaded by:
618 users

This mod adds a chance for machines to upgrade in quality as they work. The harder they work, the more opportunities they get to change quality levels.

There are two primary modes that are selectable in settings:

Normal Difficulty - quality upgrades are earned through work and applied instantly.

Uncommon Difficulty - the same as normal mode, but items must exist in a network's inventory. Entities are only marked for upgrade and bots need to deliver the item.

Gacha-style progression


Individual machines roll for quality upgrades when they hit work milestones, similar to the chance-based progression of Factorio's quality system. By default there's a 1% chance per attempt, but you can adjust this up to 100% for guaranteed upgrades.

If an upgrade attempt fails, the machine tries again when it reaches the next milestone. There's an optional luck parameter which increases the chance after each failure.

Fair assembler treatment


Every assembler progresses at the same rate when actively working. An assembler making iron gears will upgrade just as fast as one making science packs - what matters is the time spent working, not what they're making.

Crafting speed does impact progression though; an assembler with crafting speed of 2 will change twice as fast as an assembler with crafting speed 1.

Works with the whole factory


Just about all entity types are supported. Here's the full list:

  • Manufacturing: assembling machines, furnaces, rocket silos
  • Mining: mining drills, agricultural towers
  • Fluids: pumps, offshore pumps
  • Power: electric poles, solar panels, accumulators, generators, reactors, boilers, heat pipes, power switches, lightning rods
  • Combat: turrets, artillery turrets, walls, gates, radar
  • Logistics: inserters, beacons, roboports
  • Space Age: asteroid collectors, thrusters
  • Other: labs, combinators, programmable speakers, lamps

They can be toggled off in the settings if you want to avoid affecting certain items.

These secondary entities do not have way to track their activity level (like solar panels or inserters). So these receive upgrade attempts proportional to the upgrades generated by primary entities, ensuring they evolve at about the same rate.

Customization options


  • Work hours needed: How many hours a machine must work for each upgrade attempt (default: 3 hours)
  • Upgrade chance: Chance of success per attempt (default: 1%)
  • Luck accumulation: Whether failed attempts should increase future chances (optional)
  • Cost scaling: Higher quality levels can require more work time (optional)

Other Features


Notifications

A silent map ping is on by default, which highlights entities that change. This should be a non-obtrusive way to know that things are happening. It can be toggled off in player settings.

An aggregate report (off by default) is available which will ping the console with a breakdown of how many entities changed. It is displayed once every 5 minutes to avoid spamming. This one makes a console notification sound.

In game commands

Inspect entity: control-shift-q will inspect the entity under the cursor and print out stats about its current progression.

If you need to rebuild the cache (shouldn't be needed, but just in case), there is a console command available: quality-control-init

High performance


Designed to run smoothly on massive bases. The mod processes a few machines each tick to avoid lag spikes, and includes settings (under the map tab) to tune the performance further.

Adding the mod to an existing save game may cause an initial lag spike as it scans everything. Once all the entities are scanned it will go back to normal.

Compatibility


Unsupported

Temporarily disabled compatibility with mods that add quality tiers.

This seems to bloat file save sizes and I don't want anyone's game to break. Other quality upgrade mods do not have this issue, so this one is causing a bug somehow. Still investigating and will report to factorio team once it's clearer what's happening.

I confirmed that another quality mod does not have the same problem, so it seems an issue with my implementation. Here's one that does work: Upgradeable Quality

Unsupported - but still fine to use alongside

Some modded entities don't do well with quality changes. This mod is generally safe to use along side them, but their entities are pro-actively filtered out to prevent issues. There may be some that are not discovered yet.

In general, this mod avoids altering entities in the game that are hidden or indestructible.

Unsupported Vanilla Entity Types

There are a few entity types that are not supported: belts, pipes, rails, and storage containers.

There are several edge cases to handle (and test) before adding support. Things such as UPS impacts of belts with varying quality segments, rail signals being replaced at the wrong moment causing accidents, storage containers changing size and losing blocked slots etc. It's all do-able, just not a priority. If you are interested in beta testing changes though, let me know on the discussion page :)

Localization


There are several AI generated localizations, so that settings and other items are presented in native languages. Corrections are very welcome!

Please submit any corrections to the mod discussion page or to the github issues page.

Inspiration


This mod was inspired by a few others:

Factory Levels
Experience for Buildings
Level Up
Upgradeable Quality


More technical details and performance info is available on the github repo