Page 1 of 1

Add pause / unpause console command

Posted: Mon Oct 31, 2022 10:29 am
by ArthurDent0x2a
TL;DR
Add a console command that mimicks the behaviour of clicking pause / unpause button in the menu
What ?
In multiplayer games admins (and players if only_admins_can_pause_the_game is false in server settings) can pause / unpause a game by either clicking the respective button in the menu or by using the assigned keyboard shortcut (default shift+pause).

I suggest adding a possibility to the same thing from the console.
Why ?
The ability to do so via the console would enable the possibility to pause/unpause a game via RCON.

Only current way to pause a game over RCON I found is:

Code: Select all

/c game.tick_paused=true|false
This however has a few downsides:
  • Players do not get a message that the game is currently paused
  • It will disable achievements

Re: Add pause / unpause console command

Posted: Tue Nov 01, 2022 1:50 pm
by JasonC
As an alternative; would it perhaps also work if, instead of a new command, when game.tick_paused is set, players *are* notified and it does *not* disable achievements?

If it were addressed on that end then e.g. existing mods and stuff that set game.tick_paused would also become more well-behaved.

Re: Add pause / unpause console command

Posted: Wed Nov 02, 2022 6:17 am
by ssilk
The good question here is: why do you need to pause a game as normal player?

There are many reasons for that (thinkable), I want to see them listed here, because the OP has obviously a clear idea why this is needed, but doesn’t explain them.

Re: Add pause / unpause console command

Posted: Wed Nov 02, 2022 8:41 am
by SoShootMe
JasonC wrote:
Tue Nov 01, 2022 1:50 pm
As an alternative; would it perhaps also work if, instead of a new command, when game.tick_paused is set, players *are* notified and it does *not* disable achievements?
At present, "/c" always disables achievements, regardless of what you use it for (even nothing). That's easy to both understand and implement, so I think a new command makes more sense.
ssilk wrote:
Wed Nov 02, 2022 6:17 am
The good question here is: why do you need to pause a game as normal player?
The (immediate) reason was clearly given as:
ArthurDent0x2a wrote:
Mon Oct 31, 2022 10:29 am
The ability to do so via the console would enable the possibility to pause/unpause a game via RCON.
But the reason for wanting that is unclear. Maybe it would help with Server: automatically pause when a new player is joining.

Re: Add pause / unpause console command

Posted: Wed Nov 02, 2022 10:06 am
by ssilk
“Maybe” is the child of discussion. :)

Re: Add pause / unpause console command

Posted: Sat Nov 05, 2022 2:13 am
by Danjen
While not as useful for a normal player (I have my pause bound to ctrl+space so I can toggle it quickly), I can see it having some use to modders: Perhaps when debugging a complicated script, you can have it fire a pause command to freeze the game state so you can inspect things just before they break

Re: Add pause / unpause console command

Posted: Tue Nov 22, 2022 12:08 pm
by ArthurDent0x2a
Sorry, I somehow missed the replies here.

The idea for this feature request came up during preparation of a LAN party. At that event we will try to do a 100% achievments run. I'll be acting as a coach / coordinator and will not necessarily be in game. I'll use a rcon script to f.e. setup permissions (i.e. disable research / hand crafting for a certain group of people) and during breaks etc. it would be nice to be able to pause the game without the need to join the game.

I figured the functionality is already there, it would just need to be exposed in a different way so I'll posted it as a suggestion.

Re: Add pause / unpause console command

Posted: Fri Nov 25, 2022 5:14 am
by ssilk
Danjen wrote:
Sat Nov 05, 2022 2:13 am
While not as useful for a normal player (I have my pause bound to ctrl+space so I can toggle it quickly), I can see it having some use to modders: Perhaps when debugging a complicated script, you can have it fire a pause command to freeze the game state so you can inspect things just before they break
That’s called a debugger. It automatically pauses every step and AFAIK it’s already included into Factorio, because otherwise there is no way to develop this game.