game.auto_save - remove prefix

Things that we aren't going to implement
Post Reply
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

game.auto_save - remove prefix

Post by moon69 »

From LuaGameScript.auto_save...
Saves will be named _autosave-*name* when provided.

Could we please have ability to remove the "_autosave-" prefix when a name is provided?
Primarily because it sorts _ to the bottom of the Load Game gui. It also reduces the horizontal space (so less of the actual filename is visible).

Thanks.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: game.auto_save - remove prefix

Post by Rseding91 »

The reason it's setup that way now is to prevent any script or mod from overwriting user-created save files.

The save name convention says: anything which starts with _autosave may be overwritten by an autosave. I don't want to allow mods to arbitrarily overwrite save files in the users save directory.

So, if this was to be allowed, it would fail if the save already existed - which seems very useless from a mod perspective (can only save once per system assuming the player never deletes the saves).
If you want to get ahold of me I'm almost always on Discord.

User avatar
Shados
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Mar 05, 2016 11:08 am
Contact:

Re: game.auto_save - remove prefix

Post by Shados »

Rseding91 wrote:
Mon May 18, 2020 8:50 pm
The reason it's setup that way now is to prevent any script or mod from overwriting user-created save files.

The save name convention says: anything which starts with _autosave may be overwritten by an autosave. I don't want to allow mods to arbitrarily overwrite save files in the users save directory.
`game.server_save` on the other hand doesn't add any prefix; is that an oversight, is it seen as more acceptable for server saves to be overwritten, or is there some other rationale behind it?
Rseding91 wrote:
Mon May 18, 2020 8:50 pm
So, if this was to be allowed, it would fail if the save already existed - which seems very useless from a mod perspective (can only save once per system assuming the player never deletes the saves).
Preventing overwriting isn't the same as making mods only able to save once, only once per unique save name. That's plenty for my use-case, at least.

Post Reply

Return to “Won't implement”