Linear Research Costs

by Zoryn

Makes research that uses an exponential function instead scale linearly. Uses regex, so should work with most mods.

Tweaks
10 months ago
1.1 - 2.0
1.19K
Cheats

g New productivity research going crazy :D

10 months ago

With the mod enabled all new infinite recipe productivity terchnologies cost only two (+1 for level) science packs, even tho in normal game they cost 1000 and more

10 months ago

I'll look into it, that's definitely wrong lol

10 months ago

After the update it works now, only starting infinity (level 1 for the infinity technology) costs are just 1, but after that it works.

9 months ago

I think the problem is with techs with a cost formula containing 2^(L-F), L is the level to research, F is the first infinite level.
The first infinite level will then cost: BASE * 2^(F-F) = BASE * 2^0 = BASE * 1
But if you replace ^ with * using this mod it becomes: BASE * 2*(F-F) = BASE * 0

8 months ago

For the author's information: Starting with Factorio 2.0, the formula supports the following functions:

abs(value): Returns absolute value of the given argument; i.e. if the argument is negative, it is inverted.
log2(value): Returns a binary logarithm of the given value.
sign(value): Returns -1 for negative numbers, 0 for zero (regardless of sign), 1 for positive numbers
max(value1, value2, ...): Returns the greater of the given values. Supports between 2 and 255 arguments.
min(value1, value2, ...): Returns the smaller of the given values. Supports between 2 and 255 arguments.

I think the "max" and "min" here would be very useful to avoid extreme values.
Check out https://lua-api.factorio.com/latest/types/MathExpression.html for details. Also note that starting with 2.0, the formula also supports hexadecimal numbers (0xFF) and scientific notation ("1e3"), so full 2.0 support would require being able to parse these numbers.

New response