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

Implement M47 Dragon #6773

Merged
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
46 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
bfeda0a
Merge branch 'master' of https://github.com/acemod/ACE3
TheCandianVendingMachine Dec 7, 2018
f77c95a
Merge branch 'master' of https://github.com/acemod/ACE3
TheCandianVendingMachine Jan 3, 2019
6fd6558
Ports over NouberNou's dragon guidance
TheCandianVendingMachine Jan 3, 2019
923a83e
Add Dragon model
TheCandianVendingMachine Jan 3, 2019
d5bc95f
Make the Dragon CSW capable
TheCandianVendingMachine Jan 3, 2019
5cf3ba5
Fix bugs regarding argument order
TheCandianVendingMachine Jan 3, 2019
677feff
Add Dragon Attack Profile. Change how missileGuidance guidance_pfh wo…
TheCandianVendingMachine Jan 3, 2019
4df8fd7
Fix bug regarding missile direction. Add official US Army training ma…
TheCandianVendingMachine Jan 12, 2019
f317b09
Adjust model to reflect real-life one
TheCandianVendingMachine Jan 12, 2019
ebfbc56
Add attackProfile and guidanceProfile onFired functions
TheCandianVendingMachine Jan 13, 2019
0c54877
Change Dragon "onFired" to reflect missileGuidance changes
TheCandianVendingMachine Jan 13, 2019
a80e336
Only implementing the Super-Dragon. Remove Tabs. Add new lines to all…
TheCandianVendingMachine Jan 13, 2019
b2f31c1
Add sight description
TheCandianVendingMachine Jan 13, 2019
d78606b
Fix inheritance issues. Missile damage values tweaked. Fix String Tab…
TheCandianVendingMachine Jan 13, 2019
730cad3
Add feature wiki page.
TheCandianVendingMachine Jan 13, 2019
f57d16c
Fix picture issues
TheCandianVendingMachine Jan 13, 2019
a9a11f1
Remove Dragon manual
TheCandianVendingMachine Jan 14, 2019
433aaf6
add missing semi-colon
TheCandianVendingMachine Jan 14, 2019
1910741
Tweak damage values. Fix formatting. Add lazy evaluation where applic…
TheCandianVendingMachine Jan 14, 2019
3b0b249
Disable the ability to switch to the unusable launcher. Convert rvmat…
TheCandianVendingMachine Jan 14, 2019
953d2d7
Dragon flight dynamics tweaked. Now assuming there is a booster angle…
TheCandianVendingMachine Jan 15, 2019
5fb097f
hpp newline fixes. Case sensitivity for model and rvmat references
TheCandianVendingMachine Jan 16, 2019
efc298c
Update Wiki dependencies
TheCandianVendingMachine Jan 18, 2019
d900094
Revert "Update Wiki dependencies"
TheCandianVendingMachine Jan 18, 2019
ded146d
fix dependency component
TheCandianVendingMachine Jan 18, 2019
8a1ec88
Changed inheritance structure to be more rigid. Remove un-needed conf…
TheCandianVendingMachine Jan 24, 2019
36e91c8
get rid of the optic for the base dragon. fucking bi configs not maki…
TheCandianVendingMachine Jan 24, 2019
80797b2
Lock non-useable dragon on initialization
TheCandianVendingMachine Jan 27, 2019
e8e950e
Add model.cfg for animations
TheCandianVendingMachine Jan 30, 2019
b844447
Fix formatting. Fix M47 Dragon Optic zoom
TheCandianVendingMachine Jan 30, 2019
3a4f743
Change LOD selection names
TheCandianVendingMachine Jan 30, 2019
f0dc7f0
Revert indentation, keep parenthesis. "Start, stop, start stop! Jesus…
TheCandianVendingMachine Jan 31, 2019
dc1c337
Re-update indentation of model.cfg
TheCandianVendingMachine Jan 31, 2019
5c21a60
Path fix. Whitespace fix
TheCandianVendingMachine Jan 31, 2019
e074e55
Sight attach/detach on same vehicle
PabstMirror Feb 3, 2019
ae1889a
If the sight gets detached, make sure the dragon goes dumb. Remove re…
TheCandianVendingMachine Mar 14, 2019
34ccb88
disable debug
TheCandianVendingMachine Mar 14, 2019
1964195
Add EOF
TheCandianVendingMachine Apr 5, 2019
fa47225
Maybe finally fix EOF problem
TheCandianVendingMachine Apr 7, 2019
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/dragon/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
z\ace\addons\dragon

TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
TheMagnetar marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions addons/dragon/ACE_GuidanceConfig.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class EGVAR(missileguidance,AttackProfiles) {
class DRAGON {
name = CSTRING(dragonName);
visualName = CSTRING(dragonName);
description = CSTRING(dragonName);

onFired = QFUNC(onFired);
functionName = QFUNC(attackProfile_DRAGON);
};
};

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

class GVAR(penetrator_super): ammo_Penetrator_Base {
caliber = 60;
warheadName = "HEAT";
hit = 460;
fuseDistance = 75;
};

class GVAR(dragonBase): Rocket_03_AP_F {
EGVAR(frag,skip) = 1;
scope = 1;
aiAmmoUsageFlags = "128+512";
model = QPATHTOF(models\dragon.p3d);
maxSpeed = 200;
thrust = 300;
initTime = 0.151;
thrustTime = 0;
sideAirFriction = 0.05;
effectsMissile = "missile2";
effectFlare = "";
airFriction = 0.5;
fuseDistance = 75;
whistleDist = 2;

hit = 100;
indirectHit = 9;
indirectHitRange = 1;
explosive = 0.8;
timeToLive = 60;
cost = 500;
simulationStep = 0.005;
maxControlRange = 1500;

class ace_missileguidance {
minDeflection = 0;
maxDeflection = 0;
incDeflection = 0;

canVanillaLock = 0;

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

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

seekLastTargetPos = 0;
seekerAngle = 30;
seekerAccuracy = 1;

seekerMinRange = 65;
seekerMaxRange = 1000;

correctionDistance = 30;
missileLeadDistance = 0;
offsetFromCrosshair[] = { 0, 0, 0 };

serviceInterval = 0.33; // how many seconds between pops
serviceCharges = 32; // how many charges are in this missile
serviceChargeAcceleration = 6.5;
dragonSpeed = 100; // meters per second

defaultAttackProfile = "DRAGON";
attackProfiles[] = {"DRAGON"};
};
};

class GVAR(super) : GVAR(dragonBase) {
submunitionAmmo = QGVAR(penetrator_super);
submunitionDirectionType = "SubmunitionModelDirection";
submunitionInitSpeed = 1000;
submunitionParentSpeedCoef = 0;
submunitionInitialOffset[] = { 0, 0, -0.2 };

class ace_missileguidance {
enabled = 1;

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

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

seekLastTargetPos = 0;
seekerAngle = 30;
seekerAccuracy = 1;

seekerMinRange = 30;
seekerMaxRange = 1500;

correctionDistance = 30;
missileLeadDistance = 0;

serviceInterval = 0.33; // how many seconds between pops
serviceCharges = 60; // how many charges are in this missile
serviceChargeAcceleration = 6.5;
dragonSpeed = 100; // meters per second

defaultAttackProfile = "DRAGON";
attackProfiles[] = {"DRAGON"};
};
};

