SaveLoader 2.7

It uses the build in Python 2.6. I think it should work.

If Burster disables IO for Python (to write the file) the save/load actuators might still work (except they are diabled as well :wink: ).

I didnā€™t managed to get burster running locally and it has not that much priority right now.
If you want you can give it a try.

Adding the saveLoader is quite simple. I added a video tutorial to the first post.

Monster

Hey, is there any way to take the value from a string property and use that as the save file name? I ask because I could see this being very useful for map editors and such. But it would be able to save multiple maps. Not just have each one overwrite the last. (Iā€™m not to good at python btw, so a simple answer would be most appreciated)

It is already there. Add a property called

saveLoad.filename

to the saving/loading object.

See post #6 for an example

You can fill in a filename of your choice. Just make sure it is the correct name when you are going to load the file.

Oh wow, I probably should have read the thread more closely. I kind of skimmed a lot of it since I do not understand what you are saying O.o Its way to technical for me. Thanks a lot for this script.

hmm, thanks for the critics. I tried to add that much options, that is looks just complicated :S.

I think I should produce some more video tutorials. So I can show some more details. The current one, just shows the simplest way of using it.

Since 2.3 the SaveLoader is compatible with BGE 2.5!

Added an auto load option (see SaveLoader.autoLoad).
Added a reset to default option (see SaveLoader.loadDefault) with <0>.

Renamed all Saveloader objects.

Required:
SaveLoad.master - carries the Python file and deals with preloaded storage (required)

Portal related:

SaveLoad.storePlayer - stores/restores the player object (previously called ship)
SaveLoad.storeScene - stores/restores the non-player objecs

Saving/Loading:
SaveLoad.manual - complete store/restore with <s>/<l>
SaveLoad.autoLoad - complete restore of a saved game at startup
SaveLoad.loadDefault - removes the complete storage and reloads the scene

Attachments

SaveLoaderUsageDemo2.4.blend (159 KB)

Version 2.6:

  • Bugfix: If a prepared Scene did not need to get restored
    the contained instance objects are not removed anymore.

Version 2.5:

  • added makeSingleObject - it does not really belong to the
    saveLoad but it is necessary to remove any doublicate objects
  • added clearAllStores to clear all stored storage.

Attachments

SaveLoaderUsageDemo2.6.blend (162 KB)

2.7
04 Nov 2011

  • Bugfix: Missing objects after loading. Instances are not
    found in BGE 2.59+. Corrected naming
  • corrected logmessage

Attachments

SaveLoaderUsageDemo2.7.blend (162 KB)

Can I ask again, Where in the code exactly can you change the load/save buttons to something different than S and L. they are already being used in my game. Another post asked you the smae question and you refered them to post 5. But that just a thank you from somebody else. I hope I can get an exact line of code where to look i canā€™t find any reference to the keys in the script that comes with the demo? Thanks.

Not in code (this would be very inflexible and it should never be necessary to change code for configuration).

You simply change the parameters of the according keyboard sensors (Ctrl.SaveLoad).

Thanks that got me back on track

I guess 'Im off track again. I canā€™t find where the S and L keys that are being used for the save load functions are located. What object exactly do i click on to revel the keyboard sensor logic bricks that control this. I have selected every object in the file and i still canā€™t find what the keyboard senors are connected that control S and L?

I finally found it by clicking on the empty call SaveLoad.manual then going to state 3. Thanks

First of all, thanks so much for this awesome set of scriptsā€¦ youā€™ve really saved me.

However, Iā€™ve got a strange issue:
When I press the key to save my game, then I load the game, all of a sudden the main controllable objects start rotating wildly. How do I stop this?

I guess that are some side effects. Without your blend I canā€™t tell what it is.

Especially with parenting there are some issues.

:open_mouth: this run in blender 2.65! Thanks men! now I can make my game! :slight_smile: sorry englishā€¦is a good english? i not use translator :slight_smile:

Hi how can i do it that the game in the clear.AllStores (Default) start?
must I delete somthing in the script or need I a beinning allways that the s0 Sensor activate?
How can I do It???

You keep the game object ā€œSaveLoad.autoLoadā€ active in your scene. If it is there it will load and restore at scene start.

Ok I will Tray it thanks!