Skip to content

Commit

Permalink
Explosives - Improve AT/SLAM, Frag from Claymore and Bounding Mines (#…
Browse files Browse the repository at this point in the history
…10105)

* Reduce AT Mine Trigger Mass from 7t to 300kg

So that it triggers on lighter vehicles, including Wiesel Tankettes.
https://en.wikipedia.org/wiki/M15_mine#Specifications

* Improve M4 SLAM mine damage towards vehicles

* WIP add Claymore Mine Frag and reduce Structure Damage

* Fix duplicate class definition

* Improve SLAM Bottom-Attack Damage

* Reduce APERS+Bounding Mine Damage and add Frag

* Reduce Claymore Damage

* Orient Editor/Zeus-placed SLAMs pointing upwards

* ACE Copies of Ex Ammo with modified Damage

* Suggested Comment

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
  • Loading branch information
mrschick and LinkIsGrim authored Sep 30, 2024
1 parent 9c0e329 commit 8d0e70a
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 16 deletions.
36 changes: 29 additions & 7 deletions addons/explosives/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,33 @@ class CfgAmmo {

// GVAR(size) = 0; is small size
// GVAR(size) = 1; is large size
class DirectionalBombBase;
class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
class ClaymoreDirectionalMine_Remote_Ammo;
class ACE_ClaymoreDirectionalMine_Remote_Ammo: ClaymoreDirectionalMine_Remote_Ammo { // Wrapper class to avoid unintentional changes to third-party mods. Ref #10105
GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag";
GVAR(size) = 0;
GVAR(defuseObjectPosition)[] = {0, 0, 0.038};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};

// Reduce vanilla damage, so that it doesn't destroy buildings
hit = 10;
indirectHit = 10;
};

class DirectionalBombBase;
class APERSTripMine_Wire_Ammo: DirectionalBombBase {
GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12};
GVAR(size) = 0;
};

class APERSBoundingMine_Range_Ammo;
class ACE_APERSBoundingMine_Range_Ammo: APERSBoundingMine_Range_Ammo {
// Reduce vanilla damage, so that it doesn't destroy buildings
hit = 10;
indirectHit = 10;
CraterEffects = "MineCrater";
};