class ShellBase;
class GVAR(serviceCharge) : ShellBase {
hit = 1;
indirectHit = 2;
indirectHitRange = 1;
typicalSpeed = 100;
explosive = 1;
cost = 300;
model = "\A3\Weapons_F\empty.p3d";
airFriction = 0;
timeToLive = 1;
explosionTime = 0.001;
soundFly[] = {"",1,1};
soundEngine[] = {"",1,4};
CraterEffects = "";
explosionEffects = QGVAR(serviceExplosion);
hitarmor[] = {"soundDefault1", 1};
hitbuilding[] = {"soundDefault1", 1};
hitconcrete[] = {"soundDefault1", 1};
hitdefault[] = {"soundDefault1", 1};
hitfoliage[] = {"soundDefault1", 1};
hitglass[] = {"soundDefault1", 1};
hitglassarmored[] = {"soundDefault1", 1};
hitgroundhard[] = {"soundDefault1", 1};
hitgroundsoft[] = {"soundDefault1", 1};
hitiron[] = {"soundDefault1", 1};
hitman[] = {"soundDefault1", 1};
hitmetal[] = {"soundDefault1", 1};
hitmetalplate[] = {"soundDefault1", 1};
hitplastic[] = {"soundDefault1", 1};
hitrubber[] = {"soundDefault1", 1};
hitwood[] = {"soundDefault1", 1};
sounddefault1[] = {QPATHTOF(sounds\service_charge.wss), 56.2341, 1, 1800};
soundHit[] = {QPATHTOF(sounds\service_charge.wss),56.23413,1,1800};
multiSoundHit[] = {"soundDefault1", 1};
};
};

12 changes: 12 additions & 0 deletions addons/dragon/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));
};
};

16 changes: 16 additions & 0 deletions addons/dragon/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class CfgMagazines {
class 1Rnd_GAA_missiles;
class GVAR(super) : 1Rnd_GAA_missiles {
sound[] = {};
soundFly[] = {};
soundHit[] = {};
model = QPATHTOF(models\dragon.p3d);
ammo = QGVAR(super);
initSpeed = 120;
scope = 1;
displayName = CSTRING(dragonName);
displayNameShort = CSTRING(dragonName);
descriptionShort = CSTRING(dragonDescription);
};
};

