Goober5000 made a much improved (and backwards compatible) version of the script:https://www.hard-light.net/forums/index.php?topic=96939
Ship save/load script for checkpoints and red-alert like missions.
Instructions how to use it can be found in the readme.
Use 3.7.2 or newer (probably works on 3.6.16 upwards).
While working on a campaign I remembered reading that red-alert is not always doing what it should, especially with branching missions and several red-alert missions in a row. So I thought that a script might be a solution and because I wanted to learn how scripting works (haven't done much programming up to now, nothing object oriented) I started creating a script that saves all important (shipclass, hitpoints, ammo left,...) and some not so important (energy, shields, ...) shipdata into a file and loads the data into the game from the file.
The script is working as it should and gets called via script-eval with the shipname in FRED. It manages data for several ships in one file and does ship-vanish when a ship that was dead or absent while saving gets loaded. That way it can be used for red-alert like missions while playing them in the simulator or when a ship is not present in the next mission but is used again in the mission afterwards without repairs.
That said I have a few questions:
Does a script like this already exist and I just didn't find it?
Does it make sense at all to make a script for something the game engine should be able to do?
Is anyone interested in such a script and wants to see some feature in it? I'm still thinking about what else can be added or what options for loading may be of use...
The script needs a place to save shipdata and possibly a configuration file. Do you know what filetype may be the best choice and where to save it?
At the moment everything is in one file and all functions are in
I'm not exactly sure if this is the right place or if the functions should be better somewhere else.
So if there is any interest in the script I'll put in some changes, clean it, try to follow some of the advise in http://www.hard-light.net/forums/index.php?topic=72312.0
and release it. At the moment it's more or less the result of me learning lua the hard way with a target and without starting with easy examples like 'Hello World'