From 11520d03f49fec8a704e3035bd2f6a28460fd8dd Mon Sep 17 00:00:00 2001 From: Bailey Danyluk Date: Mon, 27 May 2024 21:16:15 -0600 Subject: [PATCH] Add Vikhr missile --- addons/vikhr/$PBOPREFIX$ | 1 + addons/vikhr/CfgAmmo.hpp | 46 +++++++++++++++++++++++++++ addons/vikhr/CfgMagazines.hpp | 53 +++++++++++++++++++++++++++++++ addons/vikhr/CfgWeapons.hpp | 17 ++++++++++ addons/vikhr/README.md | 12 +++++++ addons/vikhr/config.cpp | 20 ++++++++++++ addons/vikhr/script_component.hpp | 18 +++++++++++ addons/vikhr/stringtable.xml | 26 +++++++++++++++ 8 files changed, 193 insertions(+) create mode 100644 addons/vikhr/$PBOPREFIX$ create mode 100644 addons/vikhr/CfgAmmo.hpp create mode 100644 addons/vikhr/CfgMagazines.hpp create mode 100644 addons/vikhr/CfgWeapons.hpp create mode 100644 addons/vikhr/README.md create mode 100644 addons/vikhr/config.cpp create mode 100644 addons/vikhr/script_component.hpp create mode 100644 addons/vikhr/stringtable.xml diff --git a/addons/vikhr/$PBOPREFIX$ b/addons/vikhr/$PBOPREFIX$ new file mode 100644 index 0000000000..fcf7c92a17 --- /dev/null +++ b/addons/vikhr/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\vikhr \ No newline at end of file diff --git a/addons/vikhr/CfgAmmo.hpp b/addons/vikhr/CfgAmmo.hpp new file mode 100644 index 0000000000..919948103a --- /dev/null +++ b/addons/vikhr/CfgAmmo.hpp @@ -0,0 +1,46 @@ +class CfgAmmo { + class M_Scalpel_AT; + class GVAR(9k121): M_Scalpel_AT { + author = "Dani (TCVM)"; + maneuvrability = 0; + + irLock = 0; + laserLock = 0; + manualControl = 0; + + class ace_missileguidance { + enabled = 1; + showTrail = 1; + + pitchRate = 60; // Minium flap deflection for guidance + yawRate = 60; // Maximum flap deflection for guidance + + canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode + + // Guidance type for munitions + defaultSeekerType = "SACLOS"; + seekerTypes[] = { "SACLOS" }; + + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = { "LOBL" }; + + defaultNavigationType = "Line"; + navigationTypes[] = { "Line" }; + + lineGainP = 8; + lineGainD = 6; + + seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos] + seekerAngle = 15; // Angle from the shooter's view that can track the missile + seekerAccuracy = 1; // seeker accuracy multiplier + + seekerMinRange = 30; + seekerMaxRange = 12000; // Range from the missile which the seeker can visually search + + // Attack profile type selection + defaultAttackProfile = "BEAM"; + attackProfiles[] = {"BEAM"}; + }; + }; +}; + diff --git a/addons/vikhr/CfgMagazines.hpp b/addons/vikhr/CfgMagazines.hpp new file mode 100644 index 0000000000..93084a9873 --- /dev/null +++ b/addons/vikhr/CfgMagazines.hpp @@ -0,0 +1,53 @@ +class CfgMagazines { + class 2Rnd_LG_scalpel; + class 6Rnd_LG_scalpel; + class 8Rnd_LG_scalpel; + class PylonRack_1Rnd_LG_scalpel; + class PylonMissile_1Rnd_LG_scalpel; + class PylonRack_3Rnd_LG_scalpel; + class PylonRack_4Rnd_LG_scalpel; + + class GVAR(2Rnd): 2Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(2x); + ammo = QGVAR(9k121); + }; + + class GVAR(6Rnd): 6Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(6x); + ammo = QGVAR(9k121); + }; + + class GVAR(8Rnd): 8Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(8x); + ammo = QGVAR(9k121); + }; + + class GVAR(PylonRack_1Rnd): PylonRack_1Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(1x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonMissile_1Rnd): PylonMissile_1Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(1x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonRack_3Rnd): PylonRack_3Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(3x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; + class GVAR(PylonRack_4Rnd): PylonRack_4Rnd_LG_scalpel { + author = "Dani (TCVM)"; + displayName = CSTRING(4x); + ammo = QGVAR(9k121); + pylonWeapon = QGVAR(9k121); + }; +}; + diff --git a/addons/vikhr/CfgWeapons.hpp b/addons/vikhr/CfgWeapons.hpp new file mode 100644 index 0000000000..3db46a69ab --- /dev/null +++ b/addons/vikhr/CfgWeapons.hpp @@ -0,0 +1,17 @@ +class CfgWeapons { + class missiles_SCALPEL; + class GVAR(9k121): missiles_SCALPEL { + author = "Dani (TCVM)"; + displayName = CSTRING(9k121); + magazines[] = { + QGVAR(2Rnd), + QGVAR(6Rnd), + QGVAR(8Rnd), + QGVAR(PylonRack_1Rnd), + QGVAR(PylonMissile_1Rnd), + QGVAR(PylonRack_3Rnd), + QGVAR(PylonRack_4Rnd) + }; + }; +}; + diff --git a/addons/vikhr/README.md b/addons/vikhr/README.md new file mode 100644 index 0000000000..ded31c7ae1 --- /dev/null +++ b/addons/vikhr/README.md @@ -0,0 +1,12 @@ +ace_vikhr +=================== + +Adds Vikhr beam-riding ATGM + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Dani-TCVM](https://github.com/TheCandianVendingMachine) + diff --git a/addons/vikhr/config.cpp b/addons/vikhr/config.cpp new file mode 100644 index 0000000000..6b84b38bb7 --- /dev/null +++ b/addons/vikhr/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/vikhr/script_component.hpp b/addons/vikhr/script_component.hpp new file mode 100644 index 0000000000..0d70703365 --- /dev/null +++ b/addons/vikhr/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT vikhr +#define COMPONENT_BEAUTIFIED Vikhr +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_VIKHR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_VIKHR + #define DEBUG_SETTINGS DEBUG_SETTINGS_VIKHR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + diff --git a/addons/vikhr/stringtable.xml b/addons/vikhr/stringtable.xml new file mode 100644 index 0000000000..f29807d233 --- /dev/null +++ b/addons/vikhr/stringtable.xml @@ -0,0 +1,26 @@ + + + + + 9k121 Vikhr [ACE] + + + 1x 9k121 Vikhr [ACE] + + + 2x 9k121 Vikhr [ACE] + + + 3x 9k121 Vikhr [ACE] + + + 4x 9k121 Vikhr [ACE] + + + 6x 9k121 Vikhr [ACE] + + + 8x 9k121 Vikhr [ACE] + + +