I'm using a tech created for my campaign that is a smallcraft (boatbay) fighter.
It's actually three issues:
1) Shipyards don't appear to be populating the system_id in the shipyard table when created. All of the shipyards in my game have this field empty. This appears to be a bug, but may be an issue with how I created them. Figured this one out when I attempted to transfer a ship from the fleet screen to a shipyard and got an error stating that no shipyard was is the same system as the fleet, it was the race home system.
I've checked the SA database. All the older shipyards do have this field set but not the newer ones. I think this is because at some time in the past I changed the code so the shipyard complex checked the parent fleet to see how many modules it had. Therefore ComplexFleetID replaced SystemID in program terms. The system for the shipyard is now retrieved from the Fleet table. However, I obviously didn't take the shipyard button on the Fleet window into consideration when I made this decision, which is what caused the bug you describe. I have changed the code behind the shipyard button so the correct system for the shipyard is determined (by checking the location of the associated complex fleet).
2) The Prepfighters shipyard task appears to only consider expendable_type 2 (fighters) as valid for prep from crate. This one is strange since the crated strikefighters are listed as type 3 (ordinance).
Its been several years since I coded this area so I really have no idea what I intended at the time. However, the code in the end turn construction routine adds prepped fighters to ships exactly as if they were newly built fighters. From this, I assume that treating them as expendable type 2 is correct as there is no conversion in the code from a prepped type to a fully capable type. SA requires more manual intervention than Aurora because it was trying to replicate a board game and there were still areas in the game that were not covered by the code. It looks like what you do is create a prepped fighter task for the type of actual fighter than matches the crated fighter then manually delete the used up crated fighters in the Small Craft and Cargo Transfer window.
3) The Prepfighters shipyard task appears to only consider fighterbays as a valid. I expected a check for bay type of XO type based on expendable type. (ie smallcraft requiring boatbays, strikefighters requiring fighter bays, and gunboats requiring XOg's)
Looking at the code for the setup of the task, construct SC/GB/Fighters and Prep Fighters appear to be identical with the only difference being that for prep fighters a value is passed to the routine that populates the dropdown list that restricts it to fighters only. I could change this without much of a problem but it would only be available to you when I release an update. You couldn't change anything in the database to make this work.
Looks like won't be using crated smallcraft for this. At least not without a lot of maual intervention in the database.
Well, based on the fact that build small craft is pretty much identical to prep fighters (in SA code at least), why not create your crated smallcraft in the DB as a tech item and bulid them as required. When you need to prep them, use the build SC task instead and delete the used up crated items on the Small Craft and Cargo Transfer window? Would that work?
Steve