Startup option to list save-game metadata

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
quyxkh
Filter Inserter
Filter Inserter
Posts: 964
Joined: Sun May 08, 2016 9:01 am
Contact:

Startup option to list save-game metadata

Post by quyxkh »

Like most people on Linux I think, I have an options-processing frontender to start factorio from the command line. So just `Factorio` hunts down the latest savegame (or autosave), or I can say `Factorio -b sometest` and it'll hunt down the latest save game with `sometest` in its name and start it with benchmarking set up the way I like it, and so on. `Factorio $(mr ~/down)` starts factorio with the last thing I downloaded, because I've got a `mr` command to show me the most recent thing at that path, `Factorio -M seablock` starts Factorio with the most recent save and my seablock mods list, and so on.

But the thing I can't do without some fragile binary spelunking I'm trying to avoid is tell what mods I should have active to load a map. The GUI will show me that, after loading a possibly-wrong set. Any chance of getting a `--show-metadata` startup option to quickly show the same map and mod versions and maybe scenario name info the Load Game screen shows?

Code: Select all

$ factorio --show-metadata FILE        # same FILE search the other map-loading options use, with the negligible startup overhead of the `--benchmark` option.
{  
    map_version = "1.1.37",
    scenario = "freeplay",
    mods = { base = "1.1.37", HallOfFame = "1.9.0" },
 } 
 $
 

or json instead of lua might be more to taste.

I've got this feeling I'm not the first to ask for something like this, but searching for map metadata showed nothing similar in the first maybe couple dozen hits so here it is again I guess.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 387
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Startup option to list save-game metadata

Post by Silari »

Wouldn't it be easier (and possibly simpler to implement) to just have a command line switch that does the same thing as the 'Sync mods to save' button when a save file is provided?

quyxkh
Filter Inserter
Filter Inserter
Posts: 964
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Startup option to list save-game metadata

Post by quyxkh »

Silari wrote:
Thu Aug 05, 2021 2:59 am
Wouldn't it be easier (and possibly simpler to implement) to just have a command line switch that does the same thing as the 'Sync mods to save' button when a save file is provided?
That might be easier but it wouldn't allow for people adding their favored QoL mod set to maps.

There's all kinds of alternate possibilities you could imagine, I'm asking for what I think is the simplest to implement, just spitting info the game is already acquiring, the code's almost all written already. If I'm dreaming the cli allows multiple mod-enable json's in the mods directory and you can supply a list, like `--mods base,seablock,mystuff` and it looks for `base.json` or if that doesn't exist it looks for a "base" mod, and so forth, and loads up the union, but all of that stuff is easy to script, which I've already got. I'm just asking for what I can't already get reliably.

quyxkh
Filter Inserter
Filter Inserter
Posts: 964
Joined: Sun May 08, 2016 9:01 am
Contact:

Command line option to list metadata of saved game

Post by quyxkh »

I'd really like it if Factorio had a command-line option to dump metadata about save files, like the mods & versions list, the current tick, the last non-autosave file the map was saved to, maybe list of known players, whatever. Mostly for me the mod list, because a modpack mismatch is always unnecessary and gets annoying, life is good enough that it can be the worst thing that happens to you all day, and when it happens *repeatedly* all day, well, there's nerd rage in the air.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12717
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Command line option to list metadata of saved game

Post by ssilk »

splitted from viewtopic.php?f=6&t=1255 Sorting savegames: by date / world… into new topic

…then merging with existing topic

:roll:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”