>> That's exactly how it works now!
Sorry, I should have been more specific. Currently, the "virtual dropship" is simply populated as needed from the top of the bases' soldiers list, which may coincide in whole or in part with soldiers assigned to another dropship (in which case, they get the equipment assigned to them from there).
You can't control who gets used, it's just the first 8 on the list, even if they are badly wounded, for instance. What would be better would be a persistent base defense group, so you can have a base supporting a designated defence unit which is *always* the first in line, so you can actually manage the membership and equipment of your designated defenders as you can with your expeditionary squads.
One solution would be a *persistent* virtual dropship, probably tied to an active Command Centre. Once it is active, it becomes a special category of hangar, and is assigned by a default a special dropship, called the Base Defence Squad, which has no equipment or weapon slots, needs no pilot and cannot be launched onto the Battlescape (presumably because it has no range, no speed etc). The dropship also cannot be transferred, bought, sold etc. It's simply a container for ground troops and UGVs
It's a bit of a fudge, because I suspect it would have to be displayed in the "aircraft" tab, which is a bit counter-intuitive, but functionally correct (and involves minimum UI changes, too). It would become available when it meets all display criteria (which ties in with the existing system), and is somehow marked as the first place to go for defenders during a base attack (although I have to confess, I have no clue how feasible that is to code. There may be engine contraints which make that impossible, for instance). Since the membership and equipment management stuff necessary all lives in the existing dropship coding, that would just need replicating.
Ideally, you might even be able to eventually control the size of your defence force by building more advanced (ie expensive) Command Centres, once the UI changes for varying squads sizes is implemented. A small radar-and-one-interceptor type base might only rate a cheap, 6 slot defence squad, whereas your dedicated research / production bases might rate the 2-space, hugely expensive Advanced Command Bunker, which allows 10 foot troops and 2 UGVs, suitable for fending off a Battleship-full of late game aliens
>> However it's not the right way to do it
I know I've seen discussions from the devs on how to deal with base defences, but not knowing enough about how the code works, I can't say for sure what the merits of any solution might be. So far as I understand the workings of the code, I think a good solution on the lines of what I've said here is possible without the need to make huge changes, but my understanding may well be flawed.
I've effectively sidestepped the issue myself, by deliberately selecting my Firebird crews exclusively from *below* the 8th "unused" soldier assigned to a base, and by keeping all the equipment I would want to use in a base defence in storage. Thus, in the event of a base attack, I have exactly the equipment and squad I want (slight exception it the case of wounded soldiers somehow higher up the order being selected if they are using the base hospital. You can also work around that by reverting to a previous save, and reassigning your low-number wounded to another hospital facility).
I love flamers for base defence, btw. Because it's such a confined map, it's rare to see something that's out of range, and it's a great use for low-stat troopers. Anyone can be a hero with a flamethrower