Browse Source

Merge pull request #90 from 501st-Aux-Mod-Team/add-dispenser-units-to-zeus

Droid Factory auto adds units to Zeus
Erliens 4 years ago
parent
commit
036f662335
33 changed files with 514 additions and 174 deletions
  1. 2 1
      addons - Copy/RD501_Droid_Dispenser/XEH_prep.hpp
  2. 1 0
      addons - Copy/RD501_Droid_Dispenser/config_macros.hpp
  3. 2 2
      addons - Copy/RD501_Droid_Dispenser/functions/fnc_droidDispenserInit.sqf
  4. 11 2
      addons - Copy/RD501_Droid_Dispenser/functions/fnc_droidDispenserPFH.sqf
  5. 1 1
      addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleDroidDispenser.sqf
  6. 190 14
      addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleOrbitalDroidDispenser.sqf
  7. 16 0
      addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleOrbitalDroidDispenserServer.sqf
  8. 1 1
      addons - Copy/RD501_Main/XEH_postinit.sqf
  9. 59 0
      addons - Copy/RD501_Vehicles/common/smallvehiclekit.hpp
  10. 7 15
      addons - Copy/RD501_Vehicles/land/Mynock/config.cpp
  11. 1 8
      addons - Copy/RD501_Vehicles/land/Warden/config.cpp
  12. 2 2
      addons - Copy/RD501_Vehicles/land/fast_infantry_transport/config.cpp
  13. 1 9
      addons - Copy/RD501_Vehicles/land/heavy_ordinance_tank/config.cpp
  14. 59 54
      addons - Copy/RD501_Vehicles/land/resupply_box/ammo_small_mag.hpp
  15. 62 2
      addons - Copy/RD501_Vehicles/land/resupply_box/ammo_small_weap.hpp
  16. 0 2
      addons - Copy/RD501_Vehicles/land/resupply_box/config.cpp
  17. 1 10
      addons - Copy/RD501_Vehicles/land/rocket_ordinance_tank/config.cpp
  18. 6 6
      addons - Copy/RD501_Weapons/DC_Family/DC_15a/config.cpp
  19. 9 3
      addons - Copy/RD501_Weapons/DC_Family/DC_15gl/config.cpp
  20. 2 2
      addons - Copy/RD501_Weapons/DC_Family/DC_15s/config.cpp
  21. 2 2
      addons - Copy/RD501_Weapons/DC_Family/DC_15x/config.cpp
  22. 4 4
      addons - Copy/RD501_Weapons/DC_Family/DC_17/config.cpp
  23. 2 2
      addons - Copy/RD501_Weapons/DC_Family/DC_19/config.cpp
  24. 5 7
      addons - Copy/RD501_Weapons/Launchers/RPS1/config.cpp
  25. 15 7
      addons - Copy/RD501_Weapons/Launchers/RPS6/config.cpp
  26. 21 2
      addons - Copy/RD501_Weapons/RAMER/config.cpp
  27. 4 2
      addons - Copy/RD501_Weapons/Westar/config.cpp
  28. 2 2
      addons - Copy/RD501_Weapons/Z6/config.cpp
  29. 12 4
      addons - Copy/RD501_Weapons/_mag/config.cpp
  30. 1 1
      addons - Copy/RD501_Weapons/_scopes/DC_15A_2-6x_acog.hpp
  31. 1 0
      addons - Copy/RD501_Weapons/_scopes/DC_15X_12_20x_scope.hpp
  32. 4 5
      addons - Copy/RD501_Weapons/config.cpp
  33. 8 2
      addons - Copy/RD501_Weapons/rocket/config.cpp

+ 2 - 1
addons - Copy/RD501_Droid_Dispenser/XEH_prep.hpp

@@ -2,5 +2,6 @@
 #define PREP(name) FUNC(name) = compile preProcessFileLineNumbers QUOTE(ADDON\functions\CONCAT(fnc_,name).sqf)
 PREP(droidDispenserPFH);
 PREP(droidDispenserInit);
+PREP(moduleDroidDispenser);
 PREP(moduleOrbitalDroidDispenser);
-PREP(moduleDroidDispenser);
+PREP(moduleOrbitalDroidDispenserServer);

+ 1 - 0
addons - Copy/RD501_Droid_Dispenser/config_macros.hpp

@@ -14,4 +14,5 @@
 	#define QGVAR(name) QUOTE(GVAR(name))
 	#define UNIT_NAME(side,name) CONCAT_3(PREFIX,_,CONCAT_3(side,_unit_,name))
 	#define ORDNANCE(name) CONCAT_3(PREFIX,_Ordnance_,name)
+	#define DEBUG
 #endif

+ 2 - 2
addons - Copy/RD501_Droid_Dispenser/functions/fnc_droidDispenserInit.sqf

@@ -3,9 +3,9 @@ params ["_target"];
 
 if(!isServer) exitWith
 {	
-	LOG_ERROR("Not Server, Exiting PFH"); 
+	LOG("Not Server, Exiting Dispenser Init"); 
 };
-
+LOG("Server, continuing on");
 LOGF_1("Initialising spawner %1",_target);
 // TODO: Read these vars from config, maybe CfgVehicles to allow placement of vehicles, although may be better to use static object with HP and destroyed mesh rather
 _target setVariable [QGVAR(group), createGroup [opfor, true]]; // group that units will be spawned into

+ 11 - 2
addons - Copy/RD501_Droid_Dispenser/functions/fnc_droidDispenserPFH.sqf

@@ -39,7 +39,16 @@ if(_aliveUnits < _target getVariable QGVAR(maxUnits)) exitWith
 	};
 	LOGF_2("%1 spawning in %2",_target,_selectedUnit);
 	_unit = _group createUnit [_selectedUnit, position _target, [], 0, "NONE"];
