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 Kh25ML Laser Guided AGMs #5912

Merged
merged 1 commit into from
Jan 1, 2018
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
35 changes: 34 additions & 1 deletion addons/maverick/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CfgAmmo {
class Missile_AGM_02_F : MissileBase {};

class GVAR(L) : Missile_AGM_02_F {
author = "rufix";
author = "xrufix";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so close

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should i remove my name and replace it with ECSTRING(common,ACETeam);?

autoSeekTarget = 0;
irLock = 0;
laserLock = 0;
Expand Down Expand Up @@ -39,4 +39,37 @@ class CfgAmmo {
attackProfiles[] = {"maverick"};
};
};

class Missile_AGM_01_F : MissileBase {};
class ace_kh25ml : Missile_AGM_01_F {
author = "xrufix";
irLock = 0
missileLockMaxDistance = 10000;
weaponLockSystem = 4;
class ace_missileguidance {
enabled = 1;

minDeflection = 0.0005;
maxDeflection = 0.01;
incDeflection = 0.005;

canVanillaLock = 0;

defaultSeekerType = "SALH";
seekerTypes[] = {"SALH"};

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

seekLastTargetPos = 1;
seekerAngle = 40;
seekerAccuracy = 1;

seekerMinRange = 1;
seekerMaxRange = 10000;

defaultAttackProfile = "maverick";
attackProfiles[] = {"maverick"};
};
};
};
39 changes: 39 additions & 0 deletions addons/maverick/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,43 @@ class CfgMagazines {
displayNameShort = CSTRING(L_MAG_short);
pylonWeapon = QGVAR(L_Launcher);
};

// KH-25
class 4Rnd_Missile_AGM_01_F;
class PylonRack_1Rnd_Missile_AGM_01_F : 4Rnd_Missile_AGM_01_F {};
class magazine_Missile_AGM_KH25_x1 : VehicleMagazine {};
class PylonMissile_Missile_AGM_KH25_x1 : magazine_Missile_AGM_KH25_x1 {};
class PylonMissile_Missile_AGM_KH25_INT_x1 : PylonMissile_Missile_AGM_KH25_x1 {};

class ace_kh25ml_pylonrack_x1 : PylonRack_1Rnd_Missile_AGM_01_F {
ammo = "ace_kh25ml";
author = "xrufix";
descriptionShort = CSTRING(KH25ML_MAG_DESCR);
displayName = CSTRING(KH25ML_MAG_x1);
displayNameShort = CSTRING(L_MAG_short);
pylonWeapon = "ace_kh25ml_launcher";
};
class ace_kh25ml_magazine_x1 : magazine_Missile_AGM_KH25_x1 {
ammo = "ace_kh25ml";
author = "xrufix";
descriptionShort = CSTRING(KH25ML_MAG_DESCR);
displayName = CSTRING(KH25ML_MAG_x1);
displayNameShort = CSTRING(L_MAG_short);
};
class ace_kh25ml_pylonmissile_x1 : PylonMissile_Missile_AGM_KH25_x1 {
ammo = "ace_kh25ml";
author = "xrufix";
descriptionShort = CSTRING(KH25ML_MAG_DESCR);
displayName = CSTRING(KH25ML_MAG_x1);
displayNameShort = CSTRING(L_MAG_short);
pylonWeapon = "ace_kh25ml_launcher";
};
class ace_kh25ml_pylonmissile_int_x1 : PylonMissile_Missile_AGM_KH25_INT_x1 {
ammo = "ace_kh25ml";
author = "xrufix";
descriptionShort = CSTRING(KH25ML_MAG_DESCR);
displayName = CSTRING(KH25ML_MAG_x1);
displayNameShort = CSTRING(L_MAG_short);
pylonWeapon = "ace_kh25ml_launcher";
};
};
18 changes: 18 additions & 0 deletions addons/maverick/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,22 @@ class CfgWeapons {
EGVAR(laser,showHud) = 1; // show attack profile / lock on hud
GVAR(enabled) = 1;
};

class weapon_AGM_KH25Launcher : MissileLauncher {};
class ace_kh25ml_launcher : weapon_AGM_KH25Launcher {
author = "xrufix";
displayName = CSTRING(KH25ML);
magazines[] = {
"ace_kh25ml_pylonrack_x1",
"ace_kh25ml_magazine_x1",
"ace_kh25ml_pylonmissile_x1",
"ace_kh25ml_pylonmissile_int_x1"
};
weaponLockDelay = 0.1;
weaponLockSystem = 0;

EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
EGVAR(laser,showHud) = 1; // show attack profile / lock on hud
GVAR(enabled) = 1;
};
};
7 changes: 4 additions & 3 deletions addons/maverick/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ace_maverick
==========

Adds pylon magazines with laser guided AGM-65 Maverick L.
Adds pylon magazines with laser guided AGM-65 Maverick L and KH25ML.

* The magazines can be added to every plane the vanilla Macer II can be added to.
* The Mavericks can be added to every plane the vanilla Macer II can be added to.
* The KH25ML can be added to every plane the vanilla KH25 and Sharur missiles can be added to.
* The missile uses laser guidance based on ACE's Advanced Missile Guidance framework.
* The PylonWeapon from CfgWeapons is added to planes with pylons automatically.
* The PylonWeapon is added to planes with pylons automatically.

![Laser guided Maverick](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg/1280px-US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg)

Expand Down
13 changes: 9 additions & 4 deletions addons/maverick/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_hellfire"};
requiredAddons[] = {"ace_missileguidance"};
author = ECSTRING(common,ACETeam);
authors[] = {"xrufix"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
ammo[] = {
GVAR(L)
GVAR(L),
"ace_kh25ml"
};
magazines[] = {
QGVAR(L_magazine_x1),
Expand All @@ -19,11 +20,15 @@ class CfgPatches {
QGVAR(L_pylonRack_1Rnd),
QGVAR(L_PylonRack_3Rnd),
QGVAR(L_PylonRack_x1),
QGVAR(L_PylonRack_x2)
QGVAR(L_PylonRack_x2),
"ace_kh25ml_magazine_x1",
"ace_kh25ml_pylonmissile_x1",
"ace_kh25ml_pylonmissile_int_x1"
};
weapons[] = {
GVAR(L_Launcher_Plane),
GVAR(L_Launcher)
GVAR(L_Launcher),
"ace_kh25ml_launcher"
};
units[] = {};
};
Expand Down
14 changes: 14 additions & 0 deletions addons/maverick/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
<Chinesesimp>雷射导引</Chinesesimp>
<Korean>레이저 유도</Korean>
</Key>
<Key ID="str_ace_maverick_kh25ml_mag_descr">
<English>Kh-25ML, Laser Guided Air-to-Ground-Missile</English>
<German>Ch-25ML, Lasergelenkte Luft-Boden-Rakete</German>
</Key>
<Key ID="str_ace_maverick_kh25ml_mag_x1">
<English>1x Kh-25ML [ACE]</English>
<German>1x Ch-25ML [ACE]</German>
<Russian>1x Х-25МЛ [ACE]</Russian>
</Key>
</Container>
<Container name="weapons">
<Key ID="str_ace_maverick_l">
Expand All @@ -58,6 +67,11 @@
<Chinesesimp>AGM-65"小牛"飞弹L型</Chinesesimp>
<Korean>AGM-65 Maverick L</Korean>
</Key>
<Key ID="str_ace_maverick_kh25ml">
<English>Kh-25ML</English>
<German>Ch-25ML</English>
<Russian>Х-25МЛ</English>
</Key>
</Container>
</Package>
</Project>