Jump to content

Unlimited quicksaves, with screenshots, using AHK


Vector

Recommended Posts

This is along the same lines as Multiple Sequential Savegames for KSP using AutoHotKey (AHK), but with a couple differences:

One, it is not limited in the number of saves. Each save goes to a new folder that is named after the date/time.

Two, it also saves the most recent screen shot to the same folder. If you take screen shots just prior to saving, this makes it much easier to see what is going on at the intermediate saves.

Without this sort of functionality I was always reluctant to use the quicksave feature because I never knew if I might want to return to the previous quicksave. Now, with no limitation, I can save before or after any major or minor event. As often as I want, I can screenshot (F1), quicksave (F5), and then run this script (currently bound to Ctrl-F5).

This script requires AutoHotKey (www.autohotkey.com) to run, which limits it to Windows.

Without further ado:


^F5::
; modify these to your particular install and savegame
outfolder := "C:\Users\Vector\Desktop\KSP\snapshots\"
screenshots := "C:\Users\Vector\Desktop\KSP\KSP_0.22\Screenshots\*.png"
gamefolder := "C:\Users\Vector\Desktop\KSP\KSP_0.22\saves\Tech0 Grand Tour\"

; Find most recent screenshot
latest := 0
Loop %screenshots%
{
FileGetTime, filetime
if (filetime > latest) {
latest := filetime
lastfullfile := A_LoopFileFullPath
lastfile := A_LoopFileName
}
}

; Create output folder
folder := outfolder . A_Now . "\"
FileCreateDir, %folder%

; Save three files to out folder
FileCopy, %lastfullfile%, %folder%
FileCopy, %gamefolder%quicksave.sfs, %folder%
FileCopy, %gamefolder%persistent.sfs, %folder%
MsgBox, Saved

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...