Page 1 of 1

[0.17.35] LuaTechnology.level doesnt correspond to the current level for infinite mining-productivity

Posted: Fri May 03, 2019 9:34 am
by Stevetrov
What did you do?

ran the following command
/c game.player.force.technologies["mining-productivity-4"].level = 189


What happened?
MP appears to be at level 188, and bonus is 1880%
Next available tech is mp-189

What did you expect to happen instead? It might be obvious to you, but do it anyway!
MP level 189 bonus 1890%

Furthermore, when I loaded a save where I had set MP to 189 previously it had incremented to 190.

NB I expect this is true of all infinite techs and maybe the non inf ones with levels, but I havent checked

Re: [0.17.35] LuaTechnology.level doesnt correspond to the current level for infinite mining-productivity

Posted: Fri May 03, 2019 1:51 pm
by Stevetrov
Ok so I have partly confused myself (not the first time)

The root of my confusion is that level is really next level and NOT the level currently researched.

Re: [0.17.35] LuaTechnology.level doesnt correspond to the current level for infinite mining-productivity

Posted: Fri May 03, 2019 2:27 pm
by Bilka
Good thing that this is already documented: https://lua-api.factorio.com/latest/Lua ... logy.level, so now I can just move this to not a bug :)