Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GM Missile Guidance Compat and other small fixes #521

Merged
merged 13 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions addons/missileGuidanceCompat/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ class CfgAmmo {
class M_Titan_AT;
class Bo_GBU12_LGB;

class ShellBase;
class ace_dragon_serviceCharge: ShellBase {
soundSetExplosion[] = {};
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};

class CUP_M_9K32_Strela_2_AA: M_Titan_AA {
maneuvrability = 0;
#include "CfgMissileStrela.hpp"
Expand Down
7 changes: 7 additions & 0 deletions addons/missileGuidanceCompat/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class CfgMagazines {
class CA_LauncherMagazine;
class CUP_Dragon_EP1_M: CA_LauncherMagazine {
ammo = "ace_dragon_super";
initSpeed = 120;
};
};
38 changes: 38 additions & 0 deletions addons/missileGuidanceCompat/CfgMissileHOT.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
class ace_missileguidance { // reference https://github.com/acemod/ACE3/pull/10029
enabled = 1;

pitchRate = 45; // Minium flap deflection for guidance
yawRate = 45; // Maximum flap deflection for guidance

canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode

showTrail = 1;

// Guidance type for munitions
defaultSeekerType = "SACLOS";
seekerTypes[] = { "SACLOS" };

defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };

defaultNavigationType = "Line";
navigationTypes[] = { "Line" };

lineGainP = 7;
lineGainD = 6;

initialPitch = 2;

seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 30; // Angle from the shooter's view that can track the missile
seekerAccuracy = 1; // seeker accuracy multiplier

seekerMinRange = 75;
seekerMaxRange = 4000; // Range from the missile which the seeker can visually search

offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair.
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved

// Attack profile type selection
defaultAttackProfile = "WIRE";
attackProfiles[] = {"WIRE"};
};
38 changes: 38 additions & 0 deletions addons/missileGuidanceCompat/CfgMissileMilan.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
class ace_missileguidance {
enabled = 1;

pitchRate = 60; // Minium flap deflection for guidance
yawRate = 60; // Maximum flap deflection for guidance

canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode

showTrail = 0;

// Guidance type for munitions
defaultSeekerType = "SACLOS";
seekerTypes[] = { "SACLOS" };

defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };

defaultNavigationType = "Line";
navigationTypes[] = { "Line" };

lineGainP = 25;
lineGainD = 12;

initialPitch = -0.4;

seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 5; // Angle from the shooter's view that can track the missile, implemented
seekerAccuracy = 1; // seeker accuracy multiplier, not implemented?

seekerMinRange = 100;
seekerMaxRange = 2000; // Range from the missile which the seeker can visually search

offsetFromCrosshair[] = { 0, 0, 0 }; // where the missile wants to stay in relation to the center of the crosshair.

// Attack profile type selection
defaultAttackProfile = "WIRE";
attackProfiles[] = {"WIRE"};
};
1 change: 1 addition & 0 deletions addons/missileGuidanceCompat/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ class CfgPatches {
};

#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
8 changes: 4 additions & 4 deletions addons/missileGuidanceCompat/patchCWR/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class CfgPatches {


class CfgMagazines {
class CA_LauncherMagazine;
class cwr3_redeye_m: CA_LauncherMagazine {
ammo = QEGVAR(missileGuidanceCompat,redeye);
};
class CA_LauncherMagazine;
class cwr3_redeye_m: CA_LauncherMagazine {
ammo = QEGVAR(missileGuidanceCompat,redeye);
};
};
158 changes: 158 additions & 0 deletions addons/missileGuidanceCompat/patchGM/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
#include "\z\potato\addons\missileGuidanceCompat\script_component.hpp"
#undef COMPONENT
#define COMPONENT missileGuidanceCompat_patchGM

class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"potato_missileGuidanceCompat",
"gm_weapons_ammo",
"gm_weapons_launchers_fagot",
"gm_weapons_launchers_hot",
"gm_weapons_launchers_maljutka",
"gm_weapons_launchers_milan"
};
skipWhenMissingDependencies = 1;
author = "Bourbon Warfare";
authorUrl = "https://github.com/BourbonWarfare/POTATO";
VERSION_CONFIG;
};
};

class CfgAmmo {
class gm_missile_saclos_base;
// Bastion
class gm_missile_bastion_base: gm_missile_saclos_base {
maneuvrability = 0;
#include "../CfgMissileBastion.hpp"
};
class gm_missile_bastion_heat_9M117: gm_missile_bastion_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
pitchRate = 25;
yawRate = 25;
lineGainP = 6;
lineGainD = 5;
showTrail = 0;
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};
};
class gm_missile_bastion_heat_9M117M: gm_missile_bastion_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
pitchRate = 25;
yawRate = 25;
lineGainP = 6;
lineGainD = 5;
showTrail = 0;
};
};
// Fagot missile
class gm_missile_fagot_base: gm_missile_saclos_base {
maneuvrability = 0;
#include "../CfgMissileFagot.hpp"
};
class gm_missile_fagot_heat_9m111: gm_missile_fagot_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
showTrail = 0;
pitchRate = 25;
yawRate = 25;
initialPitch = 0;
lineGainP = 7;
lineGainD = 4;
};
};
// HOT missile
class gm_missile_hot_base: gm_missile_saclos_base {
maneuvrability = 0;
#include "../CfgMissileHOT.hpp"
};
class gm_missile_hot_heat_dm72: gm_missile_hot_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
pitchRate = 40;
yawRate = 40;
};
};
class gm_missile_hot_heat_dm102: gm_missile_hot_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};
// Malyutka
class gm_missile_maljutka_base: gm_missile_saclos_base {
maneuvrability = 0;
#include "../CfgMissileMalyutka.hpp"
};
class gm_missile_maljutka_heat_9m14: gm_missile_maljutka_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
showTrail = 1;
};
};
class gm_missile_maljutka_heat_9m14m: gm_missile_maljutka_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
showTrail = 1;
};
};
// Milan
class gm_missile_milan_base: gm_missile_saclos_base {
maneuvrability = 0;
#include "../CfgMissileMilan.hpp"
};
class gm_missile_milan_heat_dm82: gm_missile_milan_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};
class gm_missile_milan_heat_dm92: gm_missile_milan_base {
class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};
// AA Missiles
class gm_rocket_72mm_HE_9m32m_base;
class gm_rocket_72mm_HE_9m32m: gm_rocket_72mm_HE_9m32m_base {
maneuvrability = 0;
#include "../CfgMissileStrela.hpp"
};
class gm_rocket_70mm_HE_m585_base;
class gm_rocket_70mm_HE_m585: gm_rocket_70mm_HE_m585_base {
class ace_missileguidance { // from main CfgAmmo.hpp
enabled = 1;

pitchRate = 27; // Minium flap deflection for guidance
yawRate = 27; // Maximum flap deflection for guidance

canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode

// Guidance type for munitions
defaultSeekerType = "IR";
seekerTypes[] = { "IR" };

flareDistanceFilter = 100;
flareAngleFilter = 2.0; // can filter out flares that are >= flareAngleFilter to known target velocity

defaultSeekerLockMode = "LOBL";
seekerLockModes[] = { "LOBL" };

defaultNavigationType = "ProportionalNavigation";
navigationTypes[] = { "ProportionalNavigation" };

seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 45; // Angle from the shooter's view that can track the missile
seekerAccuracy = 0.4; // seeker accuracy multiplier

seekerMinRange = 75;
seekerMaxRange = 4500; // Range from the missile which the seeker can visually search

// Attack profile type selection
defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR"};
};
};
};