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 - Spike LR ATGM #8931

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions addons/spike/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\ace\addons\spike
11 changes: 11 additions & 0 deletions addons/spike/ACE_GuidanceConfig.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class ace_missileguidance_SeekerTypes {
class SPIKE {
functionName = QFUNC(seeker);
};
};
class ace_missileguidance_NavigationTypes {
class SPIKE {
functionName = QFUNC(navigation);
onFired = "";
};
};
103 changes: 103 additions & 0 deletions addons/spike/CfgAmmo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
class CfgAmmo {
class MissileBase;
class M_Titan_AT: MissileBase {};
class GVAR(lr): M_Titan_AT {
timeToLive = 120;

manualControl = 0;
initTime = 0.5;

class ace_missileguidance {
enabled = 1;

pitchRate = 30;
yawRate = 30;

canVanillaLock = 0;

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

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

defaultNavigationType = "SPIKE";
navigationTypes[] = { "SPIKE", "ZeroEffortMiss" };

seekLastTargetPos = 0;
seekerAngle = 20;
seekerAccuracy = 1;

seekerMinRange = 50;
seekerMaxRange = 2500;

defaultAttackProfile = "DIR";
attackProfiles[] = {"DIR"};
useModeForAttackProfile = 0;

onFired = QFUNC(onFired);

class navigationStates {
class initial {
transitionCondition = QFUNC(midCourseTransition);
navigationType = "SPIKE";
};
class terminal {
transitionCondition = "";
navigationType = "ZeroEffortMiss";
};
// transitions from initial -> termimal
states[] = {"initial", "terminal"};
};

// TV Guided projectiles have extra data that is irrelevant to most missiles
class camera {
enabled = 1;
switchOnFire = 1; // switch to the camera view immediately upon firing

class gimbal {
enabled = 1;

gimbalAngleX = 25; // how far left/right can this look in degrees
gimbalAngleY = 60; // how far up/down can this look in degrees
gimbalSpeedX = 20; // how many fast we can look left and right
gimbalSpeedY = 20; // how many fast we can look up and down

fovGimbalSpeedModifiers[] = { 1, 0.1 }; // the modifier for gimbal speed when at the zoom level

gimbalInitOffsetX = 0;
gimbalInitOffsetY = -20;

stabilizeWhenMoving = 1;
trackLockedPosition = 1;
designateWhenStationary = 0; // designate when camera doenst have any inputs
};

fovLevels[] = { 0.2, 0.05 }; // levels of zoom this has
initialFOV = 0.2;
lerpFOV = 0;
fovChangeTime = 1;

alwaysDesignate = 0; // always designate
canStopDesignating = 0;

enabledThermalTypes[] = { "white_hot_black_cold", "black_hot_white_cold" };
initialThermalType = "white_hot_black_cold";

class reticle {
titleRsc = "ACE_guidance_spike";
centerReticle = 242000;
controlsToDisappearOnLock[] = { 241000 };
controlsToAppearOnLock[] = { 243101, 243201, 243301 };
leftGate = 243200;
rightGate = 243300;
topGate = 0;
bottomGate = 243100;
uiNamespaceDialogVariable = "ACE_guidance_camera_reticle";
reticleMovesWithTrack = 1;
};
};
};
};
};

18 changes: 18 additions & 0 deletions addons/spike/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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));
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

12 changes: 12 additions & 0 deletions addons/spike/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class CfgMagazines {
class Titan_AT;
class GVAR(lr): Titan_AT {
author = "Dani (TCVM)";
ammo = QGVAR(lr);

displayName = CSTRING(LR);
displayNameShort = CSTRING(LR_Short);
mass = 300;
};
};

29 changes: 29 additions & 0 deletions addons/spike/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class CfgWeapons {
class launch_Titan_short_base;
class launch_B_Titan_short_F: launch_Titan_short_base {
class Single;
};
class GVAR(base): launch_B_Titan_short_F {
class Single: Single {
EGVAR(missileGuidance,attackProfile) = "SPIKE_TOP";
};
};
class GVAR(launcher): GVAR(base) {
scope = 2;
GVAR(enabled) = 1;
weaponInfoType = "ACE_RscOptics_spike";
modelOptics = QPATHTOF(data\reticle_titan.p3d);

canLock = 0;

lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};

displayName = CSTRING(LR);
displayNameShort = CSTRING(LR_Short);

magazines[] = {QGVAR(lr)};
magazineWell[] = {};
};
};

12 changes: 12 additions & 0 deletions addons/spike/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ace_spike
===================

Adds SPIKE LR guided missile


## Maintainers

