One of the most powerful assets the player side has in a campaign is Skyrider's helicopter. While it lacks armament, it can rapidly move a squad on the map with unrivalled speed. The queen herself is wary of its capabilities. Given the queen's vast monetary reserves, it is incomprehensible why she never acquires helicopters herself.
As you've likely guessed by now, this is going to change.
The first new feature under ASD control, the queen now has a way of acquiring helicopters, with which she can deploy soldiers across the map as well.
Helicopters are 'unlocked' once the AI is aware of the player using Skyrider's helicopter (indicated by a cutscene), it can then purchase some for itself.
Just like Skyrider, they can then fly a small squad around on the map and deploy them. Helicopters have to be fuelled and repaired, which consumes AI resources.

The player can shoot down helis via SAM batteries, and infantry-based MANPADS. Due to engine limitations, this cannot be done manually.
Every time an enemy helicopter moves and is known to the player, his air defense will try to shoot the heli down.
There are two kinds of anti-air-defenses:

SAM sites cover a large amount of the map and can fire in any of 'their' sectors (see SamSites.xml).
They require control of the sector. They can be rendered inactive by damaging their control computer.
It is now possible for the player to repair SAM sites he controls.
Damaged SAM sites can be repaired by the player in the strategic map.
They uncover any enemy heli in their sectors, but will only fire if staff (militia or mercs) is present.
CTH depends on quality of the staff and range to the target.

MAn-Portable-Air-Defense-Systems are infantry based missile launchers. They can only be used by mercs.
They can only be used on targets in the same or adjacent sectors.
CTH depends on weapon status, range and the user's cth with launchers.
The launchers have to be armed in the inventory, it is not required to have them in the hands.
The MANPADS in the trunk is the Strela-2, items #1736 & #1737. It currently uses placeholder pictures, until someone is willing to provide better ones.

A new background tag (<SAM_cth>) can modify a merc's cth (both with SAM and MANPAD). By default it is +25% for pilots and +75% for Bob (he is a decorated F16-pilot after all. If anyone in Arulco knows how air defense works, its him).

For balance reasons (there should to be an incentive to use MANPADS over SAMs), default MANPADS damage is a lot higher than SAM damage.
If a helicopter was downed, there is a chance that the pilot survived and can be killed or captured by the player (downed pilots are counted as officers with regards to Prisoner Interrogation).

Provided the sector has the correct tilesets, it is also possible to destroy enemy helicopters on the ground if they are parking in their home base. For vanilla maps, I did this by adding the correct tileset to the Meduna airfield (Ja2set.dat.xml, entry 48). This also requires USE_XML_TILESETS to be TRUE.

Enemy helicopter raids target strategically important targets to the player (towns, mines, inactive SAMs, roads, farms if MILITIA_VOLUNTEER_POOL is on) that are lightly defended and reachable without too much hostile SAM exposure.

The AI can have up to 2 helicopters, each carrying up to 6 elites. Travel time per sector is 10 minutes.

This feature is definetely not recommended for new players. The AI will target lightly defended sectors that are away from the frontline. Leaving Flo alone at Tony if you have no air defense is not a good idea if this feature is on.

For JA2_Options.ini values and additional info, see section [Enemy Helicopter Settings]. For obvious reasons, this feature is closely related to ASD and requires it to be active.

This feature is savegame-compatible.

This was added to the trunk in r8015 & GameDir r2279. Using this feature without the proper gamedata will get you chosen as Ted cruz' running mate.

[Updated on: Sat, 09 January 2016 21:45]

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

@sevenfm: Pretty! Is that active in RR? If so, did they (you?) add flying (movement always on height 1?)?

@CVB: A heli simply drops 6 elites. One of the drawbacks of the normal strategic AI is moving such a small team is not reliably doable (long and awkward story). For this reason, they are simply ejected at the target location - they will start or join a fight, but otherwise stay there. This isn't a drawback, however - this means that the player has to actively get rid of them, which ties up forces.

While very rare, it is also possible that in an ongoing fight, with an enemy helicopter in the same sector, the AI calls for reinforcements and the heli-based squad joins the battle. In this case, they'll simply join from a more or less random edge of the sector.

It would be very cool if they roped from the heli like the player can nowadays (this was indeed my initial motivation for the whole thing), but this causes absolute havoc with turnbased mode and the AI. That code is still in though, just not called - you can try by using InitiateEnemyAirDropSoldiers(...).

As to the updated exe... likely not this weekend, but soon-ish.

Edit: As of r8016, if a downed enemy helicopter had soldiers on it, there is a chance that they survived the crash - they are then added to the sector (previously it was just the pilot).

