Skip to reading
Save Games & Inventory

Save-slot event context reference

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
Source table from Save-slot event context reference, page 90
Context keyMeaning at input time
guiElementIdThe Save Game Widget element ID.
saveSlotActual numerical save slot.
saveExistsWhether the saved state exists.
saveNameStored save name.
saveSceneId / saveSceneNameSaved scene references.
saveTimestampStored timestamp text.
saveDate / saveTimeStored date and time text.
savePlayTimeFormatted recorded play time.
savePlayTimeSecondsRecorded duration as a number.
saveThumbnailPathThumbnail path, if supplied.
saveIsAutosaveWhether this slot is the configured autosave.
saveStatussaved or empty.

The normal GUI event context also identifies the GUI and event. The script example names its parameter event_context so the context is supplied to run. Use Dictionary.get with a sensible fallback when a script can be called from more than one kind of event.

The context describes the slot before the built-in action. Query the live slot later for a completed save or delete. Status-variable values written on selection have their own autosave distinction.

Do not use saveThumbnailPath as proof that the gameplay save can load. Check saveExists and the actual load result when a later action depends on success.

Page 90 of 96Permalink
Go to page