Clean Modules


Adds versions of the modules without their maluses.

Content
10 days ago
2.0
7
Manufacturing
Owner:
SirRolin
Source:
N/A
Homepage:
N/A
License:
GNU GPLv3
Created:
10 days ago
Latest Version:
0.1.0 (10 days ago)
Factorio version:
2.0
Downloaded by:
7 users

adds versions of the vanilla modules without their
maluses.

A clean module keeps only the positive effects of the module it copies, at a reduced strength — so a
Clean Speed Module gives speed without the quality penalty, and a Clean Productivity Module gives
productivity without the speed and energy penalties. Covers speed and productivity modules across
tiers 1-3.

A module type only gets a clean version when it has something worth removing:

  • Efficiency modules have nothing to remove, since they only have a bonus, so they get none.
  • Quality modules in vanilla only cost 5% speed. In calculated mode their clean version is
    scaled to match, so they get one. In linear mode a clean copy would give up more quality than
    that is worth, so they only get one when their maluses add up to more than 5% on some tier, as
    they can with mods that make quality modules costlier.

This is decided from the modules' effects when Clean Modules runs in data-updates.lua, after every
mod's data.lua. A mod that adds a malus to efficiency modules in its data.lua gets clean
efficiency modules too. Changes made in another mod's data-updates.lua are only seen when that mod
loads first, and changes in data-final-fixes.lua aren't seen.

Clean modules are drawn from the same module templates the momentum mods use, tinted a paler shade
of the module they copy so they can be told apart at a glance. How much paler is a startup setting,
and the same shade is used for whatever the momentum mods generate from them — a Clean Speed Module
and a Clean Speed Turbo are the same colour.

This mod is standalone — it does not require the Momentum Modules library, only the shared module
library both of them build on. Install the momentum mods alongside it and they will generate their
own variants of the clean modules (a Clean Speed Turbo, a Clean Prod / Clean Speed threshold pair,
and so on), because Clean Modules registers its modules as a family other mods can build from.