I realize that there are now a few cases (VIP presence, downed helicopters) where an indication on the map would be desirable, but doesn't really fit the existing layers. Perhaps we need a new one for recent events or something like that?

[Updated on: Sun, 10 January 2016 00:23]

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Pretty! Is that active in RR? If so, did they (you?) add flying (movement always on height 1?)?

This was just a replacement animation for robot bodytype in RR'005, just as in other early ja2 mods like NOps or SJ, without additional code changes as far as I know.
I hope with all new vehicle changes made by Anv and others someday this could be implemented in 1.13 as support for enemy, especially as ambush on open terrains or as a support for city assault.

Flugente

Helicopters are 'unlocked' once the AI is aware of the player using Skyrider's helicopter (indicated by a cutscene)

This sounds a bit illogical for me, why Queen should avoid using helicopters only because player doesn't use them? Maybe she should start using helicopters anyway but later in the game, at progress 50% for example?
So the player can delay this by not using his own helicopter, but not disable it completely.

Helicopters are 'unlocked' once the AI is aware of the player using Skyrider's helicopter (indicated by a cutscene)

This sounds a bit illogical for me, why Queen should avoid using helicopters only because player doesn't use them? Maybe she should start using helicopters anyway but later in the game, at progress 50% for example?
So the player can delay this by not using his own helicopter, but not disable it completely.

I have to agree. You already added ENEMYHELI_ACTIVE = TRUE to Ja2_Options.ini. How about another parameter ENEMYHELI_MINIMUM_PROGRESS = x as we have for tanks?

Also I would suggest to put the following mod related parameters to Mod_Settings.ini:

;------------------------------------------------------------------------------------------------------------------------------
; Settings related to placement of helicopters in maps
;------------------------------------------------------------------------------------------------------------------------------
; The base of the helicopters where they are refueled, repaired and based during missions
; Sector number is (x - 1) + (y - 1) * 16, example: Meduna Airfield - x = 3, y = 14 -> Sector number 210
; Valid from 0 to 255
ENEMYHELI_BASE = 210
; If the tileset of the helicopter base contains helicopter graphics, they can appear in the map when they are currently at the base.
; They can then be destroyed (for example by an infiltrating spy with C4).
; Up to two helicopter positions can be given
; Tiles in tactical where the helis should be parked. Use -1 to never show a heli
ENEMYHELI_BASE_PARKPOSITION_1 = 18475
ENEMYHELI_BASE_PARKPOSITION_2 = 18469
; heli teile index in the map tileset (see also HeliSites.xml). In changed maps, you will need at least a map editor to figure this one out
ENEMYHELI_BASE_PARK_TILEINDEX = 1689

; helis are unlocked either by the Skyrider cutscene (skipping it won't help) or if game progress reaches this value.
ENEMYHELI_DEFINITE_UNLOCK_AT_PROGRESS = 30

The following settings were moved from JA2_Options.ini to Mod_Settings.ini:

[ASD]
; supply sector (resources for the AI arrive here)
ASD_SUPPLY_ARRIVAL_SECTOR_X = 3
ASD_SUPPLY_ARRIVAL_SECTOR_Y = 14
[Enemy Heli]
; enemy heli base and park positions
ENEMYHELI_BASE_X = 3
ENEMYHELI_BASE_Y = 14
; If the tileset of the helicopter base contains helicopter graphics, they can appear in the map when they are currently at the base. Use -1 to not use
ENEMYHELI_BASE_PARKPOSITION_1 = 18475
ENEMYHELI_BASE_PARKPOSITION_2 = 18469
; heli teile index in the map tileset (see also HeliSites.xml). In changed maps, you will need at least a map editor to figure this one out
ENEMYHELI_BASE_PARK_TILEINDEX = 1689

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Is this feature is in 8047?
Do I need to turn it on?
In which place?
Never mind.

[Updated on: Tue, 02 February 2016 22:58]

Many thanks to all those who make new features for Jagged Alliance 2.

New mod + new map (JA2 map with Drassen, Omerta, Cambria etc, edited or not-it has been repeatedly ) with large sectors + two additional levels + a lot of new tileset + moving vehicles = fun for months, years. Fun with creation, fun playing this mod.

For balance reasons (there should to be an incentive to use MANPADS over SAMs), default MANPADS damage is a lot higher than SAM damage.

Purely theoretically speaking, since I haven't actually played with enemy helicopters on, the chance to have local air defense even when outside my fixed SAM umbrella and especially the chance to lay SAM traps for the AI would be incentive enough for me to carry a couple of MANPADS along.

I assume that the AI isn't aware which of my teams carry MANPADS? Then it could be a nice surprise to leave, say, Grumm Mine lightly defended but place a MANPADS team on the direct flight path from Meduna Airport to Grumm.

Questions:
How many MANPADS are actually fired on a helicopter when there is more than one launcher and/or reload missile in a sector?
One? One per launcher? All missiles available? One after another as long as the heli remains airborne?

Do MANPADS work both ways, i.e. can the army now shoot down Skyrider's heli outside the fixed SAM coverage as well? (If not, hint...)

And a proposal: since there aren't that many pilots around (is there even one besides Bob and Skyraider?), maybe give mercs with the heavy weapons trait a bonus as well?

Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

The AI isn't aware of whether we have MANPADS (it would be odd of the AI knew our inventory, wouldn't it?).