class ACE_FlareTripMine_Wire_Ammo: APERSTripMine_Wire_Ammo {
SoundSetExplosion[] = {};
defaultMagazine = "ACE_FlareTripMine_Mag"; // Mag that gets dropped after defuse
Expand All @@ -46,9 +59,16 @@ class CfgAmmo {
GVAR(size) = 0;
};

// More sensitive pressure-fuze for the Vanilla AT Mine.
class MineBase;
class ATMine_Range_Ammo: MineBase {
mineTrigger = "ACE_TankTriggerLight";
};

// "The SLAM has an anti-tamper feature that is only active in the bottom- and side-attack modes."
class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
indirectHitRange = 20;
explosionAngle = 60;
GVAR(explodeOnDefuseChance) = 1;
GVAR(magazine) = "SLAMDirectionalMine_Wire_Mag";
GVAR(size) = 0;
Expand All @@ -64,14 +84,16 @@ class CfgAmmo {
class ACE_SLAMDirectionalMine_Magnetic_Ammo: SLAMDirectionalMine_Wire_Ammo {
mineTrigger = "ACE_MagneticTrigger";
GVAR(explodeOnDefuseChance) = 1;
explosionAngle = 360;
indirectHitRange = 1;
explosionAngle = 60;
hit = 3000;
indirectHit = 3000;
indirectHitRange = 10;
mineInconspicuousness = 25;
icon = "iconExplosiveGP";
};

class PipeBombBase;
class DemoCharge_Remote_Ammo: PipeBombBase {
class DemoCharge_Remote_Ammo;
class ACE_DemoCharge_Remote_Ammo: DemoCharge_Remote_Ammo {
GVAR(magazine) = "DemoCharge_Remote_Mag";
GVAR(size) = 0;
GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055};
Expand All @@ -81,6 +103,7 @@ class CfgAmmo {
indirectHit = 500;
indirectHitRange = 7;
};
class PipeBombBase;
class SatchelCharge_Remote_Ammo: PipeBombBase {
GVAR(magazine) = "SatchelCharge_Remote_Mag";
GVAR(size) = 0;
Expand Down Expand Up @@ -157,7 +180,6 @@ class CfgAmmo {
GVAR(size) = 0;
GVAR(defuseObjectPosition)[] = {0, 0, 0.15};
};
class MineBase;
class UnderwaterMine_Range_Ammo: MineBase {
GVAR(size) = 1;
};
Expand Down
5 changes: 5 additions & 0 deletions addons/explosives/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ class Extended_Init_EventHandlers {
class ACE_Explosives_Place_SLAM {
ADDON = QUOTE(params ['_mine']; if (local _mine) then {_mine setCenterOfMass [ARR_3(0,-0.035,0.05)]; _mine setMass 5});
};
class ACE_ModuleMine_SLAMBottomMine {
class ADDON {
init = QUOTE(params ['_mine']; if (local _mine) then { [ARR_2({_this call CALLSTACK(BIS_fnc_setPitchBank)},[ARR_3(_mine,MINE_PITCH_UP,0)])] call CBA_fnc_execNextFrame });
};
};
};
2 changes: 1 addition & 1 deletion addons/explosives/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CfgMagazines {
displayName = CSTRING(SLAME_Magnetic);
digDistance = 0;
ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo";
pitch = 90;
pitch = MINE_PITCH_UP;
};
class IRSensor {
displayName = CSTRING(SLAME_IRSensor);
Expand Down
13 changes: 12 additions & 1 deletion addons/explosives/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ class CfgVehicles {
author = ECSTRING(common,aceteam);
ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo";
displayName = CSTRING(Module_SLAMBottomAttack_DisplayName);
// TODO: Find a way to place the mine laying down instead of standing up
};

class APERSTripMine: MineBase {};
Expand All @@ -374,6 +373,18 @@ class CfgVehicles {
displayName = CSTRING(TripFlare_Name);
};

class Claymore_F: MineBase {
ammo = "ACE_ClaymoreDirectionalMine_Remote_Ammo";
};

class APERSBoundingMine: MineBase {
ammo = "ACE_APERSBoundingMine_Range_Ammo";
};

class DemoCharge_F: MineBase {
ammo = "ACE_DemoCharge_Remote_Ammo";
};

class IEDUrbanBig_F;
class ACE_IEDUrbanBig_Range: IEDUrbanBig_F {
author = ECSTRING(common,aceteam);
Expand Down
8 changes: 8 additions & 0 deletions addons/explosives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ if (isServer) then {
TRACE_1("Knocked Out, Doing Deadman",_unit);
[_unit] call FUNC(onIncapacitated);
}] call CBA_fnc_addEventHandler;

// Orient all Editor-placed SLAM (Bottom attack) mines facing upward
{
private _mine = _x;
if (typeOf _mine == "ACE_SLAMDirectionalMine_Magnetic_Ammo") then {
[_mine, MINE_PITCH_UP, 0] call CALLSTACK(BIS_fnc_setPitchBank);
};
} forEach allMines;
};

if (!hasInterface) exitWith {};
Expand Down
14 changes: 10 additions & 4 deletions addons/explosives/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ class CfgActions {
};

class CfgMineTriggers {
class RangeTrigger;
class ACE_MagneticTrigger: RangeTrigger {
mineMagnetic = 1;
mineTriggerRange = 1;
class IRTrigger;
class ACE_MagneticTrigger: IRTrigger {
mineWireEnd[] = {0,0.1,0.5};
};

class TankTriggerMagnetic;
class ACE_TankTriggerLight: TankTriggerMagnetic {
// Reduce mass needed to trigger vanilla AT Mine to realistic levels (https://en.wikipedia.org/wiki/M15_mine#Specifications).
// Will now trigger for any vehicle heavier than the Vanilla ATV (280kg)
mineTriggerMass = 300; // Default: 7000
};
};
2 changes: 2 additions & 0 deletions addons/explosives/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@
#define PLACE_WAITING -1
#define PLACE_CANCEL 0
#define PLACE_APPROVE 1

#define MINE_PITCH_UP 90
13 changes: 10 additions & 3 deletions addons/frag/CfgAmmoFragParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class ATMine_Range_Ammo: MineBase {

class APERSMine_Range_Ammo: MineBase { // VS-50
GVAR(skip) = 0;
GVAR(force) = 0;
GVAR(force) = 1;
GVAR(classes)[] = {QGVAR(tiny_HD), QGVAR(tiny_HD), QGVAR(small_HD)};
GVAR(metal) = 100;
GVAR(charge) = 50;
Expand All @@ -251,7 +251,7 @@ class APERSMine_Range_Ammo: MineBase { // VS-50
};

class APERSBoundingMine_Range_Ammo: BoundingMineBase {
GVAR(skip) = 1;
GVAR(skip) = 0;
GVAR(force) = 0;
GVAR(classes)[] = {QGVAR(tiny_HD)};
GVAR(metal) = 80;
Expand Down Expand Up @@ -336,7 +336,14 @@ class APERSMineDispenser_Mine_Ammo: APERSMine_Range_Ammo {
class UXO_deploy_base_f: SubmunitionBase {};

class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
GVAR(skip) = 1;
GVAR(skip) = 0;
GVAR(force) = 0;
GVAR(classes)[] = {QGVAR(tiny), QGVAR(small)};
GVAR(fragCount) = 700;
GVAR(metal) = 700;
GVAR(charge) = 680;
GVAR(gurney_c) = 2700;
GVAR(gurney_k) = "3/5";
};

class SatchelCharge_Remote_Ammo: PipeBombBase {
Expand Down

0 comments on commit 8d0e70a

Please sign in to comment.