I have just uploaded version 0.11 to the Nexus mod site, Steam version updated.
www.nexusmods.com/xrebirth/mods/422/
Changed Trigger actor from Trade Manager to Defense Manager to get out of the way of the Trading and Manager scripts and improve chances of getting to the "Recycle or Destroy station" menu.
This is a maintenance release that fixes the cause of the Unknown Defence Officers. It also improves the cleanup routine which should delete them all from a station as you finish Comm with that station
It also provides an option to search for them all and delete them from the Tools - Repair Service menu - Unknown Defence Officer The unknown Defence Officers are listed to the debug.log and the summary of the cleanup is posted to the player log under Upkeep
So you have two options
1) Fly around as normal and let the improved cleanup deal with it one station at a time without you doing anything
2) Count and clean them all up in one go via the new Tools option
If you get some seriously large numbers ( 3 figures +) then please post them for my info

Objective
To add a way to recycle or cleanly destroy player space stations that are
No longer needed
In 20:20 hindsight have been put up in the wrong place
Where the wrong type of station was built and the build location could be better used by something else
Didn't build properly the first time but are so far back in the save games that you can't face loosing all the work to get them out
This frees up the build location and releases the original Construction Vessel (Recycle) or sells the wares from the builder CV (Recycle + sell).
You can then use the released CV (with the recycled materials as cargo and with a working Architect) to rebuild the same or a different station on the same or a different spot. Alternatively you could just sell the wares.
How to Use
Fly to the zone that contains your station that you want to recycle or destroy
Open communications with your station. This can be done from the Comm button in the Zone map or Property Owned. Then select the Defence Manager
Or
Land on one of your builder (attached to a station) Construction Vessels
Pick the Destroy or Recycle Backdoor
Then
Pick the Destroy or Recycle Station menu option
Then pick either Destroy Station or Recycle Station or Recycle + sell
Confirm your action
NEW - Construction Vessel is now released from the station and is no longer destroyed, so it can be reused.
Sit back and watch the explosions and decide what to do with the recycled wares [optional]
or
Pick the Release Construction Vessel which will detach the CV from your station and let you use it elsewhere
or
Pick the Tools menu
Diagnostics to provide orders on how to resolve "Destroy or Recycle Station" options being greyed out
Transfer Engineer to station to transfer the engineer from the attached Construction Vessel to the station.
Repair Service provides fixes or cleanups for this mod - now includes Unknown Defence Officer which will remove unknown Defence Officers from all stations
Reset main cue to clear the working flag (if ordered to)
Known issues
From v0.09 the Defense Manager now has the "Recycle or Destroy station" menu instead of the Trade Manager. This gets out of the way of the Trading and Manager scripts and improves the chances of getting to the "Recycle or Destroy station" menu.
The dummy Defense Manager is there to allow you to get at the "Destroy or Recycle Station" menu. You will be charged the max price which is refunded as it is destroyed. It should be deleted as you close the "Zone map" or "Property Owned" menus.
There are still some informational messages in the code
Will not recycle a station that has no building CV but it will destroy it. Egosoft provide an option to attach a new CV to an existing station. Once this is done you will be able to recycle the station.
Releasing the CV keeps the existing CV and all of its crew except the Architect which is cloned with the same skills as the original
Known issues specific to Recycle and sell Wares
The ware selling mission doesn't currently update any status info.
Recycling a moderate size station with defense drones and missiles will produce 14 wares which means that it will take 25 minutes plus and some work on your part to load it into another CV
You have to be in the same zone as the station to recycle it, you need to stay there until the selling mission starts then you can leave.
If you are using another CV to offload the wares into then I suggest that you leave the zone when the selling mission starts to speed things up as CV's loading cargo don't seem to like being watched.
ToDo
A proportion of the wares stored inside the station should be ejected into space for salvage - medium
Improve the "Recycle + sell" mission - low
Release history
- [16.11.2015 - V0.11 Public Beta]
RecycleSt_DummyNPC Now checks that player owns station before adding a dummy Defence Officer to trigger mod via Comm menu
RecycleSt_DummyNPC Will now cleanup unknown dummy Defence officers from any station owner
RecycleSt_DummyNPC Got rid of fee for dummy Defence Officer - improved cleanup should deal with things
RecycleSt_DummyNPC_Clean added to provide search and cleanup for unknown dummy Defence officers from Tools - Repair Service menu
RecycleSt_Fns Clone Architect now also copies their name