Airstrike
| Flag: | Airstrike |
| File(s): | rules(md).ini |
| Values: | Boolean values: yes or no, true or false, 1 or 0 |
| Default: | no |
| Applicable to: | Warheads |
Define whether this is a warhead that calls in an airstrike.
Notes
Airstrike=yes will prevent the ShrapnelWeapon from being created for this weapon, but it is normal for the AirburstWeapon.
This type of warheads does not deal damage nor establish an aggro link. Setting the Damage on weapons that use it to a non-zero value can normally create animations in the AnimList=, but it will not make other effects take effect, even if it is Rocker=yes, which does not require actual lethality.
If this effect is activated, then set AirstrikeTeam=1 (or higher) on guide unit is also required. Otherwise, the effect will not be truly activated, and the laser guide line and tinting will not be drawn. Additionally, AirstrikeTeamType must be set to a valid AircraftType; otherwise, firing will immediately trigger EIP#0041D88D.
- Whether AirstrikeTeam=1 (or higher) is satisfied directly determines whether the Airstrike logic can be truly activated.
- If it is not satisfied, then even if EliteAirstrikeTeam meets the conditions, nothing related will be enabled.
- If it is satisfied, then even ifEliteAirstrikeTeam is not satisfied, it can normally draw the flare line and tint the target, only it will not summon any[1] aircraft.
This uses AirstrikeRechargeTime as the cooldown time for aircraft after returning from executing an airstrike, similar to SpawnRegenRate in the spawns system.
The corresponding flags for when the guide unit reaches Elite level are as follows:
[SOMETECHNO] EliteAirstrikeTeam= EliteAirstrikeTeamType= EliteAirstrikeRechargeTime=
Note that the three flags in the Elite version have a Resetting Bug, if the data of the guide unit is changed in the map, then these three flags must be redefined.
When the aircraft enters the map, it will play the voice specified by [AudioVisual]→AirstrikeAttackVoice=. If after that, before the strike is completed, the unit responsible for guiding dies, then it will play the voice specified by [AudioVisual]→AirstrikeAbortSound= and directly enter the return process.
Just like spawnee, the experience gained by airstrike aircraft after destroying targets is their own and is not transferred to the guide units. Ares changed this. See #References.
Weapons using this type of warhead will tint the locked target with a color defined in [ColorAdd], specified by [AudioVisual]→LaserTargetColor= to indicate its index in that list. At the same time, draw a red line between the FLH and the target, with brightness continuously changing between 190,0,0 and 255,0,0. The end of this line[2] is located on the target, and draw a slightly larger red point. The position of the point will randomly move in ±15 radius based on the result range of a random number generator, while also affecting the position of the line's drawing end. Additionally, you can simultaneously enable a special Airstrike-style[3] attack cursor on weapons using this warhead by setting MigAttackCursor=yes, replacing the normally used Attack cursor.
When weapons with this warhead are used as a secondary weapon for any technos[4], they will be prioritized for use when attacking buildings and can only be used for attacking buildings. This will also introduce a rule for weapon selection:
((ResourceGatherer && ResourceDestination) || !CanC4) = true
When this condition is satisfied, even if other conditions permit, the target buildings cannot be attacked by this weapon, and it will fall back to using the primary weapon. A specific example is in Yuri's Revenge, when Boris attacks a Barrel, V3 Ammunition, Ammo Crate or deployed Slave Miner, he uses the AKM instead of calling an airstrike.
If, after the above formula determines to use the secondary weapon and not fall back to the primary weapon, the secondary weapon is unable to attack the target buildings due to reasons such as Verses=0%, then the infantry will be unable to obtain the Attack cursor on the target buildings.
The rule mentioned above is still part of the conventional weapon selection rules, so it can still be forcibly overridden by mandatory selections such as OpenTransportWeapon=0[5]. However, in this case, it will ignore MigAttackCursor=yes and use the regular Attack cursor instead of the Airstrike cursor.
Bugs/Side-Effects/Unexpected Limitations
If an aircraft has AirstrikeTeam=1[6], then whenever it is on an Attack mission and receives a Stop order, it may fly to the map boundary and be removed from the game upon arrival. If the aircraft also has AirportBound=yes and Ammo is set to a value not equal to -1[7], then this behavior will inevitably be triggered.
If [General]→SovParaDropInf= is not defined or invalid, then weapons using this warhead will also trigger EIP#0041D88D once they start firing.
- This bug has been fixed in Ares 0.2.
Airstrike flare line drawn to target at lower elevation would clip.
- This bug has been fixed in Phobos Build#47.
In fact, although airstrike passes an object to flare line, it passes the position parameter of the target's cell to the aircraft. Therefore, when the target is a moving object, it always performs unsatisfactorily, after all, it cannot track the target to launch an attack.
- See #References.
When a BuildingType uses such weapons, it causes itself to always display the same tinting effect as when locked.
- This bug has been fixed in Phobos Build#47.
The attacker/aircraft and the target shares the same pointer, which may lead to erroneous pointer overwriting issues and result in a crash, especially when an infantry that can guide an airstrike attacks another such infantry.
- This bug has been fixed in Phobos Build#47.
Footnotes
- ↑ In fact, this is also in line with the set value.
- ↑ This line is actually not complete; it will be truncated at 90% of its length.
- ↑ in mouse.sha from frame 480 to 487
- ↑ TechnoTypes include InfantryTypes, VehicleTypes, AircraftTypes, and BuildingTypes.
- ↑ For example, DeployFire=yes automatically enables DeployFireWeapon, and the latter has a default value of 1, which is the secondary weapon. Therefore, in this case, the primary weapon is always used when undeployed, and the secondary weapon is used after deployment. Even if the target should be immune according to the above formula, or as the attacker's infantry, due to settings like Deployer and UndeployDelay, it is actually impossible to switch to the deployed state to fire the secondary weapon at the target.
- ↑ Other values will not trigger this
- ↑ -1 is the default value, so it must be explicitly set.
References
- Starting from Ares0.2, the experience gained by airstrike aircraft from destroying targets can be proportionally transferred to guide units. Refer to Customizable Veterancy#From Airstrikes.
- Starting from Ares 0.7, airstrike-related voices can be customized. Refer to Airstrike Voices.
- Starting from Phobos Build#33, the simultaneous control of C4 and airstrike (CanC4) has been made separable. Furthermore, starting from Phobos Build#47, airstrike weapons are allowed to target non-building objects when set as an infantry's secondary weapon. Refer to Airstrike target eligibility.
- However, this also means that weapons which originally did not use this functionality and thus had no such restriction now require the manual application of a new flag to lift the limitation.
- Starting from Phobos Build#37, aircraft can be created at a specific distance and altitude from the target, instead of flying in from off-map. Refer to Fixed spawn distance & spawn height for airstrike / SpyPlane aircraft.
- Starting from Phobos Build#47, the color of the airstrike flare line can now be customized, and the airstrike aircraft will now target the unit directly instead of the cell beneath it. Refer to Airstrike flare visual customizations.
See Also
- Experience.FromAirstrike (Ares Only)
- Experience.AirstrikeModifier (Ares Only)
- VoiceAirstrikeAttack (Ares Only)
- VoiceAirstrikeAbort (Ares Only)