Productivity Research for Everyone

by Semenar

Adds a productivity research for every recipe that supports productivity and does not already have one.

Tweaks
7 months ago
2.0
1.72K
Manufacturing

b Compatibility Bug with Combat Research

8 months ago

Hello, we have a user that is using both of our mods that is encountering an odd compatibility issue and would appreciate your thoughts. My mod (https://mods.factorio.com/mod/combatresearch) is designed to count research completion based on damage done to enemy units based on the health of the unit. I've done testing with just our mods and found that occasionally when destroying a nest, one of the productivity technologies can be completed instantly from level 1 or 2 to level 30. I looked through the code of your mod and didn't see anything obvious, so thought we could collab and see if we might figure something out.

8 months ago
(updated 8 months ago)

Oh, I think someone reported this bug a while ago, but I was not able to reproduce it - let me try to test it with your mod.

8 months ago
(updated 8 months ago)

Actually, I just checked. This seems to research all levels of an infinite technology, if it has a max_level defined:
https://github.com/KryptronicDX/CombatResearch/blob/v1.1.0/control.lua#L46

I think you need to change level instead if it is an upgrade and its level is below prototype.max_level.
Or, alternately, report it as a bug to Wube.

8 months ago

Xorimuth suggested a proper solution: replace both of those lines with player.research_progress = 1. It only researches one technology.

8 months ago

I'll give this a try, thank you for the recommendation!

This thread has been locked.