Game State Saver Plugin's icon

Game State Saver Plugin 4.2.0 Scripts 4.2 Community

Submitted by user jhlothamer; MIT; 2024-07-27

This plugin maintains game object state (property values) between scene changes as well as saves that state to a file. It handles the following scenarios for you:

1. Re-applying property values to game objects when a scene is reloaded. For example if an object is moved by the player, its position can be maintained so that it is in the new position when the scene is reloaded.
2. Re-instance a game object that was dynamically added to the scene. For example if an enemy drops an item and you want it to stay in the game even when the player leaves the scene, the plugin will re-instance this object when that scene is reloaded. Of course other properties can be persisted too, like the objects position.
3. Re-free a game object that was freed from the scene. For example, a quest item is added to a scene at design time in the Godot editor, and so is normally always present. However, the player can pick up the item which removes the item from the scene tree at runtime. This plugin will note the fact the item was freed and re-free it when the scene is reloaded.
4. Share values between scenes. This is done with a "global" section of the game state data. This allows something happening in one scene to affect something else in another. For example, a switch in once scene can set a global value to true which unlocks a door in another scene.

The plugin takes care of all of the above, but if you have special state logic you need to add for a game object, you can hook into the state system by connecting to certain signals (see readme for details).


View files Download Submit an issue Recent Edits