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

SACLOS and HOT Missiles #6708

Merged
merged 35 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bcb4214
abc
Dec 7, 2017
91f876a
Revert "abc"
Dec 7, 2017
7fad1c3
Update to current commit
Dec 7, 2017
00ae4bb
Merge branch 'master' of https://github.com/acemod/ACE3
Feb 7, 2018
441c130
Merge branch 'master' of https://github.com/acemod/ACE3
Mar 19, 2018
839ce70
Merge branch 'master' of https://github.com/acemod/ACE3
TheCandianVendingMachine Jul 31, 2018
e00b012
Merge branch 'master' of https://github.com/acemod/ACE3
TheCandianVendingMachine Nov 30, 2018
9f0b715
Added HOT1 Missile and SACLOS/Wire guidance
TheCandianVendingMachine Nov 30, 2018
214c18f
Added all HOT variants. Added polish to code
TheCandianVendingMachine Nov 30, 2018
a00670e
Fixed bug with pylons
TheCandianVendingMachine Nov 30, 2018
cec1cac
Changed how seeker angle is calculated. When the wire snaps the missi…
TheCandianVendingMachine Nov 30, 2018
ef7c6d7
Replaced Wiesel FireFIST launcher with HOT Launcher
TheCandianVendingMachine Nov 30, 2018
e72da2e
Remove debug defines
TheCandianVendingMachine Nov 30, 2018
98de001
Tweak thrust
TheCandianVendingMachine Nov 30, 2018
597dc05
Fix formatting issues. Added true randomness. Added ACE prefixes. Add…
TheCandianVendingMachine Dec 1, 2018
a1e128f
Fix bug where attack profile correction was wrong due to magnitude al…
TheCandianVendingMachine Dec 1, 2018
865a7b6
Moved wire-snapping logic to attack profile
TheCandianVendingMachine Dec 1, 2018
5848eb2
Missile flight dynamics tweaked
TheCandianVendingMachine Dec 1, 2018
a17c0c0
Add a crosshair offset. The missile sits in this offset relative to t…
TheCandianVendingMachine Dec 1, 2018
893ec41
Add LOS checks. Fix bug where wire-cutting didnt work.
TheCandianVendingMachine Dec 1, 2018
5949b65
Tweak explosive range for a kill radius of ~20m. Add fragmentation
TheCandianVendingMachine Dec 2, 2018
c554eb5
Add AI Flags
TheCandianVendingMachine Dec 2, 2018
5bf6537
Person in control of missile may not be the shooter
TheCandianVendingMachine Dec 2, 2018
02c5edb
Fix RPT spam on missile out of LOS. Tweak missile dynamics. Add wire …
TheCandianVendingMachine Dec 2, 2018
6a553fb
Fix bug where missile didn't go to a fake target in front of it when …
TheCandianVendingMachine Dec 2, 2018
9f591f3
Use a better, more generic way to calculate direction camera is facing
TheCandianVendingMachine Dec 3, 2018
71ac357
Use ACE Macros for frag values. Get config entry with CBA
TheCandianVendingMachine Dec 3, 2018
d11403d
Add Wiki entry
TheCandianVendingMachine Dec 3, 2018
7a042b3
Add new lines to wiki. Allow for SQF expressions in config for maxCor…
TheCandianVendingMachine Dec 3, 2018
3bac979
Add CPP code tag
TheCandianVendingMachine Dec 3, 2018
b35968f
Fix wiki grammer error
TheCandianVendingMachine Dec 3, 2018
2e2f3ff
Re-convert back to CBA_fnc_getConfigEntry
TheCandianVendingMachine Dec 4, 2018
b1d2ffe
UAV Gunner support, cleanup
PabstMirror Dec 4, 2018
f0bf54e
Fix bug where SACLOS for launcher guided weapons was off
TheCandianVendingMachine Dec 4, 2018
535b978
Add the ability to define how far ahead of the missile the attack pro…
TheCandianVendingMachine Dec 5, 2018
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
2 changes: 2 additions & 0 deletions addons/hot/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
z\ace\addons\hot

