Сommand line option to enable replay recording

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

artemlisonok
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2025 2:23 am
Contact:

Сommand line option to enable replay recording

Post by artemlisonok »

TL;DR
In version 2.0.52, the --run-replay command line option was added, maybe this is a good reason to finally add the function to enable replay recording from the command line?
What?
I suggest to add command line option to enable replay recording. Something like --enable-replay or additional parameter in server-settings.json.
Why?
I am organizing events on my dedicated server and would like to be able to record a replay of each of them. Now I have to recreate a replay save every time I update a game or mod.
There has been talk about this for several years, which means that I'm not the only one interested in this feature.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16646
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Сommand line option to enable replay recording

Post by Rseding91 »

I don't understand the request. Even if such a command was added, it would not be able to *enable* a replay on an existing save file. Replays can only be enabled from the start of a save file and any game updates or mod changes will disable them permanently.
If you want to get ahold of me I'm almost always on Discord.
artemlisonok
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2025 2:23 am
Contact:

Re: Сommand line option to enable replay recording

Post by artemlisonok »

Rseding91 wrote: Sat Jun 07, 2025 1:39 pm it would not be able to *enable* a replay on an existing save file
Yes, I know it. I'm starting my event from scenario with such command:

Code: Select all

factorio.exe --start-server-load-scenario pvptorio-new/custom-pvp --server-settings .\server-settings.json --port 34197
And if I want to enable replay, I need to:
  • Lunch the game
  • Main menu → Single player → New game → Check "Record replay" → Select my scenario → Launch
  • Enter the Game menu → Save game → Quit game
  • Copy the created save game to the dedicated server save directory
  • Launch the server from save
And I have to follow these steps every time a game or mod is updated.
So i suggest to add --enable-replay command line option or additional parameter in server-settings.json, to avoid repeating this steps.
root
Inserter
Inserter
Posts: 25
Joined: Fri May 06, 2016 8:58 pm
Contact:

Re: Сommand line option to enable replay recording

Post by root »

I have an identical use case. The ability to enable replay for a fresh scenario on a headless server would be very useful.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1059
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Сommand line option to enable replay recording

Post by quyxkh »

You can update the configs, I do this for check-updates. Factorio has `-c` to pick the config file, if it had a `-C` to force particular config settings for this run you could `factorio -C interface.check-enable-replay-checkbox=true` to force replay enabled for this run. But for now if you want it set true yourself you can (bash syntax, $replay is true or false, $config is the config path)

Code: Select all

if [[ `grep ^check-enable-replay-checkbox=$replay` != *$replay ]]
then    sed -Ei 's/^ *;? *(check-enable-replay-checkbox) *=.*/\1='$replay/ "$config"
fi
with the weird wrapping around the sed sub there to see past any whitespace and commenting flexibility in use. That's a straight adaptation from my own factorio startup thingy.
Post Reply

Return to “Ideas and Suggestions”