-	_unit call ace_common_fnc_fixPosition;
-	_unit commandMove (_unit getPos [25, 0]);
+	[{
+		params["_unit"];		
+		_unit call ace_common_fnc_fixPosition;
+		_group = group _unit;
+		_group setBehaviour "SAFE";
+		_group1 setCombatMode "RED";
+		_unit commandMove (_unit getPos [25, 0]);
+		{
+			_x addCuratorEditableObjects [[_unit], true];
+		} forEach allCurators;
+	}, _unit] call CBA_fnc_execNextFrame;
 };
 LOGF_1("%1 not spawning anything",_target);

+ 1 - 1
addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleDroidDispenser.sqf

@@ -3,6 +3,6 @@ params["_logic"];
 if !(local _logic) exitWith {};
 private _unit = attachedTo _logic;
 
-_unit call FUNC(droidDispenserInit);
+[_unit] remoteExecCall [QUOTE(FUNC(droidDispenserInit)), 2, false];
 
 deleteVehicle _logic;

+ 190 - 14
addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleOrbitalDroidDispenser.sqf

@@ -1,16 +1,192 @@
 #include "function_macros.hpp"
 
-LOG("Triggered Orbital Drop Droid Dispenser");
-//wait for projectile to land and then spawn vehicle
-params["_logic"];
-_position = position _logic;
-LOGF_2("Firing Droid Dispenser Artillery at '%1', for '%2'",_postition,_unit);
-[{
-	params["_position"];
-	_spawner = GVAR(spawnerDefaultObject) createVehicle _position;
-	LOGF_2("Created Droid Dispenser Object '%1' at '%2'",_spawner,position _spawner);
-	[_spawner] call FUNC(droidDispenserInit);
-}, [_position], GVAR(fireSupportSpawnDelay)] call CBA_fnc_waitAndExecute;
-
-// fire projectile
-_this call ace_zeus_fnc_bi_moduleProjectile;
+LOG("Spawned Orbital Drop Droid Dispenser Logic");
+
+_logic = _this select 0;
+_units = _this select 1;
+_activated = _this seelct 2;
+
+if ({local _x} count (objectcurators _logic) > 0) then {
+    //--- Reveal the circle to curators
+    _logic hideobject false;
+    _logic setpos position _logic;
+};
+if !(isserver) exitwith {};
+
+if (_activated) then {
+    _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")];
+    if (_ammo != "") then {
+        _cfgAmmo = configfile >> "cfgammo" >> _ammo;
+        //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
+        // It seems BI broke this part...
+        // _dirVar = _fnc_scriptname + typeof _logic;
+        // _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction
+        _pos = getposatl _logic;
+        _posAmmo = +_pos;
+        _posAmmo set [2,0];
+        _dir = direction _logic;
+        _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation");
+        _altitude = 0;
+        _velocity = [];
+        _attach = false;
+        _radio = "";
+        _delay = 60;
+        _sound = "";
+        _soundSourceClass = "";
+        _hint = [];
+        _shakeStrength = 0;
+        _shakeRadius = 0;
+        switch (_simulation) do {
+            case "shotshell": {
+                _altitude = 1000;
+                _velocity = [0,0,-100];
+                _radio = "SentGenIncoming";
+                _sounds = if (getnumber (_cfgAmmo >> "hit") < 200) then {["mortar1","mortar2"]} else {["shell1","shell2","shell3","shell4"]};
+                _sound = selectRandom _sounds;
+                _hint = ["Curator","PlaceOrdnance"];
+                _shakeStrength = 0.01;
+                _shakeRadius = 300;
+            };
+            case "shotsubmunitions": {
+                _posAmmo = [_posAmmo,500,_dir + 180] call bis_fnc_relpos;
+                _altitude = 1000 - ((getterrainheightasl _posAmmo) - (getterrainheightasl _pos));
+                _posAmmo set [2,_altitude];
+                _velocity = [sin _dir * 68,cos _dir * 68,-100];
+                _radio = "SentGenIncoming";
+                _hint = ["Curator","PlaceOrdnance"];
+                _shakeStrength = 0.02;
+                _shakeRadius = 500;
+            };
+            case "shotilluminating": {
+                _altitude = 66;
+                _velocity = [wind select 0,wind select 1,30];
+                _sound = "SN_Flare_Fired_4";
+                _soundSourceClass = "SoundFlareLoop_F";
+            };
+            case "shotnvgmarker";
+            case "shotsmokex": {
+                _altitude = 0;
+                _velocity = [0,0,0];
+                _attach = true;
+            };
+            default {["Ammo simulation '%1' is not supported",_simulation] call bis_fnc_error;};
+        };
+        _fnc_playRadio = {
+            if (_radio != "") then {
+                _entities = (getposatl _logic) nearentities ["All",100];
+                _sides = [];
+                {
+                    if (isplayer _x) then {
+                        _side = side group _x;
+                        if (_side in [east,west,resistance,civilian]) then {
+                            //--- Play radio (only if it wasn't played recently)
+                            if (CBA_missionTime > _x getVariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then {
+                                [[_side,_radio,"side"],"bis_fnc_sayMessage",_x] call bis_fnc_mp;
+                                _x setVariable ["BIS_fnc_moduleProjectile_radio",CBA_missionTime + _delay];
+                            };
+                        };
+                    };
+                } foreach _entities;
+            };
+        };
+        if (count _hint > 0 && {count objectcurators _logic > 0}) then {
+            [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp;
+        };
+        if (count _velocity == 3) then {
+            _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber;
+            _radio = _logic getvariable ["radio",_radio];
+
+            //--- Create projectile
+            _posAmmo set [2,_altitude];
+            _projectile = createvehicle [_ammo,_posAmmo,[],0,"none"];
+            _projectile setpos _posAmmo;
+            _projectile setvelocity _velocity;
+            if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];};
+
+            // Added by ace_zeus for ace_frag compatibility
+            if (!isNil ace_frag_fnc_addPfhRound) then {
+                [objNull, _ammo, _projectile, true] call ace_frag_fnc_addPfhRound;
+            };
+
+            //--- Play sound
+            if (_sound != "") then {[[_logic,_sound,"say3D"],"bis_fnc_sayMessage"] call bis_fnc_mp;};
+
+            //--- Create sound source
+            _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull};
+
+            // Added by ace_zeus to toggle ordnance radio message
+            if (ace_zeus_radioOrdnance) then {
+                //--- Play radio warning
+                [] call _fnc_playRadio;
+            };
+
+            //--- Update
+            if (_attach) then {
+                waituntil {
+                    _soundSource setposatl getposatl _projectile;
+                    sleep 1;
+                    isnull _projectile || isnull _logic
+                };
+            } else {
+                waituntil {
+                    _soundSource setposatl getposatl _projectile;
+
+                    if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then {
+                        _posNew = getposasl _logic;
+                        _dirDiff = direction _logic - _dir;
+                        _posNew = [_posNew,[getposasl _projectile,_pos] call bis_fnc_distance2d,direction _logic + 180] call bis_fnc_relpos;
+                        _posNew set [2,getposasl _projectile select 2];
+                        _projectile setvelocity ([velocity _projectile,-_dirDiff] call bis_fnc_rotatevector2d);
+                        _projectile setposasl _posNew;
+                        _pos = getposatl _logic;
+                        _dir = direction _logic;
+                        //missionnamespace setvariable [_dirVar,_dir]; See L37
+                    };
+                    sleep 0.1;
+                    isnull _projectile || isnull _logic
+                };
+            };
+            deletevehicle _projectile;
+            deletevehicle _soundSource;
+			LOG("Server, continuing on");
+			_position = position _logic;
+			LOGF_1("Firing Droid Dispenser Artillery at '%1'", _position);
+			_spawner = GVAR(spawnerDefaultObject) createVehicle _position;
+			LOGF_2("Created Droid Dispenser Object '%1' at '%2'", _spawner, _position);
+			[{
+				params["_unit"];
+				LOG("Adding to curators");
+				if(!isServer) exitWith 
+				{
+					LOG("Exiting Client Method Should only run on Server");
+				};
+				[_unit] call FUNC(droidDispenserInit);
+				{
+					_x addCuratorEditableObjects [[_unit], true];
+				} forEach allCurators;
+			}, [_spawner]] call CBA_fnc_execNextFrame;
+            if (count objectcurators _logic > 0) then {
+                //--- Delete curator spawned logic
+                if (_shakeStrength > 0) then {
+                    if (_simulation == "shotsubmunitions") then {sleep 0.5;};
+                    [[_shakeStrength,0.7,[position _logic,_shakeRadius]],"bis_fnc_shakeCuratorCamera"] call bis_fnc_mp;
+                };
+				
+                deletevehicle _logic;
+            } else {
+
+                //--- Repeat to achieve permanent effect
+                _repeat = _logic getvariable ["repeat",0] > 0;
+                if (_repeat) then {
+                    [_logic,_units,_activated] call bis_fnc_moduleprojectile;
+                } else {
+                    deletevehicle _logic;
+                };
+            };
+        } else {
+            deletevehicle _logic;
+        };
+    } else {
+        ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error;
+    };
+};

