add aim120 definition

This commit is contained in:
Bailey Danyluk 2024-05-27 19:47:17 -06:00
parent b29c97ec81
commit 224c11761d
8 changed files with 521 additions and 0 deletions

View File

@ -0,0 +1 @@
z\ace\addons\aim120

200
addons/aim120/CfgAmmo.hpp Normal file
View File

@ -0,0 +1,200 @@
class CfgAmmo {
class ammo_Missile_AMRAAM_C;
class M_Zephyr;
// AIM-120
class GVAR(a): M_Zephyr {
missileLockCone = 30;
missileKeepLockedCone = 30;
missileLockMaxDistance = 16000;
missileLockMinDistance = 500;
author = "Dani (TCVM)";
maneuvrability = 0;
flightProfiles[] = {"Direct", "Loft"};
class Direct {}; // dummy to allow for F cycling of missile mode
class Loft {};
class ace_missileguidance {
enabled = 1;
pitchRate = 30; // Minium flap deflection for guidance
yawRate = 30; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode
// Guidance type for munitions
defaultSeekerType = "DopplerRadar";
seekerTypes[] = { "DopplerRadar" };
lockableTypes[] = {"Air"};
minimumSpeedFilter = 25; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.0001; // filter out targets that are this close to the ground (speed of light)
maxTerrainCheck = 16000; // How far we should check for terrain
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
defaultNavigationType = "ZeroEffortMiss";
navigationTypes[] = { "ZeroEffortMiss" };
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 50; // Angle from the shooter's view that can track the missile
seekerAccuracy = 1; // seeker accuracy multiplier
seekerMinRange = 75;
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
// Attack profile type selection
defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR", "LOFT"};
useModeForAttackProfile = 1;
};
};
class GVAR(c): ammo_Missile_AMRAAM_C {
missileLockCone = 30;
missileKeepLockedCone = 30;
missileLockMaxDistance = 16000;
missileLockMinDistance = 500;
author = "Dani (TCVM)";
maneuvrability = 0;
flightProfiles[] = {"Direct", "Loft"};
class Direct {}; // dummy to allow for F cycling of missile mode
class Loft {};
class ace_missileguidance {
enabled = 1;
pitchRate = 30; // Minium flap deflection for guidance
yawRate = 30; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode
// Guidance type for munitions
defaultSeekerType = "DopplerRadar";
seekerTypes[] = { "DopplerRadar" };
lockableTypes[] = {"Air"};
minimumSpeedFilter = 25; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.0001; // filter out targets that are this close to the ground (speed of light)
maxTerrainCheck = 16000; // How far we should check for terrain
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
defaultNavigationType = "ZeroEffortMiss";
navigationTypes[] = { "ZeroEffortMiss" };
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 50; // Angle from the shooter's view that can track the missile
seekerAccuracy = 1; // seeker accuracy multiplier
seekerMinRange = 75;
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
// Attack profile type selection
defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR", "LOFT"};
useModeForAttackProfile = 1;
};
};
class ammo_Missile_AMRAAM_D;
class GVAR(d): ammo_Missile_AMRAAM_D {
missileLockCone = 45;
missileKeepLockedCone = 45;
missileLockMaxDistance = 16000;
missileLockMinDistance = 500;
author = "Dani (TCVM)";
maneuvrability = 0;
flightProfiles[] = {"Direct", "TopDown"};
class Direct {}; // dummy to allow for F cycling of missile mode
class TopDown {};
class ace_missileguidance {
enabled = 1;
pitchRate = 45; // Minium flap deflection for guidance
yawRate = 45; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode
// Guidance type for munitions
defaultSeekerType = "DopplerRadar";
seekerTypes[] = { "DopplerRadar" };
lockableTypes[] = {"Air"};
minimumSpeedFilter = 15; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.00005; // filter out targets that are this close to the ground (speed of light)
maxTerrainCheck = 16000; // How far we should check for terrain
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
defaultNavigationType = "ZeroEffortMiss";
navigationTypes[] = { "ZeroEffortMiss" };
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 50; // Angle from the shooter's view that can track the missile
seekerAccuracy = 1; // seeker accuracy multiplier
seekerMinRange = 75;
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
// Attack profile type selection
defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR", "LOFT"};
useModeForAttackProfile = 1;
};
};
// R-77
class ammo_Missile_AA_R77;
class GVAR(r77): ammo_Missile_AA_R77 {
missileLockCone = 50;
missileKeepLockedCone = 50;
missileLockMaxDistance = 16000;
missileLockMinDistance = 500;
author = "Dani (TCVM)";
maneuvrability = 0;
flightProfiles[] = {"Direct", "TopDown"};
class Direct {}; // dummy to allow for F cycling of missile mode
class TopDown {};
class ace_missileguidance {
enabled = 1;
pitchRate = 40; // Minium flap deflection for guidance
yawRate = 40; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode
// Guidance type for munitions
defaultSeekerType = "DopplerRadar";
seekerTypes[] = { "DopplerRadar" };
lockableTypes[] = {"Air"};
minimumSpeedFilter = 15; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.00005; // filter out targets that are this close to the ground (speed of light)
maxTerrainCheck = 16000; // How far we should check for terrain
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
defaultNavigationType = "ZeroEffortMiss";
navigationTypes[] = { "ZeroEffortMiss" };
seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 50; // Angle from the shooter's view that can track the missile
seekerAccuracy = 1; // seeker accuracy multiplier
seekerMinRange = 75;
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
// Attack profile type selection
defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR", "LOFT"};
useModeForAttackProfile = 1;
};
};
};

