Page 1 of 1

More information on game.set_game_state

Posted: Thu Jan 11, 2024 3:18 pm
by Stringweasel
https://lua-api.factorio.com/latest/cla ... game_state

There is very limited information about this command in the docs, and I thought it might be useful to add some after creating Better Victory Screen. I would propose something like:
game_finished: Triggers the "Game Finished" screen for all forces when set to true. When false no victory screen is shown. Note: "Game Finished" screen will only be shown the first time this is called, unless reset_game_state is called first.
can_continue: If true will enable the "Continue" button in the "Game Finished" screen. Only applicable when game_finished is true.
next_level: The name of the next scenario to load. Only applicable if this is a campaign(?).

victorious_force: Doesn't do anything?
player_won: Doesn't do anything?

Re: More information on game.set_game_state

Posted: Fri Jan 19, 2024 3:09 pm
by Stringweasel
Added note about this function only triggering the "Game Finished" screen the first time it's called, unless...