For infinite technologies, there is no "count" properties but a "formula" property which allows to get the "count" based on the current level of the technology.
I managed to write a Lua code that evaluate the expression. Though it might not cover all the cases.
Thus I would like to have access the internal formula parser/calculator (as stated here https://www.factorio.com/blog/post/fff-161) from Lua.
Maybe something like :
Code: Select all
formula = "100(L-6)"
engine.formula_calc(formula, 3) -- not 'game.' as it would be nice to use it in the data stage as well.