Quality Control

by raley

Assemblers and furnaces earn quality upgrades for the entire factory.

Content
a day ago
2.0
661
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.2 (a day ago)
Factorio version:
2.0
Downloaded by:
661 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.

Difficulty Modes


Normal - quality upgrades are earned through work and applied instantly, no items required in network inventory.
Uncommon - the factory must have upgraded items in inventory, entities are only marked for upgrade for bots to handle. Only affects entities covered by construction networks that have an upgraded item available in network inventory.

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 based on the work that primary entities are doing.

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


Supported

This works great with mods that add extra quality tiers. If you find one that doesn't work please let me know as it's generally quick to add support.

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 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. Also, having everything with mixed quality has other gameplay impacts, such as making it hard to copy/paste parts of the factory, and blowing up the players inventory.

Localization


There are several AI generated localizations. Corrections are very welcome!

Supported languages: Belarusian, Catalan, Chinese (Simplified), Chinese (Traditional), Czech, Dutch, Finnish, French, Georgian, German, Greek, Hungarian, Italian, Japanese, Kazakh, Korean, Latvian, Norwegian, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Spanish (Latin America), Spanish (Spain), Swedish, Thai, Turkish, Ukrainian, Vietnamese.

Please share any corrections on 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