diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisionBuildingPos.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisionBuildingPos.sqf new file mode 100644 index 0000000..0d392f7 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisionBuildingPos.sqf @@ -0,0 +1,34 @@ + + +#define oddsOfGarrison 0.67 +#define maxGarrisonStatics 3 +#define maxGarrisonUnits 4 +#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls +#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. +#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. + +_helpers = allMissionObjects garrisonMarkerObject; +//diag_log format["_helpers = %1",_helpers]; +{ + if ( (typeOf _x) isEqualTo garrisonMarkerObject) then + { + private _isInside = [_x] call _fn_isInside; + if (_isInside) then + { + _building = [_x] call _fn_buildingContainer; + blck_garrisonedBuildings pushbackunique _building; + blck_garrisonedBuildings pushbackunique _x; + // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], + // 1 2 3 4 5 6 7 8 9 + _line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; + systemChat _line; + //diag_log _line; + if (_forEachIndex == 0) then + { + _cb = _cb + format["%1%2",endl,_line]; + } else { + _cb = _cb + format[",%1%2",endl,_line]; + }; + }; + }; +} forEach _helpers; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonForBuildingATL.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonForBuildingATL.sqf new file mode 100644 index 0000000..6fdaf17 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_configureGarrisonForBuildingATL.sqf @@ -0,0 +1,65 @@ + + + +#define oddsOfGarrison 0.67 +#define maxGarrisonStatics 3 +#define maxGarrisonUnits 4 +#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls +#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. +#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. + +private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"]; +_b = _this select 0; +private _count = 0; +if (_b in blck_garrisonedBuildings) exitWith {""}; +private _staticsText = ""; +private _unitsText = ""; +private _buildingGarrisonATL = ""; +_staticsInBuilding = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)]; +{ + if !(_x in _configuredStatics) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredStatics pushBackUnique _x; + //_configuredStaticsPositions pushBack (getPosATL _x) vectorDiff CENTER; + if (_staticsText isEqualTo "") then + { + _staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + }; + }; +} forEach _staticsInBuilding; +// Since this is run from the editor we do not have to worry about units running off from their original locations +_unitsInBuilding = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x}; + +{ + if !(_x in _configuredUnits) then + { + _isInside = [_x] call _fn_isInside; + if (_isInside) then {_building = [_x] call _fn_buildingContainer}; + if (_b isEqualTo _building) then + { + _configuredUnits pushBackUnique _x; + + if (_unitsText isEqualTo "") then + { + _unitsText = format["[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + } else { + _unitsText = _unitsText + format[",[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x]; + }; + _count = _count + 1; + }; + }; +} forEach _unitsInBuilding; + +if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then +{ + _buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText]; + blck_garrisonedBuildings pushBackUnique _b; +}; +_buildingGarrisonATL diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_generateObjectInfo.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_generateObjectInfo.sqf new file mode 100644 index 0000000..0fb967b --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_generateObjectInfo.sqf @@ -0,0 +1,2 @@ + +params["_3DENobject","_center"]; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf new file mode 100644 index 0000000..9c6cd8e --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_initializeAttributes.sqf @@ -0,0 +1,12 @@ + + + +missionNamespace setVariable["blck_difficulty",getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultMissionDifficulty")]; +diag_log format["Initilization: blck_difficulty set to %1",blck_difficulty]; +missionNamespace setVariable["blck_lootTiming",getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultLootcrateSpawnTiming")]; +missionNamespace setVariable["blck_loadTiming",getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultLootcrateLoadTiming")]; +missionNamespace setVariable["blck_endState",getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultMissionEndState")]; +missionNamespace setVariable["blck_startMessage","TODO: Add a start message"]; +missionNamespace setVariable["blck_endMessage","TODO: Add an end message"]; + +diag_log format["Mission Attributes Initialized for blckeagls at time %1",diag_tickTime]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_loadCratesTiming.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_loadCratesTiming.sqf new file mode 100644 index 0000000..60c2069 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_loadCratesTiming.sqf @@ -0,0 +1,4 @@ + +params["_timing"]; +missionNamespace setVariable["blck_loadTiming",_timing]; +systemChat format["Mission Load Crates Timing set to %1",_timing]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setCompletionMode.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setCompletionMode.sqf new file mode 100644 index 0000000..62a0cfe --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setCompletionMode.sqf @@ -0,0 +1,5 @@ + + +params["_mode"]; +missionNamespace setVariable["blck_endState",_mode]; +systemChat format["Mission End State updated to %1",_mode]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setDifficulty.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setDifficulty.sqf new file mode 100644 index 0000000..3b44053 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setDifficulty.sqf @@ -0,0 +1,16 @@ + +params["_difficulty"]; +missionNamespace setVariable["blck_difficulty",_difficulty]; +private _m = format["Mission Difficulty updated to %1",_difficulty]; +systemChat _m; +diag_log _m; + + +/* + +missionNamespace setVariable["blck_difficulty","Red"]; +missionNamespace setVariable["blck_lootTiming","atMissionStartGround"]; +missionNamespace setVariable["blck_loadTiming","atMissionStart"]; +missionNamespace setVariable["blck_endState","allUnitsKilled"]; +missionNamespace setVariable["blck_startMessage","TODO: Add a start message"]; +missionNamespace setVariable["blck_endMessage","TODO: Add an end message"]; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_spawnCratesTiming.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_spawnCratesTiming.sqf new file mode 100644 index 0000000..4c2475d --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_spawnCratesTiming.sqf @@ -0,0 +1,5 @@ + + +params["_timing"]; +missionNamespace setVariable["blck_lootTiming",_timing]; +systemChat format["Loot Chest Spawn Timing updated to %1",_timing]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_versionInfo.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_versionInfo.sqf new file mode 100644 index 0000000..c6357ae --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_versionInfo.sqf @@ -0,0 +1,13 @@ + + +params["_mode"]; + +private _header = format["%4Mission.sqf generated:: blckeagls 3DEN Plugin Version %1 : Build %2 : Build Date %3", + getNumber(configFile >> " CfgBlck3DEN" >> "CfgVersion" >> "version"), + getNumber(configFile >> "CfgBlck3DEN" >> "CfgVersion" >> "build"), + getText(configFile >> "CfgBlck3DEN" >> "CfgVersion" >> "date"), + _mode +]; +diag_log _header; +_header + diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt index bfcab63..d1d19da 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt @@ -1,95 +1,51 @@ +class CfgVehicles +{ + class Object + { + class AttributeCategories + { + class LandVehicle; + class blckLandVehicle: LandVehicle; + { + class Attributes + { + class blckLootVehicle + { + // https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Scenario + displayName = "Loot Vehicle"; + toolTip = "Enable/Disable Use as Loot Vehicle"; + property = "blckLootVehicle"; + control = "Edit"; + expression = "_this setVariable['%s',_value];"; + defaultValue = 'false'; + unique = 0; + validate = "BOOL"; + typeName = "BOOL"; + }; + }; + }; -/* - Output from GRG Plugin for blckeagls - For Credits and Acknowledgements see the Readme and comments -*/ - -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -#include "\q\addons\custom_server\Missions\privateVars.sqf"; - -_markerType = [,[0,0],]; -_markerColor = ; -_startMsg = "TODO: Change approiately"; -_endMsg = "TODO: Change Appropriately; -_markerMissionName = TODO: Update appropriately; -_crateLoot = blck_BoxLoot_Blue; -_lootCounts = blck_lootCountsBlue; - -_missionLandscape = [ - ["Land_Unfinished_Building_01_F",[0,0,0],0,true,true], - ["Land_u_Shed_Ind_F",[-61.9277,-7.80664,-0.0579567],0,true,true], - ["Land_Shed_08_brown_F",[-47.9512,26.3086,-0.0630035],0,true,true], - ["Land_Shed_02_F",[-6.22852,78.9766,-0.0466728],0,true,true], - ["Land_Wreck_AFV_Wheeled_01_F",[-38.0176,-20.6309,-0.0216446],0,true,true] -]; - -_simpleObjects = [ - -]; - -_missionPatrolVehicles = [ - ["B_Truck_01_mover_F",[-8.7207,13.8828,-0.0554924],0], - ["B_MRAP_01_hmg_F",[-29.7793,16.5488,-0.054863],0] -]; - -_submarinePatrolParameters = [ - -]; - -_airPatrols = [ - ["B_Heli_Light_01_dynamicLoadout_F",[-39.4199,9.21094,-0.0559273],0] -]; - -_missionEmplacedWeapons = [ - ["B_GMG_01_F",[-37.9668,-4.69336,-0.0563164],0], - ["B_HMG_01_F",[11.2852,43.7969,-0.0578575],0] -]; - -_missionGroups = [ - ,[[-27.1387,-8.02148,-0.0584373],3,6,"Red",30,45], - ,[[-2.74414,46.5508,-0.0565186],3,6,"Red",30,45] -]; - -_scubaGroupParameters = [ - -]; - -_missionLootBoxes = [ - ["Box_IND_Wps_F",[-22.0605,2.1543,-0.0577888],_crateLoot,_lootCounts,0], - ["Box_AAF_Equip_F",[-19.5859,7.62695,-0.0575409],_crateLoot,_lootCounts,0], - ["Box_IND_AmmoOrd_F",[-17.8203,13.4805,-0.0576591],_crateLoot,_lootCounts,0], - ["Box_IND_WpsLaunch_F",[-22.6543,-1.80859,-0.0577736],_crateLoot,_lootCounts,0] -]; - -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; -_noChoppers = blck_noPatrolHelisBlue; -_missionHelis = blck_patrolHelisBlue; - -_chancePara = blck_chanceParaBlue; -_noPara = blck_noParaBlue; -_paraTriggerDistance = 400; -_paraSkill = 'Blue'; -_chanceLoot = 0.0; -_paraLoot = blck_BoxLoot_Blue; -_paraLootCounts = blck_lootCountsBlue; -_missionLandscapeMode = "precise"; -_uniforms = blck_SkinList; -_headgear = blck_headgear; -_vests = blck_vests; -_backpacks = blck_backpacks; -_sideArms = blck_Pistols; -_spawnCratesTiming = blck_spawnCratesTiming; -_loadCratesTiming = blck_loadCratesTiming; -_endCondition = blck_missionEndCondition; -_minNoAI = blck_MinAI_Blue; -_maxNoAI = blck_MaxAI_Blue; -_noAIGroups = blck_AIGrps_Blue; -_noVehiclePatrols = blck_SpawnVeh_Blue; -_noEmplacedWeapons = blck_SpawnEmplaced_Blue; -_minNoAI = blck_MinAI_Blue; -_maxNoAI = blck_MaxAI_Blue -_noAIGroups = blck_AIGrps_Blue; -_noVehiclePatrols = blck_SpawnVeh_Blue; -_noEmplacedWeapons = blck_SpawnEmplaced_Blue; -#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; \ No newline at end of file + class Static; + class blckHouse: Static + { + class Attributes + { + class blckGarison + { + // https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Scenario + displayName = "Garison Building"; + toolTip = "Enable/Disable ?Garisoned Building"; + property = "blckGarison"; + control = "Edit"; + expression = "_this setVariable['%s',_value];"; + defaultValue = 'false'; + unique = 0; + validate = "BOOL"; + typeName = "BOOL"; + }; + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.sqf new file mode 100644 index 0000000..414642e --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.sqf @@ -0,0 +1,6 @@ + + +_parameter = 0; +_ok = "Multiplayer" set3DENMissionAttribute ["respawn",15]; +_parameter = "Multiplayer" get3DENMissionAtrribute "respawn"; +systemChat format["_parameter = %1",_parameter]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.txt b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.txt new file mode 100644 index 0000000..d970277 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.txt @@ -0,0 +1,3 @@ + +private _success = "blck_missions" set3DENAttribute ["mission_Dificulty","Blue"]; +[format["Difficulty Set to: %1",_difficulty],"Mission Difficulty","OK","Cancel"] call BIS_fnc_3DENShowMessage; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf index 53f861f..5ba53db 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportDynamic.sqf @@ -1,26 +1,49 @@ -#define aiDifficulty "Red" -#define minAI 3 -#define maxAI 6 -#define minPatrolRadius 30 -#define maxPatrolRadius 45 -#define AI_respawnTime 600 -#define aiVehiclePatrolRadius 75 -#define vehiclePatrolRespawnTime 600 -#define staticWeaponRespawnTime 600 -#define aiAircraftPatrolRespawnTime 600 -#define aiAircraftPatrolRadius 1700 -#define oddsOfGarrison 0.67 -#define maxGarrisonStatics 3 -#define maxGarrisonUnits 4 -#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls -#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient. -#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction. -#define objectAtMissionCenter "RoadCone_L_F" -#define lootVehicleMarker "Sign_Arrow_F" -#define landVehicles "LandVehicle" + + +objectAtMissionCenter = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "objectAtMissionCenter"); +blck_minAI = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "minAI"); +blck_maxAI = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxAI"); +minPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "minPatroRadius"); +maxPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxPatrolRadius"); +maxVehiclePatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxVehiclePatrolRadius"); +aircraftPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "aircraftPatrolRadius"); +oddsOfGarison = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "oddsOfGarison"); +maxGarrisonStatics = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxGarrisonStatics"); +typesGarrisonStatics = getArray(configFile >> "CfgBlck3DEN" >> "configs" >> "typesGarrisonStatics"); +//blck_MissionDifficulty = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultMissionDifficulty"); +blck_MissionDifficulty = missionNamespace getVariable["blck_difficulty",getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultMissionDifficulty")]; + +lootVehicleVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "lootVehicleVariableName"); +buildingPosGarrisonVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingPosGarrisonVariableName"); +buildingATLGarrisionVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingATLGarrisionVariableName"); + +{ + diag_log format["param %1 = %2",_forEachIndex,_x]; +} forEach [ + objectAtMissionCenter, + blck_minAI, + blck_maxAI, + minPatrolRadius, + maxPatrolRadius, + maxVehiclePatrolRadius, + aircraftPatrolRadius, + oddsOfGarison, + maxGarrisonStatics, + typesGarrisonStatics, + blck_MissionDifficulty, + lootVehicleVariableName, + buildingPosGarrisonVariableName, + buildingATLGarrisionVariableName +]; + CENTER = [0,0,0]; diag_log format["Dynamic Export called at %1",diag_tickTime]; +diag_log format["With blck_MissionDifficulty = %1",blck_MissionDifficulty]; + +/* + Set Default Values Where not Defined using Menu Commands +*/ if (isNil "blck_dynamicStartMessage") then { blck_dynamicStartMessage = "TODO: Change approiately"; @@ -31,38 +54,59 @@ if (isNil "blck_dynamicEndMessage") then }; if (isNil "blck_dynamicCrateLoot") then { - blck_dynamicCrateLoot = "_crateLoot = blck_BoxLoot_Green;"; + blck_dynamicCrateLoot = format["_crateLoot = blck_BoxLoot_%1;",blck_MissionDifficulty]; }; if (isNil "blck_dynamicCrateLootCounts") then { - blck_dynamicCrateLootCounts = "_lootCounts = blck_lootCountsGreen;"; + blck_dynamicCrateLootCounts = format["_lootCounts = blck_lootCounts%1;",blck_MissionDifficulty]; }; if (isNil "blck_dynamicmarkerMissionName") then { blck_dynamicmarkerMissionName = "TODO: Update appropriately"; }; -if (isNil "blck_dynamicMissionDifficulty") then +if (isNil "blck_spawnCratesTiming") then { - blck_dynamicMissionDifficulty = "Blue"; + blck_spawnCratesTiming = missionNamespace getVariable["blck_lootTiming","atMissionStartGround"]; + diag_log format["blck_loadCratesTiming set to default value of %1",blck_spawnCratesTiming]; +}; +if (isNil "blck_loadCratesTiming") then +{ + blck_loadCratesTiming = missionNamespace getVariable["blck_loadTiming","atMissionStart"]; + diag_log format["blck_loadCratesTiming set to default value of %1",blck_loadCratesTiming]; }; +if (isNil "blck_missionEndCondition") then +{ + blck_missionEndCondition = missionNamespace getVariable["blck_endState","allUnitsKilled"]; + diag_log format["blck_missionEndCondition set to default value of %1",blck_missionEndCondition]; +}; + +/* + Look for an object defined in CfgBlck3DEN \ configs \ that marks the center of the mission + and set the coords of the center if such an object is found +*/ + private _centerMarkers = allMissionObjects objectAtMissionCenter; diag_log format["_centerMarkers = %1",_centerMarkers]; if !(_centerMarkers isEqualTo []) then { CENTER = getPosATL (_centerMarkers select 0); diag_log format["CENTER defined by object %1 typeOf %2",_centerMarker,typeOf (_centerMarkers select 0)]; +} else { + diag_log format[" No object marking the center of the mission was found: using a flashing road cone or flag is recommended",getText(configFile >> "CfgVehicles" >> objectAtMissionCenter >> "displayName")]; + diag_log format["Place such an object or a marker to ensure the mission is accurately stored and spawned"]; }; -private _entities = all3DENEntities; -private _markers = _entities select 5; -diag_log format["_markers = %1",_markers]; -private ["_m1","_type","_shape","_size","_color","_brush"]; - -/* +all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"]; +private _units = []; { - diag_log format["_m1 get3EDENAttribute %1 = %2",_x, _m1 get3DENAttribute _x]; -} forEch ["markerType","markerColor","markerBrush","position","size2","text"]; + { + if (vehicle _x isEqualTo _x) then {_units pushBack _x}; + } forEach (units _x); +} forEach _groups; + +private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"]; +/* + pull info on the first marker found */ -private["_m1","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerPos","_markerSize","_markerAlpha"]; if !(_markers isEqualTo []) then { _m1 = _markers select 0; @@ -75,114 +119,166 @@ if !(_markers isEqualTo []) then _markerPos = (_m1 get3DENAttribute "position") select 0; _markerSize = (_m1 get3DENAttribute "size2") select 0; _markerText = (_m1 get3DENAttribute "text") select 0; - if (CENTER isEqualTo [0,0,0]) then {CENTER = markerPos _m1}; + + /* + use the coordinates of that marker as mission center of no object demarkating the center is found + */ + if ((isNil "CENTER") || (CENTER isEqualTo [0,0,0])) then { + CENTER = _markerPos; + diag_log format["Position of marker %1 used for position of CENTER = %2",_m1,CENTER]; + }; + if (count _markers > 1) then + { + diag_log format[" More than one marker was found; only the first marker was processed"]; + }; } else { - _type = "mil_square"; - _shape = "null"; - _size = "[0,0]"; - _color = "COLORRED"; - _brush = "null"; - CENTER = [0,0,0]; + _markerType = "mil_square"; + _markerShape = "null"; + _markerSize = "[0,0]"; + _markerColor = "COLORRED"; + _markerBrush = "null"; + if !(_objects isEqualTo []) then + { + CENTER = getPosATL (_objects select 0); + } else { + CENTER = getPos (_objects select 0); + }; + diag_log format[" No marker was found, using default values and position for mission center position"]; }; diag_log format["_m1 = %1 | _type = %2 | _shape = %3 | _size = %4 | _color = %5 | _brush = %6 | _text = %7",_m1,_markerType,_markerShape,_markerSize,_markerColor,_markerBrush,_markerText]; -private _garrisonedBuildings = []; -private _missionLootVehicles = []; -private _staticObjects = (_entities select 0) select {(_x isKindOf "Static") && !(isSimpleObject _x)}; -diag_log format["_staticObjects: %1",_staticObjects]; if (CENTER isEqualTo [0,0,0]) then { CENTER = getPosATL (_staticObjects select 0); }; diag_log format["CENTER = %1",CENTER]; + +private _garisonedBuildings = []; +private _garisonedStatics = []; +private _garisonedUnits = []; + +private _landscape = _objects select{ + !(isSimpleObject _x) && + ((typeOf _x) isKindOf "Static") +}; + +diag_log format["CENTER = %1 | _landscape = %2",CENTER,_landscape]; private _missionLandscape = []; - { - if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then - { - _missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; - }; -}forEach _staticObjects; + _missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; +}forEach _landscape; -private _simpleObjects = (_entities select 0) select {isSimpleObject _x}; +private _simpleObjects = _objects select {isSimpleObject _x}; diag_log format["_simpleObjects = %1",_simpleObjects]; private _missionSimpleObjects = []; { - if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then - { - _missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; - }; + _missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; } forEach _simpleObjects; -private _missionPatrolVehicles = []; -private _patrolVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship") select {!((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles)}; -diag_log format["_patrolVehicles = _count = %2 | %1",_patrolVehicles,count _patrolVehicles]; +private _missionLootVehicles = []; +private _lootVehicles = _objects select { + ((typeOf _x) isKindOf "AllVehicles") && + !((typeOf _x) isKindOf "Man") && + (_x get3DENAttribute "name" isEqualTo lootVehicleVariableName) +}; +diag_log format["_lootVehicles = %1",_lootVehicles]; { - _missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + _missionLootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; +} forEach _lootVehicles; + +_missionPatrolVehicles = []; +private _patrolVehicles = _objects select { + ((typeOf _x) isKindOf "AllVehicles") && + !((typeOf _x) isKindOf "Man") && + !((typeOf _x) isKindOf "SDV_01_base_F") && + !((typeOf _x) isEqualTo "Air") && + !(_x in _lootVehicles) +}; +diag_log format["_patrolVehicles = %1",_patrolVehicles]; +{ + _missionPatrolVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x,maxVehiclePatrolRadius,maxVehiclePatrolRadius]; }forEach _patrolVehicles; -private _subs = allMissionObjects "SDV_01_base_F" select {((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles)}; private _subPatrols = []; +private _subs = _objects select { + ((typeOf _x) isKindOf "SDV_01_base_F") && + !(_x in _lootVehicles) +}; diag_log format["_subs = %1",_subs]; { - _lines pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; + _subPatrols pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x,maxVehiclePatrolRadius,maxVehiclePatrolRadius]; } forEach _subs; -private _airvehicles = allMissionObjects "Air"; private _airPatrols = []; -diag_log format["_airPatrolvehicles = %1",_airvehicles]; +private _airVehicles = _objects select { + (typeOf _x) isKindOf "Air" +}; +diag_log format["_airVehicles = %1",_airvehicles]; { - _airPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; -} forEach _airvehicles; + _airPatrols pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x,aircraftPatrolRadius,aircraftPatrolRadius]; +} forEach _airVehicles; + -private _allstaticWeapons = allMissionObjects "StaticWeapon"; private _staticWeapons = []; -diag_log format["_staticWeapons = %1",_staticWeapons]; +private _statics = _objects select { + ((typeOf _x) isKindOf "StaticWeapon") && + !(_x in _garisonedStatics) +}; +diag_log format["_statics = %1",_statics]; { - _staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; -} forEach _allstaticWeapons; -private _isInside = false; -private _infantry = allMissionObjects "Man" select {!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x) && ((vehicle _x isEqualTo _x))}; + _staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x]; +} forEach _statics; + +private _infantry = _units select { + !(surfaceIsWater (getPos _x)) && + !(_x in _garisonedUnits) +}; diag_log format["_infantry = %1",_infantry]; _infantryGroups = []; { - _infantryGroups pushBack format[' ,[%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; -} forEach _infantry; + _infantryGroups pushBack format[' ,[%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,blck_minAI,blck_maxAI,blck_MissionDifficulty,minPatrolRadius,maxPatrolRadius]; +} forEach _units; -private _scuba = allMissionObjects "Man" select {(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x) && ((vehicle _x isEqualTo _x))}; +private _scuba = _units select { + (surfaceIsWater (getPos _x)) && + !(_x in _garisonedUnits) + // checck _x get3EDENAtribute "name" != "garrison"; +}; diag_log format["_scuba = %1",_scuba]; private _scubaGroups = []; { - _scubaGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius]; + _scubaGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,blck_minAI,blck_maxAI,blck_MissionDifficulty,minPatrolRadius,maxPatrolRadius]; } forEach _scuba; -private _lootBoxes = ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F")); -diag_log format["_lootBoxes = %1",_lootBoxes]; private _lootContainers = []; +private _ammoBoxes = _objects select { + (((typeOf _x) isKindOf "ReammoBox") || ((typeOf _x) isKindOf "ReammoBox_F")) +}; +diag_log format["_ammoBoxes = %1",_ammoboxes]; { _lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; -}forEach _lootBoxes; +}forEach _ammoBoxes; private _lines = []; private _lineBreak = toString [10]; _lines pushBack "/*"; -_lines pushBack " Output from GRG Plugin for blckeagls"; -_lines pushBack " For Credits and Acknowledgements see the Readme and comments"; +_lines pushBack " Dynamic Mission Generated"; +_lines pushBack " Using 3DEN Plugin for blckeagls"; +_lines pushBack format[" %1",['dynamic'] call blck3DEN_fnc_versionInfo]; +_lines pushBack " By Ghostrider-GRG-"; _lines pushBack "*/"; _lines pushBack ""; _lines pushBack '#include "\q\addons\custom_server\Configs\blck_defines.hpp";'; _lines pushBack '#include "\q\addons\custom_server\Missions\privateVars.sqf";'; _lines pushBack ""; - - _lines pushBack format["_markerType = %1",format["[%1,%2,%3];",_markerType,_markerSize,_markerBrush]]; _lines pushBack format["_markerColor = %1;",_markerColor]; _lines pushBack format['_startMsg = "%1";',blck_dynamicStartMessage]; _lines pushBack format['_endMsg = "%1;',blck_dynamicEndMessage]; -_lines pushBack format['_markerMissionName = %1;',blck_dynamicmarkerMissionName]; -_lines pushBack format['_crateLoot = blck_BoxLoot_%1;',blck_dynamicMissionDifficulty]; -_lines pushBack format['_lootCounts = blck_lootCounts%1;',blck_dynamicMissionDifficulty]; +_lines pushBack format['_markerMissionName = "%1";',blck_dynamicmarkerMissionName]; +_lines pushBack format['_crateLoot = blck_BoxLoot_%1;',blck_MissionDifficulty]; +_lines pushBack format['_lootCounts = blck_lootCounts%1;',blck_MissionDifficulty]; _lines pushBack ""; _lines pushBack "_missionLandscape = ["; _lines pushback (_missionLandscape joinString (format [",%1", _lineBreak])); @@ -192,6 +288,10 @@ _lines pushBack "_simpleObjects = ["; _lines pushback (_simpleObjects joinString (format [",%1", _lineBreak])); _lines pushBack "];"; _lines pushBack ""; +_lines pushBack "_missionLootVehicles = ["; +_lines pushBack (_missionLootVehicles joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; _lines pushBack "_missionPatrolVehicles = ["; _lines pushback (_missionPatrolVehicles joinString (format [",%1", _lineBreak])); _lines pushBack "];"; @@ -223,16 +323,16 @@ _lines pushBack ""; _lines pushBack "/*"; _lines pushBack " Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them"; _lines pushBack "*/"; -_lines pushBack format["_chanceHeliPatrol = blck_chanceHeliPatrol%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noChoppers = blck_noPatrolHelis%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_missionHelis = blck_patrolHelis%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_chancePara = blck_chancePara%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noPara = blck_noPara%1;",blck_dynamicMissionDifficulty]; +_lines pushBack format["_chanceHeliPatrol = blck_chanceHeliPatrol%1;",blck_MissionDifficulty]; +_lines pushBack format["_noChoppers = blck_noPatrolHelis%1;",blck_MissionDifficulty]; +_lines pushBack format["_missionHelis = blck_patrolHelis%1;",blck_MissionDifficulty]; +_lines pushBack format["_chancePara = blck_chancePara%1;",blck_MissionDifficulty]; +_lines pushBack format["_noPara = blck_noPara%1;",blck_MissionDifficulty]; _lines pushBack format["_paraTriggerDistance = 400;"]; -_lines pushBack format["_paraSkill = '%1';",blck_dynamicMissionDifficulty]; +_lines pushBack format["_paraSkill = '%1';",blck_MissionDifficulty]; _lines pushBack format["_chanceLoot = 0.0;"]; -_lines pushBack format["_paraLoot = blck_BoxLoot_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_paraLootCounts = blck_lootCounts%1;",blck_dynamicMissionDifficulty]; +_lines pushBack format["_paraLoot = blck_BoxLoot_%1;",blck_MissionDifficulty]; +_lines pushBack format["_paraLootCounts = blck_lootCounts%1;",blck_MissionDifficulty]; _lines pushBack format['_missionLandscapeMode = "precise";']; _linse pushBack "_useMines = blck_useMines;"; _lines pushBack "_uniforms = blck_SkinList;"; @@ -240,22 +340,22 @@ _lines pushBack "_headgear = blck_headgear;"; _lines pushBack "_vests = blck_vests;"; _lines pushBack "_backpacks = blck_backpacks;"; _lines pushBack "_sideArms = blck_Pistols;"; -_lines pushBack '_spawnCratesTiming = blck_spawnCratesTiming;'; -_lines pushBack '_loadCratesTiming = blck_loadCratesTiming;'; -_lines pushBack '_endCondition = blck_missionEndCondition;'; -_lines pushBack format["_minNoAI = blck_MinAI_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_maxNoAI = blck_MaxAI_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_minNoAI = blck_MinAI_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_maxNoAI = blck_MaxAI_%1",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_dynamicMissionDifficulty]; -_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_dynamicMissionDifficulty]; -diag_log format["blck_dynamicMissionDifficulty = %1",blck_dynamicMissionDifficulty]; - +_lines pushBack format['_spawnCratesTiming = %1',blck_spawnCratesTiming]; +_lines pushBack format['_loadCratesTiming = %1',blck_loadCratesTiming]; +_lines pushBack format['_endCondition = %1;',blck_missionEndCondition]; +_lines pushBack format["_minNoAI = blck_MinAI_%1;",blck_MissionDifficulty]; +_lines pushBack format["_maxNoAI = blck_MaxAI_%1;",blck_MissionDifficulty]; +_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_MissionDifficulty]; +_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_MissionDifficulty]; +_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_MissionDifficulty]; +_lines pushBack format["_minNoAI = blck_MinAI_%1;",blck_MissionDifficulty]; +_lines pushBack format["_maxNoAI = blck_MaxAI_%1",blck_MissionDifficulty]; +_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_MissionDifficulty]; +_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_MissionDifficulty]; +_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_MissionDifficulty]; +_lines pushBack ""; _lines pushBack '#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";'; +diag_log ["dynamic"] call blck3EDEN_fnc_versionInfo; uiNameSpace setVariable ["Display3DENCopy_data", ["dynamicMission.sqf", _lines joinString _lineBreak]]; (findDisplay 313) createdisplay "Display3DENCopy"; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf index d9fce70..702cb1d 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf @@ -1,20 +1,295 @@ -diag_log format["Dynamic Export called at %1",diag_tickTime]; + + +objectAtMissionCenter = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "objectAtMissionCenter"); +blck_minAI = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "minAI"); +blck_maxAI = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxAI"); +minPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "minPatroRadius"); +maxPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxPatrolRadius"); +maxVehiclePatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxVehiclePatrolRadius"); +aircraftPatrolRadius = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "aircraftPatrolRadius"); +oddsOfGarison = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "oddsOfGarison"); +maxGarrisonStatics = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxGarrisonStatics"); +typesGarrisonStatics = getArray(configFile >> "CfgBlck3DEN" >> "configs" >> "typesGarrisonStatics"); +blck_MissionDifficulty = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "defaultMissionDifficulty"); +lootVehicleVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "lootVehicleVariableName"); +buildingPosGarrisonVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingPosGarrisonVariableName"); +buildingATLGarrisionVariableName = getText(configFile >> "CfgBlck3DEN" >> "configs" >> "buildingATLGarrisionVariableName"); + +{ + diag_log format["param %1 = %2",_forEachIndex,_x]; +} forEach [ + objectAtMissionCenter, + blck_minAI, + blck_maxAI, + minPatrolRadius, + maxPatrolRadius, + maxVehiclePatrolRadius, + aircraftPatrolRadius, + oddsOfGarison, + maxGarrisonStatics, + typesGarrisonStatics, + blck_MissionDifficulty, + lootVehicleVariableName, + buildingPosGarrisonVariableName, + buildingATLGarrisionVariableName +]; + +CENTER = [0,0,0]; + +diag_log format["Static Mission Export called at %1",diag_tickTime]; +diag_log format["With blck_MissionDifficulty = %1",blck_MissionDifficulty]; + +/* + Set Default Values Where not Defined using Menu Commands +*/ + +if (isNil "blck_dynamicCrateLoot") then +{ + blck_dynamicCrateLoot = format["_crateLoot = blck_BoxLoot_%1;",blck_MissionDifficulty]; +}; +if (isNil "blck_dynamicCrateLootCounts") then { + blck_dynamicCrateLootCounts = format["_lootCounts = blck_lootCounts%1;",blck_MissionDifficulty]; +}; +if (isNil "blck_dynamicmarkerMissionName") then +{ + blck_dynamicmarkerMissionName = "TODO: Update appropriately"; +}; + +/* + Look for an object defined in CfgBlck3DEN \ configs \ that marks the center of the mission + and set the coords of the center if such an object is found +*/ + +private _centerMarkers = allMissionObjects objectAtMissionCenter; +diag_log format["_centerMarkers = %1",_centerMarkers]; +if !(_centerMarkers isEqualTo []) then +{ + CENTER = getPosATL (_centerMarkers select 0); + diag_log format["CENTER defined by object %1 typeOf %2",_centerMarker,typeOf (_centerMarkers select 0)]; +} else { + diag_log format[" No object marking the center of the mission was found: using a flashing road cone or flag is recommended",getText(configFile >> "CfgVehicles" >> objectAtMissionCenter >> "displayName")]; + diag_log format["Place such an object or a marker to ensure the mission is accurately stored and spawned"]; +}; + +all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"]; +private _units = []; +{ + { + if (vehicle _x isEqualTo _x) then {_units pushBack _x}; + } forEach (units _x); +} forEach _groups; + +private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"]; +/* + pull info on the first marker found +*/ +if !(_markers isEqualTo []) then +{ + _m1 = _markers select 0; + _markerType = (_m1 get3DENAttribute "itemClass") select 0; + _markerShape = (_m1 get3DENAttribute "markerType") select 0; + _markerColor = (_m1 get3DENAttribute "baseColor") select 0; + _markerText = (_m1 get3DENAttribute "text") select 0; + if !(_markerText isEqualTo "") then {blck_dynamicmarkerMissionName = _markerText}; + _markerBrush = (_m1 get3DENAttribute "markerBrush") select 0; + _markerPos = (_m1 get3DENAttribute "position") select 0; + _markerSize = (_m1 get3DENAttribute "size2") select 0; + _markerText = (_m1 get3DENAttribute "text") select 0; + + /* + use the coordinates of that marker as mission center of no object demarkating the center is found + */ +} else { + _markerType = "mil_square"; + _markerShape = "null"; + _markerSize = "[0,0]"; + _markerColor = "COLORRED"; + _markerBrush = "null"; + diag_log format[" No marker was found, using default values and position for mission center position"]; +}; +diag_log format["_m1 = %1 | _type = %2 | _shape = %3 | _size = %4 | _color = %5 | _brush = %6 | _text = %7",_m1,_markerType,_markerShape,_markerSize,_markerColor,_markerBrush,_markerText]; + +private _garisonedBuildings = []; +private _garisonedStatics = []; +private _garisonedUnits = []; + +private _landscape = _objects select{ + !(isSimpleObject _x) && + ((typeOf _x) isKindOf "Static") +}; + +diag_log format["CENTER = %1 | _landscape = %2","ignored",_landscape]; +private _missionLandscape = []; +{ + _missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], 'true','true']; +}forEach _landscape; + +private _simpleObjects = _objects select {isSimpleObject _x}; +diag_log format["_simpleObjects = %1",_simpleObjects]; +private _missionSimpleObjects = []; +{ + _missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], 'true','true']; +} forEach _simpleObjects; + +private _missionLootVehicles = []; +private _lootVehicles = _objects select { + ((typeOf _x) isKindOf "AllVehicles") && + !((typeOf _x) isKindOf "Man") && + (_x get3DENAttribute "name" isEqualTo lootVehicleVariableName) +}; +diag_log format["_lootVehicles = %1",_lootVehicles]; +{ + _missionLootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x), '_crateLoot','_lootCounts',[vectorDir _x,vectorUp _x]]; +} forEach _lootVehicles; + +_missionPatrolVehicles = []; +private _patrolVehicles = _objects select { + ((typeOf _x) isKindOf "AllVehicles") && + !((typeOf _x) isKindOf "Man") && + !((typeOf _x) isKindOf "SDV_01_base_F") && + !((typeOf _x) isEqualTo "Air") && + !(_x in _lootVehicles) +}; +diag_log format["_patrolVehicles = %1",_patrolVehicles]; +{ + _missionPatrolVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x,maxVehiclePatrolRadius,600,-1]; +}forEach _patrolVehicles; + +private _subPatrols = []; +private _subs = _objects select { + ((typeOf _x) isKindOf "SDV_01_base_F") && + !(_x in _lootVehicles) +}; +diag_log format["_subs = %1",_subs]; +{ + _subPatrols pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x),getDir _x,maxVehiclePatrolRadius,600,-1]; +} forEach _subs; + +private _airPatrols = []; +private _airVehicles = _objects select { + (typeOf _x) isKindOf "Air" +}; +diag_log format["_airVehicles = %1",_airvehicles]; +{ + _airPatrols pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x),getDir _x,aircraftPatrolRadius,900,-1]; +} forEach _airVehicles; + + +private _staticWeapons = []; +private _statics = _objects select { + ((typeOf _x) isKindOf "StaticWeapon") && + !(_x in _garisonedStatics) +}; +diag_log format["_statics = %1",_statics]; +{ + _staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x),getDir _x,0,-1]; +} forEach _statics; + +private _infantry = _units select { + !(surfaceIsWater (getPos _x)) && + !(_x in _garisonedUnits) +}; +diag_log format["_infantry = %1",_infantry]; +_infantryGroups = []; +{ + _infantryGroups pushBack format[' ,[%1,%2,%3,"%4",%5,%6]',(getPosATL _x),blck_minAI,blck_maxAI,blck_MissionDifficulty,maxPatrolRadius,600,-1]; +} forEach _units; + +private _scuba = _units select { + (surfaceIsWater (getPos _x)) && + !(_x in _garisonedUnits) + // checck _x get3EDENAtribute "name" != "garrison"; +}; +diag_log format["_scuba = %1",_scuba]; +private _scubaGroups = []; +{ + _scubaGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x),blck_minAI,blck_maxAI,blck_MissionDifficulty,maxPatrolRadius,600,-1]; +} forEach _scuba; + +private _lootContainers = []; +private _ammoBoxes = _objects select { + (((typeOf _x) isKindOf "ReammoBox") || ((typeOf _x) isKindOf "ReammoBox_F")) +}; +diag_log format["_ammoBoxes = %1",_ammoboxes]; +{ + _lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x), '_crateLoot','_lootCounts',[vectorDir _x,vectorUp _x]]; +}forEach _ammoBoxes; + private _lines = []; private _lineBreak = toString [10]; _lines pushBack "/*"; -_lines pushBack " Ourput from GRG Plugin for blckeagls"; -_lines pushBack " For Credits and Acknowledgements see the Readme and comments"; +_lines pushBack " Static Mission Generated"; +_lines pushBack " Using 3DEN Plugin for blckeagls"; +_lines pushBack format[" %1",['dynamic'] call blck3DEN_fnc_versionInfo]; +_lines pushBack " By Ghostrider-GRG-"; _lines pushBack "*/"; _lines pushBack ""; _lines pushBack '#include "\q\addons\custom_server\Configs\blck_defines.hpp";'; -_lines pushBack '#include "\q\addons\custom_server\Missions\privateVars.sqf";'; +_lines pushBack '#include "privateVars.sqf";'; +_lines pushBack ""; +_lines pushBack format["_markerType = %1",format["[%1,%2,%3];",_markerType,_markerSize,_markerBrush]]; +_lines pushBack format["_markerColor = %1;",_markerColor]; +_lines pushBack format['_markerMissionName = "%1";',blck_dynamicmarkerMissionName]; +_lines pushBack format['_crateLoot = blck_BoxLoot_%1;',blck_MissionDifficulty]; +_lines pushBack format['_lootCounts = blck_lootCounts%1;',blck_MissionDifficulty]; +_lines pushBack ""; +_lines pushBack "_missionLandscape = ["; +_lines pushback (_missionLandscape joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_simpleObjects = ["; +_lines pushback (_simpleObjects joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_missionLootVehicles = ["; +_lines pushBack (_missionLootVehicles joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_vehiclePatrolParameters = ["; +_lines pushback (_missionPatrolVehicles joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_submarinePatrolParameters = ["; +_lines pushback (_subPatrols joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_airPatrols = ["; +_lines pushback (_airPatrols joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_missionEmplacedWeapons = ["; +_lines pushback (_staticWeapons joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_aiGroupParameters = ["; +_lines pushback (_infantryGroups joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_aiScubaGroupParameters = ["; +_lines pushback (_scubaGroups joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "_missionLootBoxes = ["; +_lines pushback (_lootContainers joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; +_lines pushBack "/*"; +_lines pushBack " Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them"; +_lines pushBack "*/"; -// As found in fn_3DENExportTerrainBuilder.sqf -uiNameSpace setVariable ["Display3DENCopy_data", ["dynamicMission.sqf", _lines joinString _lineBreak]]; +_linse pushBack "_useMines = blck_useMines;"; +_lines pushBack "_uniforms = blck_SkinList;"; +_lines pushBack "_headgear = blck_headgear;"; +_lines pushBack "_vests = blck_vests;"; +_lines pushBack "_backpacks = blck_backpacks;"; +_lines pushBack "_sideArms = blck_Pistols;"; +_lines pushBack ""; +_lines pushBack '#include "\q\addons\custom_server\Missions\Static\Code\GMS_fnc_sm_initializeMission.sqf"; '; + +diag_log ["static"] call blck3EDEN_fnc_versionInfo; +uiNameSpace setVariable ["Display3DENCopy_data", ["staticMission.sqf", _lines joinString _lineBreak]]; (findDisplay 313) createdisplay "Display3DENCopy"; - - diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/pullDynamicMission.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/pullDynamicMission.sqf index f603283..5ea7458 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/pullDynamicMission.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/pullDynamicMission.sqf @@ -75,7 +75,7 @@ diag_log format["<< ---- pullDynamicMision: START %1 ---- >>",diag_tickTime // Begin pulling data here /////////////////////// -_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl]; +_cb = _cb + format["blck_garrisonedBuildings_BuildingPosnSystem = [",endl]; _helpers = allMissionObjects garrisonMarkerObject; //diag_log format["_helpers = %1",_helpers]; @@ -86,8 +86,8 @@ _helpers = allMissionObjects garrisonMarkerObject; if (_isInside) then { _building = [_x] call _fn_buildingContainer; - _garrisonedBuildings pushbackunique _building; - _garrisonedBuildings pushbackunique _x; + blck_garrisonedBuildings pushbackunique _building; + blck_garrisonedBuildings pushbackunique _x; // data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/], // 1 2 3 4 5 6 7 8 9 _line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits]; @@ -104,7 +104,7 @@ _helpers = allMissionObjects garrisonMarkerObject; } forEach _helpers; _cb = _cb + format["%1];%1%1",endl]; -_logging = format["_garrisonedBuildings = %1",_garrisonedBuildings]; +_logging = format["blck_garrisonedBuildings = %1",blck_garrisonedBuildings]; diag_log _logging; systemChat _logging; //diag_log format["_cb = %1%2",endl,_cb]; @@ -119,7 +119,7 @@ _fn_configureGarrisonForBuildingATL = { private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"]; _b = _this select 0; _count = 0; - if (_b in _garrisonedBuildings) exitWith {""}; + if (_b in blck_garrisonedBuildings) exitWith {""}; _staticsText = ""; _unitsText = ""; _buildingGarrisonATL = ""; @@ -166,7 +166,7 @@ _fn_configureGarrisonForBuildingATL = { if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then { _buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText]; - _garrisonedBuildings pushBackUnique _b; + blck_garrisonedBuildings pushBackUnique _b; }; _buildingGarrisonATL }; @@ -178,7 +178,7 @@ _cb = _cb + "_garrisonedBuilding_ATLsystem = ["; if (_isInside) then { private _building = [_x] call _fn_buildingContainer; - private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false}; + private _include = if ( !(_building in blck_garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false}; if (_include) then { //diag_log format["_x = %1 | _building = %1",_x,_building]; @@ -209,7 +209,7 @@ _cb = _cb + format["_missionLandscape = [",endl]; { diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x]; //diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"]; - if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then + if !(_x in blck_garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then { _line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true']; systemChat _line; diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/template.sqf b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/template.sqf index 4ac8b8f..8a0afe9 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/Export/template.sqf +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/Export/template.sqf @@ -1,71 +1,11 @@ -/* - Mission Template by Ghostrider [GRG] - Mission Compositions by Bill prepared for ghostridergaming - Copyright 2016 - Last modified 3/20/17 - - -------------------------- - License - -------------------------- - All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License. - http://creativecommons.org/licenses/by-nc-sa/4.0/ -*/ -#include "\q\addons\custom_server\Configs\blck_defines.hpp"; -#include "\q\addons\custom_server\Missions\privateVars.sqf"; - -//diag_log "[blckeagls] Spawning Green Mission with template = default"; -_crateLoot = blck_BoxLoot_G;reen -_lootCounts = blck_lootCountsGreen; -_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!"; -_endMsg = "The Sector at the Green Marker is under survivor control!"; - -_markerMissionName = "Research Center"; -_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise" -_useMines = blck_useMines; -_minNoAI = blck_MinAI_Green; -_maxNoAI = blck_MaxAI_Green; -_noAIGroups = blck_AIGrps_Green; -_noVehiclePatrols = blck_SpawnVeh_Green; -_noEmplacedWeapons = blck_SpawnEmplaced_Green; -_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue -_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults -_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults -_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults -_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults -// Change _useMines to true/false below to enable mission-specific settings. -_useMines = blck_useMines; // Setting this in the mission file overrides the defaults -_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults -_headgear = blck_headgear; // Setting this in the mission file overrides the defaults -_vests = blck_vests; -_backpacks = blck_backpacks; -_weaponList = ["blue"] call blck_fnc_selectAILoadout; -_sideArms = blck_Pistols; -_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults -_noChoppers = blck_noPatrolHelisBlue; -_missionHelis = blck_patrolHelisBlue; -_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults -_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults -_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0. -_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot. -_chanceLoot = 0.0; // The chance that a loot crate will be dropped with paratroops. -_paraLoot = blck_BoxLoot_Blue; -_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. - -_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir". - // Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute. - // This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission. -_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn"; - // Pertains only to crates spawned at mission spawn. - // This sets the default but can be overridden for specific missions by defining _loadCratesTiming - - // Examples: - // To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn" - // To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion" - // To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. - // To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. -_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" - // Setting this in the mission file overrides the defaults - -#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; +all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"]; +_units = []; +{ + { + if (vehicle _x isEqualTo _x) then {_units pushBack _x}; + } forEach (units _x); +} forEach _groups; +diag_log format["_groups = %1",_groups]; +diag_log format["_units = %1",_units]; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp b/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp index 3d5716d..ceac19f 100644 --- a/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp @@ -7,169 +7,53 @@ * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ - -class CfgPatches +#include "defines.h" +class CfgBlck3DEN { - class blckeagls_3den + class configs { - requiredVersion = 0.1; - requiredAddons[] = {"3den"}; - units[] = {}; - weapons[] = {}; - magazines[] = {}; - ammo[] = {}; + objectAtMissionCenter = "RoadCone_L_F"; + minAI = 3; + maxAI = 6; + minPatroRadius = 30; + maxPatrolRadius = 45; + maxVehiclePatrolRadius = 75; + aircraftPatrolRadius = 1000; + oddsOfGarison = 0.67; + maxGarrisonStatics = 3; + typesGarrisonStatics = []; + defaultMissionDifficulty = "Blue"; + defaultLootcrateSpawnTiming = "atMissionSpawnGround"; + defaultLootcrateLoadTiming = "atMissionSpawn"; + defaultMissionEndState = "allKilledOrPlayerNear"; + + // Enter the string shown here under Atributes\Variable Name + // to demarcate this vehicle as a loot vehicle + lootVehicleVariableName = "lootVehicle"; + + // Enter the string shown here under Atributes\Variable Name + // To indicate that a garrison should be placed at standard Arma + // building positions + buildingPosGarrisonVariableName = "pos"; + + // Enter the string shown here under Atributes\Variable Name + // To indicate that a garrison should be placed using setPosATL + // relative to the spawn position of the building + buildingATLGarrisionVariableName = "atl"; + + aiRespawnTime = 600; // respawn time for infantry + vehicleRespawnTime = 900; // respawn time for vehicle patrols + aircraftRespawnTime = 1200; // respawn time for aircraft patrols + }; + + /**************************************** + DO NOT TOUCH ANYTHING BELOW THIS LINE + *****************************************/ + class CfgVersion + { + version = 1.0; + build = 2; + date = "08/15/20"; }; }; -/////////////////////////////////////////////////////////////////////////////// - -class CfgFunctions -{ - - class blck3EDEN - { - class Export - { - file = "3EDEN_plugin\Export"; - class exportDynamic {}; - class exportStatic {}; - //class buildingContainer {}; - //class isInfantry {}; - //class isInside {}; - - }; - - class Core - { - file = "3EDEN_plugin\Core"; - class help {}; - class about {}; - }; - - }; - -}; - -/////////////////////////////////////////////////////////////////////////////// - -class ctrlCombo; - -class cfg3EDEN -{ - class EventHandlers - { - class blck - { - - }; - }; - - class Attributes - { - class Default; - - class Title: Default - { - class Controls - { - class Title; - }; - }; - - class Combo: Title - { - class Controls: Controls - { - class Title: Title {}; - class Value: ctrlCombo {}; - }; - }; - - class missionDifficulty: Combo - { - class Controls: Controls - { - class Title: Title {}; - class Value: Value - { - onLoad = "\ - {\ - _index = _control lbAdd _x;\ - _control lbsetdata [_index,_x];\ - }\ - forEach['','Blue (Easy)','Red (Medium)','Green (Hard)','Orange (Very Hard)'];"; - }; - }; - }; - }; -}; - -class ctrlMenuStrip; - -class display3DEN -{ - class Controls - { - class MenuStrip: ctrlMenuStrip - { - class Items - { - items[] += {"Blackeagls"}; - - class Blackeagls - { - text = "Blackeagls"; - items[] = { - "blckAbout3EDENPlugin", - "blckSeparator", - "blckSaveStaticMission", - "blckSaveDynamicMission", - "blck3EDENPluginHelp" - }; - }; - - class blckAbout3EDENPlugin - { - text = "3EDEN Plugin Version 1.0 for BlckEagls by Ghostrider-GRG-"; - action = "call blck3EDEN_fnc_about"; - }; - - class blckSeparator - { - value = 0; - }; - - class blckSaveStaticMission - { - text = "Save StaticMission"; - action = "call blck3EDEN_fnc_exportStatic"; - picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - - class blckSaveDynamicMission - { - text = "Save Dynamic Mission"; - action = "call blck3EDEN_fnc_exportDynamic"; - picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - - class Blck3EDENPluginHelp - { - text = "Help"; - action = "call blck3EDEN_fnc_Help"; - //picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - - }; - }; - }; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class CfgVehicles -{ - class B_Soldier_base_F; - // - -}; \ No newline at end of file diff --git a/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h b/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h new file mode 100644 index 0000000..dbc84e1 --- /dev/null +++ b/@blckeagls_EDEN/addons/3EDEN_plugin/defines.h @@ -0,0 +1,328 @@ +// defines.h + + +/* + ************************************** + DO NOT CHANGE ANYTHING BELOW THIS LINE + ************************************** +*/ +class CfgPatches +{ + class blckeagls_3den + { + requiredVersion = 0.1; + requiredAddons[] = {"3den"}; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + ammo[] = {}; + }; +}; + +/////////////////////////////////////////////////////////////////////////////// + +class CfgFunctions +{ + + class blck3DEN + { + class Export + { + file = "3EDEN_plugin\Export"; + class exportDynamic {}; + class exportStatic {}; + }; + + class Core + { + file = "3EDEN_plugin\Core"; + class help {}; + class about {}; + class initializeAttributes {}; + class isInfantry {}; + class isInside {}; + class buildingContainer {}; + class display {}; + class setDifficulty {}; + class setCompletionMode {} + class spawnCratesTiming {}; + class loadCratesTiming {}; + class versionInfo {}; + }; + + }; + +}; + +/////////////////////////////////////////////////////////////////////////////// + +class ctrlCombo; +class ctrlCheckbox; +class ctrlCheckboxes; +class ctrlEdit; + +class cfg3DEN +{ + class EventHandlers + { + class blckeagls + { + OnMissionLoad = "call blck3DEN_fnc_initializeAttributes"; + OnMissionNew = "call blck3DEN_fnc_initializeAttributes"; + }; + }; + + class Attributes + { + + }; + + class Mission + { + + }; +}; + + +class CfgVehicles +{ + +}; + +class ctrlMenuStrip; + +class display3DEN +{ + class Controls + { + class MenuStrip: ctrlMenuStrip + { + class Items + { + items[] += {"Blackeagls"}; + + class Blackeagls + { + text = "Blackeagls"; + items[] = { + "blckAbout3EDENPlugin", + "blckSeparator", + "blckMissionDifficulty", + "blckMissionCompletionMode", + "lootSpawnTiming", + "loadCratesTiming", + "blckSeparator", + //"blckMissionMessages", + //"blckSeparator", + "blckSaveStaticMission", + "blckSaveDynamicMission", + "blckSeparator", + "blck3EDENPluginHelp" + }; + }; + + class blckAbout3EDENPlugin + { + text = "3EDEN Plugin Version 1.0 for BlckEagls by Ghostrider-GRG-"; + action = "call blck3EDEN_fnc_about"; + }; + + class blckSeparator + { + value = 0; + }; + + class Attributes + { + items[] += { + "blck_setDifficulty" + }; + }; + + class blck_setDifficulty + { + text = "Set Mission Difficulty"; + items[] = { + "difficulty_blue" + }; + }; + + class difficulty_blue + { + text = "Easy (Blue)"; + action = "['Blue'] call blck3DEN_fnc_setDifficulty"; + }; + + class blck_setLootSpawnTime + { + text = "Set Lootcrate Spawn Timing"; + action = "edit3DENMissionAttributes 'lootSpawnTime'"; + }; + + class blckMissionDifficulty + { + text = "Set Mission Difficulty"; + items[] = { + "blckDifficultyBlue", + "blckDifficultyRed", + "blckDifficutlyGreen", + "blckDifficultyOrange" + }; + }; + class blckDifficultyBlue + { + text = "Set Mission Difficutly to EASY (Blue)"; + action = "['Blue'] call blck3DEN_fnc_setDifficulty;"; + value = "Blue"; + }; + class blckDifficultyRed + { + text = "Set Mission Difficulty to MEDIUM (Red)"; + action = "['Red'] call blck3DEN_fnc_setDifficulty;"; + value = "Red"; + }; + class blckDifficutlyGreen + { + text = "Set Mission Difficult To HARD (Green)"; + action = "['Green'] call blck3DEN_fnc_setDifficulty;"; + value = "Green"; + }; + class blckDifficultyOrange + { + text = "Set Mission Difficulty to Very HARD (Orange)"; + action = "['Orange'] call blck3DEN_fnc_setDifficulty;"; + value = "Orange"; + }; + + + class blckMissionCompletionMode + { + text = "Set the Criterial for Mission Completion"; + items[] = { + "playerNear", + "allUnitsKilled", + "allKilledOrPlayerNear" + }; + }; + class allUnitsKilled + { + text = "All AI Dead"; + toolTip = "Mission is complete only when All AI are Dead"; + action = "['allUnitsKilled'] call blck3DEN_fnc_setCompletionMode;"; + value = "allUnitsKilled"; + }; + class playerNear + { + text = "Player near mission center"; + toolTip = "MIssion is Complete when a player reaches the mission center"; + action = "['playerNear'] call blck3DEN_fnc_setCompletionMode;"; + value = "playerNear"; + }; + class allKilledOrPlayerNear + { + text = "Units Dead / Player @ Center"; + toolTip = "Mission is Complete when all units are dead or a player reaches mission center"; + action = "['allKilledOrPlayerNear'] call blck3DEN_fnc_setCompletionMode;"; + value = "allUnitsKilled"; + }; + + class lootSpawnTiming + { + text = "Set timing for spawning loot chests"; + items[] = { + "atMissionSpawnGround", + "atMissionSpawnAir", + "atMissionEndGround", + "atMissionEndAir" + }; + }; + class atMissionSpawnGround + { + text = "Crates are spawned on the ground at mission startup"; + action = "['atMissionSpawnGround'] call blck3DEN_fnc_spawnCratesTiming;"; + }; + class atMissionSpawnAir + { + text = "Crates are spawned in the air at mission startup"; + action = "['atMissionSpawnAir'] call blck3DEN_fnc_spawnCratesTiming;"; + }; + class atMissionEndGround + { + text = "Crates are spawned on the ground at mission completion"; + action = "['atMissionEndGround'] call blck3DEN_fnc_spawnCratesTiming;"; + }; + class atMissionEndAir + { + text = "Crates are spawned in the air at mission completion"; + action = "['atMissionEndAir'] call blck3DEN_fnc_spawnCratesTiming;"; + }; + + class loadCratesTiming + { + text = "Set timing for loading crates"; + items[] = { + "atMissionSpawn", + "atMissionCompletion" + }; + }; + class atMissionSpawn + { + text = "Load crates when the mission spawns"; + action = "['atMissionSpawn'] call blck3DEN_fnc_loadCratesTiming"; + }; + class atMissionCompletion + { + text = "Load crates when the mission is complete"; + action = "['atMissionCompletion'] call blck3DEN_fnc_loadCratesTiming"; + }; + + ///////////////////////////// + class blckMissionMessages + { + text = "Set timing for loading crates"; + items[] = { + "blckStartMessage", + "blckEndMessage" + }; + }; + class blckStartMessage + { + text = "Misstion Start Message"; + //action = "edit3DENMissionAttributes 'MissionStartMsg';"; + }; + class blckEndMessage + { + text = "Mission End Message"; + //action = "edit3DENMissionAttributes 'MissionEndMsg';"; + }; + + ///////////////////////////// + class blckSaveStaticMission + { + text = "Save StaticMission"; + action = "call blck3DEN_fnc_exportStatic"; + picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; + }; + + class blckSaveDynamicMission + { + text = "Save Dynamic Mission"; + action = "call blck3DEN_fnc_exportDynamic"; + picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; + }; + + class Blck3EDENPluginHelp + { + text = "Help"; + action = "call blck3DEN_fnc_Help"; + //picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; + }; + + }; + }; + }; +}; + +/////////////////////////////////////////////////////////////////////////////// + +