10-persistence.md
1 # Persistence & Save System 2 3 ## Save slots 4 5 3 save slots total. 6 7 - **Slot 1** (index 0): Reserved for auto-save 8 - **Slots 2–3** (index 1–2): Manual saves 9 10 ## Auto-save 11 12 Triggers every 3 turns automatically. 13 Overwrites slot 1 without confirmation. 14 15 ## Save data 16 17 Each save stores: 18 - Full game state (ship, galaxy, position, points, turn, log, etc.) 19 - Save metadata for display: commander name, rank, points, turn, ship name, planets explored, timestamp 20 21 ## Main menu 22 23 Shows all non-empty save slots with preview data. 24 Player can load any saved game or start a new mission. 25 26 ## In-game save/load 27 28 Available from the SAVE tab during navigation screen. 29 - **Save**: Writes current state to selected slot 30 - **Load**: Restores state from selected slot 31 - **Delete**: Clears a slot 32 33 ## Backward compatibility 34 35 When loading a save from before the component HP system was added, 36 the game builds a fresh compHealth object from the legacy scalar values.