+ 16 - 0
addons - Copy/RD501_Droid_Dispenser/functions/fnc_moduleOrbitalDroidDispenserServer.sqf

@@ -0,0 +1,16 @@
+#include "function_macros.hpp"
+params["_pos"];
+LOGF_1("Firing Droid Dispenser Artillery at '%1'",_postition);
+[{
+	params["_position"];
+	if !(isServer) exitWith {};
+	_spawner = GVAR(spawnerDefaultObject) createVehicle _position;
+	LOGF_2("Created Droid Dispenser Object '%1' at '%2'",_spawner, position _spawner);
+	[_spawner] call FUNC(droidDispenserInit);
+	[{
+		params["_unit"];
+		{
+			_x addCuratorEditableObjects [[_unit], true];
+		} forEach allCurators;
+	}, _spawner] call CBA_fnc_execNextFrame;
+}, [_pos], GVAR(fireSupportSpawnDelay)] call CBA_fnc_waitAndExecute;

+ 1 - 1
addons - Copy/RD501_Main/XEH_postinit.sqf

@@ -21,5 +21,5 @@ RD501_FORCE_WALK_WEAPONS = [macro_quote(macro_new_weapon_nofam(z1000))];
 ["weapon", macro_fnc_name(heavyWeaponHandlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler;
 
 //Auto Reload On Equip
-RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(RPS_Disposable)];
+RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(rps1)];
 ["weapon", macro_fnc_name(reloadWeaponOnFirstSelected)] call CBA_fnc_addPlayerEventHandler;

+ 59 - 0
addons - Copy/RD501_Vehicles/common/smallvehiclekit.hpp

@@ -0,0 +1,59 @@
+class TransportItems
+	{
+		class _transport_ToolKit
+		{
+			name = "ToolKit";
+			count = 2;
+		};
+		class _transport_ACE_morphine
+		{
+			name = "ACE_morphine";
+			count = 10;
+		};	
+		class _transport_ACE_epinephrine
+		{
+			name = "ACE_epinephrine";
+			count = 10;
+		};	
+		class _transport_ACE_tourniquet
+		{
+			name = "ACE_tourniquet";
+			count = 6;
+		};	
+		class _transport_ACE_elasticBandage
+		{
+			name = "ACE_elasticBandage";
+			count = 40;
+		};				
+	};
+class TransportWeapons
+	{
+	class _transport_dc15a
+		{
+			weapon = macro_new_weapon(DC,r15a)
+			count = 3;
+		};
+	class _transport_dc15c
+		{
+			weapon = macro_new_weapon(DC,15c)
+			count = 3;
+		};
+	class _transport_rps1
+		{
+			weapon = macro_new_weapon(launcher,rps1)
+			count = 2;
+		};
+	};
+class TransportMagazines
+	{
+	class transport_10mw30
+		{
+			magazine = macro_new_mag(10mw,30);
+			count = 20;
+		};
+	class _transport_20mwdp20
+		{
+			magazine = macro_new_mag(20mwdp,20);
+			count = 40;
+		};
+	};

+ 7 - 15
addons - Copy/RD501_Vehicles/land/Mynock/config.cpp

@@ -71,9 +71,7 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(Tank)
 		vehicleClass = macro_editor_vehicle_type(Tank)
 		class TransportBackpacks;
