← Back to Rapier · project planning pack

Skill · Version 1.0.0

Unity progression and saves

Preserves Unity inventory, quests and unlocks across saving, loading and updates. Defines restoration order and recovery behavior so interrupted writes or replayed actions do not corrupt progress.

unity-gameplay-progression-save

Agents using this skill

See how it helps

When is it useful?

Use it when you add saved progress or need to stop loading from duplicating items, rewards or completed quest actions.

What does it help you do?

  • Defines what inventory changes and quest steps are allowed, including full bags, missing items and a reward that has already been granted.
  • Restores the player, world and active quests in a deliberate order so loading a save does not grant rewards or unlocks again.
  • Checks save-file versions and damaged or incomplete files; plans writes so an interrupted save does not silently replace the only recoverable copy.

Try asking this

Add a save point after a Unity dungeon boss. Save inventory, quest completion and the opened exit, then load twice and confirm the reward is not repeated. Test an older file version and an interrupted write; a damaged new file must not silently replace the player's only recoverable progress.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Progression and Save Restoration

Model state before persistence

Separate immutable item/quest/ability definitions from per-player runtime instances. Give persisted definitions stable identifiers independent of scene instance IDs or hierarchy paths. Identify who owns progress, when changes become durable and what a checkpoint actually restores.

  • Define inventory invariants: stack limits, unique items, capacity, quantity bounds and failure behavior. A rejected operation must not partially remove or duplicate items.
  • Model quests and abilities with explicit states and transition guards. Rewards, unlocks and checkpoint grants need an idempotency rule so replaying an event or restoring a save cannot grant them twice.
  • Specify dependencies and restoration order: definitions, player state, scene/world state, active quests and presentation. A load should reconstruct a valid state before events trigger gameplay side effects.
  • Persist plain versioned data with validation and deliberate migrations. Treat missing definitions, unknown fields, corrupt/truncated files and future versions as explicit cases. Preserve recoverable data rather than silently overwriting it.
  • Use the project's platform-appropriate save location and write/replacement strategy. Keep a last-known-good copy where appropriate; a crash during writing should not destroy the only valid save.
  • Distinguish a save request from a completed durable write. Handle cancellation, scene exit, concurrent requests and failures without reporting success early.
  • Keep secrets and authoritative multiplayer economy state out of editable local saves. Follow existing cloud-sync/account semantics when present; don't introduce an external service by assumption.

Verification

Round-trip representative progress, empty/new-game state and old versions. Check interrupted writes, malformed data, missing content, repeated load, scene transition and reward replay. Use temporary fixture data instead of real player saves. Report the actual tested platform and restoration scenarios.

References: version-matched Unity serialization and Application.persistentDataPath. Inspect target-platform behavior before choosing a storage or atomic replacement API.

Included files 1

  • SKILL.md