19 changes: 19 additions & 0 deletions addons/hot/ACE_GuidanceConfig.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class EGVAR(missileguidance,AttackProfiles) {
class WIRE {
name = "Wire-Guided";
visualName = "Wire-Guided";
description = "Wire-Guided missile";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved

functionName = QFUNC(attackProfile_WIRE);
};
};
class EGVAR(missileguidance,SeekerTypes) {
class SACLOS {
name = "SACLOS";
visualName = "SACLOS";
description = "Semi-automatic command to line of sight";

functionName = QFUNC(seekerType_SACLOS);
};
};

130 changes: 130 additions & 0 deletions addons/hot/CfgAmmo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
class CfgAmmo {
class M_Scalpel_AT;
class ammo_Penetrator_Base;

class GVAR(ammo_Penetrator_HOT1): ammo_Penetrator_Base {
caliber = 60;
warheadName = "HEAT";
hit = 720;
};

class GVAR(ammo_Penetrator_HOT2): ammo_Penetrator_Base {
caliber = 65;
warheadName = "HEAT";
hit = 900;
};

class GVAR(ammo_Penetrator_HOT3): ammo_Penetrator_Base {
caliber = 80;
warheadName = "TandemHEAT";
hit = 1000;
};

class GVAR(HOT1): M_Scalpel_AT {
model = "\A3\Weapons_F_Tank\Launchers\Vorona\Vorona_missile_heat_fly";
proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F";
submunitionAmmo = QGVAR(ammo_Penetrator_HOT1);
submunitionDirectionType = "SubmunitionModelDirection";
submunitionInitSpeed = 1000;
submunitionParentSpeedCoef = 0;
submunitionInitialOffset[] = {0,0,-0.2};
hit = 150;
warheadName = "HEAT";
indirectHit = 25;
indirectHitRange = 3.5;
explosive = 0.8;

displayName = "HOT 1";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT1";
description = "HOT 1";
descriptionShort = "HOT1";


effectsMissile = "missile2";

irLock = 0;
laserLock = 0;
manualControl = 0;
maxSpeed = 240;

thrustTime = 17;
thrust = 125;
timeToLive = 40;
initTime = 0.3;

EGVAR(rearm,caliber) = 178;

class ace_missileguidance {
enabled = 1;

minDeflection = 0; // Minium flap deflection for guidance
maxDeflection = 0.0015; // Maximum flap deflection for guidance
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.

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

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

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

seekLastTargetPos = 0; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 60; // Angle in front of the missile which can be searched
seekerAccuracy = 1; // seeker accuracy multiplier

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

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

class GVAR(HOT2): GVAR(HOT1) {
submunitionAmmo = QGVAR(ammo_Penetrator_HOT2);
displayName = "HOT 2";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT2";
description = "HOT 2";
descriptionShort = "HOT2";

class ace_missileguidance: ace_missileguidance {
enabled = 1;
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};
};

class GVAR(HOT2MP): GVAR(HOT2) {
submunitionAmmo = "";
warheadName = "HE";
hit = 200;
indirectHit = 200;
indirectHitRange = 12;
explosionEffects = "BombExplosion";

displayName = "HOT 2MP";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT2MP";
description = "HOT 2MP";
descriptionShort = "HOT2MP";

class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};

class GVAR(HOT3): GVAR(HOT2) {
submunitionAmmo = QGVAR(ammo_Penetrator_HOT3);
warheadName = "TandemHEAT";
displayName = "HOT 3";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT3";
description = "HOT 3";
descriptionShort = "HOT3";

class ace_missileguidance: ace_missileguidance {
enabled = 1;
seekerMaxRange = 4300;
};
};
};

12 changes: 12 additions & 0 deletions addons/hot/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};

205 changes: 205 additions & 0 deletions addons/hot/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
class CfgMagazines {
class 12Rnd_PG_missiles;

// HOT1 - tandem shaped charge HEAT (anti-tank)
class 6Rnd_ACE_HOT1: 12Rnd_PG_missiles { // Old style vehicle magazine
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
count = 6;
initSpeed = 100;
ammo = "ACE_HOT_HOT1";
displayName = "HOT 1 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT1";
descriptionShort = "HOT1";
};

class 2Rnd_ACE_HOT1: 6Rnd_ACE_HOT1 {
count = 2;
};

// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_HOT1: 6Rnd_ACE_HOT1 { // Bare missle
displayName = "1x HOT 1 [ACE]";
count = 1;
mass = 70;
pylonWeapon = QGVAR(1_launcher);
hardpoints[] = {"SCALPEL_1RND"};
model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d";
};
class PylonRack_1Rnd_ACE_HOT1: 6Rnd_ACE_HOT1 { // 1x Launcher Support Rack
displayName = "1x HOT 1 [ACE]";
count = 1;
mass = 85;
pylonWeapon = QGVAR(1_launcher);
hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL", "CUP_NATO_HELO_SMALL", "CUP_NATO_HELO_LARGE", "RHS_HP_MELB"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d";
};
class PylonRack_3Rnd_ACE_HOT1: 6Rnd_ACE_HOT1 { // 3x Launcher Support Rack
displayName = "3x HOT 1 [ACE]";
count = 3;
mass = 250;
pylonWeapon = QGVAR(1_launcher);
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
class PylonRack_4Rnd_ACE_HOT1: 6Rnd_ACE_HOT1 { // 4x Launcher Support Rack
displayName = "4x HOT 1 [ACE]";
count = 4;
mass = 340;
pylonWeapon = QGVAR(1_launcher);
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_HELLFIRE_RACK", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};

// HOT2 - tandem shaped charge HEAT (anti-tank)
class 6Rnd_ACE_HOT2: 12Rnd_PG_missiles { // Old style vehicle magazine
count = 6;
initSpeed = 100;
ammo = "ACE_HOT_HOT2";
displayName = "HOT 1 [ACE]";
displayNameShort = "HOT2";
descriptionShort = "HOT2";
};

class 2Rnd_ACE_HOT2: 6Rnd_ACE_HOT2 {
count = 2;
};

// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_HOT2: 6Rnd_ACE_HOT2 { // Bare missle
displayName = "1x HOT 2 [ACE]";
pylonWeapon = QGVAR(2_launcher);
count = 1;
mass = 70;
hardpoints[] = {"SCALPEL_1RND"};
model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d";
};
class PylonRack_1Rnd_ACE_HOT2: 6Rnd_ACE_HOT2 { // 1x Launcher Support Rack
displayName = "1x HOT 2 [ACE]";
pylonWeapon = QGVAR(2_launcher);
count = 1;
mass = 85;
hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL", "CUP_NATO_HELO_SMALL", "CUP_NATO_HELO_LARGE", "RHS_HP_MELB"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d";
};
class PylonRack_3Rnd_ACE_HOT2: 6Rnd_ACE_HOT2 { // 3x Launcher Support Rack
displayName = "3x HOT 2 [ACE]";
pylonWeapon = QGVAR(2_launcher);
count = 3;
mass = 250;
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
class PylonRack_4Rnd_ACE_HOT2: 6Rnd_ACE_HOT2 { // 4x Launcher Support Rack
displayName = "4x HOT 2 [ACE]";
pylonWeapon = QGVAR(2_launcher);
count = 4;
mass = 340;
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_HELLFIRE_RACK", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};

// HOT2MPMP - HE Anti-Infantry
class 6Rnd_ACE_HOT2MP: 12Rnd_PG_missiles { // Old style vehicle magazine
count = 6;
initSpeed = 100;
ammo = "ACE_HOT_HOT2MP";
displayName = "HOT 2MP [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT2MP";
descriptionShort = "HOT2MP";
};

class 2Rnd_ACE_HOT2MP: 6Rnd_ACE_HOT2MP {
count = 2;
};

// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_HOT2MP: 6Rnd_ACE_HOT2MP { // Bare missle
displayName = "1x HOT 2MP [ACE]";
pylonWeapon = QGVAR(2mp_launcher);
count = 1;
mass = 70;
hardpoints[] = {"SCALPEL_1RND"};
model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d";
};
class PylonRack_1Rnd_ACE_HOT2MP: 6Rnd_ACE_HOT2MP { // 1x Launcher Support Rack
displayName = "1x HOT 2MP [ACE]";
pylonWeapon = QGVAR(2mp_launcher);
count = 1;
mass = 85;
hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL", "CUP_NATO_HELO_SMALL", "CUP_NATO_HELO_LARGE", "RHS_HP_MELB"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d";
};
class PylonRack_3Rnd_ACE_HOT2MP: 6Rnd_ACE_HOT2MP { // 3x Launcher Support Rack
displayName = "3x HOT 2MP [ACE]";
pylonWeapon = QGVAR(2mp_launcher);
count = 3;
mass = 250;
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
class PylonRack_4Rnd_ACE_HOT2MP: 6Rnd_ACE_HOT2MP { // 4x Launcher Support Rack
displayName = "4x HOT 2MP [ACE]";
pylonWeapon = QGVAR(2mp_launcher);
count = 4;
mass = 340;
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_HELLFIRE_RACK", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};

// HOT3 - tandem shaped charge HEAT (anti-tank)
class 6Rnd_ACE_HOT3: 12Rnd_PG_missiles { // Old style vehicle magazine
count = 6;
initSpeed = 100;
ammo = "ACE_HOT_HOT3";
displayName = "HOT 1 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayNameShort = "HOT3";
descriptionShort = "HOT3";
};

class 2Rnd_ACE_HOT3: 6Rnd_ACE_HOT3 { // Old style vehicle magazine
count = 2;
};

// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_HOT3: 6Rnd_ACE_HOT3 { // Bare missle
displayName = "1x HOT 3 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
pylonWeapon = QGVAR(3_launcher);
count = 1;
mass = 70;
hardpoints[] = {"SCALPEL_1RND"};
model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d";
};

class PylonRack_1Rnd_ACE_HOT3: 6Rnd_ACE_HOT3 { // 1x Launcher Support Rack
displayName = "1x HOT 3 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
pylonWeapon = QGVAR(3_launcher);
count = 1;
mass = 85;
hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL", "CUP_NATO_HELO_SMALL", "CUP_NATO_HELO_LARGE", "RHS_HP_MELB"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d";
};
class PylonRack_3Rnd_ACE_HOT3: 6Rnd_ACE_HOT3 { // 3x Launcher Support Rack
displayName = "3x HOT 3 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
pylonWeapon = QGVAR(3_launcher);
count = 3;
mass = 250;
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
class PylonRack_4Rnd_ACE_HOT3: 6Rnd_ACE_HOT3 { // 4x Launcher Support Rack
displayName = "4x HOT 3 [ACE]";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
pylonWeapon = QGVAR(3_launcher);
count = 4;
mass = 340;
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_HELLFIRE_RACK", "RHS_HP_LONGBOW_RACK"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};
};

21 changes: 21 additions & 0 deletions addons/hot/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class CfgVehicles {
class Tank;
class Tank_F: Tank {
class Turrets;
};
class LT_01_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret;
};
};
class LT_01_AT_base_F: LT_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"SmokeLauncher","HMG_127",QGVAR(generic_launcher)};
magazines[] = {"SmokeLauncherMag","2Rnd_ACE_HOT2","2Rnd_ACE_HOT2","2Rnd_ACE_HOT2","2Rnd_ACE_HOT2MP","100Rnd_127x99_mag_Tracer_Red","100Rnd_127x99_mag_Tracer_Red","100Rnd_127x99_mag_Tracer_Red","100Rnd_127x99_mag_Tracer_Red"};

TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};
};
};
};

Loading