-		class TransportItems;
-		class TransportWeapons;
-		class TransportMagazines;
+		#include "../../common/smallvehiclekit.hpp"
 
 		#include "common_stuff_mynock.hpp"
 
@@ -119,9 +117,7 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(Tank)
 		vehicleClass = macro_editor_vehicle_type(Tank)
 		class TransportBackpacks;
-		class TransportItems;
-		class TransportWeapons;
-		class TransportMagazines;
+		#include "../../common/smallvehiclekit.hpp"
 
 		#include "common_stuff_mynock.hpp"
 
@@ -166,9 +162,7 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(Tank)
 		vehicleClass = macro_editor_vehicle_type(Tank)
 		class TransportBackpacks;
-		class TransportItems;
-		class TransportWeapons;
-		class TransportMagazines;
+		#include "../../common/smallvehiclekit.hpp"
 
 		#include "common_stuff_mynock.hpp"
 
@@ -217,9 +211,7 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(APC)
 		vehicleClass = macro_editor_vehicle_type(APC)
 		class TransportBackpacks;
-		class TransportItems;
-		class TransportWeapons;
-		class TransportMagazines;
+		#include "../../common/smallvehiclekit.hpp"
 		class EventHandlers: DefaultEventhandlers
 		{
 			fired = "_this call (uinamespace getviariable 'BIS_fnc_effectFired');";
@@ -246,6 +238,7 @@ class CfgVehicles
 	{
 		displayName="Republic Glaive TD"
 		author="RD501"
+		#include "../../common/smallvehiclekit.hpp"
 		hiddenSelectionsTextures[]=
 		{
 			"RD501_Vehicles\textures\glaive\glaive_ext1_republic_co.paa",
@@ -282,9 +275,7 @@ class CfgVehicles
 		editorSubcategory = macro_editor_cat(AA)
 		vehicleClass = macro_editor_vehicle_type(AA)
 		class TransportBackpacks;
-		class TransportItems;
-		class TransportWeapons;
-		class TransportMagazines;
+		#include "../../common/smallvehiclekit.hpp"
 
 		#include "common_stuff_mynock.hpp"
 
@@ -325,5 +316,6 @@ class CfgVehicles
 		faction = macro_republic_faction
 		editorSubcategory = macro_editor_cat(Transport)
 		vehicleClass = macro_editor_vehicle_type(Transport)
+		#include "../../common/smallvehiclekit.hpp"
 	};	
 };

+ 1 - 8
addons - Copy/RD501_Vehicles/land/Warden/config.cpp

@@ -86,15 +86,8 @@ class CfgVehicles
 		vehicleClass = macro_editor_vehicle_type(APC)
 
 		#include "../Mynock/common_stuff_mynock.hpp"
+		#include "../../common/smallvehiclekit.hpp"
 		
-		class TransportItems
-		{
-			class _xx_ToolKit
-			{
-				name = "ToolKit";
-				count = 4;
-			};
-		};
 		author = "RD501";
 		//faction = "RD501Faction";
 		scope = 2;

+ 2 - 2
addons - Copy/RD501_Vehicles/land/fast_infantry_transport/config.cpp

@@ -49,7 +49,7 @@ class CfgVehicles
 		displayName = "Republic Pathfinder";
 		forceInGarage = 1;
 		side = 1;
-		
+		#include "../../common/smallvehiclekit.hpp"
 
 		faction = macro_republic_faction
 		editorSubcategory = macro_editor_cat(Transport)
@@ -99,7 +99,7 @@ class CfgVehicles
 			macro_vehicle_textures\Fast_Infantry_Transport\wheels_medical_fit.paa,
 			""
 		};
-
+		
 		smokeLauncherAngle = 360;
 		smokeLauncherGrenadeCount = 20;
 		smokeLauncherVelocity = 16;

+ 1 - 9
addons - Copy/RD501_Vehicles/land/heavy_ordinance_tank/config.cpp

@@ -62,15 +62,7 @@ class CfgVehicles
 
 		forceInGarage=1;
 		author = "RD501";
-		class TransportItems
-		{
-		};
-		class TransportMagazines
-		{
-		};
-		class TransportWeapons 
-		{
-		};
+		#include "../../common/smallvehiclekit.hpp"
 
 		#include "../Mynock/common_stuff_mynock.hpp"
 		class EventHandlers: DefaultEventhandlers

+ 59 - 54
addons - Copy/RD501_Vehicles/land/resupply_box/ammo_small_mag.hpp

@@ -1,95 +1,100 @@
-class DC15_A_Rifle_full_mag
+class transport_2mw30
 {
-	magazine = macro_new_mag(DC15a_High,15);
+	magazine = macro_new_mag(2mw,30);
 	count = 15;
 };
-class _xx_SWOP_DC15ABlasterRifle_Mag
+class transport_5mw15
 {
-	magazine = macro_new_mag(DC15a_Med,30);
+	magazine = macro_new_mag(5mw,10);
 	count = 15;
 };
-class _xx_SWOP_DC15ABlasterRifle_Low_Mag
+class transport_5mw60
 {
-	magazine = 	macro_new_mag(DC15a_Low,60)
-	count = 15;
+	magazine = 	macro_new_mag(5mw,60)
+	count = 60;
 };
-class _xx_DCStun_Mag
+class transport_10mw30
 {
-	magazine = "DCStun_Mag";
-	count = 10;
+	magazine = macro_new_mag(10mw,30);
+	count = 60;
 };
-class _xx_SWOP_DC15_Mag_Mag
+class transport_10mw400
 {
-	magazine = macro_new_mag(DC15s,60);
+	magazine = macro_new_mag(10mw,400);
 	count = 15;
 };
-class _xx_SWOP_SWOP_dc15xBlasterRifle_RD501_Mag_Mag
+class _transport_20mw20
 {
-	magazine = macro_new_mag(DC15x,6);
-	count = 15;
+	magazine = macro_new_mag(20mw,20);
+	count = 20;
 };
