Save Load
Use when implementing save/load systems, ConfigFile, JSON, Resource serialization...
Install
npx skills add jame581/GodotPrompter --skill save-load -g -a claude-code -y- Repository
- jame581/GodotPrompter914
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,350 tokens
- Runs scripts
- No, instructions only
What it does
Use when implementing save/load systems, ConfigFile, JSON, Resource serialization, save game architecture
Save / Load Systems in Godot 4.3+
Choose the right serialization strategy for your data type. All examples target Godot 4.3+ with no deprecated APIs.
Related skills: resource-pattern for custom Resource data containers, inventory-system for inventory serialization patterns, godot-project-setup for SaveManager autoload setup, popochiu for adventure-framework saves.
1. Strategy Comparison
| Strategy | Best For | Readable | Editor Support | Notes |
|---|---|---|---|---|
| ConfigFile | Settings, simple key-value data | Yes | No | Built-in INI-style, no extra deps |
| JSON | Game saves, flexible structures | Yes | No | Cross-platform, version-migratable |
| Resource .tres | Editor-integrated data | Yes | Yes | NOT secure, never load untrusted files |
| Resource .res | Fast binary data | No | Yes | NOT secure, never load untrusted files |
When you recommend a strategy, name the one you rejected and the factor that decided it, "JSON, not Resource files, because saves are user-writable and loading a Resource can run code". A format picked without a named alternative cannot be overruled.
Security warning: Loading
.tresor.resfiles executes arbitrary GDScript embedded in the resource. Never load Resource files from untrusted sources (user-uploaded files, downloaded mods). Use ConfigFile or JSON for user-generated save data.
2. ConfigFile, Settings
ConfigFile writes INI-style sections, ideal for audio / video / controls settings (small, designer-debuggable). Use set_value(section, key, value) then save(path); load with load(path) and get_value(section, key, default).
