Scaling the Health Effects of Crafting Machines

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Gizzmohammer
Inserter
Inserter
Posts: 22
Joined: Wed May 07, 2025 1:55 am
Contact:

Scaling the Health Effects of Crafting Machines

Post by Gizzmohammer »

Unsure if this is a bug or not.
Currently the "Production Health Effects" in the "Crafting Machine Prototype" are unaffected by crafting speed penalties.
For example, this machine gets the full healing from "production" even though it's not producing anything.

09-01-2025, 21-03-55.png
09-01-2025, 21-03-55.png (441.66 KiB) Viewed 299 times

It would be great if the health calculations took these edge-cases into account.
If this is intended behavior, it would be nice to have an "affected-by-crafting-speed" boolean in the "ProductionHealthEffect" struct

Thanks for reading!
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 455
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: Scaling the Health Effects of Crafting Machines

Post by BraveCaperCat »

Uhhhhhh
there's a ProductionHealthEffect struct???
Creator of multiple mods, including Quality Assurance - My most popular one.
Go check them out with the first and second links!
I'll probably be wanting or giving help with modding most of the time I spend here on the forum.
protocol_1903
Filter Inserter
Filter Inserter
Posts: 320
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Scaling the Health Effects of Crafting Machines

Post by protocol_1903 »

I feel like a variable effect might be computation intensive, although this does seem like an edge case where partial power availability should not activate the effect.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4140
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Scaling the Health Effects of Crafting Machines

Post by boskid »

production_health_effect was primarily implemented because of the captive biter spawners which do not accept any effects and as such there are multiple corner cases that were not considered. Having a crafting machine accept effects was one of those cases that was not considered because it did not affect our primary use case. Another cases i am aware of is if a crafting machine is disabled by control behavior (in which case the production health effect will not get applied) or when crafting machine is marked to be deconstructed when it stops updating, or if a crafting machine gets disabled due to having unresearched recipe or having a recipe parameter set, where all of those cases do not apply in our base use case. Also having a machine be repairable may interfere with usage of this feature for obvious reasons. If you think it does not work as expected and report it to bugs, i will move all such reports to modding interface request instead because all such behaviors fall outside of defined scope of this feature.
Gizzmohammer
Inserter
Inserter
Posts: 22
Joined: Wed May 07, 2025 1:55 am
Contact:

Re: Scaling the Health Effects of Crafting Machines

Post by Gizzmohammer »

Ah, that makes sense, thanks :)
Post Reply

Return to “Modding interface requests”