ACE3/addons/hot/CfgAmmo.hpp
Brandon Danyluk 1511ecc1c0 SACLOS and HOT Missiles (#6708)
* abc

* Revert "abc"

This reverts commit bcb4214bd9.

* Update to current commit

* Added HOT1 Missile and SACLOS/Wire guidance

* Added all HOT variants. Added polish to code

* Fixed bug with pylons

* Changed how seeker angle is calculated. When the wire snaps the missile goes haywire. Fixed bug where HOT2/3 missiles weren't getting missile guidance

* Replaced Wiesel FireFIST launcher with  HOT Launcher

* Remove debug defines

* Tweak thrust

* Fix formatting issues. Added true randomness. Added ACE prefixes. Added string table. Tweaked missile dynamics

* Fix bug where attack profile correction was wrong due to magnitude always being 50. Add stringtable values for relevant strings. Added reload time to Wiesel ATGM. Added "onFired" to initialize values

* Moved wire-snapping logic to attack profile

* Missile flight dynamics tweaked

* Add a crosshair offset. The missile sits in this offset relative to the crosshair

* Add LOS checks. Fix bug where wire-cutting didnt work.

* Tweak explosive range for a kill radius of ~20m. Add fragmentation

* Add AI Flags

* Person in control of missile may not be the shooter

* Fix RPT spam on missile out of LOS. Tweak missile dynamics. Add wire break sound cue

* Fix bug where missile didn't go to a fake target in front of it when out of LOS

* Use a better, more generic way to calculate direction camera is facing

* Use ACE Macros for frag values. Get config entry with CBA

* Add Wiki entry

* Add new lines to wiki. Allow for SQF expressions in config for maxCorrectableDistance

* Add CPP code tag

* Fix wiki grammer error

* Re-convert back to CBA_fnc_getConfigEntry

* UAV Gunner support, cleanup

* Fix bug where SACLOS for launcher guided weapons was off

* Add the ability to define how far ahead of the missile the attack profile will seek toward
2018-12-06 20:27:30 -06:00

141 lines
4.4 KiB
C++

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 {
aiAmmoUsageFlags = "128+512";
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 = CSTRING(hot1);
displayNameShort = CSTRING(hot1);
description = CSTRING(missileType_Description);
descriptionShort = CSTRING(missileType);
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.0030; // 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" };
onFired = QFUNC(onFired);
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
correctionDistance = 15; // distance from center of crosshair where missile slows down
offsetFromCrosshair[] = { 0, 0, 0.5 }; // where the missile wants to stay in relation to the center of the crosshair.
// Attack profile type selection
defaultAttackProfile = "WIRE";
attackProfiles[] = {"WIRE"};
};
};
class GVAR(HOT2): GVAR(HOT1) {
submunitionAmmo = QGVAR(ammo_Penetrator_HOT2);
displayName = CSTRING(hot2);
displayNameShort = CSTRING(hot2);
class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};
class GVAR(HOT2MP): GVAR(HOT2) {
aiAmmoUsageFlags = "64+128";
submunitionAmmo = "";
warheadName = "HE";
allowAgainstInfantry = 1;
hit = 200;
indirectHit = 200;
indirectHitRange = 5;
explosionEffects = "BombExplosion";
explosive = 0.7;
EGVAR(frag,enabled) = 1;
EGVAR(frag,metal) = 7100; // 1000 steel balls
EGVAR(frag,charge) = 4100;
EGVAR(frag,gurney_c) = 2700;
EGVAR(frag,gurney_k) = 3/5;
EGVAR(frag,classes)[] = {"ACE_frag_small"};
displayName = CSTRING(hot2mp);
displayNameShort = CSTRING(hot2mp);
description = CSTRING(missileType_Description_AP);
class ace_missileguidance: ace_missileguidance {
enabled = 1;
};
};
class GVAR(HOT3): GVAR(HOT2) {
submunitionAmmo = QGVAR(ammo_Penetrator_HOT3);
warheadName = "TandemHEAT";
displayName = CSTRING(hot3);
displayNameShort = CSTRING(hot3);
class ace_missileguidance: ace_missileguidance {
enabled = 1;
seekerMaxRange = 4300;
};
};
};