Results 1 to 5 of 5

Thread: Autosave control

  1. #1
    Join Date
    Sep 2016

    Autosave control

    Please allow modders to control when autosaves can occur. This solves a few issues:

    1) Modders need to put in extra effort to handle asynchronous events that can be running while the autosave occurs. For example, timers, coroutines, and setpositionsmooth. These are far from trivial to handle.
    2) Any temporarily used variables that are not intended to be kept outside of a relatively small period of the game (ie. round/turn) must be persisted in the save file in the event that the period is broken up by an autosave
    3) 10 seconds is an arbitrary period to go forward/backward in a game's history. By allowing mods to trigger autosaves at key points (end of a round/turn), it is more clear to the players what the state of the game was at each save point.
    4) Because saving is synchronous, mods which save a LOT of data can experience stuttering/pausing when autosaves occur. Limiting when this can happen can create a better experience. Note: This would only be an issue in extreme examples, and is usually the modder's fault (as it was in my case), but I could see some rare legitimate cases.

    To achieve the above, I propose the following:

    • Option for the host and/or script to disable autosaves
    • new function: triggerAutosave()
    Last edited by Sancho; 06-12-2020 at 01:12 PM.

  2. #2
    This sounds really sensible and useful. The only other option I can think of here is "auto-save whenever an object is placed on the table", so the player can rewind step by step without reverting to a state where their are components mid-air.

  3. #3
    Great suggestion. The way things are now, since you can't control autosaves you basically have to be ready for anything when the autosave happens, which in practice means that the mod ignores autosaves and possibly breaks if the player tries to rewind. I don't want to spend precious hours of development time on tiny little details of loading/saving just in case the autosave happens in the middle of a complex scripting sequence. Giving us control of autosaves would turn them into an actually useful feature for modding.

  4. #4
    Join Date
    Sep 2016
    Thanks for the feedback. I realized my original suggestion was very disjointed and poorly written, so I edited my original post. Hopefully this should make things more clear.

  5. #5
    Join Date
    Sep 2017
    One way to resist trouble with auto-save is to save yourself right after a potentially breaking script action. That would clean up any cruft left with a bad auto-save.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts