Flat Infinite Research Cost


This mod allows you to set a fix value for the costs of infinite research technologies instead of the increasing vanilla prices.

Tweaks
6 months ago
0.16 - 2.0
2.73K
Cheats

g Crash if "also change cost of early levels" is selected

6 months ago

This option now (game v2.0, mod v 1.5.0) crashes the game during startup. The game launcher gives the option to reset this mod to default settings, which allows the game to load.

Failed to load mods: FlatInfiniteResearchCost/data-final-fixes.lua:7: attempt to index field 'unit' (a nil value)
stack traceback:
FlatInfiniteResearchCost/data-final-fixes.lua:7: in main chunk

6 months ago

Thank you for reporting this bug. In earlier versions, the cost to complete a research was calculated as "fill the progress bar in the labs X times," with no exceptions. As a result, the mod would update the value of X for the affected technologies. However, with the release of Factorio 2.0, new types of research completion costs were introduced, such as "craft 50 steel plates" to unlock the Steelaxe. The error you reported occurred because these new technologies did not have a value for X that the mod could access.

I have just uploaded version 1.5.1, which fixes the error. Unfortunately, the only solution I found was to hardcode the earlier-level technologies. As a result, the "Also change costs of early levels" setting will now only affect the seven vanilla technologies (physical projectile damage, stronger explosives, refined flammables, laser weapons damage, follower robot count, worker robots speed, and mining productivity), the artillery buffs do not have an "earlier level." However, infinite level cost should still be changed for all infinite researches, including those added by other mods.

6 months ago

Gotcha. Thanks for the explanation and the notes you left in the files. This fixes the crash , but it skips over any of the vanilla infinite techs that are infinite from the first level onward. I made a list of the vanilla infinite techs and the last level they upgrade to before becoming infinite. All of the ones with a zero (no prior levels) are not affected by flattening.

    ["physical-projectile-damage"] = 5,
    ["stronger-explosives"] = 5,
    ["refined-flammables"] = 5,
    ["laser-weapons-damage"] = 5,
    ["follower-robot-count"] = 4,
    ["worker-robots-speed"] = 5,
    ["mining-productivity"] = 3,
["artillery-shell-range"] = 0,
["artillery-shell-speed"] = 0,
["electric-weapons-damage"] = 3,
["artillery-shell-damage"] = 0,
["railgun-shooting-speed"] = 0,
["railgun-damage"] = 0,
["health"] = 0,
    ["asteroid-productivity"] = 0,
    ["laboratory-productivity"] = 0,
    ["processing-unit-productivity"] = 0,
    ["scrap-recycling-productivity"] = 0,
    ["steel-plate-productivity"] = 0,
    ["low-density-structure-productivity"] = 0,
    ["plastic-bar-productivity"] = 0,
    ["rocket-fuel-productivity"] = 0,
    ["rocket-part-productivity"] = 0
6 months ago

it skips over any of the vanilla infinite techs that are infinite from the first level onward.

That should not happen. The infinite techs (artillery shell range and artillery shell speed) that are infinite from the first level onward are flattened from line 43 to 56 in data-final-fixes.lua (line numbers in version 1.5.1). I just tried it in the game, the setting also works for these. The Space Age infinite research works too.

Do you use any other mods that affect these research costs?

6 months ago

Yes. It appears to be Productivity Technology Limit, which sets the max level of infinite productivity technologies to 30, reflecting the max 300% productivity bonus. It does not change the cost of the technologies, but I have verified that the flattening does work correctly with that mod disabled. Thank you very much for fixing the crash error and verifying the remaining error I experienced was with my configuration. I appreciate it!!

I've moved this conversation over to Productivity Technology Limit: https://mods.factorio.com/mod/productivity-technology-limit/discussion/67b54aaffe381692daeeb05b

New response