-class _xx_SWOP_SWOP_DC15ABlasterRifle_Low_highcap_box_Mag
+class _transport_20mwup20
 {
-	magazine =  macro_new_mag(DC15a_box_mag,240);
-	count = 10;
+	magazine =  macro_new_mag(20mwup,20);
+	count = 40;
 };		
-class _xx_SWOP_1Rnd_AT_Grenade_DC15A_Mag
+class _transport_20mwdp20
 {
-	magazine = macro_new_mag(AT_GL,2);
-	count = 10;
+	magazine = macro_new_mag(20mwdp,20);
+	count = 40;
 };		
-class _xx_SWOP_SWOP_WESTARM5_MAG
+class _transport_20mw240
 {
-	magazine = "SWOP_WESTARM5_Mag";
-	count = 10;
+	magazine = macro_new_mag(20mw,240);
+	count = 20;
 };									
-class _xx_SWOP_SWOP_DC17Pistol_Mag_Mag
+class _transport_30mw10
 {
-	magazine = macro_new_mag(DC17,20)
+	magazine = macro_new_mag(30mw,10);
 	count = 15;
-};					
-class _xx_ACE_HuntIR_M203
+}
+class _transport_30mw7
 {
-	magazine = "ACE_HuntIR_M203";
-	count = 25;
+	magazine = macro_new_mag(30mw,7)
+	count = 15;
 };
-class _xx_5Rnd_HE_Grenade_DC15A
+class _transport_40mw5
 {
-	magazine = macro_new_mag(HE_GL,3)
+	magazine = macro_new_mag(40mw,5)
 	count = 10;
 };
-class _xx_300Rnd_BlasterLaser_Belt
+class _transport_stun5
 {
-	magazine = macro_new_mag(z6,400)
-	count = 10;
+	magazine =  macro_new_mag(stun,5)
+	count = 20;
 };
-class _xx_RD501_DC15ABlasterRifleLE_Full_Mag
+class _transport_launcher_AT_mags
 {
-	magazine =  macro_new_mag(DC15a_LE,15)
-	count = 10;
+	magazine =  macro_new_mag(RPS_AT,1)
+	count = 20;
 };
-class _xx_C12_Remote_Mag
+class _transport_launcher_AA_mags
 {
-	magazine = "C12_Remote_Mag";
-	count = 2;
+	magazine =  macro_new_mag(RPS_AA,1)
+	count = 20;
 };
-class _xx_RocketHH15CloneHEATFF_Mag_RD501
+class _transport_he3
 {
-	magazine =  macro_new_mag(RPS_AT,1)
-	count = 10;
+	magazine = macro_new_mag(UGL_HE,3);
+	count = 15;
 };
-class _xx_Rocket_AA_mags
+class _transport_ap2
 {
-	magazine =  macro_new_mag(RPS_AA,1)
-	count = 10;
-};
-class _xx_UGL_FlareWhite_F_3Rnd_RD501
+	magazine = macro_new_mag(UGL_AP,2);
+	count = 15;
+};		
+class _transport_emp1
+{
+	magazine = macro_new_mag(UGL_EMP,1);
+	count = 3;
+};			
+class _transport_HuntIR_M203
 {
-	magazine = "UGL_FlareWhite_F_3Rnd_RD501";
-	count = 5;
+	magazine = "ACE_HuntIR_M203";
+	count = 15;
 };
-class _xx_UGL_3Rnd_Smoke_Grenade_shell
+class _transport_C12_Remote_Mag
 {
-	magazine = "3Rnd_Smoke_Grenade_shell";
-	count = 5;
+	magazine = "C12_Remote_Mag";
+	count = 2;
 };

+ 62 - 2
addons - Copy/RD501_Vehicles/land/resupply_box/ammo_small_weap.hpp

@@ -1,5 +1,65 @@
-class _xx_SWOP_SWOP_DC15ABlasterRifle_RD501_RD501
+class _transport_dc15a
 {
-    weapon = macro_new_weapon(DC,15a)
+    weapon = macro_new_weapon(DC,r15a)
     count = 5;
+};
+class _transport_dc15s
+{
+    weapon = macro_new_weapon(DC,r15s)
+    count = 5;
+};
+class _transport_dc15c
+{
+    weapon = macro_new_weapon(DC,15c)
+    count = 5;
+};
+class _transport_dc15l
+{
+    weapon = macro_new_weapon(DC,15l)
+    count = 2;
+};
+class _transport_z6
+{
+    weapon = macro_new_weapon_nofam(rz6)
+    count = 2;
+};
+class _transport_dc15gl
+{
+    weapon = macro_new_weapon(DC,15gl)
+    count = 2;
+};
+class _transport_valken38x
+{
+    weapon = macro_new_weapon_nofam(valken38x)
+    count = 2;
+};
+class _transport_rps6
+{
+    weapon = macro_new_weapon(launcher,rps6)
+    count = 2;
+};
+class _transport_rps1
+{
+    weapon = macro_new_weapon(launcher,rps1)
+    count = 2;
+};
+class _transport_plx
+{
+    weapon = macro_new_weapon(Launcher,PLX1)
+    count = 1;
+};
+class _transport_z1000
+{
+    weapon = macro_new_weapon_nofam(z1000)
+    count = 1;
+};
+class _transport_dc15x
+{
+    weapon = macro_new_weapon(DC,r15x)
+    count = 1;
+};
+class _transport_rgl6
+{
+    weapon = macro_new_weapon_nofam(rgl6)
+    count = 1;
 };

+ 0 - 2
addons - Copy/RD501_Vehicles/land/resupply_box/config.cpp

@@ -180,8 +180,6 @@ class CfgVehicles
 		ace_cargo_size = 1;
 		class TransportItems
         {
-        	#include "ammo_small_items.hpp"
-			#include "medical_small_items.hpp"
         };
 			
 		class TransportMagazines

+ 1 - 10
addons - Copy/RD501_Vehicles/land/rocket_ordinance_tank/config.cpp

@@ -60,16 +60,7 @@ class CfgVehicles
 		forceInGarage=1;
 
 		#include "../Mynock/common_stuff_mynock.hpp"
