ModuleEffect Prototype: A prototype to add new module effects evaluated for entities.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
MeteorSwarm
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Sep 25, 2025 10:49 pm
Contact:

ModuleEffect Prototype: A prototype to add new module effects evaluated for entities.

Post by MeteorSwarm »

There are several methods that one could currently use to write new module effects in the current API without needing a ModuleEffect prototype, though doing so requires heavy use of mod-data and custom tooltips:

1. As Rigor Module does, by creating recipe copies for all recipes that support the Rigor effect, and hotswapping recipes in machines based on the machine's rigor.
2. With recipe events, calculating a machine's module effect value, then doing something to the machine based on the effect value.

ModuleEffect would simplify the codebase of custom module mods by eliminating the need to store module effect values in mod-data or to calculate module effects in machines. It does not need to support anything other than the ability to calculate, display and read custom module effects in machines, as well as the ability to assign custom module effects to modules and machines via Effect. All effects of these custom module effects can be executed via other parts of the Lua API.
08-15-2026, 13-35-14.png
08-15-2026, 13-35-14.png (54.2 KiB) Viewed 481 times
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 554
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: ModuleEffect Prototype: A prototype to add new module effects evaluated for entities.

Post by protocol_1903 »

+1, would be nice for a few pY effects i have in mind that are similar to some mods on the portal
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
Rseding91
Factorio Staff
Factorio Staff
Posts: 17513
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: ModuleEffect Prototype: A prototype to add new module effects evaluated for entities.

Post by Rseding91 »

Current module effects are cached and fully inlined on a given entity that supports them - for the best possible performance (no need to read dynamic allocated memory to determine the effect value when the entity runs its update logic).

So i don’t see this happening.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”