FreeSpace Releases > Scripting Releases

ship save/load script

<< < (18/18)

I thought I'd post my version of the ship save/load script.  The only major change is to implement the deferred file writing I mentioned above, since I encountered significant pauses in both Scroll and Deneb III when using the script in certain missions.  With this new version, the pauses are not noticeable.

The new functionality required a few changes to the API.  When saving a file, you must call save_init before all of the save calls, followed by save_done after all of them.  (The save_done call is what actually writes the data to the file.)  When loading a file, you must call load_init before all of the load calls.  There is no corresponding load_done.

NB: In this script, I used "Invisible Target" instead of "Shipsave" for the temp class ship entry.

Admiral MS:
Oh, so you already made these changes, that's nice :)
I'll add your version to the package, update the readme and maybe rename the shipclass back to Shipsave for consistency. You could have sent me a PM though - I didn't notice any new posts in here despite checking the forum nearly every day.

Oh, well, I thought you would have thread notifications enabled.

(Actually, we have had issues with the forum not sending emails to some members, so you may not have seen it.)

Bump to let people know about my rewritten version of this script.


[0] Message Index

[*] Previous page

Go to full version