Page 1 of 1

[kovarex] [0.17.42] Infinite technologies with lower max_level than prototype-number can freeze the game.

Posted: Fri May 31, 2019 11:02 am
by eradicator
What?

If an infinite technology prototype is named "blabla-N" and has max_level=K with K < (N-1) then calling research_all_technologies will freeze the game.

Reproduction

Code: Select all

data.raw.technology['physical-projectile-damage-7'].max_level=1

Code: Select all

/c game.player.force.research_all_technologies()
This technology works 7 to 5.
This technology works 7 to 5.
invalid_level_range.png (56.67 KiB) Viewed 1754 times

Expected Behavior

Max level should be treated as ((N-1) + K) not just K i guess? Not sure.

Re: [0.17.42] Infinite technologies with lower max_level than prototype-number can freeze the game.

Posted: Tue Jun 04, 2019 11:00 am
by kovarex
Hello, thanks for the report.
I made a condition for the technology loading, that the max level can't be lower then the level.