Page 1 of 1

[1.1.101] Creating a multiplayer map with replay

Posted: Mon Jan 15, 2024 12:17 pm
by chaoswolf
What is the recommended way to create a map for a server with replay enabled?

The replay system wiki article only redirects to the multiplayer article which does not contain any information as to how one can set up a new replay multiplayer map.
I found several topics regarding this topic which do not contain a solution nor instructions.

The map-gen-settings.json and map-settings.json do not contain an option for the replay.
There is not a command line parameter for enabling replay.
As noted in viewtopic.php?p=556693 the

Code: Select all

check-enable-replay-checkbox=true
setting in the config.ini does not affect the headless game.

After a lot of trial and error I found this single way to create a replay multiplayer map without disabled achievements:
  1. Start the GUI game
  2. Select Single player > New game
  3. Enable the Record replay check box in the upper right corner
  4. Select Freeplay and Next
  5. Choose your map settings (Some settings disable achievements)
  6. Press Play and instantly pause the started game, save it and quit.
  7. Copy the newly created save from the saves directory to your server and start it with this save file.

    Code: Select all

    bin/x64/factorio --start-server my-save-with-enabled-replay.zip
    
I find this unnecessarily complicated. I wish there was the a command line option like

Code: Select all

bin/x64/factorio --create map-with-replay.zip --enable-replay
or an additional parameter in the map generation settings.

As it is now someone can create a map and host a server without a factorio account but without replays. If you want to host a server with a replay you need a saves file generated by the GUI version of the game. That seems like weird restriction because the headless server works fine with a save file were replay is enabled. You just can't create a new map with replay.

Coming back to my original question: What is the recommended way to create a map for a server with replay enabled? Because I feel like this isn't it.

Re: [1.1.101] Creating a multiplayer map with replay

Posted: Mon Jan 15, 2024 1:44 pm
by Bilka
I usually host games with my own instance, instead of a server. There, enabling replay is as simple as checking the "Record replay" checkbox in the screen you get to from Multiplayer -> Host new game and then continuing to set the map settings and create and host the game.

For the headless server there are no options to create a save with enabled replay from the commandline or with a file. That's why you're not finding anything.

To request such a setting or command line option, the ideas and suggestions subforum would be the correct address. For example you could add your voice to 96332 (which you linked above).

Re: [1.1.101] Creating a multiplayer map with replay

Posted: Mon Jan 15, 2024 2:05 pm
by chaoswolf
The part that was bugging me the most, was that every piece of information I found only talked about that it is possible to run a server with replay enabled but not how it is set up. That is completely missing from the wiki. I think the above step-by-step instructions would be a good addition to the replay wiki article.