The people responsible for merging changes to this component or answering potential questions.

- [Dani-TCVM](https://github.com/TheCandianVendingMachine)

134 changes: 134 additions & 0 deletions addons/spike/RscInGameUI.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

// Taken from AGM for optics management.

class RscInGameUI {
class ACE_RscOptics_spike {
idd = 141000;
controls[] = { "reticle", "manualText", QGVAR(mapHelper) };
onLoad = QUOTE(with uiNamespace do {ACE_RscOptics_spike = _this select 0;};);

class GVAR(mapHelper): RscMapControl {
onDraw = QUOTE(_this call FUNC(mapHelperDraw););
x = 0;
y = 0;
w = 0;
h = 0;
};

class manualText: RscText {
idc = 241000;
x = "safeZoneX + safeZoneW * 0.425";
y = "safeZoneY + safeZoneH * 0.2";
w = "safeZoneW * 0.15";
h = "safeZoneH * 0.05";
style = "0 + 2";
text = CSTRING(Manual);
colorBackground[] = {0,0,0,0};
colorText[] = COLOR_WHITE;
font = "LucidaConsoleB";
sizeEx = QUOTE(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 2.2);
enabled = 1;
show = 1;
};

class reticle: RscControlsGroupNoScrollbars {
idc = 242000;
x = "safeZoneX";
y = "safeZoneY";
w = "safeZoneW-safeZoneX";
h = "safeZoneH-safeZoneY";
enabled = 1;
show = 0;
class controls {
class lineV: RscControlsGroupNoScrollbars {
idc = 243100;
enabled = 1;
show = 1;
class Controls {
class lineBlack: RscText {
x = "safeZoneX + (SafeZoneW * 0.501)";
y = "safeZoneY + (SafeZoneH * 0.53)";
w = "safeZoneW * 0.0025";
h = "safeZoneH * 0.1";
colorBackground[] = COLOR_BLACK;
};
class lineWhite: RscText {
x = "safeZoneX + (SafeZoneW * 0.504)";
y = "safeZoneY + (SafeZoneH * 0.53)";
w = "safeZoneW * 0.0025";
h = "safeZoneH * 0.1";
colorBackground[] = COLOR_WHITE;
};
class squareB: RscText {
idc = 243101;
x = "safeZoneX + safeZoneW * 0.499";
y = "safeZoneY + safeZoneH * 0.52";
w = "safeZoneH * 0.006";
h = "safeZoneW * 0.006";
colorBackground[] = COLOR_BLACK;
};
};
};
class lineHL: RscControlsGroupNoScrollbars {
idc = 243200;
enabled = 1;
show = 1;
class Controls {
class lineBlack: RscText {
x = "safeZoneY + (SafeZoneH * 0.37)";
y = "safeZoneX + (SafeZoneW * 0.5)";
w = "safeZoneH * 0.1";
h = "safeZoneW * 0.003";
colorBackground[] = COLOR_BLACK;
};
class lineWhite: RscText {
x = "safeZoneY + (SafeZoneH * 0.37)";
y = "safeZoneX + (SafeZoneW * 0.504)";
w = "safeZoneH * 0.1";
h = "safeZoneW * 0.0023";
colorBackground[] = COLOR_WHITE;
};
class squareL: RscText {
idc = 243201;
x = "safeZoneX + (SafeZoneW * 0.485)";
y = "safeZoneY + safeZoneH * 0.5";
w = "safeZoneH * 0.006";
h = "safeZoneW * 0.006";
colorBackground[] = COLOR_BLACK;
};
};
};
class lineHR: RscControlsGroupNoScrollbars {
idc = 243300;
enabled = 1;
show = 1;
class Controls {
class lineBlack: RscText {
x = "safeZoneY + (SafeZoneH * 0.53)";
y = "safeZoneX + (SafeZoneW * 0.5)";
w = "safeZoneH * 0.1";
h = "safeZoneW * 0.003";
colorBackground[] = COLOR_BLACK;
};
class lineWhite: RscText {
x = "safeZoneY + (SafeZoneH * 0.53)";
y = "safeZoneX + (SafeZoneW * 0.504)";
w = "safeZoneH * 0.1";
h = "safeZoneW * 0.0023";
colorBackground[] = COLOR_WHITE;
};
class squareR: RscText {
idc = 243301;
x = "safeZoneX + (SafeZoneW * 0.515)";
y = "safeZoneY + safeZoneH * 0.5";
w = "safeZoneH * 0.006";
h = "safeZoneW * 0.006";
colorBackground[] = COLOR_BLACK;
};
};
};
};
};
};
};

Loading