diff --git a/@GMS_3EDEN/addons/3DEN_plugin.pbo b/@GMS_3EDEN/addons/3DEN_plugin.pbo index 9efded2..ca60465 100644 Binary files a/@GMS_3EDEN/addons/3DEN_plugin.pbo and b/@GMS_3EDEN/addons/3DEN_plugin.pbo differ diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Cfggms3DENDisplay-1.h b/@GMS_3EDEN/addons/3DEN_plugin/Cfggms3DENDisplay-1.h deleted file mode 100644 index 05792eb..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Cfggms3DENDisplay-1.h +++ /dev/null @@ -1,265 +0,0 @@ -#include "Core\gms3DEN_defines.hpp" - -// Include Eden Editor UI macros -// For attributes, you'll be interested in these: -// ATTRIBUTE_TITLE_W - title width -// ATTRIBUTE_CONTENT_W - content width -#include "\a3\3DEN\UI\macros.inc" - - -#include "Core\gms3DEN_defines.hpp" - -// Include Eden Editor UI macros -// For attributes, you'll be interested in these: -// ATTRIBUTE_TITLE_W - title width -// ATTRIBUTE_CONTENT_W - content width -#include "\a3\3DEN\UI\macros.inc" - -class Default; -class Title: Default; -{ - class Controls - { - class Title; - }; -}; -class Checkbox; -class ctrlMenuStrip; -class ctrlMenu; - -class display3DEN -{ - class Controls - { - class MenuStrip: ctrlMenuStrip - { - class Items - { - // Additions to the menu strip to export missions and seek help - // ************************************************************ - items[] += {"GMS_configure","GMS_export","GMS_support"}; - - /* - The menu for exporting missions is defined here - */ - class GMS_export { - items[]= { - "GMS_exportDynamic" - }; - text = "Export Mission"; - toolTip = "Export GMS Missions"; - }; - class GMS_exportDynamic { - text = "Export Mission"; - //toolTip = "Export Dynamic Mission"; - action = "call gms3DEN_fnc_exportDynamic"; - picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - - /* - menus for those seeking support are here - */ - class GMS_support { - items[] = { - "GMS_help", - "GMS_about" - }; - text = "Plugin Support"; - }; - class GMS_help { - text = "Help"; - action = "call gms3DEN_fnc_Help"; - //picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - class GMS_about { - text = "3EDEN Plugin Version 1.0 for GMS by Ghostrider-GRG-"; - action = "call blck3EDEN_fnc_about"; - }; - - - /* - All menus for configuring a GMS mission are defined here - */ - - class GMS_configure { - items[] = { - "GMS_difficulty", - "GMS_crateSpawn", - "GMS_lootSpawn", - "GMS_location_Respawns", - "GMS_MissionCompletionMode" - //"GMS_editMissionSettings" - }; - text = "Configure Mission"; - toolTip = "Adjust Mission Settings"; - }; - - class GMS_difficulty { - text = "Difficulty"; - toolTip = "Set Mission Difficulty"; - items[] = { - "GMS_difficultyBlue", - "GMS_difficultyRed", - "GMS_difficultyGreen", - "GMS_difficultyOrange" - }; - }; - class GMS_difficultyBlue - { - text = "Set Mission Difficutly to EASY (Blue)"; - action = "['Blue'] call gms3DEN_fnc_setDifficulty;"; - value = GMS_blue; - }; - class GMS_difficultyRed - { - text = "Set Mission Difficulty to MEDIUM (Red)"; - action = "['Red'] call gms3DEN_fnc_setDifficulty;"; - value = GMS_red; - }; - class GMS_difficultyGreen - { - text = "Set Mission Difficult To HARD (Green)"; - action = "['Green'] call gms3DEN_fnc_setDifficulty;"; - value = GMS_green; - }; - class GMS_difficultyOrange - { - text = "Set Mission Difficulty to Very HARD (Orange)"; - action = "['Orange'] call gms3DEN_fnc_setDifficulty;"; - value = GMS_orange; - }; - - class GMS_MissionCompletionMode - { - text = "Set the Criterial for Mission Completion"; - items[] = { - "GMS_playerNear", - "GMS_allUnitsKilled", - "GMS_allKilledOrPlayerNear", - "GMS_assetSecured" - }; - }; - class GMS_allUnitsKilled - { - text = "All AI Dead"; - toolTip = "Mission is complete only when All AI are Dead"; - action = "['allUnitsKilled'] call gms3DEN_fnc_setCompletionMode;"; - value = allUnitsKilled; - }; - class GMS_playerNear - { - text = "Player near mission center"; - toolTip = "MIssion is Complete when a player reaches the mission center"; - action = "['playerNear'] call gms3DEN_fnc_setCompletionMode;"; - value = playerNear; - }; - class GMS_allKilledOrPlayerNear - { - text = "Units Dead / Player @ Center"; - toolTip = "Mission is Complete when all units are dead or a player reaches mission center"; - action = "['allKilledOrPlayerNear'] call gms3DEN_fnc_setCompletionMode;"; - value = allKilledOrPlayerNear; - }; - class GMS_assetSecured - { - text = "Asset Secured"; - toolTip = "Mission is Complete when the asset is secured"; - action = "[assetSecured] call gms3DEN_fnc_setCompletionMode;"; - value = allKilledOrPlayerNear; - }; - class GMS_location_Respawns - { - text = "Set Mission Spawns (static vs random)"; - //action = "edit3DENMissionAttributes 'setAsStaticMission'"; - items[] = { - "GMS_dynamicMission", - "GMS_staticMission" - }; - }; - class GMS_dynamicMission - { - text = "Configure as Dynamic Mission"; - action = "['dynamic'] call gms3DEN_fnc_setSpawnLocations"; - }; - class GMS_staticMission - { - text = "Configure Static Mission"; - action = "['static'] call gms3DEN_fnc_setSpawnLocations"; - }; - class GMS_crateSpawn { - text = "Set When Crates Spawn"; - toolTip = "Set when crates are spawned"; - items[] = { - "GMS_atMissionSpawnGround", - "GMS_atMissionSpawnAir", - "GMS_atMissionEndGround", - "GMS_atMissionEndAir" - }; - }; - class GMS_atMissionSpawnGround - { - text = "At Spawn Ground"; - toolTip = "Crates are spawned on the ground at mission startup"; - action = "['atMissionSpawnGround'] call gms3DEN_fnc_spawnCratesTiming;"; - }; - class GMS_atMissionSpawnAir - { - text = "At Spawn Air"; - toolTip = "Crates are spawned in the air at mission startup"; - action = "['atMissionSpawnAir'] call gms3DEN_fnc_spawnCratesTiming;"; - }; - class GMS_atMissionEndGround - { - text = "At End Ground"; - toolTip = "Crates are spawned on the ground at mission completion"; - action = "['atMissionEndGround'] call gms3DEN_fnc_spawnCratesTiming;"; - }; - class GMS_atMissionEndAir - { - text = "At End Air"; - toodTip = "Crates are spawned in the air at mission completion"; - action = "['atMissionEndAir'] call gms3DEN_fnc_spawnCratesTiming;"; - }; - - class GMS_lootSpawn { - text = "Set timing for loading crates"; - items[] = { - "GMS_atMissionSpawn", - "GMS_atMissionCompletion" - }; - }; - class GMS_atMissionSpawn - { - text = "At Spawn"; - toolTip = "Load crates when the mission spawns"; - action = "['atMissionSpawn'] call gms3DEN_fnc_setLoadCratesTiming"; - }; - class GMS_atMissionCompletion - { - text = "At Completion"; - toolTip = "Load crates when the mission is complete"; - action = "['atMissionCompletion'] call gms3DEN_fnc_setLoadCratesTiming"; - }; - - class GMS_static { - text = "Set if Mission is Static/Dynamic"; - toolTip = "Toggle between static and random mission locations"; - items[] = { - "GMS_setToDynamic", - "GMS_setToStatic" - }; - }; - class GMS_setToDynamic { - text = "Dynamic"; - toolType = "Set mission to be spawned at random location"; - action = "['dynamic'] call gms3DEN_fnc_toggleStaticSpawns"; - }; - class GMS_setToStatic { - text = "Static"; - toolTip = "Set mission to respawn at the same location each time"; - action = "['static'] call gms3DEN_fnc_toggleStaticSpawns"; - }; - }; - }; - }; -}; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf index 41f360b..66f120e 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf +++ b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf @@ -3,13 +3,38 @@ By Ghostrider-GRG- Copyright 2020 */ -params["_u",["_category","House"]]; -private _pos = getPosASL _u; -private _building = objNull; -private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10]; -private _surfacesBelow = lineIntersectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 100],_u,_u,true,10]; -{ - if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)}; -} forEach _surfacesAbove + _surfacesbelow; -diag_log format["_buildingContainer: _u = %1| _buildig = %2",_u,_building]; -_building + params["_u",["_category","House"]]; + + diag_log format["_fn_buildingContainer: typeOf _u = %1", typeOf _u]; + private _pos = getPosASL _u; + private _building = objNull; + // lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique] + /* + Wiki page: https://community.bistudio.com/wiki/lineIntersectsSurfaces + + Return Value + Array of intersections in format [[intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf], ...] where: + + intersectPosASL: PositionASL - the actual position where line intersects surface + surfaceNormal: Vector - a normal to the intersected surface + intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain + parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain + Arma 3 logo black.png + 2.10 + selectionNames: Array of Strings - Names of the intersected selections (bones). Returns [] if there is no intersection with a selection. + Arma 3 logo black.png + 2.10 + pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns "" if surface has no special properties. Terrain surface properties begin with #, and the surface properties are defined in CfgSurfaces. For example, if it returns #GdtVRsurface01, properties are defined in: configFile >> "CfgSurfaces" >> "GdtVRsurface01" + */ + private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,10,"VIEW","FIRE",true]; + private _surfacesBelow = lineIntersectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 100],_u,_u,true,10,"VIEW","FIRE",true]; + diag_log format["fn_buildingContainer: _surfacesAbove = %1", _surfacesAbove]; + diag_log format["fn_buildingContainer: _surfacesBelow = %1", _surfacesBelow]; + private _buildingAbove = if !(_surfacesAbove isEqualTo []) then {_surfacesAbove select 0 select 2} else {objNull}; + private _buildingBelow = if !(_surfacesBelow isEqualTo []) then {_surfacesBelow select 0 select 2} else {objNull}; + diag_log format["fn_buildingContainer: _buildingAbove = %1",_buildingAbove]; + diag_log format["fn_buildingContainer: _buildingBelow = %1",_buildingBelow]; + + if (!(isNull _buildingAbove) && _buildingAbove isKindOf "Building") then {_building = _buildingAbove} else {if (!(isNull _buildingBelow) && _buildingBelow isKindOf "Building") then {_building = _buildingBelow}}; + diag_log format["fn_buldingContainer: _building = %1",_building]; + _building \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic copy.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic copy.sqf deleted file mode 100644 index a25182d..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic copy.sqf +++ /dev/null @@ -1,558 +0,0 @@ -/* - GMS 3DEN Editor Plugin - by Ghostrider-GRG- - Copyright 2020 - -*/ -#include "gms3DEN_defines.hpp" -private _m = "Staring exportDynamic.sqf"; -systemChat _m; -diag_log _m; -Mission_CENTER = [0,0,0]; -#define oddsOfGarrison 0.67 -#define maxGarrisonUnits 4 -GMS_objectAtMissionCenter = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "objectAtMissionCenter"); -GMS_minAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "minAI"); -GMS_maxAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxAI"); -GMS_minPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "minPatroRadius"); -GMS_maxPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxPatrolRadius"); -GMS_maxVehiclePatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxVehiclePatrolRadius"); -GMS_aircraftPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "aircraftPatrolRadius"); -GMS_garisonMarkerObject = "Sign_Sphere100cm_F"; -GMS_oddsOfGarison = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "oddsOfGarison"); -GMS_maxGarrisonStatics = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxGarrisonStatics"); -GMS_typesGarrisonStatics = getArray(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "typesGarrisonStatics"); -GMS_lootVehicleVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "lootVehicleVariableName"); -GMS_buildingPosGarrisonVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "buildingPosGarrisonVariableName"); -GMS_buildingATLGarrisionVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "buildingATLGarrisionVariableName"); - -/* - Set Default Values Where not Defined using Menu Commands -*/ -if (isNil "GMS_missionLocations") then -{ - GMS_missionLocations = "random"; -}; -if (isNil "GMS_difficulty") then -{ - GMS_difficulty = "Red"; -} else { - diag_log format["Line 36: typeName GMS_difficulty = %1 | GMS_difficulty = %2",typeName GMS_difficulty, GMS_difficulty]; - if (GMS_difficulty in [1,2,3,4]) then - { - GMS_difficulty = ["Blue","Red","Green","Orange"] select GMS_difficulty; - }; - diag_log format["Line 41: typeName GMS_difficulty = %1 | GMS_difficulty = %2",typeName GMS_difficulty, GMS_difficulty]; -}; -if (isNil "GMS_dynamicStartMessage") then -{ - GMS_dynamicStartMessage = "TODO: Change approiately"; -}; -if (isNil "GMS_dynamicEndMessage") then -{ - GMS_dynamicEndMessage = "TODO: Change Appropriately"; -}; -if (isNil "GMS_dynamicCrateLoot") then -{ - GMS_dynamicCrateLoot = format["_crateLoot = blck_BoxLoot_%1;",GMS_difficulty]; -}; -if (isNil "GMS_dynamicCrateLootCounts") then { - GMS_dynamicCrateLootCounts = format["_lootCounts = bGMS_lootCounts%1;",GMS_difficulty]; -}; -if (isNil "GMS_dynamicmarkerMissionNamet") then -{ - GMS_dynamicmarkerMissionName = "TODO: Update appropriately"; -}; -if (isNil "GMS_spawnCratesTiming") then -{ - GMS_spawnCratesTiming = "atMissionStartGround"; -}; -if (isNil "GMS_loadCratesTiming") then -{ - GMS_loadCratesTiming = "atMissionStart"; -}; -if (isNil "GMS_missionEndCondition") then -{ - GMS_missionEndCondition = "allUnitsKilled"; -}; -switch (GMS_missionEndCondition) do -{ - case "GMS_playerNear": {GMS_missionEndCondition = playerNear}; - case "GMS_allUnitsKilled": {GMS_missionEndCondition = allUnitsKilled}; - case "GMS_allKilledOrPlayerNear": {GMS_missionEndCondition = allKilledOrPlayerNear}; - case "GMS_assetSecured": {GMS_missionEndCondition = assetSecured}; -}; - -/* - Look for an object defined in Cfggms3DEN \ configs \ that marks the center of the mission - and set the coords of the center if such an object is found -*/ -all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"]; - -// Relax what is an object at mission center somehow? -// Maybe using inheritsFrom? -diag_log format["exportDynamic line 90: GMS_objectAtMissionCenter = %1",GMS_objectAtMissionCenter]; -private _centerMarkerObject = objNull; -{ - diag_log format["exportDynamic: evaluating objects for one that is to set mission center where the object is of typeOf %1", typeOf _x]; - if ((typeOf _x) isEqualTo GMS_objectAtMissionCenter) exitwith - { - _centerMarkerObject = _x; - diag_log format["exportDynamic Line 97: _x = %1 | _centerMarkerObject = %2", _x, _centerMarkerObject]; - }; -} forEach _objects; - -diag_log format["Line 100: _centerMarkerObject = %1 | GMS_objectAtMissionCenter = %2",_centerMarkerObject, GMS_objectAtMissionCenter]; - -if !(isNull _centerMarkerObject) then -{ - private _objPos = (_centerMarkerObject get3DENAttribute "position") select 0; - private _objType = typeOf _centerMarkerObject; - Mission_CENTER = _objPos; - diag_log format["CENTER defined by object %1 typeOf %2 located at %3",_obj,_objType,_objPos]; -} else { - diag_log format[" No object marking the center of the mission was found: using an object defined in 'objectAtMissionCenter' 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["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"]; -/* - pull info on the first marker found - If Mission_CENTER was not set above then try to set it based on the first marker identified. -*/ - -if (_markers isEqualTo []) then -{ - diag_log "No Marker Found, no Marker Definitions Will Be generated"; -} else { - private _m1 = _markers select 0; - _markerPosition = (_m1 get3DENAttribute "Position") select 0; // Returns expected value - _markerText = (_m1 get3DENAttribute "Text") select 0; // Returns expected value - _markerColor = (_m1 get3DENAttribute "baseColor") select 0; //Returns Null - _markerShape = (_m1 get3DENAttribute "markerType") select 0; // Returns [-1] if not a rectangular or elipsoid marker] - _markerAlpha = _m1 get3DENAttribute "alpha"; - _markerType = (_m1 get3DENAttribute "itemClass") select 0; // Returns "" if not an icon type marker - _markerBrush = (_m1 get3DENAttribute "brush") select 0; - _markerSize = (_m1 get3DENAttribute "size2") select 0; - _markerRotation = (_m1 get3DENAttribute "rotation") select 0; - - /* - use the coordinates of that marker as mission center of no object demarkating the center is found - */ - if (Mission_CENTER isEqualTo [0,0,0]) then { - Mission_CENTER = _markerPosition; - diag_log format["Position of marker %1 used for position of CENTER = %2",_m,Mission_CENTER]; - }; - if (count _markers > 1) then - { - diag_log format[" More than one marker was found; only the first marker was processed"]; - }; -}; - -_m = format["Line 152: Mission_CENTER = %1",Mission_CENTER]; -systemChat _m; -diag_log _m; - -diag_log format["Line 156: _objects = %1",_objects]; -GMS_defaultMissionLocations = if (toLower(missionNameSpace getVariable["GMS_missionSpawnMode","dynamic"]) isEqualTo "StaticWeapon") then {Mission_Center} else {[]}; -diag_log format["Line 161: GMS_defaultMissionLocations = %1",GMS_defaultMissionLocations]; -GMS_simpleObjects = []; -GMS_uavs = []; -GMS_ugvs = []; -_tanks = []; -GMS_carsTrucks = []; -GMS_submersibles = []; -GMS_aircraft = []; -GMS_boats = []; -GMS_carsTrucks = []; -GMS_turrets = []; -GMS_buildings = []; -GMS_landscape = []; -GMS_crates = []; -GMS_garrisonGroups = []; -GMS_infantryGroups = []; -GMS_garrisonATL = []; -GMS_missionLandscape = []; - -// Remove any groups that were assigned to vehicles or turrets as the mission system will add these. - -private _countGroups = count _groups; -private _totalGroups = count _groups; -private _groupsProcessed = 0; -private _totalObjectsCount = count _objects; -private _objectsProcessed = 0; - -// Run through objects and move any turrents to a separate array. -for "_i" from 1 to (count _objects) do -{ - if (_i > (count _objects)) exitWith {}; - private _obj = _objects deleteAt 0; - if (_obj isKindOf "StaticWeapon") then - { - GMS_turrets pushBack _obj; - diag_log format["exportDynamic Line 197: adding object %1 to GMS_turrets",_obj]; - } else { - _objects pushBack _obj; - }; -}; - -// Run through Objects and remove any vehicles (land, air or sea), ammo crates or simple objects -for "_i" from 1 to (count _objects) do -{ - if (_i > (count _objects)) exitWith {}; - private _obj = _objects deleteAt 0; - private _processed = false; - if ((_obj get3DENAttribute "objectIsSimple") select 0 && !_processed) then { - GMS_simpleObjects pushBack _obj; - diag_log format["exportDynamic Line 242: adding %1 to _simpleObjects | _simpleObjects = %2",typeOf _obj, GMS_simpleObjects]; - _processed = true; - }; - private _vehicleClass = getText(configFile >> "CfgVehicles" >> typeOf _obj >> "vehicleclass"); - diag_log format["exportDynamic Line 210: typeOf _obj %1 | _vehicleClass %1",typeOf _obj, _vehicleclass]; - if ((_obj isKindOf "Car" || _obj isKindOf "Tank") && !_processed) then - { - // vehicleClass = "Autonomous"; - if (_vehicleClass isEqualTo "Autonomous") then - { - diag_log format["exportDynamic Line 211: object %1 added to GMS_ugvs",_obj]; - GMS_ugvs pushBack _obj; - } else { - diag_log format["exportDynamic Line 213: object %1 added to GMS_carsTrucks",_obj]; - GMS_carsTrucks pushBack _obj; - }; - _processed = true; - }; - if (_obj isKindOf "Air" && !_processed) then - { - if (_vehicleClass isEqualTo "Autonomous") then - { - diag_log format["exportDynamic Line 228: object %1 added to GMS_uavs",_obj]; - GMS_uavs pushBack _obj; - } else { - GMS_aircraft pushBack _obj; - }; - _processed = true; - }; - if (_obj isKindOf "Ship" && !_processed) then - { - if (toLower (_vehicleClass) isEqualTo "submarine") then - { - diag_log format["exportDynamice Line 237: object %1 added to GMS_submersibles",_obj]; - GMS_submersibles pushBack _obj; - } else { - diag_log format["exportDynamic Line 240: object %1 added to GMS_carsTrucks",_obj]; - GMS_carsTrucks pushBack _obj; - }; - _processed = true; - }; - if (_obj isKindOf "FloatingStructure_F" && !_processed) then { - GMS_landscape pushBack _obj; - diag_log format["exportDynnamic case of FloatingStructure Line 247: adding %1 | type of %2 to GMS_landscape",_obj, typeOf _obj]; - _processed = true; - }; - if (_obj isKindOf "Items_base_F" && !_processed) then { - diag_log format["exportDynamic case of thing isKindOf Items_base_F line 253 - adding object %1 to GMS_landscape",_obj]; - GMS_landscape pushBack _obj; - _processed = true; - }; - if (_obj isKindOf "ReammoBox_F" && !_processed) then { - if (_obj isKindOf "VirtualReammoBox_F") then { - diag_log format["exportDynamic case of thing isKindOf VirtualReammoBox_F line 258 - adding object %1 to GMS_landscape",_obj]; - GMS_landscape pushBack _obj; - _processed = true; - } else { - diag_log format["exportDynamic case of thing isKindOf ReammoBox line 263 - adding object %1 to GMS_crates",_obj]; - GMS_crates pushBack _obj; - _processed = true; - }; - }; - if (_obj isKindOf "Static" && !_processed) then { - diag_log format["exportDynamic case of static is typeOf %1 line 282 - adding object to GMS_landscape",typeOf _obj]; - GMS_landscape pushBack _obj; - _processed = true; - }; - - // if !_process then the object did not qualify for any of these and should be added back to the list for further processing - if !(_processed) then {_objects pushBack _obj}; -}; - -// Run through the buildings first to pull out and properly position any groups or turrets inside them. -for "_i" from 1 to (count _objects) do -{ - if (_i > (count _objects)) exitWith {}; - if (_obj isKindOf "Building") then - { - diag_log format["exportDynamic case of Building with _obj = %1 | typeOf _obj = %2",_obj, typeOf _obj]; - private _isGarrisoned = false; - // Search for any turrets located within the building - private _turretsATL = []; - for "_i" from 1 to (count GMS_turrets) do - { - if (_i > (count GMS_turrets)) exitWith {}; - private _tur = GMS_turrets deleteAt 0; - if [_tur] call gms3DEN_fnc_isInside then - { - _isGarrisoned = true; - _turretsATL pushBack _tur; - }; - }; - diag_log format["exportDynamic %1 turrets found in _obj %2",count _turretsATL,_obj]; - - private _groupsATL = []; - for "_i" from 1 to (count _groups) do - { - if (_i > (count _groups)) exitWith {}; - private _grp = _groups deleteAt 0; - private _inside = false; - { - if ([_x] call gms3DEN_fnc_isInside) then {_inside = true}; - if (_inside) exitWith {}; - } forEach (units _grp); - if (_inside) then {_groupsATL pushBack _grp}; - }; - diag_log format["exportDynamic %1 groups found in _obj %2",count _groupsATL,_obj]; - - if (_turretsATL isEqualTo [] && _groupsATL isEqualTo []) then - { - diag_log format["exportDynamic: no garrison found for %1, addiing it to GMS_buildings",_obj]; - GMS_buildings pushBack _obj; - } else { - private _gar = [_obj, _turretsATL, _groupsATL] call gms3DEN_fnc_configureGarrisonATL; - diag_log format["exportDynamic: garrison found for %1, adding configs for it to GMS_garrisonATL",_obj]; - diag_log format["exportDynamice: usiing the folloing config: %1",_gar]; - GMS_garrisonATL pushBack _gar; - }; - _objectsProcessed = _objectsProcessed + 1; - }; -}; - -// setup an array with any static weapons not placed in buildings -for "_i" from 1 to (count _objects) do -{ - if (_objects isEqualTo []) exitWith {}; - private _obj = _objects deleteAt 0; - if (_obj isKindOf "StaticWeapon") then { - GMS_turrets pushBack _obj; - diag_log format["exportDynamic case of StaticWeapon Line 241: adding %1 to GMS_turrets", typeOf _obj]; - } else { - _objects pushBack _obj; - }; -}; - -// At this point we can assume that any groups left in _groups is neither in a vehicle nor inside a building so just do the assignment of the global variable -// without scanning for where each group is. - -GMS_groups = _groups; -_groupsProcess = _groupsProcessed + (count _groups); - -// Do some housekeeping - logging the output so far. -{ - private _var = missionNameSpace getVariable[_x,[]]; - diag_log format["Line 364: _var %1 | count %2 | values %3",_x,count _var,_var]; -} forEach["GMS_crates","GMS_landscape","GMS_buildings","GMS_turrets","GMS_carsTrucks","GMS_boats","GMS_aircraft","GMS_simpleObjects","GMS_groups","GMS_uavs","GMS_ugvs"]; - -GMS_missionSimpleObjects = []; -{ - GMS_missionSimpleObjects pushBack format[' ["%1",%2,%3]', - (_x get3DENAttribute "ItemClass") select 0, - ((_x get3DENAttribute "position") select 0) vectorDiff Mission_CENTER, - ((_x get3DENAttribute "rotation") select 0) select 2 - ]; - diag_log format["_object = %1",_object]; -} forEach GMS_simpleObjects; -diag_log format["Line 425: GMS_simpleObjects -> count %1 | contents %2",count GMS_simpleObjects,GMS_simpleObjects]; - -/* -private _missionLootVehicles = []; -private _lootVehicles = _objects select { - ((typeOf _x) isKindOf "AllVehicles") && - !((typeOf _x) isKindOf "Man") && - (_x getVariable["lootvehicle",false]) -}; - -diag_log format["_lootVehicles = %1",_lootVehicles]; -{ - _missionLootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x]; -} forEach _lootVehicles; -*/ - - -GMS_missionPatrolVehicles = []; -{ - GMS_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; -}forEach GMS_carsTrucks + GMS_ugvs; -diag_log format["Line 446: GMS_missionPatrolVehicles -> count %1 | contents %2",count GMS_missionPatrolVehicles,GMS_missionPatrolVehicles]; - -GMS_subPatrols = []; -{ - GMS_subPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; -} forEach GMS_submersibles; -diag_log format["Line 452: count GMS_submersibles = %1 | GMS_submersibles = %2",count GMS_submersibles, GMS_submersibles]; - -GMS_airPatrols = []; -{ - GMS_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; -} forEach GMS_aircraft + GMS_uavs; -diag_log format["Line 452: count GMS_airPatrols = %1 | GMS_airPatrols = %2",count GMS_airPatrols, GMS_airPatrols]; - -GMS_staticWeapons = []; -{ - GMS_staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; -} forEach GMS_turrets; -diag_log format["Line 375: GMS_staticWeapons -> count %1 | contents %2",count GMS_staticWeapons,GMS_staticWeapons]; - -diag_log format["Line 392: count GMS_groups = %1 | GMS_groups = %2",count GMS_groups,GMS_groups]; -GMS_infantryGroups = []; -GMS_scubaGroups = []; -{ - _unit = leader _x; - if (_surfaceIsWater) then { - diag_log format["Line 472: adding group %1 to GMS_scubaGroups",_x]; - GMS_scubaGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,blck_minAI,blck_maxAI,GMS_difficulty]; - } else { - diag_log format["Line 475: adding group %1 to GMS_infantryGroups",_x]; - GMS_infantryGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,blck_minAI,blck_maxAI,GMS_difficulty]; - }; -} forEach GMS_groups; -diag_log format["Line 479: GMS_infantryGroups -> count %1 | contents %2",count GMS_infantryGroups,GMS_infantryGroups]; -diag_log format["Line 480: GMS_scubaGroups -> count %1 | contents %2",count GMS_scubaGroups,GMS_scubaGroups]; - -GMS_lootContainers = []; -{ - diag_log format["Line 484: adding %1 to GMS_lootContainers",_x]; - GMS_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER, '_crateLoot','_lootCounts',getDir _x]; -}forEach GMS_crates; -diag_log format["Line 487: GMS_lootContainers -> count %1 | contents %2",count GMS_lootContainers,GMS_lootContainers]; - -GMS_objectsToSpawn = []; -{ - diag_log format["Line 442: adding %1 to GMS_objectsToSpawn",_x]; - GMS_objectsToSpawn pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; -} forEach GMS_landscape; - -diag_log format["exportDynamic Line 489: all data organized, formating text output"]; -private _lines = []; -private _lineBreak = toString [10]; - -_lines pushBack "/*"; -_lines pushBack " Dynamic Mission Generated"; -_lines pushBack " Using 3DEN Plugin for blckeagls"; -_lines pushBack format[" %1",['dynamic'] call gms3DEN_fnc_versionInfo]; -_lines pushBack " By Ghostrider-GRG-"; -_lines pushBack "*/"; -_lines pushBack ""; - -//GMS_missionLocations -switch (GMS_missionLocations) do -{ - case 'random': {GMS_defaultMissionLocations = []}; - case 'fixed': {GMS_defaultMissionLocations = [Mission_CENTER]}; -}; -_lines pushBack '#include "\GMS\Compiles\Init\GMS_defines.hpp"'; -_lines pushBack '#include "\GMS\Missions\GMS_privateVars.sqf" '; -_lines pushBack ""; -_lines pushBack format["_defaultMissionLocations = %1;",GMS_defaultMissionLocations]; -_lines pushBack format["_maxMissionRespawns = -1; // Chage this to either zero for no respawns or a positive number if you want to limit the number of times a mission spawns at the same location"]; - -if (_markerType isEqualTo "") then -{ - _markerType = ["rectangle","elipse"] select _markerShape; -}; -_lines pushBack format["_markerType = %1",format['["%1",%2,"%3"];',_markerType,_markerSize,_markerBrush]]; -_lines pushBack format['_markerColor = "%1";',_markerColor]; - -_lines pushBack format['_startMsg = "%1";',GMS_dynamicStartMessage]; -_lines pushBack format['_endMsg = "%1";',GMS_dynamicEndMessage]; -_lines pushBack format['_markerMissionName = "%1";',_markerText]; -_lines pushBack format['_crateLoot = GMS_BoxLoot_%1;',GMS_difficulty]; -_lines pushBack format['_lootCounts = GMS_lootCounts%1;',GMS_difficulty]; -_lines pushBack ""; -_lines pushBack "_garrisonedBuilding_ATLsystem = ["; -_lines pushBack (GMS_garrisonATL joinString (format[",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionLandscape = ["; -_lines pushback (GMS_objectsToSpawn joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_simpleObjects = ["; -_lines pushback (GMS_missionSimpleObjects joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionLootVehicles = ["; -_lines pushBack (GMS_missionLootVehicles joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionPatrolVehicles = ["; -_lines pushback (GMS_missionPatrolVehicles joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_submarinePatrolParameters = ["; -_lines pushback (GMS_subPatrols joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_airPatrols = ["; -_lines pushback (GMS_airPatrols joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionEmplacedWeapons = ["; -_lines pushback (GMS_staticWeapons joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionGroups = ["; -_lines pushback (GMS_infantryGroups joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_scubaGroupParameters = ["; -_lines pushback (GMS_scubaGroups joinString (format [",%1", _lineBreak])); -_lines pushBack "];"; -_lines pushBack ""; -_lines pushBack "_missionLootBoxes = ["; -_lines pushback (GMS_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 "*/"; -_lines pushBack format["_chanceHeliPatrol = GMS_chanceHeliPatrol%1;",GMS_difficulty]; -_lines pushBack format["_noChoppers = GMS_noPatrolHelis%1;",GMS_difficulty]; -_lines pushBack format["_missionHelis = GMS_patrolHelis%1;",GMS_difficulty]; -_lines pushBack format["_chancePara = GMS_chancePara%1;",GMS_difficulty]; -_lines pushBack format["_noPara = GMS_noPara%1;",GMS_difficulty]; -_lines pushBack format["_paraTriggerDistance = 400;"]; -//_lines pushBack format["_paraSkill = '%1';",0.7]; -_lines pushBack format["_chanceLoot = 0.0;"]; -_lines pushBack format["_paraLoot = GMS_BoxLoot_%1;",GMS_difficulty]; -_lines pushBack format["_paraLootCounts = GMS_lootCounts%1;",GMS_difficulty]; -_lines pushBack format['_missionLandscapeMode = "precise";']; -_linse pushBack "_useMines = GMS_useMines;"; -_lines pushBack "_uniforms = GMS_SkinList;"; -_lines pushBack "_headgear = GMS_headgear;"; -_lines pushBack "_vests = GMS_vests;"; -_lines pushBack "_backpacks = GMS_backpacks;"; -_lines pushBack "_sideArms = GMS_Pistols;"; -_lines pushBack format['_spawnCratesTiming = "%1";',GMS_spawnCratesTiming]; -_lines pushBack format['_loadCratesTiming = "%1";',GMS_loadCratesTiming]; -diag_log format["Line 520: typeName GMS_missionEndCondition = %1 | GMS_missionEndCondition = = %2",typeName GMS_missionEndCondition,GMS_missionEndCondition]; -_lines pushBack format['_endCondition = %1;', GMS_missionEndCondition]; -_lines pushBack format["_minNoAI = GMS_MinAI_%1;",GMS_difficulty]; -_lines pushBack format["_maxNoAI = GMS_MaxAI_%1;",GMS_difficulty]; -_lines pushBack format["_noAIGroups = GMS_AIGrps_%1;",GMS_difficulty]; -_lines pushBack format["_noVehiclePatrols = GMS_SpawnVeh_%1;",GMS_difficulty]; -_lines pushBack format["_noEmplacedWeapons = GMS_SpawnEmplaced_%1;",GMS_difficulty]; -_lines pushBack "_submarinePatrols = 0; // Default number of submarine patrols at pirate missions"; -_lines pushBack "_scubaPatrols = 0; // Default number of scuba diver patrols at pirate missions"; -_lines pushBack ""; - -_lines pushBack '#include "\GMS\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"; - -private _m = format["exportDynamic.sqf: reached line 367"]; -systemChat _m; -diag_log _m; -_m = "Exported Mission copied to clipboard"; -systemChat _m; -diag_log _m; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf index 2a26d5e..f01c6da 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf +++ b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf @@ -2,29 +2,16 @@ GMS 3DEN Editor Plugin by Ghostrider-GRG- Copyright 2020 - */ #include "gms3DEN_defines.hpp" private _m = "Staring exportDynamic.sqf"; systemChat _m; diag_log _m; Mission_CENTER = [0,0,0]; -#define oddsOfGarrison 0.67 -#define maxGarrisonUnits 4 GMS_objectAtMissionCenter = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "objectAtMissionCenter"); -GMS_minAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "minAI"); -GMS_maxAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxAI"); -GMS_minPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "minPatroRadius"); -GMS_maxPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxPatrolRadius"); -GMS_maxVehiclePatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxVehiclePatrolRadius"); -GMS_aircraftPatrolRadius = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "aircraftPatrolRadius"); -GMS_garisonMarkerObject = "Sign_Sphere100cm_F"; -GMS_oddsOfGarison = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "oddsOfGarison"); -GMS_maxGarrisonStatics = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxGarrisonStatics"); -GMS_typesGarrisonStatics = getArray(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "typesGarrisonStatics"); -GMS_lootVehicleVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "lootVehicleVariableName"); -GMS_buildingPosGarrisonVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "buildingPosGarrisonVariableName"); -GMS_buildingATLGarrisionVariableName = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "buildingATLGarrisionVariableName"); +if (isNil "GMS_minAI") then {GMS_minAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "minAI")}; +if (isNil "GMS_maxAI") then {GMS_maxAI = getNumber(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "maxAI")}; + /* Set Default Values Where not Defined using Menu Commands @@ -37,7 +24,6 @@ if (isNil "GMS_difficulty") then { GMS_difficulty = "Red"; } else { - diag_log format["Line 36: typeName GMS_difficulty = %1 | GMS_difficulty = %2",typeName GMS_difficulty, GMS_difficulty]; if (GMS_difficulty in [1,2,3,4]) then { GMS_difficulty = ["Blue","Red","Green","Orange"] select GMS_difficulty; @@ -45,7 +31,6 @@ if (isNil "GMS_difficulty") then if (GMS_difficulty isEqualTo "") then { GMS_difficulty isEqualTo "Red"; }; - diag_log format["Line 41: typeName GMS_difficulty = %1 | GMS_difficulty = %2",typeName GMS_difficulty, GMS_difficulty]; }; if (isNil "GMS_dynamicStartMessage") then { @@ -78,6 +63,10 @@ if (isNil "GMS_missionEndCondition") then { GMS_missionEndCondition = "allUnitsKilled"; }; +if (isNil "gms_chancemissionspawned") then +{ + gms_chancemissionspawned = 1.0; +}; switch (GMS_missionEndCondition) do { case "GMS_playerNear": {GMS_missionEndCondition = playerNear}; @@ -112,7 +101,7 @@ if !(isNull _centerMarkerObject) then private _objPos = (_centerMarkerObject get3DENAttribute "position") select 0; private _objType = typeOf _centerMarkerObject; Mission_CENTER = _objPos; - diag_log format["CENTER defined by object %1 typeOf %2 located at %3",_obj,_objType,_objPos]; + diag_log format["CENTER defined by object %1 typeOf %2 located at %3",_centerMarkerObject,_objType,_objPos]; } else { diag_log format[" No object marking the center of the mission was found: using an object defined in 'objectAtMissionCenter' 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"]; @@ -123,7 +112,7 @@ private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerT pull info on the first marker found If Mission_CENTER was not set above then try to set it based on the first marker identified. */ - +private _markerLabel = ""; private _centerSet = false; if !(_markers isEqualTo []) then { @@ -165,7 +154,6 @@ if (Mission_CENTER isEqualTo [0,0,0]) then { if (_markers isEqualTo []) then { _markerPosition = Mission_CENTER; - _markerLabel = ""; _markerText = ""; _markerColor = ""; _markerShape = "ELLIPSE"; @@ -177,62 +165,75 @@ if (_markers isEqualTo []) then }; private _markerMissionName = "TODO: Set this to an appropriate name"; - -diag_log format["Line 175: _markerType = %1",_markerType]; private _m = format["Line 152: Mission_CENTER = %1",Mission_CENTER]; -systemChat _m; -diag_log _m; -diag_log format["Line 156: _objects = %1",_objects]; -GMS_defaultMissionLocations = if (toLower(missionNameSpace getVariable["GMS_missionSpawnMode","dynamic"]) isEqualTo "StaticWeapon") then {Mission_Center} else {[]}; -diag_log format["Line 161: GMS_defaultMissionLocations = %1",GMS_defaultMissionLocations]; - -// Pull the list of Turrets out of _objects -GMS_staticWeapons = []; -GMS_turretsATL = []; -private _turrets = _objects select {_x isKindOf "StaticWeapon"}; -{ - private _obj = _x; - //private _isGarrison = _obj getVariable["gmsIsGarrison",false]; - private _isGarrison = _obj call gms3DEN_fnc_isInside; - diag_log format["_exportDynamic (188): for StaticWeapon _obj %` _isGarrison = %2",_obj,_isGarrison]; - if (_isGarrison) then { - GMS_turretsATL pushBack _obj; - } else { - GMS_staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; - }; -} forEach _turrets; - -diag_log format["Line 181: count GMS_staticWeapons = %1 | count GMS_turretsATL = %2",count GMS_staticWeapons, count GMS_turretsATL]; -diag_log format["Line 182: count _groups = %1",count _groups]; -GMS_units = []; -GMS_unitsATL = []; -{ - private _group = _x; - private _units = units _group; - { - private _unit = _x; - if (vehicle _unit isEqualTo _unit) then - { - //private _isGarrisoned = _unit getVariable["gmsIsGarrison",false]; - private _isGarrisoned = _unit call gms3DEN_fnc_isInside; - if (_isGarrisoned) then { - GMS_unitsATL pushBack _unit; - } else { - GMS_units pushBack _unit; - }; - }; - } forEach _units; - //GMS_units pushBack (units _x); -} forEach _groups; -diag_log format["Line 198: count GMS_units = %1 | count GMS_unitsATL = %2",count GMS_units, count GMS_unitsATL]; private _props = _objects select {!(_x isKindOf "ReammoBox_F") && (_x isKindOf "FloatingStructure_F" || _x isKindOf "Items_base_F" || _x isKindOf "Thing" || _x isKindOf "Static")}; -diag_log format["Line 201: count _props = %1",count _props]; -GMS_garrisonedBuildings = []; +GMS_staticWeapons = []; GMS_objectsToSpawn = []; GMS_missionSimpleObjects = []; -// Get list of garrisoned buildings based on their attributes +GMS_garrisonedBuildings = []; +GMS_unitsATL = []; +GMS_scubaGroups = []; +GMS_infantryGroups = []; +GMS_missionPatrolVehicles = []; +GMS_lootVehicles = []; +GMS_subPatrols = []; +GMS_ugvs = []; +GMS_uavs = []; + +/* Turrets First */ +private _allTurrets = _objects select {_x isKindOf "StaticWeapon"}; +{ + GMS_staticWeapons pushBack format[" %1, %2, %3, %4",typeOf _x, (getPosATL _x) vectorDiff Mission_CENTER, getDir _x, GMS_difficulty]; +} forEach _allTurrets; + +private _vehicles = _objects select {_x isKindOf "Car" || _x isKindOf "Tank" || _x isKindOf "Ship"}; +{ + private _obj = _x; + private _vehicleClass = getText(configFile >> "CfgVehicles" >> typeOf _obj >> "vehicleclass"); + private _isLoot = _obj getVariable["gmsIsLootVehicle",false]; + if (_isLoot) then + { + GMS_lootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _obj]; + } else { + if (_obj isKindOf "SDV_01_base_F") then { + GMS_subPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; + } else { + if (_vehicleClass isEqualTo "Autonomous") then + { + GMS_ugvs pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; + } else { + GMS_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; + }; + }; + }; +} forEach _vehicles; + +private _aircraft = _objects select {_x isKindOf "Air"}; +// Run through objects and format any for output +GMS_airPatrols = []; +{ + //_objects = _objects deleteAt (_objects find _x); + private _obj = _x; + private _vehicleClass = getText(configFile >> "CfgVehicles" >> typeOf _obj >> "vehicleclass"); + if (_vehicleClass isEqualTo "Autonomous") then { + GMS_uavs pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; + } else { + GMS_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; + }; +} forEach _aircraft; + +private _lootBoxes = _objects select {_x isKindOf "ReammoBox_F"}; +// Run through objects and put any Ammo Crates in a separate array +GMS_lootContainers = []; +{ + //_objects = _objects deleteAt (_objects find _x); + private _obj = _x; + GMS_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER, '_crateLoot','_lootCounts',getDir _obj]; +} forEach _lootBoxes; + +private _props = _objects select {(_x isKindOf "FloatingStructure_F" || _x isKindOf "Items_base_F" || _x isKindOf "Thing" || _x isKindOf "Static")}; { private _obj = _x; if (_obj get3DENAttribute "objectIsSimple" select 0) then { @@ -243,174 +244,88 @@ GMS_missionSimpleObjects = []; ((_obj get3DENAttribute "rotation") select 0) select 2 ]; } else { - private _isGarrison = _obj getVariable["gmsIsGarrison",false]; - diag_log format["_exportDynamic(207): for Object %1 typeOf %3 _isGarrison = %2",_obj,_isGarrison,getText(configFile >> "CfgVehicles" >> typeOf _obj >> "displayName")]; - private _turrets = []; - private _units = []; - { - private _building = [_x] call gms3DEN_fnc_buildingContainer; - diag_log format["Line 225: _obj = %1 | _building = %2", _obj,_building]; - if (_obj isEqualTo _building) then { - private _unit = _x; - private _pos = getPosATL _unit; - private _center = getPosATL _building; - private _offset = _pos vectorDiff _center; - private _dir = getDir _unit; - _units pushBack [_offset,_dir]; - }; - } forEach GMS_unitsATL; - diag_log format["Line 234: for building %1 located at %2 _units = %3",_building,getPos _building,_units]; - { - private _building = [_x] call gms3DEN_fnc_buildingContainer; - diag_log format["Line 225: _obj = %1 | _building = %2", _obj,_building]; - if (_obj isEqualTo _building) then { - private _tur = _x; - private _pos = getPosATL _tur; - private _dir = getDir _tur; - private _center = getPosATL _building; - private _offset = _center vectorDiff _pos; - _turrets pushBack [format['%1',typeOf _tur],_offset,_dir]; - }; - } forEach GMS_turretsATL; - diag_log format["Line 246: for building %1 located at %2 _turrets = %3",_building, getPos _building,_turrets]; - - if ((_turrets isEqualTo []) && (_units isEqualTo [])) then - { - /* - Treat this like an ordinary building - */ - private _allowDamage = (_obj get3DENAttribute "allowDamage") select 0; - private _enableSimulation = (_obj get3DENAttribute "enableSimulation") select 0; - diag_log format["_Line 278: _building %1 | _allowDamage %2 | _enableSimulation %3",_obj,_allowDamage,_enableSimulation] ; - GMS_objectsToSpawn pushBack format[' ["%1",%2,%3,[%4,%5]]', - typeOf _obj, - (getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj, - _allowDamage, - _enableSimulation - ]; - } else { - /* - Treat this like a garrisoned building - */ - private _building = _obj; - private _allowDamage = (_building get3DENAttribute "allowDamage") select 0; - private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0; - diag_log format["Line 249: _building %1 | damage %2 | simulation %3",_allowDamage,_enableSimulation]; - _buildingGarrisonATL = [ - format["%1", - typeOf _building], - getPosATL _building, - getDir _building, - _allowDamage, - _enableSimulation, - _turrets, - _units - ]; - GMS_garrisonedBuildings pushBack _buildingGarrisonATL; - diag_log format["Line 274: count ", count GMS_garrisonedBuildings, [_buildingGarrisonATL,_configuredStatics,_configuredUnits]]; - }; + private _allowDamage = (_obj get3DENAttribute "allowDamage") select 0; + private _enableSimulation = (_obj get3DENAttribute "enableSimulation") select 0; + GMS_objectsToSpawn pushBack format[' ["%1",%2,%3,[%4,%5]]', + typeOf _obj, + (getPosATL _obj) vectorDiff Mission_CENTER, + getDir _obj, + _allowDamage, + _enableSimulation + ]; }; } forEach _props; -private _vehicles = _objects select {_x isKindOf "Car" || _x isKindOf "Tank" || _x isKindOf "Ship"}; -GMS_missionPatrolVehicles = []; -GMS_lootVehicles = []; -GMS_subPatrols = []; +private _men = []; +private _menInside = []; { - private _obj = _x; - private _isLoot = _obj getVariable["gmsIsLootVehicle",false]; - diag_log format["_exportDynamic (227): for LandVehicle %1 _isLoot = %2",_obj,_isLoot]; - if (_isLoot) then + private _group = _x; + private _units = units _group; + { + private _unit = _x; + private _onFoot = if (vehicle _unit isEqualTo _unit) then {true} else {false}; + private _isGarrisoned = _unit call gms3DEN_fnc_isInside; + private _isSurfaceWater = surfaceIsWater (getPosATL _unit); + if (_onFoot) then { - GMS_lootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _obj]; - } else { - if (_obj isKindOf "SDV_01_base_F") then { - GMS_subPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x]; + if (_isGarrisoned) then + { + GMS_unitsATL pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER, getDir _unit, GMS_difficulty]; } else { - GMS_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; + if (_isSurfaceWater) then { + GMS_scubaGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty]; + } else { + GMS_infantryGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty]; + }; }; }; -} forEach _vehicles; + } forEach _units; +} forEach _groups; -private _aircraft = _objects select {_x isKindOf "Air"}; -// Run through objects and format any for output -GMS_airPatrols = []; -{ - private _obj = _x; - GMS_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj]; -} forEach _aircraft; - -diag_log format["Line 254: GMS_difficulty = %1 | GMS_minAI = %2 | GMS_maxAI = %3", GMS_difficulty, GMS_minAI, GMS_maxAI]; -// Run through groups and sort them based on whether they still have units and if they are/are not in a building. -GMS_infantryGroups = []; -GMS_scubaGroups = []; -{ - private _unit = _x; - private _isInVehicle = if (vehicle _unit isEqualTo _unit) then {false} else {true}; - private _isSurfaceWater = surfaceIsWater (position _unit); - diag_log format["Line 261: _unit = %1 | _isInVehicle = %2 | _isSurfaceWater = %3",_unit, _isInVehicle, _isSurfaceWater]; - if !(_isInVehicle) then { - if (_isSurfaceWater) then { - GMS_scubaGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty]; - } else { - GMS_infantryGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty]; - }; - }; -} forEach GMS_units; - -diag_log format["_exportDynamic (288): count _objects = %1",count _objects]; // are there any objects left to process ? - -private _lootBoxes = _objects select {_x isKindOf "ReammoBox_F"}; -// Run through objects and put any Ammo Crates in a separate array -GMS_lootContainers = []; -{ - private _obj = _x; - GMS_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER, '_crateLoot','_lootCounts',getDir _obj]; -} forEach _lootBoxes; - -diag_log format["_exportDynamic (303): count _objects = %1",count _objects]; // did we capture them all? - -diag_log format["exportDynamic Line 489: all data organized, formating text output"]; private _lines = []; private _lineBreak = toString [10]; _lines pushBack "/*"; -_lines pushBack " Dynamic Mission Generated"; +_lines pushBack format[" %1 Mission Generated",GMS_missionSpawnMode]; _lines pushBack " Using 3DEN Plugin for GMS by Ghostrider"; _lines pushBack format[" %1",['dynamic'] call gms3DEN_fnc_versionInfo]; _lines pushBack " By Ghostrider-GRG-"; _lines pushBack "*/"; _lines pushBack ""; -//GMS_missionLocations -switch (GMS_missionLocations) do -{ - case 'random': {GMS_defaultMissionLocations = []}; - case 'fixed': {GMS_defaultMissionLocations = [Mission_CENTER]}; -}; +GMS_defaultMissionLocations = []; +if (GMS_missionSpawnMode isEqualTo "Static") then {GMS_defaultMissionLocations = Mission_CENTER}; + _lines pushBack '#include "\GMS\Compiles\Init\GMS_defines.hpp"'; _lines pushBack '#include "\GMS\Missions\GMS_privateVars.sqf" '; _lines pushBack ""; _lines pushBack format['_difficulty = "%1";',GMS_difficulty]; _lines pushBack format["_chanceMissionSpawned = %1;",GMS_chanceMissionSpawned]; _lines pushBack format["_defaultMissionLocations = %1;",GMS_defaultMissionLocations]; -_lines pushBack format["_maxMissionRespawns = -1; // Chage this to either zero for no respawns or a positive number if you want to limit the number of times a mission spawns at the same location"]; - -_lines pushBack format['_markerLabel = "%1";',_markerLabel]; -_lines pushBack format['_markerType = %1;',[_markerType,_markerSize,_markerBrush]]; -_lines pushBack format['_markerColor = "%1";',_markerColor]; -_lines pushBack format['_markerMissionName = "%1";',_markerMissionName]; - +_lines pushBack "_maxMissionRespawns = -1;"; _lines pushBack format['_startMsg = "%1";',GMS_dynamicStartMessage]; _lines pushBack format['_endMsg = "%1";',GMS_dynamicEndMessage]; -_lines pushBack format['_markerMissionName = "%1";',_markerText]; + +_lines pushBack format['_markerLabel = "%1";',_markerLabel]; +_lines pushBack format['_markerColor = "%1";',_markerColor]; +_lines pushBack format['_markerText = "%1";',_markerText]; +_lines pushBack format['_markerMissionName = "%1";',_markerMissionName]; + _lines pushBack format['_crateLoot = GMS_BoxLoot_%1;',GMS_difficulty]; _lines pushBack format['_lootCounts = GMS_lootCounts%1;',GMS_difficulty]; _lines pushBack ""; +_lines pushBack "/*"; +_lines pushBack " Depricated Variable Included for Backwards Compatibility with Existing Missions"; +_lines pushBack "*/"; _lines pushBack "_garrisonedBuilding_ATLsystem = ["; -_lines pushBack (GMS_garrisonedBuildings joinString (format[",%1", _lineBreak])); -_lines pushBack "];"; _lines pushBack ""; +_lines pushBack "];"; +_lines pushBack "/*"; +_lines pushBack " Depricated Variable Included for Backwards Compatibility with Existing Missions"; +_lines pushBack "*/"; +_lines pushBack "_garrisonedBuildings_BuildingPosnSystem = ["; +_lines pushBack ""; +_lines pushBack "];"; _lines pushBack "_missionLandscape = ["; _lines pushback (GMS_objectsToSpawn joinString (format [",%1", _lineBreak])); _lines pushBack "];"; @@ -427,6 +342,9 @@ _lines pushBack "_missionPatrolVehicles = ["; _lines pushback (GMS_missionPatrolVehicles joinString (format [",%1", _lineBreak])); _lines pushBack "];"; _lines pushBack ""; +_lines pushBack "_missionUGVs = ["; +_lines pushBack (GMS_ugvs joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; _lines pushBack "_submarinePatrolParameters = ["; _lines pushback (GMS_subPatrols joinString (format [",%1", _lineBreak])); _lines pushBack "];"; @@ -435,6 +353,9 @@ _lines pushBack "_airPatrols = ["; _lines pushback (GMS_airPatrols joinString (format [",%1", _lineBreak])); _lines pushBack "];"; _lines pushBack ""; +_lines pushBack "_missionUAVs = ["; +_lines pushBack (GMS_uavs joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; _lines pushBack "_missionEmplacedWeapons = ["; _lines pushback (GMS_staticWeapons joinString (format [",%1", _lineBreak])); _lines pushBack "];"; @@ -443,6 +364,10 @@ _lines pushBack "_missionGroups = ["; _lines pushback (GMS_infantryGroups joinString (format [",%1", _lineBreak])); _lines pushBack "];"; _lines pushBack ""; +_lines pushBack "_missionGarrisonedGroups = ["; +_lines pushBack (GMS_unitsATL joinString (format [",%1", _lineBreak])); +_lines pushBack "];"; +_lines pushBack ""; _lines pushBack "_scubaGroupParameters = ["; _lines pushback (GMS_scubaGroups joinString (format [",%1", _lineBreak])); _lines pushBack "];"; @@ -452,7 +377,7 @@ _lines pushback (GMS_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 " Use the parameters below to customize your mission - see the template or GMS_configs.sqf for details about each them"; _lines pushBack "*/"; _lines pushBack format["_chanceHeliPatrol = GMS_chanceHeliPatrol%1;",GMS_difficulty]; _lines pushBack format["_noChoppers = GMS_noPatrolHelis%1;",GMS_difficulty]; @@ -460,12 +385,12 @@ _lines pushBack format["_missionHelis = GMS_patrolHelis%1;",GMS_difficulty]; _lines pushBack format["_chancePara = GMS_chancePara%1;",GMS_difficulty]; _lines pushBack format["_noPara = GMS_noPara%1;",GMS_difficulty]; _lines pushBack format["_paraTriggerDistance = 400;"]; -//_lines pushBack format["_paraSkill = '%1';",0.7]; +_lines pushBack format["_paraSkill = %1;",0.7]; _lines pushBack format["_chanceLoot = 0.0;"]; _lines pushBack format["_paraLoot = GMS_BoxLoot_%1;",GMS_difficulty]; _lines pushBack format["_paraLootCounts = GMS_lootCounts%1;",GMS_difficulty]; _lines pushBack format['_missionLandscapeMode = "precise";']; -_linse pushBack "_useMines = GMS_useMines;"; +_lines pushBack "_useMines = GMS_useMines;"; _lines pushBack "_uniforms = GMS_SkinList;"; _lines pushBack "_headgear = GMS_headgear;"; _lines pushBack "_vests = GMS_vests;"; @@ -473,26 +398,20 @@ _lines pushBack "_backpacks = GMS_backpacks;"; _lines pushBack "_sideArms = GMS_Pistols;"; _lines pushBack format['_spawnCratesTiming = "%1;"',GMS_spawnCratesTiming]; _lines pushBack format['_loadCratesTiming = "%1;"',GMS_loadCratesTiming]; -diag_log format["Line 520: typeName GMS_missionEndCondition = %1 | GMS_missionEndCondition = = %2",typeName GMS_missionEndCondition,GMS_missionEndCondition]; _lines pushBack format['_endCondition = %1;', GMS_missionEndCondition]; _lines pushBack format["_minNoAI = GMS_MinAI_%1;",GMS_difficulty]; _lines pushBack format["_maxNoAI = GMS_MaxAI_%1;",GMS_difficulty]; _lines pushBack format["_noAIGroups = GMS_AIGrps_%1;",GMS_difficulty]; _lines pushBack format["_noVehiclePatrols = GMS_SpawnVeh_%1;",GMS_difficulty]; _lines pushBack format["_noEmplacedWeapons = GMS_SpawnEmplaced_%1;",GMS_difficulty]; -_lines pushBack "_submarinePatrols = 0; // Default number of submarine patrols at pirate missions"; -_lines pushBack "_scubaPatrols = 0; // Default number of scuba diver patrols at pirate missions"; +_lines pushBack "_submarinePatrols = 0;"; +_lines pushBack "_scubaPatrols = 0;"; _lines pushBack ""; - _lines pushBack '#include "\GMS\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"; -private _m = format["exportDynamic.sqf: reached line 367"]; -systemChat _m; -diag_log _m; _m = "Exported Mission copied to clipboard"; systemChat _m; -diag_log _m; \ No newline at end of file +diag_log _m; diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_initializeAttributes.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_initializeAttributes.sqf index 7e3a4c6..f705314 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_initializeAttributes.sqf +++ b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_initializeAttributes.sqf @@ -4,7 +4,7 @@ Copyright 2020 */ - +diag_log format["Initializing GMS_RC 3DEN Plugin %1",call gms3DEN_fnc_versionInfo]; GMS_difficulty = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "defaultMissionDifficulty"); diag_log format["configs returned defaultMissionDifficulty = %1",GMS_difficulty]; GMS_chanceMissionSpawned = 1.0; @@ -22,4 +22,7 @@ gms3DENGarrisonTexture = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> diag_log format["configs returned %1 as the color for garrisoned objects",gms3DENGarrisonTexture]; gms3DENlootVehicleTexture = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "colorLootObject"); diag_log format["configs returned %1 as the color for loot objects such as vehicles",gms3DENlootVehicleTexture]; -diag_log format["Mission Attributes Initialized for GMS at time %1",diag_tickTime]; \ No newline at end of file +gms3DEN_useGarrisonATL = false; +diag_log format["gms3DEN_useGarrisonATL set to default value of %1",gms3DEN_useGarrisonATL]; +GMS_missionSpawnMode = "Dynamic"; +diag_log format["Mission Attributes Initialized for GMS at time %1",diag_tickTime]; diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_isInside.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_isInside.sqf index 51cfbe5..b2707a1 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_isInside.sqf +++ b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_isInside.sqf @@ -6,7 +6,6 @@ */ params["_u"]; -diag_log format["fn_isInside: _u = %1",_u]; private _pos = getPosASL _u; private _above = AGLToASL [_pos select 0, _pos select 1, (_pos select 2) + 100]; @@ -14,6 +13,6 @@ private _below = AGLtoASL [_pos select 0, _pos select 1, (_pos select 2) - 10]; private _objAbove = lineIntersects [_pos, _above, _u,_u]; private _objBelow = lineIntersects [_pos, _below, _u,_u]; private _isInside = if (_objAbove || _objBelow) then {true} else {false}; -diag_log format["fn_isInside: _u = %4 | _objAbove = %1 | _objBelow = %2 | _isInside %3",_objAbove,_objBelow,_isInside,_u]; + _isInside diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_toggleStaticSpawns.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_toggleStaticSpawns.sqf index ef436b4..6506cdb 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_toggleStaticSpawns.sqf +++ b/@GMS_3EDEN/addons/3DEN_plugin/Core/fn_toggleStaticSpawns.sqf @@ -1,6 +1,9 @@ params["_mode"]; -_m = format["GMS_missionSpawnMode set to %1",_mode]; -missionNameSpace setVariable["GMS_missionSpawnMode",_mode]; +GMS_missionSpawnMode = _mode; +_m = format["_toggleStaticSpawns: _mode = %1",_mode]; +diag_log _m; +systemChat _m; +_m = format["_toggleStaticSpawns: GMS_missionSpawnMode = %1",GMS_missionSpawnMode]; diag_log _m; systemChat _m; diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Static/pullMarkerInfo.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Static/pullMarkerInfo.sqf deleted file mode 100644 index a32417b..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Static/pullMarkerInfo.sqf +++ /dev/null @@ -1,45 +0,0 @@ -diag_log format["<< ---- START %1 ---- >>",diag_tickTime]; - -all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"]; -private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"]; -if (_markers isEqualTo []) then -{ - diag_log "No Marker Found, no Marker Definitions Will Be generated"; -} else { - private _m1 = _markers select 0; - diag_log format["_m1 = %1",_m1]; - _markerPosition = _m1 get3DENAttribute "Position"; // Returns expected value - _markerText = _m1 get3DENAttribute "Text"; // Returns expected value - _markerColor = _m1 get3DENAttribute "baseColor"; //Returns Null - _markerShape = (_m1 get3DENAttribute "markerType") select 0; // Returns [-1] if not a rectangular or elipsoid marker] - _markerAlpha = _m1 get3DENAttribute "alpha"; - _markerType = (_m1 get3DENAttribute "itemClass") select 0; // Returns "" if not an icon type marker - _markerBrush = _m1 get3DENAttribute "brush"; - _markerSize = _m1 get3DENAttribute "size2"; - _markerRotation = _m1 get3DENAttribute "rotation"; - diag_log format["typeName _markerType = %1 | markerType = %2 | typeName _markerShape = %3 | markerShape = %4", typeName _markerType, _markerType, typeName _markerShape, _markerShape]; - diag_log format["typeName _markerPosition = %1 | _markerPosition = %2 | typeName _markerRotation = %3 | _markerRotation = %4",typeName _markerPosition,_markerPosition,typeName _markerRotation,_markerRotation]; -}; - - /* - if (_markerShape == -1) then - { - // The marker is an icon - - } else { - _markerSize = _m1 get3DENAttribute "size2"; // Returns Null - _markerBrush = _m1 get3DENAttribute " brush"; - }; - - /* -_lines pushBack format["_markerPosition = %1",_markerPosition]; -_lines pushBack format["_markerText = %1",_markerText]; -_lines pushBack format["_markerColor = %1",_markerColor]; -_lines pushBack format["_markerType = %1", _markerType]; -_lines pushBack format["_markerShape = %1",_markerShape]; -_lines pushBack format["_markerAlpha = %1",_markerAlpha]; -_lines pushBack format["_markerBrush = %1",_markerBrush]; -_lines pushBack format["_markerSize = %1",_markerSize]; -_lines pushBack format["_markerRotation = %1",_markerRotation]; -*/ - */ \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Static/scanAttributes.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Static/scanAttributes.sqf deleted file mode 100644 index 1530fcd..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Static/scanAttributes.sqf +++ /dev/null @@ -1,9 +0,0 @@ - - -all3DENEntities params ["_objects"]; -{ - private _garrison = _x getVariable["gmsIsGarrison",false]; - _m = format["scanAttributes: object %1 | displayName %2 | _garrison %3",_x, getText(configFile >> "CfgVehicles" >> typeOf _x >> "displayName"), _garrison]; - systemChat _m; - diag_log _m; -} forEach _objects; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Static/setCenterAtPlayer.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Static/setCenterAtPlayer.sqf deleted file mode 100644 index 6db9def..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Static/setCenterAtPlayer.sqf +++ /dev/null @@ -1 +0,0 @@ -CENTER = getPos player; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/Static/template.sqf b/@GMS_3EDEN/addons/3DEN_plugin/Static/template.sqf deleted file mode 100644 index a691f02..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/Static/template.sqf +++ /dev/null @@ -1,81 +0,0 @@ -/* - 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_Green; -_lootCounts = bGMS_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" - -////////// -// Past the output of the script here - - -////////// -// The lines below define additional variables you may wish to configure. - - -// Change _useMines to true/false below to enable mission-specific settings. -_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; -_paraLoot = blck_BoxLoot_Blue; -_paraLootCounts = bGMS_lootCountsRed; // Throw in something more exotic than found at a normal blue mission. - -_spawnCratesTiming = GMS_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 = GMS_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 GMS_spawnCratesTiming = "atMissionSpawnGround" && GMS_loadCratesTiming = "atMissionSpawn" - // To spawn crates at mission start but load gear only after the mission is completed set GMS_spawnCratesTiming = "atMissionSpawnGround" && GMS_loadCratesTiming = "atMissionCompletion" - // To spawn crates on the ground at mission completion set GMS_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned. - // To spawn crates in the air and drop them by chutes set GMS_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned. -_endCondition = GMS_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear" - // Setting this in the mission file overrides the defaults -//_timeOut = -1; -#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf"; diff --git a/@GMS_3EDEN/addons/3DEN_plugin/To Do List b/@GMS_3EDEN/addons/3DEN_plugin/To Do List deleted file mode 100644 index 73ea1c3..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/To Do List +++ /dev/null @@ -1,39 +0,0 @@ - -Build 10 -Test that mission center is defined in the following cases: -- no marker and no object pre-identified as defining the mission center: works. -- no marker and an object pre-identified as defining the mission center: works. -- the mission marker is present with a text label -- the mission marker is present without a text label - -Build 11 -- reorganize and rename the Cfg Files in a way that makes more sense. Done. -- test that coding of static and random spawn positions is properly done: Done. -- Moved menus for mission configuration to the Attributes Menu - -Build 12. --Add option to set an attribute for loot vehicles. --Check that all necessary default configs are present and consistently spelled thorughout the code. - -Build 13 -Test that mission objects are added to proper arrays excluding units and garrisoned buildings. - -- wheeled vehicles: working -- tracked vehicles other than tanks: working -- tanks: working -- helis and planes: working -- surface vessels: working -- subs: working -- turrets - working for turrets outisde of any structure. - -- loot crates -- simple objects -- anything that is not a building (landscape) -- everything that is a building - - -Long-term TODO: - - - - diff --git a/@GMS_3EDEN/addons/3DEN_plugin/To Do List copy b/@GMS_3EDEN/addons/3DEN_plugin/To Do List copy deleted file mode 100644 index 6fb66a5..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/To Do List copy +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/@GMS_3EDEN/addons/3DEN_plugin/changlog.txt b/@GMS_3EDEN/addons/3DEN_plugin/changlog.txt index 628db0c..743e577 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/changlog.txt +++ b/@GMS_3EDEN/addons/3DEN_plugin/changlog.txt @@ -2,6 +2,7 @@ Long-term TODO: +Allow Users to Define Loot Vehicles diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy 2.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy 2.h deleted file mode 100644 index 3d452d1..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy 2.h +++ /dev/null @@ -1,56 +0,0 @@ - - -class cfg3DEN -{ - class EventHandlers - { - class gms3DEN - { - OnMissionLoad = "diag_log format['Mission loaded at %1',diag_tickTime]; call gms3DEN_fnc_initialize"; - OnMissionNew = "diag_log format['New Mission Created at %1',diag_tickTime]; call gms3DEN_fnc_initialize"; - //onHistoryChange = "call gms3DEN_fnc_updateObjects"; - }; - }; - - class Attributes - { - class Default; - class Title: Default - { - class Controls - { - class Title; - }; - }; - class CheckBox: default{ - class Controls - { - class Title; - class Value; - }; - }; - }; - class Object - { - class AttributeCatories - { - class gmsAttributes - { - displayName = "GMS Settings"; - collapsed = 1; - class Attributes - { - class lootVehicle - { - displayName = "Loot Vehicle"; - toolTip = "Set as Loot Vehicle"; - property = "gmsLootVehicle"; - control = "CheckBox"; - defaultValue = "false"; - condition = "objectVehicle"; - }; - }; - }; - }; - }; -}; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy.h deleted file mode 100644 index 9419608..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DEN copy.h +++ /dev/null @@ -1,149 +0,0 @@ - - - -class cfg3DEN -{ - class EventHandlers - { - class gms3DEN - { - OnMissionLoad = "diag_log format['Mission loaded at %1',diag_tickTime]; call gms3DEN_fnc_initialize"; - OnMissionNew = "diag_log format['New Mission Created at %1',diag_tickTime]; call gms3DEN_fnc_initialize"; - //onHistoryChange = "call gms3DEN_fnc_updateObjects"; - }; - }; - class Mission - { - class gms3DENmissionSettings - { - displayName = "Mission Settings"; - // display = "Display3DENEditAttributesPreview"; // Optional - display for attributes window. Must have the same structure and IDCs as the default Display3DENEditAttributes - class AttributeCategories - { - class gms3DENCategory - { - class Attributes - { - class missionStartMessage - { - property = "gmsMissionStartMessage"; - }; - class missionEndMessage - { - property = "gmsMissionEndMessage"; - }; - class missionDifficulty - { - property = "gmsMissionDifficulty"; - }; - }; - }; - }; - }; - }; - class Attributes - { - class Default; - - class Title: Default - { - class Controls - { - class Title; - }; - }; - - class gms3DENCheckBoxGarrisonsControl: Title - { - onload = "call gms3DEN_fnc_onLoadGarrison;"; - onUnload = "diag_log 'onUnload for garrisons'"; - onCheckedChanged = "diag_log format['onCheckedChanged %1',_this];"; - attributeLoad = "(_this controlsGroupCtrl 100) ctrlSetText _value; [_this,_value] call gms3DEN_fnc_onAttributeLoadGarrison;"; - attributeSave = "[cbChecked (this controlsGroupCtrl 100)] call gms3DEN_fnc_onAttributeSaveGarrison;"; - }; - class gmsGarrisonColorControl: Title - { - onload = "call gms3DEN_fnc_onLoadGarrisonColor;"; - //onUnload = "diag_log 'onUnload for garrisons'"; - attributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadGarrisonColor;"; - attributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveGarrisonColor;"; - }; - class gms3DENCheckboxLootVehControl: Title - { - onload = "call gms3DEN_fnc_onLoadLootVeh;"; - //onUnload = "diag_log 'onUnload for loot veh'"; - onAttributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadLootVeh;"; - onAttributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveLootVeh;"; - }; - class gms3DENCLootVehicleColorControl: Title - { - onload = "call gms3DEN_fnc_onLoadLootVehColor;"; - //onUnload = "diag_log 'onUnload for loot veh'"; - onAttributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadLootVehColor;"; - onAttributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveLootVeh;"; - }; - }; - - class Object - { - class AttributeCategories - { - class gms3DENgarrisonedAttribute - { - displayName = "Garrisons"; - collapsed = 1; - class Attributes - { - class GarrisonedAttribute - { - displayName = "Garrison"; - tooltip = "Mark as part of a garrison"; - property = "gmsIsGarrison"; - control = "gms3DENCheckBoxGarrisonsControl"; - //condition = ""; - expression = "_this setVariable ['%s',_value];"; - defaultValue = "false"; - }; - class GarrisonedColorAttribute - { - displayName = "Color On"; - tooltip = "Check to color this garrisoned object" - property = "gmsGarrisonColor"; - control = "CheckBox"; - //condition = ""; - expression = "_this setVariable ['%s',_value];"; - defaultValue = "false"; - }; - }; - }; - class gms3DENlootVehicles - { - displayName = "Loot Vehicle"; - collapsed = 1; - class Attributes - { - class lootVehicleAttribute - { - displayName = "Loot Vehicle"; - tooltip = "Set box to checked for loot vehicles"; - property = "gmsIsLootVehicle"; - control = "CheckBoz"; - //condition = ""; - expression = "_this setVariable ['%s',_value];"; - defaultValue = "false"; - }; - class lootVehicleColorAttribute - { - displayName = "Color On"; - tooltip = "Check box to color this loot vehicle"; - property = "gmsLootVehicleColor"; - control = "CheckBox"; - //condition = ""; - expression = "_this setVariable ['%s',_value];"; - defaultValue = "false"; - }; - }; - }; - }; - }; -}; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h index 036dafb..eca79ea 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h +++ b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h @@ -16,158 +16,34 @@ class display3DEN // ************************************************************ items[] += {"GMS_configure","GMS_export","GMS_support"}; - /* - The menu for exporting missions is defined here - */ - class GMS_export { - items[]= { - "GMS_exportDynamic" - }; - text = "Export Mission"; - toolTip = "Export GMS Missions"; - }; - class GMS_exportDynamic { - text = "Export Mission"; - //toolTip = "Export Dynamic Mission"; - action = "call gms3DEN_fnc_exportDynamic"; - picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - - /* - menus for those seeking support are here - */ - class GMS_support { - items[] = { - "GMS_help", - "GMS_about" - }; - text = "Plugin Support"; - }; - class GMS_help { - text = "Help"; - action = "call gms3DEN_fnc_Help"; - //picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; - }; - class GMS_about { - text = "3EDEN Plugin Version 1.0 for GMS by Ghostrider-GRG-"; - action = "call blck3EDEN_fnc_about"; - }; - - /* All menus for configuring a GMS mission are defined here */ class GMS_configure { + text = "GMS Settings"; + toolTip = "Adjust Settings"; items[] = { - "GMS_difficulty", - "GMS_crateSpawn", - "GMS_lootSpawn", - "GMS_location_Respawns", - "GMS_MissionCompletionMode", - "GMS_missionSpawnChance", - "GMS_minAI", - "GMS_maxAI" - //"GMS_editMissionSettings" + "GMS_missions", + "GMS_units" + //"GMS_plugin" }; - text = "Configure Mission"; - toolTip = "Adjust Mission Settings"; }; - - class GMS_maxAI + + + class GMS_missions { - text = "Max AI per Infantry Group"; - tooltip = "set the maximum AI per Infantry Group"; + text = "Mission Settings"; + tooltip = "Adjust Mission Settings"; items[] = { - "GMS_maxThree", - "GMS_maxFour", - "GMS_maxFive", - "GMS_maxSix", - "GMS_maxEight", - "GMS_maxNine" + "GMS_static", + "GMS_missionSpawnChance", + "GMS_difficulty", + "GMS_MissionCompletionMode", + "GMS_crateSpawn", + "GMS_lootSpawn" }; }; - class GMS_maxThree - { - text = "set max AI = 3"; - action = "[3] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxFour - { - text = "set max AI = 4"; - action = "[4] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxFive - { - text = "set max AI = 5"; - action = "[5] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxSix - { - text = "set max AI = 6"; - action = "[6] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxSeven - { - text = "set max AI = 7"; - action = "[7] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxEight - { - text = "set max AI = 8"; - action = "[8] call gms3DEN_fnc_setMaxAI"; - }; - class GMS_maxNine - { - text = "set max AI = 9"; - action = "[9] call gms3DEN_fnc_setMaxAI"; - }; - - class GMS_minAI - { - text = "Min AI per Infantry Group"; - tooltip = "Set the minimum AI per infantry group"; - items[] = { - "GMS_minOne", - "GMS_minTwo", - "GMS_minThree", - "GMS_minFour", - "GMS_minFive", - "GMS_minSix" - }; - }; - class GMS_minOne - { - text = "set min AI = 1"; - action = "[1] call gms3DEN_fnc_setMinAI"; - }; - class GMS_minTwo - { - text = "set min AI = 2"; - action = "[2] call gms3DEN_fnc_setMinAI"; - }; - class GMS_minThree - { - text = "set min AI = 3"; - action = "[3] call gms3DEN_fnc_setMinAI"; - }; - class GMS_minFour - { - text = "set min AI = 4"; - action = "[4] call gms3DEN_fnc_setMinAI"; - }; - class GMS_minFive - { - text = "set min AI = 5"; - action = "[5] call gms3DEN_fnc_setMinAI"; - }; - class GMS_minSix - { - text = "set min AI = 6"; - action = "[6] call gms3DEN_fnc_setMinAI"; - }; - - class GMS_missionSpawnChance { text = "Spawn Chance"; @@ -279,25 +155,7 @@ class display3DEN action = "[assetSecured] call gms3DEN_fnc_setCompletionMode;"; value = allKilledOrPlayerNear; }; - class GMS_location_Respawns - { - text = "Set Mission Spawns (static vs random)"; - //action = "edit3DENMissionAttributes 'setAsStaticMission'"; - items[] = { - "GMS_dynamicMission", - "GMS_staticMission" - }; - }; - class GMS_dynamicMission - { - text = "Configure as Dynamic Mission"; - action = "['dynamic'] call gms3DEN_fnc_setSpawnLocations"; - }; - class GMS_staticMission - { - text = "Configure Static Mission"; - action = "['static'] call gms3DEN_fnc_setSpawnLocations"; - }; + class GMS_crateSpawn { text = "Set When Crates Spawn"; toolTip = "Set when crates are spawned"; @@ -362,16 +220,191 @@ class display3DEN }; }; class GMS_setToDynamic { - text = "Dynamic"; + text = "Dynamic (Default)"; toolType = "Set mission to be spawned at random location"; - action = "['dynamic'] call gms3DEN_fnc_toggleStaticSpawns"; + action = "['Dynamic'] call gms3DEN_fnc_toggleStaticSpawns"; }; class GMS_setToStatic { text = "Static"; toolTip = "Set mission to respawn at the same location each time"; - action = "['static'] call gms3DEN_fnc_toggleStaticSpawns"; - }; + action = "['Static'] call gms3DEN_fnc_toggleStaticSpawns"; + }; + + class GMS_plugin + { + text = "Pluggin Settings"; + items[] = { + "GMS_garrisonATL" + }; + }; + + class GMS_units + { + text = "Adjust AI Settings" + items[] = { + "GMS_maxAI", + "GMS_minAI" + }; + }; + + class GMS_maxAI + { + text = "Max AI per Infantry Group"; + tooltip = "set the maximum AI per Infantry Group"; + items[] = { + "GMS_maxThree", + "GMS_maxFour", + "GMS_maxFive", + "GMS_maxSix", + "GMS_maxEight", + "GMS_maxNine" + }; + }; + class GMS_maxThree + { + text = "set max AI = 3"; + action = "[3] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxFour + { + text = "set max AI = 4"; + action = "[4] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxFive + { + text = "set max AI = 5"; + action = "[5] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxSix + { + text = "set max AI = 6"; + action = "[6] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxSeven + { + text = "set max AI = 7"; + action = "[7] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxEight + { + text = "set max AI = 8"; + action = "[8] call gms3DEN_fnc_setMaxAI"; + }; + class GMS_maxNine + { + text = "set max AI = 9"; + action = "[9] call gms3DEN_fnc_setMaxAI"; + }; + + class GMS_minAI + { + text = "Min AI per Infantry Group"; + tooltip = "Set the minimum AI per infantry group"; + items[] = { + "GMS_minOne", + "GMS_minTwo", + "GMS_minThree", + "GMS_minFour", + "GMS_minFive", + "GMS_minSix" + }; + }; + class GMS_minOne + { + text = "set min AI = 1"; + action = "[1] call gms3DEN_fnc_setMinAI"; + }; + class GMS_minTwo + { + text = "set min AI = 2"; + action = "[2] call gms3DEN_fnc_setMinAI"; + }; + class GMS_minThree + { + text = "set min AI = 3"; + action = "[3] call gms3DEN_fnc_setMinAI"; + }; + class GMS_minFour + { + text = "set min AI = 4"; + action = "[4] call gms3DEN_fnc_setMinAI"; + }; + class GMS_minFive + { + text = "set min AI = 5"; + action = "[5] call gms3DEN_fnc_setMinAI"; + }; + class GMS_minSix + { + text = "set min AI = 6"; + action = "[6] call gms3DEN_fnc_setMinAI"; + }; + + class GMS_garrisonATL + { + text = "Garrison-ATL Mode"; + items[] = { + "GMS_garrisonATLoff", + "GMS_garrisonATLon", + "GMS_aboutGarrisonATL" + }; + }; + class GMS_garrisonATLoff + { + text = "Off (default)"; + action = "[false] call gms3DEN_fnc_setGarrisonATL"; + }; + class GMS_garrisonATLon + { + text = "On"; + action = "[true] call gms3DEN_fnc_setGarrisonATL"; + }; + class GMS_aboutGarrisonATL + { + text = "Help"; + action = "call gms3DEN_fnc_garissonATLhelp"; + }; + /*************************************** + The menu for exporting missions is defined here + ***************************************/ + + class GMS_export { + items[]= { + "GMS_exportDynamic" + }; + text = "Export Mission"; + toolTip = "Export GMS Missions"; + }; + class GMS_exportDynamic { + text = "Export Mission"; + //toolTip = "Export Dynamic Mission"; + action = "call gms3DEN_fnc_exportDynamic"; + picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa"; + }; + + /*************************************** + menus for those seeking support are here + ***************************************/ + + class GMS_support { + items[] = { + "GMS_help", + "GMS_about" + }; + text = "Plugin Support"; + }; + class GMS_help { + text = "Help"; + action = "call gms3DEN_fnc_Help"; + }; + class GMS_about { + text = "3EDEN Plugin Version 1.0 for GMS by Ghostrider-GRG-"; + action = "call gms3EDEN_fnc_about"; + }; + }; + + }; }; }; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h index d6180bf..3afc2a6 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h +++ b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h @@ -2,7 +2,7 @@ class CfgGMS3DENVersion { - version = 1.1; - build = 16; - date = "09/23/23"; + version = 1.21; + build = 18; + date = "09/27/23"; }; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h index 24c4da3..b0b6322 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h +++ b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h @@ -7,36 +7,10 @@ class CfgGMS3DEN 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 - // colors used to highlight garrison objects and loot objects colorGarrisonObject = "#(argb,8,8,3)color(0,1,0,1)"; // Lime colorLootObject = "#(argb,8,8,3)color(1,0,1,1)"; // Fucshia diff --git a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfgFunctions.h b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfgFunctions.h index fa5ba5a..565f831 100644 --- a/@GMS_3EDEN/addons/3DEN_plugin/gmsCfgFunctions.h +++ b/@GMS_3EDEN/addons/3DEN_plugin/gmsCfgFunctions.h @@ -3,13 +3,6 @@ class CfgFunctions { class gms3DEN { - class Export - { - file = "3DEN_plugin\Export"; - - //class exportStatic {}; - }; - class Core { file = "3DEN_plugin\Core"; @@ -52,6 +45,7 @@ class CfgFunctions class setSpawnChance {}; class setSpawnLocations {}; class spawnCratesTiming {}; + class toggleStaticSpawns {}; class versionInfo {}; }; }; diff --git a/@GMS_3EDEN/addons/3DEN_plugin/helperscripts.sqf b/@GMS_3EDEN/addons/3DEN_plugin/helperscripts.sqf deleted file mode 100644 index 9e31182..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/helperscripts.sqf +++ /dev/null @@ -1,21 +0,0 @@ - - -{ - _m = format["object = %1",_x]; - systemChat _m; - diag_log _m; -} forEach nearestTerrainObjects [player, [], 50]; - -_u = player; -diag_log format["fn_isInside: _u = %1",_u]; -all3DENEntities params ["_objects"]; - -private _pos = getPosASL _u; -private _above = AGLToASL [_pos select 0, _pos select 1, (_pos select 2) + 100]; -private _below = AGLtoASL [_pos select 0, _pos select 1, (_pos select 2) - 10]; -private _objAbove = lineIntersects [_pos, _above, _u,_u]; -private _objBelow = lineIntersects [_pos, _below, _u,_u]; -private _isInside = if (_objAbove || _objBelow) then {true} else {false}; -_m = format["fn_isInside: _u = %4 | _objAbove = %1 | _objBelow = %2 | _isInside %3",_objAbove,_objBelow,_isInside,_u]; -systemchat _m; -diag_log _m; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/testIntersects.sqf b/@GMS_3EDEN/addons/3DEN_plugin/testIntersects.sqf deleted file mode 100644 index fc720b4..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/testIntersects.sqf +++ /dev/null @@ -1,15 +0,0 @@ -private _obj = cursorObject; -private _pos = getPosATL _obj; -private _startPos = _pos; -private _endPos = [_pos select 0, _pos select 1, (_pos select 2) + 100]; -private _objIntersect = lineIntersectsObjs [_startPos, _endPos,_obj,_obj,true]; -private _count = count _ojbIntersect; -systemChat format["count = %1",_count]; -if !(_count isEqualTo 0) then -{ - private _firstObj = _objIntersect select 0; - private _lastObj = _objIntersect select ((count _objIntersect) - 1); - _m = format["first Obj = %1 | last Obj = %2 | cursorObj = %3",_firstObj,_lastObj, _obj]; - systemChat _m; - diag_log _m; -}; \ No newline at end of file diff --git a/@GMS_3EDEN/addons/3DEN_plugin/testingscripts.sqf b/@GMS_3EDEN/addons/3DEN_plugin/testingscripts.sqf deleted file mode 100644 index ab18051..0000000 --- a/@GMS_3EDEN/addons/3DEN_plugin/testingscripts.sqf +++ /dev/null @@ -1,20 +0,0 @@ - - -_t1 = diag_tickTime; -_v1 = 0; -for "_i" from 1 to 100000 do -{ - if (_v1 == 0) then {true}; -}: -_m = format["elapsed time integer = %1",diag_tickTime - _t1]; -systemChat _m; -diag_log _m; -_t1 = diag_tickTime; -_v1 = "thisspecialvar"; -for "_i" from 1 to 100000 do -{ - if (_v1 isEqualTo "thisspecialvar") then {}; -}; -_m = format["elapsed time string = %1",diag_tickTime - _t1]; -systemChat _m; -diag_log _m; \ No newline at end of file