Jump to content
Sign in to follow this  
Kelenon

Supply system for MP games on dedicated server

Recommended Posts

I've been working past few weeks on a system for my unit that would spice things up a little and allow us to search containers for supplies, claim vehicles, salvage wrecks for scrap and track supply usage across the mission. What I managed to get working is the supply tracking piece which basically uses EH to remove for example 1 unit of ammo when player reloads and old magazine is almost empty or removes 1 unit of medicaments when player uses 10 medical items (this one uses ACE).

 

What is also working (with some small issues but still quite alright all things considered) is the scripts that create actions on objects that allow for either searching object for supplies or claiming it or scrapping it - this works well when I call script file from object init field.

 

What I wanted to achieve though is that the action is being applied to:

 

- all viable* objects placed in editor

- all viable objects placed during operation

 

(By viable I mean set of containers and vehicles that I defined in global array.)

 

Unfortunately here it's getting complicated as I'm having problem understanding how locality should work here. Basically in MP when launching mission on dedicated server what is happening is that often actions are being applied twice to the same object (or even thrice!) and similar problems are encountered with curator placed objects.

 

If some good soul could take a look at these scripts and point me in the right direction I would be much obliged - I don't expect anyone to fix it for me but I just need someone else insight on this one and help me save this atrocity of code I committed 🙂

 

Quote

//DNT_supplies/DNT_createSupplies.sqf 

/*this is main script that creates actions and depending on passed arguments it either creates acction to search for supplies, claim vehicles or scrap wrecks. Script can be called like this 

[_object, _type, _mod, _size] execVM "DNT_supplies\DNT_createSupplies.sqf"; where 
- _object - an object script creates action for, for example supplie crate or a tank 
- _type - kin of action, can be "ammunition" or "medicaments" for searching supplies, "vehicle" that allows for claiming vehicle or "scrap" that allows for salvaging a wreck
- _mod - to increase probability of finding supplies, does nothing if _type == "vehicle"
- _size - does nothing if _type == "vehicle". For rest it defines the ACE cargo size for containers*/


scriptName "DNT_createSupplies";

params ["_this","_type", "_mod", "_cargoSize"];

private _actionText = "";

switch(_type) do {

	case "ammunition":{_actionText = "Search for supplies"};
	case "medicaments":{_actionText = "Search for supplies"};
	case "vehicle":{_actionText = "Claim vehicle"};
	case "scrap":{_actionText = "Scrap for salvage"};
	default {_actionText = "Search for supplies"};

};