View File

@ -0,0 +1,108 @@
class CfgMagazines {
class magazine_Missile_AMRAAM_C_x1;
class PylonMissile_Missile_AMRAAM_C_x1;
class PylonRack_Missile_AMRAAM_C_x1;
class PylonRack_Missile_AMRAAM_C_x2;
class PylonMissile_Missile_AMRAAM_D_x1;
class PylonMissile_Missile_AMRAAM_D_INT_x1;
class PylonRack_Missile_AMRAAM_D_x1;
class PylonRack_Missile_AMRAAM_D_x2;
class 4Rnd_GAA_missiles;
class PylonRack_1Rnd_GAA_missiles;
class PylonMissile_1Rnd_GAA_missiles;
class GVAR(a): 4Rnd_GAA_missiles {
author = "Dani (TCVM)";
displayName = CSTRING(a);
ammo = QGVAR(a);
};
class GVAR(PylonRack_1Rnd_a): PylonRack_1Rnd_GAA_missiles {
author = "Dani (TCVM)";
displayName = CSTRING(a_1x);
ammo = QGVAR(a);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_1Rnd_a): PylonMissile_1Rnd_GAA_missiles {
author = "Dani (TCVM)";
displayName = CSTRING(a_1x);
ammo = QGVAR(a);
pylonWeapon = QGVAR(aim120Launcher);
};
// AIM-120
class GVAR(c): magazine_Missile_AMRAAM_C_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(c_1x);
ammo = QGVAR(c);
};
class GVAR(PylonMissile_Missile_c_x1): PylonMissile_Missile_AMRAAM_C_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(c_1x);
ammo = QGVAR(c);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_c_x1): PylonRack_Missile_AMRAAM_C_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(c_1x);
ammo = QGVAR(c);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_c_x2): PylonRack_Missile_AMRAAM_C_x2 {
author = "Dani (TCVM)";
displayName = CSTRING(c_2x);
ammo = QGVAR(c);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_Missile_d_x1): PylonMissile_Missile_AMRAAM_D_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_Missile_d_INT_x1): PylonMissile_Missile_AMRAAM_D_INT_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_d_x1): PylonRack_Missile_AMRAAM_D_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_d_x2): PylonRack_Missile_AMRAAM_D_x2 {
author = "Dani (TCVM)";
displayName = CSTRING(d_2x);
ammo = QGVAR(d);
pylonWeapon = QGVAR(aim120Launcher);
};
// R-77
class magazine_Missile_AA_R77_x1;
class PylonMissile_Missile_AA_R77_x1;
class PylonMissile_Missile_AA_R77_INT_x1;
class GVAR(r77): magazine_Missile_AA_R77_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(r77_1x);
ammo = QGVAR(r77);
};
class GVAR(PylonMissile_Missile_R77_x1): PylonMissile_Missile_AA_R77_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(r77_1x);
ammo = QGVAR(r77);
pylonWeapon = QGVAR(r77Launcher);
};
class GVAR(PylonMissile_Missile_R77__INT_x1): PylonMissile_Missile_AA_R77_INT_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(r77_1x);
ammo = QGVAR(r77);
pylonWeapon = QGVAR(r77Launcher);
};
};

View File