MANPADS have a range of 1 sector. In order to fire, the mercs must currently know of the heli, either by seeing it themselves, having a scout see it from an adjacent sector, or it being in range of a working player SAM.
Every 'helicopter turn' (10 minutes, so every time it moves), we loop over our mercs in range, everybody can fire once.

The AI does not use MANPADS. As enemy soldiers and inventory does not exist outside of the currently loaded sector, we don't know whether any enemy team has air defense. We could simulate that by deciding at random how many any patrol has every time our heli gets in range - but then this becomes a tedious game of 'move heli, reload'. There is no skill for us operating the heli there, just luck.

As the current MANPADS (Strela) is a heavy weapon, merc with the heavy weapons trait already get a substantial cth boost (no damage boost though, because say so). Bob and Skyraider get the special SAM background because they are very familiar with aircraft and would thus know a bit about how to down them.

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

In case nobody has already produced a set of graphics for the SA-7 Strela here is a set I put together over the last few days, on MediaFire.

Details:
- based on graphic from Wikipedia
- using the P1 libary, 901 and 902 (my last SCI download goes up to 900 so these were the next indexes for me)
- it made more sense for me to use the launch tube (minus battery and grip) as the interface graphic but the loose rocket for the Big Image looked too good to pass up

I was testing the Starstreak HVM as a dual anti-air/anti-tank weapon added to the next AFS and I noticed that the Strela stats (copied for the initial Starstreak) had 3 shots / 4 turns which makes it unusable in turn base, was this intentional? To complete testing of the AT stats I set both MANPADS to 5 shots / 4 turns which allows firing but I'm concerned if this will cause problems with the feature.

The weapon stats are irrelevant as far as shooting helis is concerned - damage depends on ENEMYHELI_MANPADS_DAMAGE_BASE and ENEMYHELI_MANPADS_DAMAGE_VAR, accuracy on marksmanship, heavy weapons trait and samcth background property. I intentionally made the Strela bad to indicate to the player that this weapon is rather bad against anything but its intended purpose.

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

While digging through vanilla code, I found out that SAM sites were originally intended to be repaired by the player - however this code was deactivated in Jan. 1999. Since having mercs to stuff is much cooler than magically spending money on it, I have now reactivated this method (and scrapped my method of, well, clicking on the 'Repair' button in the sector description) in r8314.

This option only appears in a sector with a damaged SAM site.

On the repair(wo)man's portrait, the first number indicates the number of points they can repair in one hour, the second one is the number of points that are missing to 100.

In order for repair to work , your merc needs the Technician (new trait system) or Electronics (old trait system) trait.

As repairing this is hard, normal repair points are divided by 4 (original code was 10, which is bonkers).

For those who don't know this, a SAM can be damaged by destroying the control console.

If the console was destroyed, repairing the status over 20% will bring the console back.

A SAM cannot function at all below 50% (was 80%). Though as most of the times player simply destroy the console, the status was always kinda binary...

For those who don't know, SAM radius is influenced by status and hack status.

[Updated on: Fri, 14 October 2016 20:01]

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

In r8446 I fixed an annoying bug with this feature: when an enemy airdrop occurred in a sector that had mercs, you often got to a point where you entered the sector, where prompted to place your mercs... and then couldn't do so. This has been fixed (unless I missed yet another method to start battles).

I also got reports that the airdrops often occurred in sectors to heavily defended, making this less a danger than a supply drop. I've thus increased the perceived threat of mercs to the heli attack decision function, this should make the airborne attacks less obviously suicidal.

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

I have a quick question. Where can I find Strela? Bobby doesn't have it nor have I found it after any battle. In case it has some relation to the Strela I'm using newest AIMNAS and Volatile 8338 exe for more mercs.