Add long range SAMs

This commit is contained in:
Brandon Danyluk 2021-04-21 01:41:56 -06:00
parent 6b3be24be7
commit a91b3aa1c9
9 changed files with 283 additions and 6 deletions

View File

@ -33,9 +33,9 @@ Weapon Configs:
ZSU-39 Tigris AA - Infrared
Mk49 Spartan - Infrared
Mk21 Centurion - Doppler Radar
MIM-145 - Doppler Radar
S-750 - Doppler Radar
X Mk21 Centurion - Doppler Radar
X MIM-145 - Doppler Radar
X S-750 - Doppler Radar
Seeker Types:
X Laser
@ -73,9 +73,9 @@ Navigation Types:
X AIM-120 - ZEM
X AIM-132 - ZEM
X GBU-SDB - ZEM
MIM-145 - ZEM
S-750 - ZEM
Mk49 Spartan - ZEM
X MIM-145 - ZEM
X S-750 - ZEM
X Mk49 Spartan - ZEM
Navigation State Machine:
Todo: Will allow for changing of navigation type in flight to get a more realistic flight profile

1
addons/sam/$PBOPREFIX$ Normal file
View File

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

122
addons/sam/CfgAmmo.hpp Normal file
View File

@ -0,0 +1,122 @@
class CfgAmmo {
class ammo_Missile_mim145;
class GVAR(patriot): ammo_Missile_mim145 {
author = "Brandon (TCVM)";
maneuvrability = 0;
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 = 10; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.00001; // 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"};
};
};
class ammo_Missile_rim162;
class GVAR(RIM162): ammo_Missile_rim162 {
author = "Brandon (TCVM)";
maneuvrability = 0;
class ace_missileguidance {
enabled = 1;
pitchRate = 15; // Minium flap deflection for guidance
yawRate = 15; // 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 = 20; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.00001; // 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"};
};
};
class ammo_Missile_s750;
class GVAR(s400): ammo_Missile_s750 {
author = "Brandon (TCVM)";
maneuvrability = 0;
class ace_missileguidance {
enabled = 1;
pitchRate = 25; // Minium flap deflection for guidance
yawRate = 25; // 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 = 5; // filter out targets that have a closing velocity less than this
minimumTimeFilter = 0.000001; // 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"};
};
};
};

View File

@ -0,0 +1,20 @@
class CfgMagazines {
class magazine_Missile_mim145_x4;
class GVAR(patriot): magazine_Missile_mim145_x4 {
displayName = "MIM-104 Patriot Missile";
ammo = QGVAR(patriot);
};
class magazine_Missile_rim162_x8;
class GVAR(RIM162): magazine_Missile_rim162_x8 {
displayName = "RIM-162 ESSM";
ammo = QGVAR(RIM162);
};
class magazine_Missile_s750_x4;
class GVAR(s400): magazine_Missile_s750_x4 {
displayName = "S-400";
ammo = QGVAR(s400);
};
};

View File

@ -0,0 +1,57 @@
class CfgVehicles {
class LandVehicle;
class StaticWeapon: LandVehicle {
class Turrets;
};
class StaticMGWeapon: StaticWeapon {
class Turrets: Turrets {
class MainTurret;
};
};
// RIM-162
class SAM_System_02_base_F: StaticMGWeapon {
displayName = "Mk-29";
class Turrets: Turrets {
class MainTurret: MainTurret {
gunnerName = "Mk-29 Operator";
weapons[] = {
QGVAR(RIM162)
};
magazines[] = {
QGVAR(RIM162)
};
};
};
};
// Patriot
class SAM_System_03_base_F: StaticMGWeapon {
displayName = "MIM-104 Patriot";
class Turrets: Turrets {
class MainTurret: MainTurret {
gunnerName = "MIM-104 Patriot Operator";
weapons[] = {
QGVAR(patriot)
};
magazines[] = {
QGVAR(patriot)
};
};
};
};
// S-400
class SAM_System_04_base_F: StaticMGWeapon {
displayName = "S-400";
class Turrets: Turrets {
class MainTurret: MainTurret {
gunnerName = "S-400 Operator";
weapons[] = {
QGVAR(s400)
};
magazines[] = {
QGVAR(s400)
};
};
};
};
};

26
addons/sam/CfgWeapons.hpp Normal file
View File

@ -0,0 +1,26 @@
class CfgWeapons {
class weapon_mim145Launcher;
class GVAR(patriot): weapon_mim145Launcher {
author = "Brandon (TCVM)";
displayName = "MIM-104 Patriot";
magazines[] = { QGVAR(patriot) };
weaponLockDelay = 0.5;
};
class weapon_rim162Launcher;
class GVAR(RIM162): weapon_rim162Launcher {
author = "Brandon (TCVM)";
displayName = "Mk-29 ESSM";
magazines[] = { QGVAR(RIM162) };
weaponLockDelay = 0.5;
};
class weapon_s750Launcher;
class GVAR(s400): weapon_s750Launcher {
author = "Brandon (TCVM)";
displayName = "S-400";
magazines[] = { QGVAR(s400) };
weaponLockDelay = 0.5;
};
};

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

@ -0,0 +1,12 @@
ace_sam
===================
Adds MIM-104 Patriot, S-400, and RIM-162 missiles
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Brandon-TCVM](https://github.com/TheCandianVendingMachine)

21
addons/sam/config.cpp Normal file
View File

@ -0,0 +1,21 @@
#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[] = {"Brandon (TCVM)"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,18 @@
#define COMPONENT sam
#define COMPONENT_BEAUTIFIED SAM
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_SAM
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_SAM
#define DEBUG_SETTINGS DEBUG_SETTINGS_SAM
#endif
#include "\z\ace\addons\main\script_macros.hpp"