OK, this could either go here or in the FRED area. It's gone here
This build contains the remove-goal sexp which inadvertantly got left out at some point.
The actual sexp itself has 2 parameters, the ship/wing and the order to remove, and if a priority is specified, uses that while sorting through the goals.
If a priority is not specified, the first goal matching the sexp directive in the Ai_info structure is removed.
A very basic test was done with a mission supplied by The_E, but it was by no means conclusive, only that the general idea worked.
Things that probably need to be beaten to death are:
-removing goals from wings
-removing goals from ships
-removing goals based on priority
-removing every possible goal there is. I might have made a mistake in any one of them (and you'll understand when you see the patch - this turned out to be a lot more hideous than it could have been)
The priority code uses atoi(CTEXT(CDR... atm, so no sub sexps for calculating the priority yet
There are 5 builds here: fs2 release, debug, fred release and debug, and mib_cyzrzks modified debug version with a console capable of executing arbitrary sexps in-game.
The patch is also here. Without further ado, and an 'anything that goes wrong is your own damn fault':
The PatchSCP Release VersionSCP Debug VersionFRED Release VersionFRED Debug VersionDebug with mib_cyzrzks console VersionPlease don't hit the server too hard