195 changes: 195 additions & 0 deletions addons/dragon/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
class MainTurret;
class CfgVehicles {
class LandVehicle;

class StaticWeapon : LandVehicle {
class Turrets {
class MainTurret;
};
};

class StaticMGWeapon: StaticWeapon{
class Turrets : Turrets {
class MainTurret : MainTurret {
class ViewOptics;
};
};
};

class AT_01_base_F: StaticMGWeapon {
class Turrets : Turrets {
class MainTurret : MainTurret {
class ViewOptics: ViewOptics {
};
};
};
};

class GVAR(dragonStaticBase) : AT_01_base_F {
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
scope = 1;
displayName = CSTRING(dragonName);
model = QPATHTOF(models\ace_m47_static.p3d);
picture = "\A3\Static_F_Gamma\data\UI\gear_StaticTurret_AT_CA.paa";
UiPicture = "\A3\Static_F_Gamma\data\UI\gear_StaticTurret_AT_CA.paa";
icon = "\A3\Static_F_Gamma\data\UI\map_StaticTurret_AT_CA.paa";
threat[] = {0.3,1.0,0.3};
cost = 150000;
class Damage {
tex[] = {};
mat[] = {"a3\static_f_gamma\data\staticturret_01.rvmat","a3\static_f_gamma\data\staticturret_01_damage.rvmat","a3\static_f_gamma\data\staticturret_01_destruct.rvmat","a3\static_f_gamma\data\staticturret_02.rvmat","a3\static_f_gamma\data\staticturret_02_damage.rvmat","a3\static_f_gamma\data\staticturret_02_destruct.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_launcher.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_launcher_damage.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_launcher_destruct.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_mtube.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_mtube_damage.rvmat","a3\weapons_f_beta\launchers\titan\data\titan_mtube_destruct.rvmat"};
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};
class Turrets: Turrets {
class MainTurret: MainTurret {
optics = 1;
turretInfoType = "RscWeaponEmpty";
gunnerOpticsModel = QPATHTOF(models\optics_m47.p3d);
minElev = -60;
maxElev = 0;
weapons[] = {};
magazines[] = {};

gunnerAction = "gunner_static_low01";
gunnergetInAction = "";
gunnergetOutAction = "";

discreteDistance[] = {};
discreteDistanceInitIndex = 0;

class OpticsIn {
class Wide: ViewOptics {
initFov = 0.055;
minFov = 0.055; // 6 degree FOV
maxFov = 0.055;
gunnerOpticsModel = QPATHTOF(models\optics_m47.p3d);
gunnerOutOpticsModel = "\A3\weapons_f\reticle\optics_empty";
gunnerOpticsEffect[] = {"TankGunnerOptics1","OpticsBlur2","OpticsCHAbera2"};
};
};

displayName = CSTRING(dragonName);

class ViewOptics: ViewOptics {
initAngleX = 0;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 5;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.055;
minFov = 0.055; // 6 degree FOV
maxFov = 0.055;
visionMode[] = {"Normal"};
thermalMode[] = {0};
};
gunnerRightHandAnimName = "OtocHlaven_shake";
gunnerLeftHandAnimName = "OtocHlaven_shake";
gunBeg = "spice rakety";
gunEnd = "konec rakety";
memoryPointGunnerOptics = "look";
};
};
class AnimationSources {
class rest_rotate {
source="user";
animPeriod=0.00001;
initPhase=-0.35;
maxValue="3.60";
minValue="-3.60";
};
class optic_hide {
source="user";
animPeriod=0.0001;
initPhase=1;
maxValue="1";
minValue="0";
};
class missile_hide {
source="user";
animPeriod=0.0001;
initPhase=0;
maxValue="1";
minValue="0";
};
};
soundGetOut[] = {"A3\sounds_f\dummysound",0.001,1,5};
soundGetIn[] = {"A3\sounds_f\dummysound",0.00031622776,1,5};
armorStructural = 10.0;
hiddenSelections[] = {"camo_launcher","camo_tube"};
};

class GVAR(super_noSight) : GVAR(dragonStaticBase) {
scope = 2;
author = ECSTRING(common,ACETeam);
_generalMacro = "O_static_AT_F";
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
displayname = CSTRING(dragonNoSight);
side = 1;
faction = "BLU_F";
crew = "B_soldier_f";
hiddenSelectionsTextures[] = {"\a3\weapons_f_beta\launchers\titan\data\launcher_co.paa","\a3\weapons_f_beta\launchers\titan\data\tubem_co.paa"};

class Turrets: Turrets {
class MainTurret: MainTurret {
optics = 0;
TheCandianVendingMachine marked this conversation as resolved.
Show resolved Hide resolved
};
};

class ACE_CSW {
disassembleTo = QGVAR(super);
};

class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(dragonName);
selection = "";
distance = 2;
condition = "true";
class GVAR(pickUp) {
displayName = ECSTRING(csw,Pickup_displayName);
condition = QUOTE(call FUNC(canPickupTripod));
statement = QUOTE(call EFUNC(csw,assemble_pickupTripod));
};
class GVAR(mountWeapon) {
displayName = CSTRING(attachSight);
condition = QUOTE(call FUNC(canDeployWeapon));
statement = QUOTE([ARR_4(_this select 0, _this select 1, [], binocular (_this select 1))] call EFUNC(csw,assemble_deployWeapon));
};
};
};
};

class GVAR(super_sight) : GVAR(dragonStaticBase) {
scope = 2;
author = ECSTRING(common,ACETeam);
_generalMacro = "O_static_AT_F";
displayname = CSTRING(dragonSight);
side = 1;
faction = "BLU_F";
crew = "B_soldier_f";
hiddenSelectionsTextures[] = {"\a3\weapons_f_beta\launchers\titan\data\launcher_co.paa","\a3\weapons_f_beta\launchers\titan\data\tubem_co.paa"};

class AnimationSources: AnimationSources {
class optic_hide: optic_hide {
initPhase = 0;
};
};

class ACE_CSW {
enabled = 1;
disassembleFunc = QFUNC(onDisassemble);
disassembleWeapon = QGVAR(sight);
disassembleTurret = QGVAR(super_noSight);
desiredAmmo = 1;
ammoLoadTime = -1;
ammoUnloadTime = -1;
};

class Turrets: Turrets {
class MainTurret: MainTurret {
optics = 1;
weapons[] = { QGVAR(superStatic) };
magazines[] = { QGVAR(super) };
};
};
};
};

Loading