Quality Control

by raley

Assemblers and furnaces earn quality upgrades for the entire factory.

Content
3 hours ago
2.0 - 2.1
2.01K
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:
11 months ago
Latest Version:
2.2.0 (3 hours ago)
Factorio version:
2.0 - 2.1
Downloaded by:
2.01K users

This mod adds a chance for machines to upgrade in quality as they work.

Progression is normalized based on the crafting speed of the machine, not on the number of items completed; so an assembler-1 making iron gears for an hour will upgrade at the same rate as an assembler-1 making science packs for an hour.

The growth of an entity can be improved by adding speed modules. An assembler with crafting speed 2 will progress twice as fast as one at crafting speed 1, regardless of recipe.

By default there's a 1% chance per 3 hours of crafting at crafting speed 1, but you can adjust both the chance of success and the amount of work required.

In general, idle machines won't upgrade, they need to be working to earn those promotions.

Works with the whole factory


Most entity types are supported, and all are configurable. Their growth can be limited in settings if you want to avoid affecting certain items.

  • Manufacturing: assembling machines, furnaces, rocket silos
  • Producers: mining drills, agriculture towers, water 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, fluid pumps

Copy Paste Helper


The factory can end up with a lot of mixed quality entities scattered about. I made a companion mod that helps with copy pasting those elements.

Quality Gardner

It will update ghosts to match items available in logistic storage. It will also upgrade buildings if there are higher quality ones in logistic storage just laying about.

Customization options


It's very configurable. Almost all settings can be enabled/disabled or min/maxed to fairly extreme levels.

Here are the main concepts and options:

Work hours needed

How many hours a machine must work for each upgrade attempt. The default of 3 hours means that an assembler with crafting speed 1 must work for 3 real-time hours in game to earn 1 upgrade attempt. If your savegame has 30 hours of gameplay and it's been working the whole time, it will attempt upgrades 10 times. It sounds slow, but speed modules, productivity bonuses, and faster assemblers with higher crafting speeds end up earning upgrades pretty fast.

Upgrade chance
Chance of success per attempt (default: 1%)

Difficulty scaling
Higher quality levels can optionally require more work, expressed as a percentage at each level. Helps keep late game progression in check.

Luck
There is an optional luck parameter which increases the machine's chance to succeed after each failure.

Module Upgrading
Should modules in an entity also upgrade with it? This is pretty OP when turned on, by default it's off.

Continue Accumulating at Max Quality
Once an assembler hits max quality level, should it contribute upgrade credits to the general pool? This helps entities upgrade that don't have a way to generate attempts on their own (such as inserters and solar panels).

Some additional context: factorio's API doesn't have a way to track work completed for things like inserters, so instead, entities that produce upgrade attempts (assemblers) share those attempts out on a 1:1 basis. For each upgrade attempt generated by a producer, a random non-producer also gets an upgrade attempt.

Turrets

New for version 2.1.0 - turrets generate upgrade attempts by dealing damage. The default value is calculated as 36,000 damage, the equivalent of an hour of piercing ammo production at crafting speed 1.

Heads up that rail-guns can progress very fast due to their high damage output.

Other Features


Notifications

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

An aggregate report 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. The report is off by default. It makes a console notification sound and there was not a way to disable that.

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. This is helpful if you suspect something should be tracked by Quality Control but it isn't.

Optimized 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 well with mods that add extra quality tiers. If you find one that doesn't work please let me know as it's nice 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 filtered out to prevent issues. There may be some that are not discovered yet.

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

Unsupported Entity Types

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

Localization


There are some 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