-
-		class TransportItems
-		{
-		};
-		class TransportMagazines
-		{
-		};
-		class TransportWeapons 
-		{
-		};
+		#include "../../common/smallvehiclekit.hpp"
 		
 		textureList[] = {};
 		hiddenSelectionsTextures[] = 

+ 6 - 6
addons - Copy/RD501_Weapons/DC_Family/DC_15a/config.cpp

@@ -29,7 +29,7 @@ class CfgPatches
 
 class cfgWeapons 
 {
-	class Rifle_Long_Base_F;
+	/*class Rifle_Long_Base_F;
 	class SWOP_BlasterRifle_Base:Rifle_Long_Base_F
 	{
 		class WeaponSlotsInfo;
@@ -100,7 +100,7 @@ class cfgWeapons
 		{
 			class CowsSlot;
 		};
-	}
+	}*/
 	class 3AS_DC15A_Base_F;
 	class RD501_stun_muzzle;
 	class 3AS_DC15A_F:3AS_DC15A_Base_F
@@ -154,9 +154,9 @@ class cfgWeapons
 			};
 		};
 	};
-	#include "DC_15a__LE_rifle.hpp"
-	#include "DC_15a__GL_rifle.hpp"
-	#include "DC_15a__mod0_rifle.hpp"
-	#include "DC_15a_rifle.hpp"
+	//#include "DC_15a__LE_rifle.hpp"
+	//#include "DC_15a__GL_rifle.hpp"
+	//#include "DC_15a__mod0_rifle.hpp"
+	//#include "DC_15a_rifle.hpp"
 };
 

+ 9 - 3
addons - Copy/RD501_Weapons/DC_Family/DC_15gl/config.cpp

@@ -1,4 +1,4 @@
-#define COMPONENT DC_15s
+#define COMPONENT DC_15gl
 #include "../../../RD501_main/config_macros.hpp"
 #include "../../_common/common.hpp"
 
@@ -73,10 +73,16 @@ class CfgWeapons
 			mass = 30;
 			class CowsSlot: CowsSlot
 			{
-				access = 1;
+				displayName = "Optics Slot";
+				iconPicture = "\A3\Weapons_F\Data\UI\attachment_top.paa";
+				iconPinpoint = "Bottom";
+				iconPosition[] = {0.5,0.35};
+				iconScale = 0.2;
+				linkProxy = "\A3\data_f\proxies\weapon_slots\TOP";
+				scope = 0;
 				compatibleItems[] = 
 				{
-					macro_new_weapon(scope,dc_15a_acogtcw)
+					macro_new_weapon(scope,dc_15a_acog)
 				};
 
 			};

+ 2 - 2
addons - Copy/RD501_Weapons/DC_Family/DC_15s/config.cpp

