Page 1 of 1

[0.17 NotABug?] get_saved_technology_progress, set_saved_technology_progress don't work for current research

Posted: Thu May 23, 2019 5:59 pm
by ownlyme
I'm currently working on a mod where players can have different damage multipliers and shooting speeds, so my workaround was to give every player it's own force.
But i'm stuck at syncing the technology progress, because get_saved_technology_progress always returns nil, regardless of progress - (my code:

Code: Select all

/c game.player.print(game.player.force.get_saved_technology_progress(game.player.force.current_research.name))
)
and set_saved_technology_progress doesn't work either...:

Code: Select all

/c game.player.force.set_saved_technology_progress(game.player.force.current_research), 0.5)
Thank you.

edit: i see now that this only affects technologies that are not currently researching...
A bit counter-intuitive, because now i have to write a function to automatically switch between research_progress and saved...progress
I guess you have more important stuff to do, but maybe you want to merge those functions at some point.

Re: [0.17 NotABug?] get_saved_technology_progress, set_saved_technology_progress don't work for current research

Posted: Fri May 24, 2019 12:22 am
by Rseding91
Thanks for the report however that's working correctly: you can't have saved progress for a technology being actively researched.