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

Bugs that are actually features.
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

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

Post 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
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

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

Post 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.
Bilka
Factorio Staff
Factorio Staff
Posts: 3619
Joined: Sat Aug 13, 2016 9:20 am
Contact:

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

Post 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 :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Not a bug”