Productivity Through Science

by wadeack

Turn scientific progress into industrial efficiency. Every researched technology grants a permanent productivity bonus to all unlocked recipes.

Tweaks
7 days ago
2.0 - 2.1
500
Cheats

b Productivity calculation

11 days ago

Hi there!

I've started to use your mod and quite enjoy it as a nice bonus whilst I work on my factory.
But I noticed stacking productivity bonuses are calculated incorrectly.

In this particular case for steel.
I have a bunch of techs unlocked with a modifier of 0.1% per tech. Providing 35%
I have steel productivity 6, providing 60%
Accumulative this should provide 95% productivity, instead it only gives 35% (This is the case even when I use the /pts-resync command)

I am assuming this is not intended

11 days ago

Hi, thanks for reporting the issue!

Indeed this was not intended and I've completely overlooked those recipes. The current storage of researched techs is flawed and I'll refactor it so that productivity bonus calculation would be aware of other productivity bonuses coming from the game. I'll publish an update as soon as it's working, but it will probably take some time, so sorry for the inconvenience.

10 days ago

I've published a fixed version, but it will only apply to new researches moving forward. In your current save where you've already completed steel productivity research, the legacy values won't automatically revert to the expected totals retroactively. I'm looking into whether there's a clean way to handle retroactive fixes down the line.

10 days ago

Thank you for the swift response and updating it.

I tested it and works going forward as you described.

Perhaps an interesting observation that could be useful to you:
The percentage of steel productivity research is 60%
The percentage of the research buff by your mod is 56% (Current modifier is 0.15)

It appears to prioritise the steel productivity, as my furnaces producing steel are at 60%, meanwhile the other furnaces are at 56%.

10 days ago

Thanks for the details, I've reproduced that issue locally and just published another version that includes the following command: /pts-repair-space-age . It should recalculate the bonuses applied to recipes from space-age productivity techs and apply additively bonus from the mod itself.

Please let me know if after running the command you still observe discrepancy.

10 days ago

Tried and tested. It works like a charm on steel productivity.
Got an accumulated 116% productivity which Im content about.

However, the current solution still has a flaw in it.
The rocket part still has a similar issue, it does not accumulate.
I have 40% from techs, and 56% from the pts mod.
Currently it only shows 56%

The productivity tech for rocket parts is from the Muluna mod.

10 days ago

Glad to hear the fix is working! Regarding the Muluna mod or any other mod that adds productivity to a select recipe - I'm not planning to provide a universal fix for the discrepancy caused by the buggy version. However the latest mod version should be able to properly calculate bonus with such techs even if those are coming from other mods.

If you want I can share a command for you that would update the productivity bonus for a given recipe:
/c local recipe = game.player.force.recipes["<recipe-name>"] if recipe then recipe.productivity_bonus = <desired-bonus> end
where
- <recipe-name> you could get by hovering its icon anywhere in the game, e.g. in bonuses tab, factoriopedia, tech description, etc., and pressing Ctrl + Shift + F on PC.
- <desired-bonus> is a percentage in decimal, e.g. 0.96 for 96% bonus.

If you have troubles running it, send me a dm in discord, name is the same as here.

9 days ago

Fair enough, it is fine as is.
I tried running it, but the game told me it's a LUA command so I won't mess with it further as I dont want my achievements disabled.
Not yet at least.

I think for now it would be a great addition to be able to manually trigger the recalculation because it disappears every time there's a mod update / added / removed.
Needing a sacrificial tech to get it back after each mod list change is a bit unpleasant.

9 days ago

Regarding the bonus removal on mods update (on configuration changed to be precise) it was an issue that I believe has been fixed in v.1.1.3 (v.1.0.2 for 2.0). Have you observed this in the recent versions as well?

9 days ago

From what I have seen yes, any configuration change removes the provided bonus until a new trigger happens.

9 days ago

I need more details on this issue as I cannot reproduce it. The issue that I've fixed before was for cases when techs could be un-researched (e.g. from Brain Damage Fixed ) and then inflated bonuses would reset on config change to a "correct" one discarding repeated researches. So could you please share:

  • When you change/update mods, do the recipe productivity bonuses drop all the way down to 0%, or do they drop to a value that excludes your mod's contribution (leaving only vanilla/Space Age tech bonuses)?

  • Do you happen to use any other mods that modify technologies or productivity bonus?

The bonuses from the pts mod are stored consistently (even if they were overriding the other productivity bonuses in the past, lol) and on config change it would always re-use those value, so the list of other mods might help here.

9 days ago

So I've inspected the Muluna mod and I have a suspicion that discrepancy is coming from the script based researches that this mod ignores. I've finished the rework on /pts-resync command and published a new version containing it. Can you check if it fixes the bonuses for you?

New response