@@ -25,7 +25,7 @@ class CfgPatches
 
 class cfgWeapons 
 {
-	class SWOP_B2gun;
+	/*class SWOP_B2gun;
 	class Rifle_Long_Base_F;
 	class SWOP_BlasterRifle_Base:Rifle_Long_Base_F
 	{
@@ -96,7 +96,7 @@ class cfgWeapons
 
 			};
 		};
-	};
+	};*/
 
 	class Pistol;
 	class Pistol_Base_F:Pistol

+ 2 - 2
addons - Copy/RD501_Weapons/DC_Family/DC_15x/config.cpp

@@ -27,7 +27,7 @@ class CfgPatches
 class cfgWeapons 
 {
 	
-	class SWOP_BlasterRifle_Base;
+	/*class SWOP_BlasterRifle_Base;
 
 	class SWOP_dc15xBlasterRifle: SWOP_BlasterRifle_Base
 	{
@@ -96,7 +96,7 @@ class cfgWeapons
 			};
 		};
 
-	};
+	};*/
 	class arifle_MX_Base_F;
 	class JLTS_DC15X: arifle_MX_Base_F
 	{

+ 4 - 4
addons - Copy/RD501_Weapons/DC_Family/DC_17/config.cpp

@@ -28,7 +28,7 @@ class CfgPatches
 
 class cfgWeapons 
 {
-	class Mode_FullAuto;
+	/*class Mode_FullAuto;
 	class Pistol_Base_F;
 	class SWOP_DC17Pistol: Pistol_Base_F
 	{
@@ -101,7 +101,7 @@ class cfgWeapons
 	class SWOP_DC15SAPistol:Pistol_Base_F
 	{
 		class Single;
-	};
+	};*/
 	class RD501_stun_muzzle;
 	class hgun_P07_F;
 	class JLTS_DC17SA:hgun_P07_F
@@ -176,7 +176,7 @@ class cfgWeapons
 			burst=3;
 		};
 	};
-
+/*
 	class RD501_DC_15_RB:SWOP_DC15SAPistol
 	{
 		scope=2;
@@ -280,7 +280,7 @@ class cfgWeapons
 
 			dispersion = 0.0001;
 		};
-	};
+	};*/
 
 	
 };

+ 2 - 2
addons - Copy/RD501_Weapons/DC_Family/DC_19/config.cpp

@@ -24,7 +24,7 @@ class CfgPatches
 
 class cfgWeapons 
 {
-	class SWOP_BlasterRifle_Base;
+	/*class SWOP_BlasterRifle_Base;
 	class SWOP_DC19: SWOP_BlasterRifle_Base
 	{
 		
@@ -58,6 +58,6 @@ class cfgWeapons
 			reloadTime = DC19_reloadtime_single
         	dispersion = DC19_accuracy
 		};
-	};
+	};*/
 };
 

+ 5 - 7
addons - Copy/RD501_Weapons/Launchers/RPS1/config.cpp

@@ -23,29 +23,27 @@ class CfgPatches
 
 class cfgWeapons 
 {
-	class Launcher;
-    class Launcher_Base_F: Launcher {
+	class Launcher_Base_F;
+    class launch_RPG32_F: Launcher_Base_F {
         class WeaponSlotsInfo;
     };
 
-	class macro_new_weapon(launcher,rps1) : Launcher_Base_F
+	class macro_new_weapon(launcher,rps1) : launch_RPG32_F
 	{
 		author= "RD501";
 		scope = 2;
 		scopeArsenal=2;
 		displayName = "Republic RPS1 Launcher";
 		model = "\3AS\3AS_Weapons\RPS6\3AS_RPS6_F.p3d";
-		modelOptics = "\A3\Weapons_F\acc\reticle_RPG_F";
         icon = "\RD501_Weapons\Launchers\RPS1\rps_disposable_icon.paa";
 		picture = "\RD501_Weapons\Launchers\RPS1\rps_disposable_icon.paa";
 		recoil = "recoil_single_law";
 		baseWeapon = macro_new_weapon(launcher,rps1)
 		RD501_Empty_Weapon = macro_new_weapon(launcher,rps1_u)
-		magazines[] = { "MRAWS_HEAT55_F" };
-
+		magazines[] = { macro_new_mag(rps1,1) };
+		magazineWell[]={""};
 		magazineReloadTime = 0.1;
         reloadMagazineSound[] = {"",1,1};
-        
 		class EventHandlers {
 			fired = macro_quote(_this call macro_fnc_name(onWeaponFiredSwapToEmpty));
 		};

+ 15 - 7
addons - Copy/RD501_Weapons/Launchers/RPS6/config.cpp

@@ -19,20 +19,27 @@ class CfgPatches
 	};
 };
 class CfgWeapons
-{
-	class 3AS_RPS6_HP;
+{	class Launcher_Base_F;
+	class 3AS_RPS6_HP:Launcher_Base_F
+	{
+		class OpticsModes{class optic;};
+	};
 	class macro_new_weapon(launcher,RPS6):3AS_RPS6_HP
 	{
 		scope=2;
+		canLock = 2;
+		airLock=2;
 		displayName="Republic RPS6 Launcher";
 		weaponInfoType="RscOptics_titan";
 		modelOptics="\A3\Weapons_F_Beta\acc\reticle_titan.p3d";
 		icon = "\RD501_Weapons\Launchers\RPS6\icon.paa";
 		picture = "\RD501_Weapons\Launchers\RPS6\icon.paa";
+		nameSound="aalauncher";
 		magazines[]=
 		{
 			macro_new_mag(RPS_AT,1),
 			macro_new_mag(RPS_AA,1)
+			
 		};
 		class OpticsModes
 		{
@@ -46,9 +53,9 @@ class CfgWeapons
 					"OpticsBlur1"
 				};
 				opticsFlare=0;
-				opticsZoomMin=0.083329998;
-				opticsZoomMax=0.041669998;
-				opticsZoomInit=0.083329998;
+				opticsZoomInit =scope_magnification(1); //0.1083;
+				opticsZoomMax = scope_magnification(1); //0.1083;
+				opticsZoomMin = scope_magnification(6); //0.1083;
 				distanceZoomMin=300;
 				distanceZoomMax=300;
 				memoryPointCamera="eye";
@@ -56,11 +63,12 @@ class CfgWeapons
 				visionMode[]=
 				{
 					"Normal",
+					"NVG",
 					"Ti"
 				};
-				thermalMode[]={0,1};
+				thermalMode[]={0};
 				opticsDisablePeripherialVision=1;
-				discretefov[]={0.083329998,0.041669998};
+				discretefov[] = {scope_magnification(1),scope_magnification(3),scope_magnification(6)};
 				discreteInitIndex=0;
 			};
 		};

+ 21 - 2
addons - Copy/RD501_Weapons/RAMER/config.cpp

@@ -21,7 +21,7 @@ class CfgPatches
 };
 class cfgWeapons
 {
-	class SWOP_T21BlasterRifle;
+	/*class SWOP_T21BlasterRifle;
 	class RD501_RAMER: SWOP_T21BlasterRifle
 	{
 		baseWeapon="RD501_RAMER";
@@ -35,7 +35,7 @@ class cfgWeapons
 		{
 			"RD501_RAMER_x6_mag"
 		};
-	};
+	};*/
 	class arifle_MX_Base_F;
 	class JLTS_EPL2:arifle_MX_Base_F
 	{
@@ -53,5 +53,24 @@ class cfgWeapons
 		{
 			reloadTime=2;
 		}
+			class WeaponSlotsInfo
+		{
+			mass = 30;
+			class CowsSlot
+			{
+				displayName = "Optics Slot";
+				iconPicture = "\A3\Weapons_F\Data\UI\attachment_top.paa";
+				iconPinpoint = "Bottom";
+				iconPosition[] = {0.5,0.35};
+				iconScale = 0.2;
+				linkProxy = "\A3\data_f\proxies\weapon_slots\TOP";
+				scope = 0;
+				compatibleItems[] = 
+				{
+					"optic_Holosight_blk_F"
+				};
+
+			};
+		};
 	};
 };

+ 4 - 2
addons - Copy/RD501_Weapons/Westar/config.cpp

@@ -26,7 +26,7 @@ class CfgPatches
 
 class cfgWeapons 
 {	
-	class Rifle_Long_Base_F;
+	/*class Rifle_Long_Base_F;
 	class SWOP_BlasterRifle_Base :Rifle_Long_Base_F
 	{
 		
@@ -62,6 +62,7 @@ class cfgWeapons
 	};
 
 	#include "westar_pistol.hpp"
+	*/
 	class 3AS_WestarM5_Base_F;
 	class 3AS_WestarM5_F:3AS_WestarM5_Base_F
 	{
@@ -74,7 +75,8 @@ class cfgWeapons
 		displayName="Republic Westar M5"
 		magazines[]=
 		{
-				macro_new_mag(10mws,30)
+				macro_new_mag(10mws,30),
+				"ACE_HuntIR_M203"
 		};
 		modes[] = {"Single","FullAuto"};
 		class Single:Single

+ 2 - 2
addons - Copy/RD501_Weapons/Z6/config.cpp

@@ -28,7 +28,7 @@ class CfgPatches
 class Mode_SemiAuto;
 class cfgWeapons 
 {	
-	class Rifle_Base_F;
+	/*class Rifle_Base_F;
 	class Mode_FullAuto;
 	class SW_Z6_base_F:Rifle_Base_F
 	{
@@ -103,7 +103,7 @@ class cfgWeapons
 			};
 		};
 
-	};
+	};*/
 	class LMG_Mk200_F;
 	class JLTS_Z6:LMG_Mk200_F
 	{

+ 12 - 4
addons - Copy/RD501_Weapons/_mag/config.cpp

@@ -26,6 +26,7 @@ class CfgMagazines
 	class SWOP_DC15SA_Ammo;
 	class SWOP_termDet_Gm;
 	class SWOP_BCCKtermimploder_G;
+	class RPG32_F;
 	///Rifle/Pistol Magazines
 	class macro_new_mag(2mw,30) : 3AS_45Rnd_EC50_Mag
 	{
@@ -287,18 +288,25 @@ class CfgMagazines
 	{
 		scope=2;
 		displayName = "Republic Thermal Imploder";
-		displayNameShort = "Thermal Imploder";
+		displayNameShort = "Republic Thermal Imploder";
 		count=1;
 		ammo = macro_new_ammo(imploder)
-		descriptionShort = "Thermal Imploder";
+		descriptionShort = "Republic Thermal Imploder";
 	};
 	class macro_new_mag(thermaldet,1):SWOP_termDet_Gm
 	{
 		scope=2;
 		displayName = "Republic Thermal Detonator";
-		displayNameShort = "Thermal Detonator";
+		displayNameShort = "Republic Thermal Detonator";
 		count=1;
 		ammo = macro_new_ammo(thermaldet)
-		descriptionShort = "Thermal Detonator";
+		descriptionShort = "Republic Thermal Detonator";
 	};
+	/////////////////////////////////////////////////////
+	/////////////Missile  Magazines/////////////////////
+	////////////////////////////////////////////////////
+	class macro_new_mag(rps1,1):RPG32_F
+	{
+		scope=1;
+	}
 };

+ 1 - 1
addons - Copy/RD501_Weapons/_scopes/DC_15A_2-6x_acog.hpp

@@ -30,7 +30,7 @@ class macro_new_weapon(scope,dc_r15a_acog): itemCore
                 opticsZoomMin =  scope_magnification(.53);
                 opticsZoomMax = 1.25;
                 opticsZoomInit = 0.75;
-                memoryPointCamera = "eye";
+                memoryPointCamera = "opticView";
                 visionMode[] = {};
                 //discretefov[] = {scope_magnification(.53)};
                 discreteDistance[] = {200};

+ 1 - 0
addons - Copy/RD501_Weapons/_scopes/DC_15X_12_20x_scope.hpp

@@ -5,4 +5,5 @@ class macro_new_weapon(scope,dc15x_12_20x_scope):JLTS_DC15X_scope
 	scope = 2;
     displayName = "DC-15X Scope (12-20x)";
     descriptionShort = "DC-15X Scope (12-20x)";
+	visionMode[] = {"Normal", "NVG"};
 }

+ 4 - 5
addons - Copy/RD501_Weapons/config.cpp

@@ -312,20 +312,18 @@ class CfgMagazines
 
 	class Titan_AA;
 	class CA_LauncherMagazine;
+	class Titan_AT;
 
-	class macro_new_mag(RPS_AT,1): CA_LauncherMagazine
+	class macro_new_mag(RPS_AT,1): Titan_AT
 	{
 		scope = 2;
 		displayName = "RPS AT Rocket";
 		ammo = macro_new_ammo(RPS_AT);
 		type = "2 *   256";
 		count = 1;
-		picture = "\A3\weapons_f\launchers\nlaw\data\UI\gear_nlaw_rocket_ca.paa";
-		model = "\A3\weapons_f\launchers\nlaw\nlaw_proxy";
 		initSpeed = 60;
 		maxLeadSpeed = 60;
 		mass = 70;
-		nameSound = "missiles";
 
 
 	};
@@ -506,6 +504,7 @@ class CfgAmmo
 	class M_Titan_AA;
 	class DH17_Blaster_Ammo;
 	class 3AS_Chaingun_Ammo;
+	class M_Titan_AT;
 
 	class macro_new_ammo(westar_35):SWOP_DC17_Ammo
 	{
@@ -670,7 +669,7 @@ class CfgAmmo
 
 	
 
-	class macro_new_ammo(RPS_AT):A_RocketHH15Clone_HEAT_FireForget
+	class macro_new_ammo(RPS_AT):M_Titan_AT
 	{
 		aiAmmoUsageFlags = "128 + 256 +512";
 		hit = 95;

+ 8 - 2
addons - Copy/RD501_Weapons/rocket/config.cpp

@@ -30,7 +30,7 @@ class cfgWeapons
 	class RocketRPS6_F;
 	class JLTS_PLX1_AT;
 
-	class macro_new_weapon(hh,15):RocketHH15Clone
+	/*class macro_new_weapon(hh,15):RocketHH15Clone
 	{
 		author= "RD501";
 		_generalMacro = macro_new_weapon(hh,15)
@@ -58,7 +58,7 @@ class cfgWeapons
 		#include "rocket_scope_fix.hpp"
 
 		magazineWell[] += {macro_new_magwell(rocket_RPS)};
-	};
+	};*/
 
     class macro_new_weapon(Launcher,PLX1): JLTS_PLX1_AT
     {
@@ -68,6 +68,12 @@ class cfgWeapons
 		scopeCurator=2;
 		scopeArsenal=2;
 		displayName = "Republic PLX1s";
+		ace_javelin_enabled = 1;  // Enable Javelin-style locking (0-disabled, 1-enabled)
+        weaponInfoType = "ACE_RscOptics_javelin";  // Inteface
+        modelOptics = "\z\ace\addons\javelin\data\reticle_titan.p3d";  // Optics model
+        canLock = 0;  // Disable vanilla locking (0-disabled, 1-enabled)
+        lockingTargetSound[] = {"", 0, 1};  // Locking sound
+        lockedTargetSound[] = {"", 0, 1};  // Target acquired sound
     };
 
 };