godot-save-load-systems

Implements versioned save/load systems in Godot using JSON, binary serialization, and PERSIST groups.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-save-load-systems-decioluvier
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: godot-save-load-systems
Source: https://github.com/DecioLuvier/Shatterless/tree/main/.claude/skills/godot/references/godot-save-load-systems
Command: npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-save-load-systems-decioluvier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Game progress, settings, and state persistence in Godot often breaks when save schemas evolve, files corrupt mid-write, or untrusted save data is deserialized unsafely. This Skill provides a blueprint for building robust save/load systems with versioning, migration, backups, and integrity checks. ## Core Features & Use Cases - Format Selection Guidance: Decision tree for choosing JSON, binary store_var, ResourceSaver, or PERSIST group collection based on data shape and trust level. - Versioning and Migration: Mandatory version fields with migration scripts so old saves keep working after schema changes. - Corruption and Tamper Protection: Rolling .bak backups, SHA-256 integrity validation, encrypted slots via FileAccess.open_encrypted_with_pass, and the allow_objects=false trust boundary against RCE in untrusted saves. - Use Case: A player updates your game and their old save no longer matches the new data structure. The migration manager upgrades the save version-by-version, validates it, and falls back to a backup if integrity checks fail. ## Quick Start Ask the AI to implement a versioned JSON save system with migration and backup support for your Godot 4 project using this skill.

Frequently Asked Questions about godot-save-load-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save and load game data in Godot 4?▼

Use a SaveManager Autoload that writes a Dictionary to user:// via FileAccess, serialized as JSON or binary store_var. Include a version field, validate loaded data with data.get defaults, and save only at checkpoints or menus, never per physics frame.

JSON vs binary store_var for Godot save files?▼

JSON is human-readable and suits small to medium progress data, but loses type fidelity for Variants like Vector3. Binary store_var preserves types and handles larger blobs, but must use allow_objects=false for untrusted saves to avoid code execution risks.

How do I migrate old save files after updating my Godot game?▼

Store a version field in every save and run a migration manager that upgrades the data one version hop at a time before loading. Never skip hops, and keep save schema versioning separate from engine version upgrades.

Why is store_var with allow_objects=true dangerous for save files?▼

Setting allow_objects=true enables full object decoding, which allows arbitrary code execution from tampered or downloaded save files. Always use false for player saves, workshop mods, or any untrusted data, reserving true only for trusted local tooling.

How do I prevent save file corruption in Godot?▼

Copy the existing save to a .bak file before overwriting, write to a temp file then rename, and optionally verify integrity with FileAccess.get_sha256. On mismatch, fall back to the backup instead of loading corrupted data.

Can I encrypt Godot save files to prevent cheating?▼

Yes, use FileAccess.open_encrypted_with_pass to encrypt sensitive save slots with AES. The password must come from secure storage or a user secret, never hardcoded in the script, and encrypted saves should still use allow_objects=false.