I would like to suggest a following feature:
- type: STR_SMALL_SCOUT
researchSwitch:
STR_LASER_RIFLE:
- STR_SMALL_SCOUT_WITH_LASER_RIFLES
STR_SMALL_SCOUT_WITH_LASER_RIFLES is another, separate deployment. If you don't have STR_LASER_RIFLE researched, the deployment is loaded as normal; but if you do, the game uses STR_SMALL_SCOUT_WITH_LASER_RIFLES instead of STR_SMALL_SCOUT.
If a deployment has multiple research switches, like in this case:
- type: STR_SMALL_SCOUT
researchSwitch:
STR_LASER_RIFLE:
- STR_SMALL_SCOUT_LASER_RIFLE
STR_MEDI_KIT:
- STR_SMALL_SCOUT_MEDI_KIT
and you have both prerequisites, then the game picks one of these two deployments at random.
The second-level deployment (the one the game uses instead of the basic one, because you have the necessary research) may also have researchSwitch of its own; when used, it forces the game to use yet another deployment. (This would be used to make "tiered" sets: the game normally uses deployment 1, but when you have research X it uses deployment 2, and if you have researches X and Y the game uses deployment 3.)
But what for?
In more story-driven mods, players' decisions are often represented as completing a certain research. Some such decisions may have impact on the battlescape. For example, in XCF you can either share some weapon techs with your allies or not; and if you do, they should use this tech in combat on cooperative missions (which is something the players request regularly).
Why not simply make a new mission and use scripts to differentiate between having and not having a certain research?
It's doable, but with more complex scripts becomes rather impractical. Many of my missions are launched from multiple scripts (depending on time, research projects etc.) despite having one and the same deployment. I wouldn't want to double that amount just to introduce more research conditions, if I can help it, and also make duplicates of the corresponding missions, regions and all that jazz. A simple switch on the deployment level as shown above would be a nice, simple solution (from a modder's perspective).
EDIT: Also would be nice to set some odds of the deployment switch (a chance for the switch to happen).