@ -0,0 +1,118 @@
class CfgWeapons {
class weapon_AMRAAMLauncher;
class MissileLauncher;
class GVAR(aim120Launcher): weapon_AMRAAMLauncher {
author = "Dani (TCVM)";
displayName = CSTRING(aim120);
weaponLockDelay = 0.5;
magazines[] = {
QGVAR(a),
QGVAR(PylonRack_1Rnd_a),
QGVAR(PylonMissile_1Rnd_a),
QGVAR(c),
QGVAR(PylonMissile_Missile_c_x1),
QGVAR(PylonRack_Missile_c_x1),
QGVAR(PylonRack_Missile_c_x2),
QGVAR(PylonMissile_Missile_d_x1),
QGVAR(PylonMissile_Missile_d_INT_x1),
QGVAR(PylonRack_Missile_d_x1),
QGVAR(PylonRack_Missile_d_x2)
};
modes[] = {"Direct", "Loft"};
class Direct: MissileLauncher {
displayName = CSTRING(direct);
textureType = "direct";
reloadTime = 0.1;
magazineReloadTime = 0.1;
aiRateOfFire = 15;
aiRateOfFireDispersion = -10;
aiRateOfFireDistance = 10000;
minRange = 800;
minRangeProbab = 0.5;
midRange = 2500;
midRangeProbab = 0.95;
maxRange = 4000;
maxRangeProbab = 1;
sounds[] = {"StandardSound"};
class StandardSound {
begin1[] = {"A3\Sounds_F\weapons\Rockets\missile_2", 1.12202, 1.3, 1000};
soundBegin[] = {"begin1", 1};
weaponSoundEffect = "DefaultRifle";
};
soundFly[] = {"A3\Sounds_F\weapons\Rockets\rocket_fly_1", 1, 1.5, 700};
lockingTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_1", 0.562341, 1};
lockedTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_3", 0.562341, 2.5};
EGVAR(missileGuidance,attackProfile) = "DIR";
};
class Loft: Direct {
displayName = CSTRING(loft);
textureType = "topdown";
minRange = 4000;
minRangeProbab = 0.5;
midRange = 7000;
midRangeProbab = 0.95;
maxRange = 13000;
maxRangeProbab = 1;
EGVAR(missileGuidance,attackProfile) = "LOFT";
};
};
class weapon_R77Launcher;
class GVAR(r77Launcher): weapon_R77Launcher {
author = "Dani (TCVM)";
displayName = CSTRING(r77);
weaponLockDelay = 0.5;
magazines[] = {QGVAR(r77), QGVAR(PylonMissile_Missile_R77_x1), QGVAR(PylonMissile_Missile_R77__INT_x1)};
modes[] = {"Direct", "Loft"};
class Direct: MissileLauncher {
displayName = CSTRING(direct);
textureType = "direct";
reloadTime = 0.1;
magazineReloadTime = 0.1;
aiRateOfFire = 15;
aiRateOfFireDispersion = -10;
aiRateOfFireDistance = 10000;
minRange = 800;
minRangeProbab = 0.5;
midRange = 2500;
midRangeProbab = 0.95;
maxRange = 4000;
maxRangeProbab = 1;
sounds[] = {"StandardSound"};
class StandardSound {
begin1[] = {"A3\Sounds_F\weapons\Rockets\missile_2", 1.12202, 1.3, 1000};
soundBegin[] = {"begin1", 1};
weaponSoundEffect = "DefaultRifle";
};
soundFly[] = {"A3\Sounds_F\weapons\Rockets\rocket_fly_1", 1, 1.5, 700};
lockingTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_1", 0.562341, 1};
lockedTargetSound[] = {"\A3\Sounds_F\weapons\Rockets\locked_3", 0.562341, 2.5};
EGVAR(missileGuidance,attackProfile) = "DIR";
};
class Loft: Direct {
displayName = CSTRING(loft);
textureType = "topdown";
minRange = 4000;
minRangeProbab = 0.5;
midRange = 7000;
midRangeProbab = 0.95;
maxRange = 13000;
maxRangeProbab = 1;
EGVAR(missileGuidance,attackProfile) = "LOFT";
};
};
};

12
addons/aim120/README.md Normal file
View File

@ -0,0 +1,12 @@
ace_aim120
===================
Adds AIM-120, AIM-132, and R-77 AHR missiles
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Dani-TCVM](https://github.com/TheCandianVendingMachine)

20
addons/aim120/config.cpp Normal file
View File

@ -0,0 +1,20 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common","ace_missileguidance"};
author = ECSTRING(common,ACETeam);
authors[] = {"Dani (TCVM)"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"

View File

@ -0,0 +1,18 @@
#define COMPONENT aim120
#define COMPONENT_BEAUTIFIED AIM-120
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AIM120
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_AIM120
#define DEBUG_SETTINGS DEBUG_SETTINGS_AIM120
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="AIM120">
<Key ID="STR_ACE_AIM120_a">
<English>AIM-120A [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_a_1x">
<English>1x AIM-120A [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_c">
<English>AIM-120C [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_c_1x">
<English>1x AIM-120C [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_c_2x">
<English>2x AIM-120C [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_d">
<English>AIM-120D [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_d_1x">
<English>1x AIM-120D [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_d_2x">
<English>2x AIM-120D [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_r77">
<English>R-77 [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_r77_1x">
<English>1x R-77 [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_aim120">
<English>AIM-120 [ACE]</English>
</Key>
<Key ID="STR_ACE_AIM120_direct">
<English>Direct</English>
</Key>
<Key ID="STR_ACE_AIM120_loft">
<English>Loft</English>
</Key>
</Package>
</Project>