if(_type == "scrap") then {

	_this addAction[_actionText,{
	
		params ["_target", "_caller", "_actionId", "_supType", "_mod", "_cargoSize"];
		
		clearItemCargo _target; 
		
		if(([_caller, 1] call ace_repair_fnc_isEngineer) == true) then {
				
				[_target,_actionId]remoteExec ["removeAction"];				
				_supType = _this select 3 select 0;
				_mod = _this select 3 select 1;
				_cargoSize = _this select 3 select 2;
				private _rollD20 = floor(random 20) + _mod;

				if(_supType == "scrap" && ([_caller, 1] call ace_repair_fnc_isEngineer) == true) then {
				
					if(_rollD20 >= 10) then {
					
						private _scrapPos = getPos _target; 
						private _targetType = typeOf _target;
						private _modifier = _rollD20 - 10;
						private _base = 0;
						private _salvageTime = 10;
						
						if(_targetType in tinyCargoSize) then {_salvageTime = 10};
						if(_targetType in smallCargoSize) then {_salvageTime = 15};
						if(_targetType in mediumCargoSize) then {_salvageTime = 20};
						if(_targetType in largeCargoSize) then {_salvageTime = 30};
						if(_targetType in gargantuanCargoSize) then {_salvageTime = 40};
						
						_caller enableSimulationGlobal false;
						
						private _animationUnit = group _caller createUnit ["B_RangeMaster_F", (getPosASL _caller vectorAdd [10000000, 10000000, 10000000]), [], 0, "CAN_COLLIDE"];
						_animationUnit allowDamage false;
						
						[_animationUnit, true] remoteExec ["hideObjectGlobal", 2]; //hides animation unit
						
						[_animationUnit, _caller] remoteExecCall ["disableCollisionWith", 0, _animationUnit];
						[_animationUnit, _target] remoteExecCall ["disableCollisionWith", 0, _animationUnit];

						
						_animationUnit setUnitLoadout (getUnitLoadout _caller);
						_animationUnit disableAI "ANIM";
						_animationUnit setPosASL (getPosASL _caller vectorAdd [0.3, 0.3, 0]);
						_animationUnit setVectorDir (vectorDir _caller);
						[_animationUnit, "InBaseMoves_repairVehicleKnl"] remoteExec ["switchMove"];
						[_animationUnit, false] remoteExec ["hideObjectGlobal", 2]; //shows animation unit
						[_caller, true] remoteExec ["hideObjectGlobal", 2]; //hides player
						
						[_salvageTime, [], {}, {}, "Salvaging", {true}, [], true] call ace_common_fnc_progressBar;
						
						_soundSource = "HeliHempty" createvehicleLocal position _target;
						_soundSource attachTo [_target, [0, 0, 0.5]];
						[_soundSource, "salvageWreck"] remoteExec ["say"];
						
						uiSleep (_salvageTime-3);
						deleteVehicle _target;
						
						if(_targetType in tinyCargoSize) then {_target = createVehicle["3as_Small_Box_1_prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; [_target, 1] call ace_cargo_fnc_setSize; _base = 2;};
						if(_targetType in smallCargoSize) then {_target = createVehicle["3AS_Small_Box_10_Prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; [_target, 2] call ace_cargo_fnc_setSize; _base = 5};
						if(_targetType in mediumCargoSize) then {_target = createVehicle["3AS_Small_Box_10_Prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; [_target, 5] call ace_cargo_fnc_setSize; _base = 10};
						if(_targetType in largeCargoSize) then {_target = createVehicle["3AS_Small_Box_10_Prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 2.5, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 2.5, 1.2], 0, true] call ace_dragging_fnc_setDraggable; [_target, 15] call ace_cargo_fnc_setSize;  _base = 15};
						if(_targetType in gargantuanCargoSize) then {_target = createVehicle["3AS_Small_Box_10_Prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 3, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 3, 1.5], 0, true] call ace_dragging_fnc_setDraggable; [_target, 20] call ace_cargo_fnc_setSize;  _base = 20};
						if((_targetType in tinyCargoSize) == false && (_targetType in smallCargoSize) == false && (_targetType in mediumCargoSize) == false && (_targetType in largeCargoSize) == false && (_targetType in gargantuanCargoSize) == false) then {_target = createVehicle["3AS_Small_Box_10_Prop", (_scrapPos vectorAdd [0,0,0.5]), [], 0, "NONE"];[_target, true, [0, 2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; [_target, true, [0, 2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; [_target, 5] call ace_cargo_fnc_setSize;_base = _cargoSize}; 
						_target setDamage 0;
						uiSleep 3;
						deleteVehicle _soundSource;
						
						[_caller, false] remoteExec ["hideObjectGlobal", 2]; //shows player
						
						deleteVehicle _animationUnit; //removes animation unit

						_caller enableSimulationGlobal true;
						
						private _amount = _base + (_base *_modifier);
						hint parseText format["You have salvaged <t color='#FF8000'> %1 </t> units of %2!", _amount,_supType];
						
						
						[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; //Potentialy problematic lines with interactions
						[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; 
						[_target, _cargoSize] call ace_cargo_fnc_setSize;
						
						
						private _resourceVName = "dntsp_"+_supType+(str dnt_supplyTaskID);
						private _mission = "dntask_"+_supType+(str dnt_supplyTaskID);
																			
						dnt_supplyTaskID = dnt_supplyTaskID + 1;
						publicVariable "dnt_supplyTaskID";
																		
						missionNamespace setVariable [_resourceVName, [_target, _amount, _supType, _mission], true];												
	
						[_mission, (format ["Deliver %1 units of %2 to the Haunter",_amount, _supType])] call ENGTASKS_CreateTask;
						[_mission, getPos _target, false] call ENGTASKS_SetTaskDestination;
						
					
					}
					
					else {hint "There is nothing to salvage!";
					[_target,_actionId]remoteExec ["removeAction"];
					};
				}
			}
			
			else {hint "You need to be an engineer to salvage!"};

},[_type,_mod, _cargoSize],6,true,true,"","true", 10,false,"",""];}



else{
	if(alive _this) then {
		_this addAction[_actionText,{
		
			params ["_target", "_caller", "_actionId", "_supType", "_mod", "_cargoSize"];
						
					clearItemCargo _target;
					
					_supType = _this select 3 select 0;
					_mod = _this select 3 select 1;
					_cargoSize = _this select 3 select 2;
					private _rollD20 = floor(random 20) + _mod;
									
					
					
					if(_supType == "vehicle") then {
					
						if({alive _x} count crew _target == 0) then {
							if(alive _target == true) then {
						
								[_target,_actionId]remoteExec ["removeAction"];		
									
								hint "Vehicle claimed!";
								
								private _vehicleId = "_vid_" + str(dnt_supplyTaskID);
								dnt_supplyTaskID = dnt_supplyTaskID + 1;
								publicVariable "dnt_supplyTaskID";
								private _vicName = (getText (configFile >> "cfgVehicles" >> typeOf _target >> "displayName")) + _vehicleId;
								private _vehicleVName = "dntv_vehicle"+(str(dnt_supplyTaskID));
								
								missionNamespace setVariable [_vehicleVName, [_target, _vicName, _vehicleId,_supType], true];
								
								dnt_VehicleList pushBack _vicName;
												
								[_vehicleId, (format ["Claimed %1", _vicName])] call ENGTASKS_CreateTask;
								[_vehicleId, getPos _target, false] call ENGTASKS_SetTaskDestination;
							}
							else {[_target,_actionId]remoteExec ["removeAction"];};
						}
						
						else {hint "You can't claim occupied vehicle";};
						
						
					};
		
					
					if(_supType == "ammunition" || _supType == "medicaments") then {
					
						if(alive _target == true) then {
	
							[_target,_actionId]remoteExec ["removeAction"];
							
							_caller enableSimulationGlobal false;
								
							private _animationUnit = group _caller createUnit ["B_RangeMaster_F", (getPosASL _caller vectorAdd [10000000, 10000000, 10000000]), [], 0, "CAN_COLLIDE"];
		
							_animationUnit allowDamage false;
							[_animationUnit, true] remoteExec ["hideObjectGlobal", 2]; //hides animation unit
							[_animationUnit, _caller] remoteExecCall ["disableCollisionWith", 0, _animationUnit];
							[_animationUnit, _target] remoteExecCall ["disableCollisionWith", 0, _animationUnit];
							
							
							_animationUnit setUnitLoadout (getUnitLoadout _caller);
							
							_animationUnit disableAI "ANIM";
							_animationUnit setPosASL (getPosASL _caller vectorAdd [0.3, 0.3, 0]);
							_animationUnit setVectorDir (vectorDir _caller);
							[_animationUnit, "InBaseMoves_repairVehicleKnl"] remoteExec ["switchMove"];
							[_animationUnit, false] remoteExec ["hideObjectGlobal", 2]; //shows animation unit
							[_caller, true] remoteExec ["hideObjectGlobal", 2]; //hides player
							
							[3, [], {}, {}, "Searching", {true}, [], true] call ace_common_fnc_progressBar;
								
							_soundSource = "HeliHempty" createvehicleLocal position _target;
							_soundSource attachTo [_target, [0, 0, 0.5]];
							[_soundSource, "searchCrate"] remoteExec ["say"];
								
							uiSleep 3;
							
							deleteVehicle _soundSource;
								
							[_caller, false] remoteExec ["hideObjectGlobal", 2]; //shows player
							deleteVehicle _animationUnit; //removes animation unit
		
							_caller enableSimulationGlobal true;
							
						
							if(_rollD20 >= 10) then {
								
								[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setCarryable; 
								[_target, true, [0, 1.2, 1.2], 0, true] call ace_dragging_fnc_setDraggable; 
								[_target, _cargoSize] call ace_cargo_fnc_setSize;
								
								private _base = 0;
						
								switch(_supType) do {
							
									case "ammunition":{_base = 5};
								
									case "medicaments":{_base = 1};
									
									default {hint "No supply type defined"};
									
									};
									
								private _modifier = _rollD20 - 10;
								private _amount = _base + (_base *_modifier);
												
								hint parseText format["You have found <t color='#FF8000'> %1 </t> units of %2!", _amount,_supType];
													
								private _resourceVName = "dntsp_"+_supType+(str dnt_supplyTaskID);
								private _mission = "dntask_"+_supType+(str dnt_supplyTaskID);
																					
								dnt_supplyTaskID = dnt_supplyTaskID + 1;
								publicVariable "dnt_supplyTaskID";
																				
								missionNamespace setVariable [_resourceVName, [_target, _amount, _supType, _mission], true];												
			
								[_mission, (format ["Deliver %1 units of %2 to the Haunter",_amount, _supType])] call ENGTASKS_CreateTask;
								[_mission, getPos _target, false] call ENGTASKS_SetTaskDestination;
								
							}
							
							else {hint "You find nothing";};
						}
						
						else {[_target,_actionId]remoteExec ["removeAction"];};
					};
			
			},[_type,_mod, _cargoSize],6,true,true,"","true", 10,false,"",""];
			
		};
	
};

 

 

Quote

//DNT_supplies/DNT_autoSupplyActionEden.sqf
/*

This script is called in "initServer.sqf" - null = execVM "DNT_supplies\DNT_autoSupplyActionEden.sqf";

It attempts to add actions to defined set of supply crates and vehicles that were placed in Editor. In my understanding server evaluates conditions but then scripts are being remotely executed on client machines.

*/
if(dnt_autoCreateSuppliesOn == 1) then { //dnt_autoCreateSuppliesOn global var defined in initServer.sqf, if set to 0 this won't run
	{
		
		[[_x, "ammunition", 0, 2],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //At mission start first player sees 2 actions, after aborting scenario and rejoining only 1 
	

	}forEach entities[dnt_ammoContainers,[],false,true];
};

if(dnt_autoCreateSuppliesOn == 1) then {
	{
		
		[[_x, "medicaments", 0, 2],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //At mission start first player sees 2 actions, after aborting scenario and rejoining only 1 
	

	}forEach entities[dnt_medicalContainers,[],false,true];
};



{ 

	private _cargoSpace = dnt_spaceXS;
	private _isVehicle = false;
	
	if(typeOf _x in tinyCargoSize) then {_cargoSpace = dnt_spaceXS;_isVehicle = true;};
	if(typeOf _x in smallCargoSize) then {_cargoSpace = dnt_spaceS;_isVehicle = true;};
	if(typeOf _x in mediumCargoSize) then {_cargoSpace = dnt_spaceM;_isVehicle = true;};
	if(typeOf _x in largeCargoSize) then {_cargoSpace = dnt_spaceL;_isVehicle = true;};
	if(typeOf _x in gargantuanCargoSize) then {_cargoSpace = dnt_spaceXL;_isVehicle = true;};
	
	if(_isVehicle == true) then {
	
		[_x, _cargoSpace] remoteExec ["ace_cargo_fnc_setSpace",-2,true]; //Works fine, all players see changes container size 
		
		if(typeOf _x in dnt_claimVic && dnt_autoClaimableVicsOn == 1) then {
			[[_x, "vehicle", 0, 1],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //V2 - at start first player gets 2 actions, after rejoin only 1 //V1 LM - works DS - first player gets 2 claims, but after rejoin there is only 1
			
		};
		
		_x addEventHandler ["Killed", {
				params ["_unit", "_killer", "_instigator", "_useEffects"];
				
				private _scrapSize = dnt_scrapXS;
				if(typeOf _unit in smallCargoSize) then {_scrapSize = dnt_scrapS;};
				if(typeOf _unit in mediumCargoSize) then {_scrapSize = dnt_scrapM;};
				if(typeOf _unit in largeCargoSize) then {_scrapSize = dnt_scrapL;};
				if(typeOf _unit in gargantuanCargoSize) then {_scrapSize = dnt_scrapXL;};
				
				[[_unit, "scrap", 0, _scrapSize],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //3 actions are consistently available to all players 
		}];
	};


}forEach vehicles;

 

 

Quote

//DNT_supplies/DNT_autoSupplyActionZeus.sqf
/*

In current state this script is launched from initPlayerLocal.sqf using null = execVM "DNT_supplies\DNT_autoSupplyActionZeus.sqf";

This one tries to add actions to object placed by Zeus

*/


	getAssignedCuratorLogic player addEventHandler ["CuratorObjectPlaced", {
			params ["_curator", "_entity"];
			
			private _cargoSpace = dnt_spaceXS;
			private _isVehicle = false;
			
			if(typeOf _entity in tinyCargoSize) then {_cargoSpace = dnt_spaceXS;_isVehicle = true;};
			if(typeOf _entity in smallCargoSize) then {_cargoSpace = dnt_spaceS;_isVehicle = true;};
			if(typeOf _entity in mediumCargoSize) then {_cargoSpace = dnt_spaceM;_isVehicle = true;};
			if(typeOf _entity in largeCargoSize) then {_cargoSpace = dnt_spaceL;_isVehicle = true;};
			if(typeOf _entity in gargantuanCargoSize) then {_cargoSpace = dnt_spaceXL;_isVehicle = true;};
			
			if(typeOf _entity in dnt_ammoContainers) then {[[_entity, "ammunition", -2, 2],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",0,true];}; //Doesn't work
			if(typeOf _entity in dnt_medicalContainers) then {[[_entity, "medicaments", -2, 2],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",0,true];}; //Doesn't work
			
			if(_isVehicle == true) then {
			
				[_entity, _cargoSpace] remoteExec ["ace_cargo_fnc_setSpace",-2,true]; //Seems to only work for 1st spawned vehicle, and for next it doesn't applies
				if(typeOf _entity in dnt_claimVic  && dnt_autoClaimableVicsOn == 1) then {
					[[_entity, "vehicle", 0, 2],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //Doesn't work
				};
				
				_entity addEventHandler ["Killed", {
						params ["_unit", "_killer", "_instigator", "_useEffects"];
						
						private _scrapSize = dnt_scrapXS;
						if(typeOf _unit in smallCargoSize) then {_scrapSize = dnt_scrapS;};
						if(typeOf _unit in mediumCargoSize) then {_scrapSize = dnt_scrapM;};
						if(typeOf _unit in largeCargoSize) then {_scrapSize = dnt_scrapL;};
						if(typeOf _unit in gargantuanCargoSize) then {_scrapSize = dnt_scrapXL;};
						
						[[_unit, "scrap", 0, _scrapSize],"DNT_supplies\DNT_createSupplies.sqf"] remoteExec ["execVM",-2,true]; //Doesn't work
				}];
			};
	}];

 

 

Quote

//initServer.sqf

/*******Update values below with quartermasters logbook!*******/

dnt_ammoCount = 1080; //Update with current amount of ammo from #quartermasters-logbook! channel on discord

dnt_medicalCount = 11; //Update with current amount of medical supplies from #quartermasters-logbook! channel on discord

dnt_scrapCount = 40; //Update with current amount of scrap from #quartermasters-logbook! channel on discord


/*********Edit below only if you don't want supplies and vehicles actions to be applied automaticaly************/

dnt_autoCreateSuppliesOn = 1; //Change to 0 if you want to disable supplies being created automatically on supply containers 

dnt_autoClaimableVicsOn = 1; //Change to 0 if you want to disable vehicles being available for claim automatically


/*DONT TOUCH ANYTHING BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!*/








publicVariable "dnt_ammoCount";
publicVariable "dnt_medicalCount";
publicVariable "dnt_scrapCount";
publicVariable "dnt_autoCrateSuppliesOn";
publicVariable "dnt_autoClaimableVicsOn";

//Variables for supplyTaskID
dnt_supplyTaskID = 0;
publicVariable "dnt_supplyTaskID";
dnt_supplyList = [];
publicVariable  "dnt_supplyList";

dnt_medicalItemsUsed = 0;
publicVariable "dnt_medicalBandagesCount";

dnt_VehicleList = [];
publicVariable "dnt_VehicleList";


//CargoSizes and spaces for DNT_setCargoSize.sqf
tinyCargoSize = ["3AS_Barc_212", "3AS_Barc_501", "3AS_Barc", "3AS_BarcSideCar_212", "3AS_BarcSideCar_501", "3AS_BarcSideCar", "OPTRE_M274_ATV", "OPTRE_M274_ATV_Ins", "lsd_ground_lancerBike", "ls_ground_barc", "lsd_car_ast", "lsd_civ_lancerBike", "3AS_AV7", "3AS_Advanced_DSD", "3AS_LAATC", "3AS_LAATC_Wampa", "lsd_heli_laatc", "OPTRE_AV22C_Sparrowhawk", "OPTRE_AV22A_Sparrowhawk", "OPTRE_AV22_Sparrowhawk", "OPTRE_AV22B_Sparrowhawk", "3AS_Z95_Republic", "3AS_Z95_Blue", "3AS_Z95_Green", "3AS_Z95_Orange"];
publicVariable "tinyCargoSize";

smallCargoSize = ["lsd_ground_agtRaptor","3AS_ISP", "OPTRE_M12_LRV", "OPTRE_M12A1_LRV", "OPTRE_M12G1_LRV", "OPTRE_M12R_AA", "OPTRE_M813_TT", "OPTRE_m1087_stallion_device_unsc", "OPTRE_m1087_stallion_unsc_refuel", "OPTRE_m1015_mule_fuel_ins", "OPTRE_M12_LRV_ins", "OPTRE_M12_TD_ins", "OPTRE_M12_VBIED_Big", "OPTRE_M12A1_LRV_ins", "OPTRE_M12R_AA_ins", "OPTRE_Genet_IND", "OPTRE_M12_CIV2_IND", "OPTRE_M12_LRV_PD", "OPTRE_M12_LRV_DME", "OPTRE_m1015_mule_fuel_ins_IND", "OPTRE_M12_LRV_ins_IND", "OPTRE_M12_TD_ins_IND", "OPTRE_M12A1_LRV_ins_IND", "OPTRE_M12R_AA_ins_IND", "OPTRE_Genet", "OPTRE_M12_CIV2", "3AS_SandSpeeder", "3AS_SnowSpeeder", "3AS_Snowspeeder_Blue", "3AS_Snowspeeder_Rogue", "3AS_Hailfire_SAM", "3AS_Hailfire_Rocket", "3AS_Hailfire_AT", "3AS_N99", "3AS_SAC_Trade", "3AS_Patrol_LAAT_Imperial", "3AS_Patrol_LAAT_Police", "3AS_Patrol_LAAT_Republic", "ls_heli_laatle", "ls_heli_laatle_policeGunship", "ls_heli_laatle_transportGunship", "OPTRE_UNSC_hornet", "OPTRE_UNSC_hornet_CAP", "OPTRE_UNSC_hornet_CAS", "OPTRE_UNSC_falcon_armed", "OPTRE_UNSC_falcon", "OPTRE_UNSC_falcon_armed_S", "OPTRE_UNSC_falcon_S", "OPTRE_UNSC_hornet_ins", "OPTRE_ins_falcon", "OPTRE_ins_falcon_unarmed", "OPTRE_UNSC_falcon_armed_S_ins", "OPTRE_UNSC_falcon_S_ins", "OPTRE_CMA_hornet", "OPTRE_CMA_falcon", "OPTRE_CMA_falcon_unarmed", "OPTRE_UNSC_falcon_PD", "OPTRE_DME_hornet", "OPTRE_DME_falcon_armed", "OPTRE_DME_falcon_unarmed", "OPTRE_UNSC_hornet_ins_IND", "OPTRE_ins_falcon_IND", "OPTRE_ins_falcon_unarmed_IND", "3AS_VWing_Imperial", "3AS_ARC_170_Blue", "3AS_ARC_170_Green", "3AS_ARC_170_Orange", "3AS_ARC_170_Red", "3AS_ARC_170_Yellow", "3AS_BTLB_Bomber", "3AS_BTLB_Bomber_RedLeader", "3AS_BTLB_Bomber_ShadowLeader", "3AS_BTLB_Bomber_Shadow", "3AS_Delta7_F", "3AS_Delta7_TANO", "3AS_Delta7_ANI", "3AS_Delta7_Blue", "3AS_Delta7_Green", "3AS_Delta7_Orange", "3AS_Delta7_PLO", "3AS_Delta7_Purple", "3as_Vwing_base", "OPTRE_EscapePod", "OPTRE_YSS_1000_A", "OPTRE_YSS_1000_A_VTOL"];
publicVariable "smallCargoSize";

mediumCargoSize = ["3AS_ISP_Transport", "OPTRE_M12_FAV_APC", "OPTRE_M12_FAV_APC_MED", "OPTRE_M12_FAV", "OPTRE_M914_RV", "OPTRE_M12_ins_APC", "OPTRE_M12_ins_MED", "OPTRE_M12_VBIED", "OPTRE_M12_FAV_ins", "OPTRE_M914_RV_ins", "OPTRE_M12_CIV_IND", "OPTRE_M12_FAV_APC_PD", "OPTRE_M12_FAV_PD", "OPTRE_DME_M12_FAV", "OPTRE_M12_ins_APC_IND", "OPTRE_M12_ins_MED_IND", "OPTRE_M12_FAV_ins_IND", "OPTRE_M914_RV_ins_IND", "OPTRE_M12_CIV", "OPTRE_M411_APC_UNSC", "OPTRE_M412_IFV_UNSC", "OPTRE_M413_MGS_UNSC", "OPTRE_M412_IFV_INS", "OPTRE_M413_MGS_INS", "lsd_air_v19", "GD_LAAT_Airborne", "GD_LAAT_Gunship", "GD_LAAT_MedEvac", "GD_TX130", "3AS_Saber_M1_Imperial", "3AS_Saber_M1Recon_Imperial", "3AS_Saber_Super_Imperial", "3AS_Saber_M1G_Imperial", "3AS_Saber_M1", "3AS_Saber_M1_501", "3AS_Saber_M1Recon", "3AS_Saber_M1Recon_501", "3AS_Saber_Super", "3AS_Saber_Super_501", "3AS_Saber_M1G", "3AS_Saber_M1G_501", "115th_TX130", "796th_TX130", "985th_TX130", "Shadow_TX130", "SWLG_tanks_tx130", "OPTRE_M808B_UNSC", "OPTRE_M808BM_UNSC", "OPTRE_M808L", "OPTRE_M808S", "OPTRE_M850_UNSC", "3AS_AAT", "3AS_AAT_Aqua", "3AS_AAT_Arid", "3AS_AAT_CIS", "3AS_AAT_Desert", "3AS_AAT_Geonosis", "3AS_AAT_Green", "3AS_AAT_tan", "3AS_AAT_Tropical", "3AS_AAT_Winter", "3AS_AAT_Woodland", "3AS_GAT", "3AS_GAT_Olive", "3AS_GAT_Light", "3AS_GAT_Light_Olive", "3AS_HAGM_Tan", "3AS_HAGM_CIS", "3AS_AAT_Red", "OPTRE_M808B_INS", "OPTRE_M808B_INS_IND", "3AS_LAAT_Mk1_Imperial", "3AS_LAAT_Mk1Lights_Imperial", "3AS_LAAT_Mk2_Imperial", "3AS_LAAT_Mk2Lights_Imperial", "3AS_LAAT_Mk1", "3AS_LAAT_Mk1Lights", "3AS_LAAT_Mk2", "3AS_LAAT_Mk2Lights", "lsd_heli_laati_ab", "lsd_heli_laati", "lsd_heli_laati_medevac", "lsd_heli_laati_transport", "OPTRE_Pelican_unarmed", "OPTRE_Pelican_unarmed_SOCOM", "OPTRE_Pelican_armed", "OPTRE_Pelican_armed_70mm", "OPTRE_Pelican_armed_SOCOM", "3AS_HMP_Transport", "3AS_HMP_Gunship", "ls_cis_hmp", "ls_cis_hmp_transport", "OPTRE_Pelican_unarmed_ins", "OPTRE_Pelican_armed_ins", "OPTRE_Pelican_armed_70mm_ins", "OPTRE_Pelican_armed_CMA", "OPTRE_Pelican_unarmed_PD", "OPTRE_Pelican_unarmed_ins_IND", "OPTRE_Pelican_armed_ins_IND", "3as_V19_base"];
publicVariable "mediumCargoSize";

largeCargoSize = ["3AS_ITT","OPTRE_m1087_stallion_unsc_resupply", "OPTRE_m1087_stallion_cover_unsc", "OPTRE_m1087_stallion_unsc_medical", "OPTRE_m1087_stallion_unsc_repair", "OPTRE_m1015_mule_ins", "OPTRE_m1015_mule_ammo_ins", "OPTRE_m1015_mule_cover_ins", "OPTRE_m1015_mule_medical_ins", "OPTRE_m1015_mule_ins_IND", "OPTRE_m1015_mule_ammo_ins_IND", "OPTRE_m1015_mule_cover_ins_IND", "OPTRE_m1015_mule_medical_ins_IND", "3AS_ITT_Logistic", "3AS_ITT_Medical", "3AS_RTT", "3AS_RTT_Wheeled", "3AS_ATTE_Base", "3AS_ATTE_Ryloth", "3AS_ATTE_TCW", "3AS_ATAP_Base", "3AS_ATTE_Imperial"];
publicVariable "largeCargoSize";

gargantuanCargoSize = ["3as_Jug", "3AS_ATAT", "3AS_UTAT", "OPTRE_M313_UNSC", "3AS_MTT", "3AS_Nuclass", "lsd_largeVTOL_cisDropship", "lsd_largeVTOL_federationDropship_base", "3AS_Imperial_Transport_01", "3AS_Republic_Transport_01", "3AS_Civilian_Transport_01", "3AS_Civilian_Transport_03", "3AS_Civilian_Transport_02"];
publicVariable "gargantuanCargoSize";

//Containers that are considered supplies automaticaly

dnt_ammoContainers = ["JLTS_Ammobox_ammo_GAR", "JLTS_Ammobox_weapons_GAR", "JLTS_Ammobox_explosives_GAR", "JLTS_Ammobox_grenades_GAR", "JLTS_Ammobox_launchers_GAR", "JLTS_Ammobox_weapons_special_GAR", "JLTS_Ammobox_support_GAR", "JLTS_Ammobox_ammo_CIS", "JLTS_Ammobox_weapons_CIS", "JLTS_Ammobox_launchers_CIS", "JLTS_Ammobox_weapons_special_CIS", "JLTS_Ammobox_support_CIS", "ls_supplies_commando_box", "ls_supplies_dc15aResupply_box", "ls_supplies_dc15sResupply_box", "ls_supplies_droidAssault_box", "ls_supplies_e60r_box", "ls_supplies_generalResupply_box", "ls_supplies_rocket_box", "ls_supplies_grenade_box", "ls_supplies_plx_box", "ls_supplies_republicAssault_box", "ls_supplies_rps6_box", "ls_supplies_specOps_box", "ls_supplies_z6Resupply_box", "3as_Small_Box_1_prop", "3AS_Small_Box_10_Prop", "3as_Small_Box_7_prop", "3AS_Small_Box_6_Prop", "3AS_Small_Box_6_CIS_Prop", "3AS_Small_Box_6_Civilian_Prop", "3AS_Small_Box_9_Prop", "3AS_Small_Box_9_Black_Prop", "3AS_Small_Box_9_Blue_Prop", "3AS_Small_Box_9_Grey_Prop"];
dnt_medicalContainers = ["3AS_Supply_Large_Medical_Prop"];

//Claimable vehicles

dnt_claimVic = ["lsd_heli_laatc", "3AS_LAATC", "3AS_Barc_212", "3AS_Barc_501", "3AS_Barc", "3AS_BarcSideCar_212", "3AS_BarcSideCar_501", "3AS_BarcSideCar", "lsd_ground_lancerBike", "ls_ground_barc", "lsd_civ_lancerBike", "3AS_LAATC_Wampa", "3AS_Z95_Orange", "3AS_Z95_Green", "3AS_Z95_Republic", "3AS_Z95_Blue", "3AS_AV7", "3AS_BTLB_Bomber", "3AS_BTLB_Bomber_Shadow", "3AS_BTLB_Bomber_RedLeader", "3AS_BTLB_Bomber_ShadowLeader", "3AS_ARC_170_Red", "3AS_ARC_170_Blue", "3AS_ARC_170_Yellow", "3AS_ARC_170_Orange", "3AS_ARC_170_Green", "3AS_Delta7_Green", "3AS_Delta7_Blue", "3AS_Delta7_TANO", "3AS_Delta7_F", "3AS_Delta7_ANI", "3AS_Delta7_Orange", "3as_Vwing_base", "3AS_VWing_Imperial", "3AS_Snowspeeder_Rogue", "3AS_Snowspeeder_Blue", "3AS_SandSpeeder", "3AS_SnowSpeeder", "ls_heli_laatle", "ls_heli_laatle_policeGunship", "ls_heli_laatle_transportGunship", "3AS_Delta7_PLO", "3AS_Delta7_Purple", "3AS_ISP", "3AS_Patrol_LAAT_Imperial", "3AS_Patrol_LAAT_Republic", "3AS_Patrol_LAAT_Police", "3AS_ISP_Transport", "3AS_Saber_M1_Imperial", "3AS_Saber_M1G_Imperial", "3AS_Saber_M1G", "3AS_Saber_M1G_501", "796th_TX130", "115th_TX130", "985th_TX130", "SWLG_tanks_tx130", "Shadow_TX130", "GD_TX130", "3AS_Saber_M1Recon_Imperial", "3AS_Saber_Super_Imperial", "3as_V19_base", "lsd_air_v19", "GD_LAAT_Airborne", "GD_LAAT_Gunship", "3AS_LAAT_Mk2", "3AS_LAAT_Mk2Lights", "3AS_LAAT_Mk1Lights", "GD_LAAT_MedEvac", "3AS_LAAT_Mk1_Imperial", "3AS_LAAT_Mk1", "lsd_heli_laati_transport", "3AS_LAAT_Mk1Lights_Imperial", "lsd_heli_laati_medevac", "lsd_heli_laati", "lsd_heli_laati_ab", "3AS_LAAT_Mk2Lights_Imperial", "3AS_LAAT_Mk2_Imperial", "3AS_Saber_Super_501", "3AS_Saber_Super", "3AS_Saber_M1Recon_501", "3AS_Saber_M1Recon", "3AS_Saber_M1_501", "3AS_Saber_M1", "3AS_ITT", "3AS_ITT_Logistic", "3AS_ITT_Medical", "3AS_RTT", "3AS_RTT_Wheeled", "3AS_ATTE_Ryloth", "3AS_ATTE_Base", "3AS_ATTE_TCW", "3AS_ATAP_Base", "3AS_ATTE_Imperial", "3AS_Civilian_Transport_02", "3AS_Civilian_Transport_03", "3AS_Civilian_Transport_01", "3AS_Republic_Transport_01", "3AS_Imperial_Transport_01", "3AS_Nuclass", "3as_Jug", "3AS_UTAT", "3AS_ATAT"];

//Vehicle cargo space customizable

dnt_spaceXS = 2;
dnt_spaceS = 5;
dnt_spaceM = 25;
dnt_spaceL = 50;
dnt_spaceXL = 1000;

publicVariable "dnt_spaceXS";
publicVariable "dnt_spaceS";
publicVariable "dnt_spaceM";
publicVariable "dnt_spaceL";
publicVariable "dnt_spaceXL";

//Salvageble scrap size

dnt_scrapXS = 1;
dnt_scrapS = 2;
dnt_scrapM = 5;
dnt_scrapL = 15;
dnt_scrapXL = 25;

publicVariable "dnt_scrapXS";
publicVariable "dnt_scrapS";
publicVariable "dnt_scrapM";
publicVariable "dnt_scrapL";
publicVariable "dnt_scrapXL";


//Launch supply system - for curator logic system is launched in initPlayerServer.sqf
null = execVM "DNT_supplies\DNT_trackSupplies.sqf";
null = execVM "DNT_supplies\DNT_autoSupplyActionEden.sqf";

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×