Files
sector-32-documentation/Savegames.md
2021-08-18 18:11:40 +02:00

1.6 KiB

Overview

  • GeneralPurposeSave (Savegame) : The object containing all changable information within a level
  • SaveGame (Task) : Save the full current state of the game into a GeneralPurposeSavegame
  • SaveGameLoader (Actor) : On EventBeginPlay use the GeneralPurposeSavegame provided at actor spawn to populate and alter the level acordingly
  • MetaSave (Savegame) : A meta-save containing all Level results, the current GeneralPurposeSavegame and an assotiated savegame slot string

GeneralPurposeSavegame

States

Ship Vars

  • Health
  • Shield
  • AmmoPrimary
  • AmmoSecondary
  • Flares

Transforms

  • PlayerTransform
  • RizTransform
  • MarkTransform

Other

  • CurrentLevel (Name)
  • DisplayString (String, name of the save)

Changeable Actor States

  • WaypointStates (Map, String of Actor FQN to WaypointState-struct)
  • Gamefacts (Map, String, Gamefact-Name/Bool)
  • DialogTriggerStates (Map, String to WaypointState-struct)
  • Gamefacts_LevelState (Map, String, Gamefact-Name/Bool)
  • ActorSpawns (List of structs, Class/Transforms to spawn)
  • TagHiddenStateTaskTracker (List of structs, Tag/HiddenState to set to the specified state)

Updating and Saving

Ship Vars, Transforms and Other are set by an Update Values call in the "SaveGame"-Task. GamefactStates and TagHiddenStateTaskTracker are set by the respective Tasks in dialog-BT, namely: SetActorHiddenState, SetFactByName. DialogTriggerStates, ActorSpawns and WaypointStates are updated during the triggered execution of the respective Actors, namely: DialogTriggerDefault, WaypointDefaultActor (SpawnActorOption) and WaypointDefaultActor (no options).