From 224c11761dcd5a49ebce88f319cba4fd4dc41ccb Mon Sep 17 00:00:00 2001 From: Bailey Danyluk Date: Mon, 27 May 2024 19:47:17 -0600 Subject: [PATCH] add aim120 definition --- addons/aim120/$PBOPREFIX$ | 1 + addons/aim120/CfgAmmo.hpp | 200 +++++++++++++++++++++++++++++ addons/aim120/CfgMagazines.hpp | 108 ++++++++++++++++ addons/aim120/CfgWeapons.hpp | 118 +++++++++++++++++ addons/aim120/README.md | 12 ++ addons/aim120/config.cpp | 20 +++ addons/aim120/script_component.hpp | 18 +++ addons/aim120/stringtable.xml | 44 +++++++ 8 files changed, 521 insertions(+) create mode 100644 addons/aim120/$PBOPREFIX$ create mode 100644 addons/aim120/CfgAmmo.hpp create mode 100644 addons/aim120/CfgMagazines.hpp create mode 100644 addons/aim120/CfgWeapons.hpp create mode 100644 addons/aim120/README.md create mode 100644 addons/aim120/config.cpp create mode 100644 addons/aim120/script_component.hpp create mode 100644 addons/aim120/stringtable.xml diff --git a/addons/aim120/$PBOPREFIX$ b/addons/aim120/$PBOPREFIX$ new file mode 100644 index 0000000000..9139f548f4 --- /dev/null +++ b/addons/aim120/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\aim120 \ No newline at end of file diff --git a/addons/aim120/CfgAmmo.hpp b/addons/aim120/CfgAmmo.hpp new file mode 100644 index 0000000000..fef12a51ae --- /dev/null +++ b/addons/aim120/CfgAmmo.hpp @@ -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; + }; + }; +}; + diff --git a/addons/aim120/CfgMagazines.hpp b/addons/aim120/CfgMagazines.hpp new file mode 100644 index 0000000000..7d866accb0 --- /dev/null +++ b/addons/aim120/CfgMagazines.hpp @@ -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); + }; +}; + diff --git a/addons/aim120/CfgWeapons.hpp b/addons/aim120/CfgWeapons.hpp new file mode 100644 index 0000000000..e033b7424d --- /dev/null +++ b/addons/aim120/CfgWeapons.hpp @@ -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"; + }; + }; +}; + diff --git a/addons/aim120/README.md b/addons/aim120/README.md new file mode 100644 index 0000000000..fc0fd068dd --- /dev/null +++ b/addons/aim120/README.md @@ -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) + diff --git a/addons/aim120/config.cpp b/addons/aim120/config.cpp new file mode 100644 index 0000000000..6b84b38bb7 --- /dev/null +++ b/addons/aim120/config.cpp @@ -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" + diff --git a/addons/aim120/script_component.hpp b/addons/aim120/script_component.hpp new file mode 100644 index 0000000000..25c6b2ea9f --- /dev/null +++ b/addons/aim120/script_component.hpp @@ -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" + diff --git a/addons/aim120/stringtable.xml b/addons/aim120/stringtable.xml new file mode 100644 index 0000000000..646a167631 --- /dev/null +++ b/addons/aim120/stringtable.xml @@ -0,0 +1,44 @@ + + + + + AIM-120A [ACE] + + + 1x AIM-120A [ACE] + + + AIM-120C [ACE] + + + 1x AIM-120C [ACE] + + + 2x AIM-120C [ACE] + + + AIM-120D [ACE] + + + 1x AIM-120D [ACE] + + + 2x AIM-120D [ACE] + + + R-77 [ACE] + + + 1x R-77 [ACE] + + + AIM-120 [ACE] + + + Direct + + + Loft + + +