mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
parent
9141ccbf65
commit
9f69e5e20f
1
@blckeagls_EDEN/addons/$PBOPREFIX$
Normal file
1
@blckeagls_EDEN/addons/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
addons\3DENplugin
|
2
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_about.sqf
Normal file
2
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_about.sqf
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
diag_log format["About called at %1",diag_tickTime];
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Returns the builing containing an object or objNull
|
||||
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];
|
||||
|
||||
{
|
||||
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
||||
} forEach _surfacesAbove;
|
||||
if (_building isEqualTo objNull) then
|
||||
{
|
||||
private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
|
||||
{
|
||||
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
||||
} forEach _surfacesBelow;
|
||||
};
|
||||
|
||||
_building
|
@ -0,0 +1,75 @@
|
||||
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_building","_center"];
|
||||
private _pos = getPosATL _building;
|
||||
private _garrisonedBuildings = missionNamespace getVariable["blck_garrisonedBuildings",[]];
|
||||
private _count = 0;
|
||||
private _staticsText = [];
|
||||
private _unitsText = [];
|
||||
private _buildingGarrisonATL = [];
|
||||
private _configuredStatics = [];
|
||||
private _configuredUnits = [];
|
||||
private _statics = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)];
|
||||
private _units = nearestObjects[getPosATL _building,["Man"],sizeOf (typeOf _building)] select {(vehicle _x) isEqualTo _x};
|
||||
private _lineBreak = toString [10];
|
||||
|
||||
{
|
||||
if !(_x in _configuredStatics) then
|
||||
{
|
||||
private _isInside = [_x] call blck3DEN_fnc_isInside;
|
||||
private _container = [_x] call blck3DEN_fnc_buildingContainer;
|
||||
if (_isInside && (_container isEqualTo _building)) then
|
||||
{
|
||||
_configuredStatics pushBackUnique _x;
|
||||
_staticsText pushBack [format['%1',typeOf _x],(getPosATL _x) vectorDiff (_pos),getDir _x];
|
||||
};
|
||||
};
|
||||
} forEach _statics;
|
||||
_staticsText joinString _lineBreak;
|
||||
|
||||
// Since this is run from the editor we do not have to worry about units running off from their original locations
|
||||
{
|
||||
if !(_x in _configuredUnits) then
|
||||
{
|
||||
private _isInside = [_x] call blck3DEN_fnc_isInside;
|
||||
private _container = [_x] call blck3DEN_fnc_buildingContainer;
|
||||
if (_isInside && (_container isEqualTo _building)) then
|
||||
{
|
||||
_configuredUnits pushBackUnique _x;
|
||||
_unitsText pushBack [(getPosATL _x) vectorDiff (_pos),getDir _x];
|
||||
};
|
||||
};
|
||||
} forEach _units;
|
||||
_unitsText joinString _lineBreak;
|
||||
|
||||
if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then
|
||||
{
|
||||
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||
diag_log format["_configureGarrisonATL: _building %1 | damage %2 | simulation %3",_allowDamage,_enableSimulation];
|
||||
_buildingGarrisonATL = [
|
||||
format["%1",
|
||||
typeOf _building],
|
||||
(getPosATL _building) vectorDiff _center,
|
||||
getDir _building,
|
||||
_allowDamage,
|
||||
_enableSimulation,
|
||||
_staticsText,
|
||||
_unitsText
|
||||
];
|
||||
};
|
||||
|
||||
private "_return";
|
||||
if (_buildingGarrisonATL isEqualTo []) then
|
||||
{
|
||||
_return = [];
|
||||
} else {
|
||||
_return = [_buildingGarrisonATL,_configuredStatics,_configuredUnits];
|
||||
};
|
||||
_return
|
@ -0,0 +1,18 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
private _marker = create3DENEntity ["object","Sign_Arrow_Large_Yellow_F",getPos _object];
|
||||
private _markerPos = getPos _object;
|
||||
private _bbr = boundingBoxReal _object;
|
||||
_p1 = _bbr select 0;
|
||||
_p2 = _bbr select 1;
|
||||
_height = abs ((_p2 select 2) - (_p1 select 2));
|
||||
_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height];
|
||||
_object setVariable ["marker",_marker];
|
||||
true
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
private _marker = create3DENEntity ["object","Sign_Arrow_Large_Green_F",getPos _object];
|
||||
private _markerPos = getPos _object;
|
||||
private _bbr = boundingBoxReal _object;
|
||||
_p1 = _bbr select 0;
|
||||
_p2 = _bbr select 1;
|
||||
_height = abs ((_p2 select 2) - (_p1 select 2));
|
||||
_marker setPosATL [_markerPos select 0, _markerPos select 1, (_markerPos select 2) + _height];
|
||||
_object setVariable ["marker",_marker];
|
||||
|
||||
true
|
||||
|
13
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf
Normal file
13
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_display.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_message"];
|
||||
|
||||
// As found in fn_3DENExportTerrainBuilder.sqf
|
||||
//private _message = ["this is ","an array"];
|
||||
private _lineBreak = toString [10];
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["missionName.sqf", _message joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_state"];
|
||||
all3DENEntities params ["_objects"];
|
||||
_objects = _objects select {_x getVariable["garrisoned",false]};
|
||||
|
||||
missionNameSpace setVariable["blck_displayGarrisonMarkerOn",_state];
|
||||
{
|
||||
if (_state) then // if the request was to show the markers then ....
|
||||
{
|
||||
private _marker = _x getVariable["marker",""];
|
||||
diag_log format["_x = %1 | _marker = %2",_x,_marker];
|
||||
if (_marker isEqualto "") then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_createGarrisonMarker;
|
||||
[_x] call blck3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
} else {
|
||||
blck_displayGarrisonMarkerOn = false;
|
||||
if !(_x getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_removeMarker;
|
||||
};
|
||||
};
|
||||
|
||||
} forEach _objects;
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_state"];
|
||||
all3DENEntities params ["_objects"];
|
||||
_objects = _objects select {_x getVariable ["lootVehicle",false]};
|
||||
|
||||
missionNamespace setVariable["blck_displayLootMarkerOn",_state];
|
||||
{
|
||||
if (_state) then // if the request was to show the markers then ....
|
||||
{
|
||||
if (_x getVariable["marker",""] isEqualto "") then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_createLootMarker;
|
||||
[_x] call blck3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
} else {
|
||||
if !(_x getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_removeMarker;
|
||||
};
|
||||
};
|
||||
|
||||
} forEach _objects;
|
10
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf
Normal file
10
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_endMessage.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_end"];
|
||||
missionNamespace setVariable["blck_endMessage",_end];
|
||||
systemChat format["End Message set to %1",_end];
|
375
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_exportDynamic.sqf
Normal file
375
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_exportDynamic.sqf
Normal file
@ -0,0 +1,375 @@
|
||||
/*
|
||||
GMS 3DEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
private _m = "Staring exportDynamic.sqf";
|
||||
systemChat _m;
|
||||
diag_log _m;
|
||||
|
||||
#define oddsOfGarrison 0.67
|
||||
#define maxGarrisonUnits 4
|
||||
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");
|
||||
garisonMarkerObject = "Sign_Sphere100cm_F";
|
||||
oddsOfGarison = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "oddsOfGarison");
|
||||
maxGarrisonStatics = getNumber(configFile >> "CfgBlck3DEN" >> "configs" >> "maxGarrisonStatics");
|
||||
typesGarrisonStatics = getArray(configFile >> "CfgBlck3DEN" >> "configs" >> "typesGarrisonStatics");
|
||||
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");
|
||||
|
||||
/*
|
||||
Set Default Values Where not Defined using Menu Commands
|
||||
*/
|
||||
if (isNil "blck_dynamicStartMessage") then
|
||||
{
|
||||
blck_dynamicStartMessage = "TODO: Change approiately";
|
||||
};
|
||||
if (isNil "blck_dynamicEndMessage") then
|
||||
{
|
||||
blck_dynamicEndMessage = "TODO: Change Appropriately";
|
||||
};
|
||||
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";
|
||||
};
|
||||
if (isNil "blck_spawnCratesTiming") then
|
||||
{
|
||||
blck_spawnCratesTiming = missionNamespace getVariable["blck_lootTiming","atMissionStartGround"];
|
||||
};
|
||||
if (isNil "blck_loadCratesTiming") then
|
||||
{
|
||||
blck_loadCratesTiming = missionNamespace getVariable["blck_loadTiming","atMissionStart"];
|
||||
};
|
||||
if (isNil "blck_missionEndCondition") then
|
||||
{
|
||||
blck_missionEndCondition = missionNamespace getVariable["blck_endState","allUnitsKilled"];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"];
|
||||
private _centerMarkers = _objects select {(typeOf _x) isEqualTo 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["<WARNING> 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["_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 "brush") 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
|
||||
*/
|
||||
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["<WARNING> More than one marker was found; only the first marker was processed"];
|
||||
};
|
||||
} else {
|
||||
_markerType = "ELLIPSE";
|
||||
//_markerShape = "ELLIPSE";
|
||||
_markerSize = "[250,250]";
|
||||
_markerColor = "COLORRED";
|
||||
_markerBrush = "SOLID";
|
||||
if !(_objects isEqualTo []) then
|
||||
{
|
||||
Mission_CENTER = getPosATL (_objects select 0);
|
||||
} else {
|
||||
Mission_CENTER = getPos (_objects select 0);
|
||||
};
|
||||
diag_log format["<WARNING> No marker was found, using default values and position for mission center position"];
|
||||
};
|
||||
|
||||
if (Mission_CENTER isEqualTo [0,0,0]) then
|
||||
{
|
||||
Mission_CENTER = getPosATL (_staticObjects select 0);
|
||||
};
|
||||
diag_log format["Mission_CENTER = %1",Mission_CENTER];
|
||||
|
||||
|
||||
private _garisonedBuildings = [];
|
||||
private _garisonedStatics = [];
|
||||
private _garisonedUnits = [];
|
||||
|
||||
private _landscape = _objects select{
|
||||
!((_x get3DENAttribute "objectIsSimple") select 0) &&
|
||||
((typeOf _x) isKindOf "Static" || ( (typeOf _x) isKindOf "ThingX")) &&
|
||||
!((typeOf _x) isKindOf "ReammoBox_F") &&
|
||||
!(_x getVariable["isLootContainer",false]) &&
|
||||
!((typeOf _x) isKindOf "Helper_Base_F")
|
||||
};
|
||||
|
||||
private _simpleObjects = _objects select {(_x get3DENAttribute "objectIsSimple") select 0};
|
||||
diag_log format["_simpleObjects = %1",_simpleObjects];
|
||||
private _missionSimpleObjects = [];
|
||||
{
|
||||
private _object = format[' ["%1",%2,%3]',
|
||||
(_x get3DENAttribute "ItemClass") select 0,
|
||||
((_x get3DENAttribute "position") select 0) vectorDiff CENTER,
|
||||
((_x get3DENAttribute "rotation") select 0) select 2
|
||||
];
|
||||
diag_log format["_object = %1",_object];
|
||||
_missionSimpleObjects pushBack _object;
|
||||
} forEach _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;
|
||||
|
||||
_missionPatrolVehicles = [];
|
||||
private _patrolVehicles = _objects select {
|
||||
(((typeOf _x) isKindOf "Car") || ((typeOf _x) isKindOf "Tank") || ((typeOf _x) isKindOf "Ship")) &&
|
||||
!((typeOf _x) isKindOf "SDV_01_base_F") &&
|
||||
!(_x getVariable["lootvehicle",false])
|
||||
};
|
||||
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 _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) vectorDiff CENTER,getDir _x,maxVehiclePatrolRadius,maxVehiclePatrolRadius];
|
||||
} 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) vectorDiff CENTER,getDir _x,aircraftPatrolRadius,aircraftPatrolRadius];
|
||||
} 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) vectorDiff CENTER,getDir _x];
|
||||
} forEach _statics;
|
||||
|
||||
private _infantry = _units select {
|
||||
!(surfaceIsWater (getPos _x)) &&
|
||||
!(_x in _garisonedUnits)
|
||||
};
|
||||
diag_log format["_garisonedUnits = %1",_garisonedUnits];
|
||||
diag_log format["_infantry = %1",_infantry];
|
||||
private _units = [];
|
||||
{
|
||||
{
|
||||
if (vehicle _x isEqualTo _x) then {_units pushBack _x};
|
||||
} forEach (units _x);
|
||||
} forEach _groups;
|
||||
_infantryGroups = [];
|
||||
{
|
||||
_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 = _units select {
|
||||
(surfaceIsWater (getPos _x)) &&
|
||||
!([_x] call blck3DEN_fnc_isInside)
|
||||
// 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,blck_minAI,blck_maxAI,blck_MissionDifficulty,minPatrolRadius,maxPatrolRadius];
|
||||
} forEach _scuba;
|
||||
|
||||
private _lootContainers = [];
|
||||
private _ammoBoxes = _objects select { // "ReammoBox_F"
|
||||
(((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 _ammoBoxes;
|
||||
private _missionCoords = [];
|
||||
if (toLower(missionNamespace getVariable["blck_missionLocations","random"]) isEqualTo "fixed") then
|
||||
{
|
||||
_missionCoords pushBack Mission_CENTER;
|
||||
};
|
||||
|
||||
|
||||
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 blck3DEN_fnc_versionInfo];
|
||||
_lines pushBack " By Ghostrider-GRG-";
|
||||
_lines pushBack "*/";
|
||||
_lines pushBack "";
|
||||
/*
|
||||
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
||||
#include "\GMS\Missions\GMS_privateVars.sqf";
|
||||
*/
|
||||
_lines pushBack '#include "\GMS\Compiles\Init\GMS_defines.hpp"';
|
||||
_lines pushBack '#include "\GMS\Missions\GMS_privateVars.sqf" ';
|
||||
_lines pushBack "";
|
||||
_lines pushBack format["_defaultMissionLocations = %1;",_missionCoords];
|
||||
_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_MissionDifficulty];
|
||||
_lines pushBack format['_lootCounts = blck_lootCounts%1;',blck_MissionDifficulty];
|
||||
_lines pushBack "";
|
||||
_lines pushBack "_garrisonedBuildings_BuildingPosnSystem = [";
|
||||
_lines pushBack (_garisonedPos joinString (format[",%1", _lineBreak]));
|
||||
_lines pushBack "];";
|
||||
_lines pushBack "";
|
||||
_lines pushBack "_garrisonedBuilding_ATLsystem = [";
|
||||
_lines pushBack (_garrisonATL joinString (format[",%1", _lineBreak]));
|
||||
_lines pushBack "];";
|
||||
_lines pushBack "";
|
||||
_lines pushBack "_missionLandscape = [";
|
||||
_lines pushback (_missionLandscape joinString (format [",%1", _lineBreak]));
|
||||
_lines pushBack "];";
|
||||
_lines pushBack "";
|
||||
_lines pushBack "_simpleObjects = [";
|
||||
_lines pushback (_missionSimpleObjects 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 "];";
|
||||
_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 "_missionGroups = [";
|
||||
_lines pushback (_infantryGroups joinString (format [",%1", _lineBreak]));
|
||||
_lines pushBack "];";
|
||||
_lines pushBack "";
|
||||
_lines pushBack "_scubaGroupParameters = [";
|
||||
_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 "*/";
|
||||
_lines pushBack format["_chanceHeliPatrol = GMS_chanceHeliPatrol%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noChoppers = GMS_noPatrolHelis%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_missionHelis = GMS_patrolHelis%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_chancePara = GMS_chancePara%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noPara = GMS_noPara%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_paraTriggerDistance = 400;"];
|
||||
_lines pushBack format["_paraSkill = '%1';",blck_MissionDifficulty];
|
||||
_lines pushBack format["_chanceLoot = 0.0;"];
|
||||
_lines pushBack format["_paraLoot = GMS_BoxLoot_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_paraLootCounts = GMS_lootCounts%1;",blck_MissionDifficulty];
|
||||
_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";',blck_spawnCratesTiming];
|
||||
_lines pushBack format['_loadCratesTiming = "%1";',blck_loadCratesTiming];
|
||||
_lines pushBack format['_endCondition = "%1";',blck_missionEndCondition];
|
||||
_lines pushBack format["_minNoAI = GMS_MinAI_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_maxNoAI = GMS_MaxAI_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noAIGroups = GMS_AIGrps_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noVehiclePatrols = GMS_SpawnVeh_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noEmplacedWeapons = GMS_SpawnEmplaced_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_minNoAI = GMS_MinAI_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_maxNoAI = GMS_MaxAI_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noAIGroups = GMS_AIGrps_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noVehiclePatrols = GMS_SpawnVeh_%1;",blck_MissionDifficulty];
|
||||
_lines pushBack format["_noEmplacedWeapons = GMS_SpawnEmplaced_%1;",blck_MissionDifficulty];
|
||||
_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;
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_3DENobject","_center"];
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
private _objects = get3DENSelected "object";
|
||||
private "_message";
|
||||
diag_log format["getGarrisonInfo: _object = %1",format["%1",_object]];
|
||||
if (_objects isEqualTo []) then
|
||||
{
|
||||
_message = "No Buildings Selected";
|
||||
} else {
|
||||
if (count _objects == 1) then
|
||||
{
|
||||
if ((_objects select 0) getVariable["garrisoned",false]) then
|
||||
{
|
||||
_message = format["Building %1 IS Garrisoned",typeOf (_objects select 0)];
|
||||
} else {
|
||||
_message = format["Building %1 is NOT Garrisoned",typeOf (_objects select 0)];
|
||||
};
|
||||
} else {
|
||||
_message = format["Select a single building then try again"];
|
||||
};
|
||||
};
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||
|
@ -0,0 +1,31 @@
|
||||
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship" || (typeOf _x) isKindOf "ThingX"};
|
||||
private "_message";
|
||||
|
||||
if (_objects isEqualTo []) then
|
||||
{
|
||||
_message = "No Cars/Ships/ThingX Selected";
|
||||
} else {
|
||||
if (count _objects == 1) then
|
||||
{
|
||||
if ((_objects select 0) getVariable["lootvehicle",false]) then
|
||||
{
|
||||
_message = format["Vehicle %1 IS a Loot Vehicle",typeOf (_objects select 0)];
|
||||
} else {
|
||||
_message = format["Vehicle %1 is NOT a Loot Vehicle",typeOf (_objects select 0)];
|
||||
};
|
||||
} else {
|
||||
_message = format["% Vehicles Selected. Select a single vehicle then try again",count _objects];
|
||||
};
|
||||
};
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
|
||||
private _objects = get3DENSelected "object" select {((typeOf _x) isKindOf "House") && [_x] call BIS_fnc_isBuildingEnterable};
|
||||
private _lines = [];
|
||||
private _lineBreak = toString [10];
|
||||
{
|
||||
_message pushBack format["Garrison Flag for Building type %1 at %2 = %3",typeOf _x,getPosATL _x,_x getVariable["garrisoned",false]];
|
||||
} forEach _objects;
|
||||
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["garrisonedBuildings.sqf", _lines joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
||||
|
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car"};
|
||||
private _lines = [];
|
||||
private _lineBreak = toString [10];
|
||||
{
|
||||
_message pushBack format["Loot Vehicle Flag for Vehicle type %1 at %2 = %3",typeOf _x,getPosATL _x,_x getVariable["garrisoned",false]];
|
||||
} forEach _objects;
|
||||
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["lootVehicles.sqf", _lines joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
7
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_help.sqf
Normal file
7
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_help.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
diag_log format["Help called at %1",diag_tickTime];
|
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
diag_log format["fn_initialize loaded at %1",diag_tickTime];
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
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"];
|
||||
missionNamespace setVariable["blck_missionLocations","random"];
|
||||
missionNameSpace setVariable["blck_displayGarrisonMarkerOn",false];
|
||||
missionNamespace setVariable["blck_displayLootMarkerOn",false];
|
||||
|
||||
diag_log format["Mission Attributes Initialized for blckeagls at time %1",diag_tickTime];
|
11
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf
Normal file
11
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInfantry.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
private _u = _this select 0;
|
||||
private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false};
|
||||
_isInfantry
|
38
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInside.sqf
Normal file
38
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_isInside.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_u",["_category","House"]];
|
||||
|
||||
private _pos = getPosASL _u;
|
||||
private _above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u];
|
||||
private _below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u];
|
||||
//diag_log format["_fn_isInside: _u %1 | _category = %5 | typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u, _category];
|
||||
|
||||
// If there is something above or below the object do a quick double-check to make sure there is a building there and not something else.
|
||||
if (_above) then // test if any surfaces above are from buildingPos
|
||||
{
|
||||
private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100];
|
||||
_above = false;
|
||||
{
|
||||
//diag_log format["_fn_isInside: _x = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
|
||||
if ((_x select 2) isKindOf _category) then {_above = true};
|
||||
}forEach _surfacesAbove;
|
||||
};
|
||||
|
||||
if (_below) then
|
||||
{
|
||||
private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
|
||||
_above = false;
|
||||
{
|
||||
//diag_log format["_fn_isInside: _x = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
|
||||
if ((_x select 2) isKindOf _category) then {_above = true};
|
||||
}forEach _surfacesBelow;
|
||||
};
|
||||
|
||||
private _isInside = if (_above || _below) then {true} else {false};
|
||||
//diag_log format["_fn_isInside: _isInside = %1",_isInside];
|
||||
_isInside
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_timing"];
|
||||
missionNamespace setVariable["blck_loadTiming",_timing];
|
||||
systemChat format["Mission Load Crates Timing set to %1",_timing];
|
13
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onDrag.sqf
Normal file
13
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onDrag.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
if !(_object getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
private _marker = _object getVariable["marker",""];
|
||||
private _markerPos = getPosATL _object;
|
||||
_marker setPosATL[_markerPos select 0, _markerPos select 1, (_markerPos select 2) + sizeOf _object];
|
||||
};
|
28
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onRegistered.sqf
Normal file
28
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onRegistered.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
switch (true) do
|
||||
{
|
||||
case ((typeOf _object) isKindOf "ThingX" && blck_displayLootMarkerOn): {
|
||||
if !(_object getVariable["lootVehicle",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call blck3DEN_fnc_createLootMarker;
|
||||
[_object] call blck3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
};
|
||||
case ((typeOf _object) isKindOf "House" && blck_displayGarrisonMarkerOn): {
|
||||
if !(_object getVariable["garrisoned",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call blck3DEN_fnc_createGarrisonMarker;
|
||||
[_object] call blck3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
12
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onUnregister.sqf
Normal file
12
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_onUnregister.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
if !(_object getvariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call blck3DEN_fnc_removeMarker;
|
||||
_object setVariable ["marker",nil];
|
||||
};
|
18
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_removeMarker.sqf
Normal file
18
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_removeMarker.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
private _marker = _object getVariable["marker",""];
|
||||
if !(_marker isEqualTo "") then
|
||||
{
|
||||
private _id = get3DENEntityID _marker;
|
||||
delete3DENEntities [_id];
|
||||
_object setVariable["marker",nil];
|
||||
};
|
||||
|
||||
true
|
@ -0,0 +1,10 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_mode"];
|
||||
missionNamespace setVariable["blck_endState",_mode];
|
||||
systemChat format["Mission End State updated to %1",_mode];
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_difficulty"];
|
||||
missionNamespace setVariable["blck_difficulty",_difficulty];
|
||||
private _m = format["Mission Difficulty updated to %1",_difficulty];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
||||
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
|
||||
_object removeAllEventHandlers "UnregisteredFromWorld3DEN";
|
||||
_object removeAllEventHandlers "RegisteredToWorld3DEN";
|
||||
_object removeAllEventHandlers "Dragged3DEN";
|
||||
_object addEventHandler ["Dragged3DEN",{_this call blck3DEN_fnc_onDrag;}];
|
||||
_object addEventHandler ["UnregisteredFromWorld3DEN",{_this call blck3DEN_fnc_onUnregister;}];
|
||||
_object addEventHandler ["RegisteredToWorld3DEN", {_this call blck3DEN_fnc_onRegistered;}];
|
47
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf
Normal file
47
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_setGarrison.sqf
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_state"];
|
||||
private _markersStateON = missionNamespace getVariable["blck_displayGarrisonMarkerOn",false];
|
||||
[false] call blck3DEN_fnc_displayGarrisonMarkers;
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "House"};
|
||||
private "_message";
|
||||
if (_objects isEqualTo []) exitWith
|
||||
{
|
||||
_message = "Select one or more buildings to configure";
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
||||
|
||||
{
|
||||
if ([_x] call BIS_fnc_isBuildingEnterable) then
|
||||
{
|
||||
_x setVariable["garrisoned",_state];
|
||||
_message = format["building of type %1 had garrison state set to %2",typeOf _x,_state];
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
if (blck_displayGarrisonMarkerOn) then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_createGarrisonedMarker;
|
||||
[_x] call blck3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
} else {
|
||||
_message = format["Object type %1 ignored: only enterable buildings can be garrisoned",typeOf _x];
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
||||
|
||||
} forEach _objects;
|
||||
_message = format["Garrison State of %1 buildings updated to %2",count _objects,_state];
|
||||
systemChat _message;
|
||||
if (_markersStateON) then
|
||||
{
|
||||
[true] call blck3DEN_fnc_displayGarrisonMarkers;
|
||||
};
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
sets a flag stored through setVariable for each selected object that meets the filter criteria
|
||||
only objects of type "Car"or "ThingX" are allowed.
|
||||
*/
|
||||
|
||||
params["_state"];
|
||||
private _markerStateON = missionNameSpace getVariable["blck_displayLootMarkerOn",false];
|
||||
[false] call blck3DEN_fnc_displayLootMarkers;
|
||||
private "_message";
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; //
|
||||
if (_objects isEqualTo []) exitWith
|
||||
{
|
||||
_message = "Select one or more vehicles or items of type ThingX to configure";
|
||||
systemChat _message;
|
||||
};
|
||||
{
|
||||
if ((typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship") then
|
||||
{
|
||||
_x setVariable["lootvehicle",_state];
|
||||
if (blck_displayLootMarkerOn && _state) then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_createLootMarker;
|
||||
[_x] call blck3DEN_fnc_setEventHandlers;
|
||||
} else {
|
||||
if !(_state) then
|
||||
{
|
||||
[_x] call blck3DEN_fnc_removeLootMarker;
|
||||
};
|
||||
};
|
||||
_message = format["Vehicle type %1 set to Loot Vehicle = %1",typeOf _x,_state];
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
} else {
|
||||
_message = format["Object with type %1 ignored:: only objects of type Car can be used as loot vehicles",typeOf _x];
|
||||
diag_log _message;
|
||||
systemChat _message;
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
if (_markerStateON) then
|
||||
{
|
||||
[true] call blck3DEN_fnc_displayLootMarkers;
|
||||
};
|
||||
_message = format["Loot Vehicle State of %1 objects updated to %2",count _objects,_state];
|
||||
systemChat _m;
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_mode"];
|
||||
switch (_mode) do
|
||||
{
|
||||
case "random": {missionNamespace setVariable["blck_missionLocations","random"]};
|
||||
case "fixed": {missionNamespace setVariable["blck_missionLocations","fixed"]};
|
||||
};
|
||||
systemChat format["Mission Locations updated to %1",_mode];
|
@ -0,0 +1,10 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_timing"];
|
||||
missionNamespace setVariable["blck_lootTiming",_timing];
|
||||
systemChat format["Loot Chest Spawn Timing updated to %1",_timing];
|
10
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_startMessage.sqf
Normal file
10
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_startMessage.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_start"];
|
||||
missionNamespace setVariable["blck_startMessage",_start];
|
||||
systemChat format["Start Message set to %1",_start];
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
private _objects = get3DENSelected "object";
|
||||
private _markers select {(typeOf _x) = _markerType};
|
||||
{
|
||||
|
||||
};
|
||||
_m = "Update Objects Called";
|
||||
diag_log _m;
|
||||
systemChat _m;
|
18
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_versionInfo.sqf
Normal file
18
@blckeagls_EDEN/addons/3EDEN_plugin/Core/fn_versionInfo.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
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
|
||||
|
11
@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt
Normal file
11
@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-1.txt
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
all3DENEntities params ["_objects"];
|
||||
{
|
||||
diag_log format [
|
||||
"classname %1 | position %2 | direction %3 | isSimple = %4",
|
||||
(_x get3DENAttribute "ItemClass") select 0,
|
||||
(_x get3DENAttribute "position") select 0,
|
||||
((_x get3DENAttribute "rotation") select 0) select 2,
|
||||
(_x get3DENAttribute "objectIsSimple") select 0
|
||||
];
|
||||
} forEach _objects;
|
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
_parameter = 0;
|
||||
_ok = "Multiplayer" set3DENMissionAttribute ["respawn",15];
|
||||
_parameter = "Multiplayer" get3DENMissionAtrribute "respawn";
|
||||
systemChat format["_parameter = %1",_parameter];
|
129
@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.txt
Normal file
129
@blckeagls_EDEN/addons/3EDEN_plugin/Export/Untitled-2.txt
Normal file
@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Dynamic Mission Generated
|
||||
Using 3DEN Plugin for blckeagls
|
||||
dynamicMission.sqf generated:: blckeagls 3DEN Plugin Version 0 : Build 2 : Build Date 08/15/20
|
||||
By Ghostrider-GRG-
|
||||
*/
|
||||
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
#include "\q\addons\custom_server\Missions\privateVars.sqf";
|
||||
|
||||
_defaultMissionLocations = [];
|
||||
_markerType = ["mil_box",[1,1],"<null>"];
|
||||
_markerColor = "ColorRed";
|
||||
_startMsg = "TODO: Change approiately";
|
||||
_endMsg = "TODO: Change Appropriately";
|
||||
_markerMissionName = "Stay Away";
|
||||
_crateLoot = blck_BoxLoot_Blue;
|
||||
_lootCounts = blck_lootCountsBlue;
|
||||
|
||||
_garrisonedBuilding_ATLsystem = [
|
||||
["Land_Unfinished_Building_01_F",[0,0,0],0,true,true,
|
||||
[["B_HMG_01_high_F",[-2.19922,0.837891,3.61188],0],
|
||||
["B_static_AA_F",[-2.34766,3.85352,6.80866],0]],
|
||||
[
|
||||
[[0.96875,-1.99023,0.27216],0],
|
||||
[[-3.74219,0.279297,0.136929],0]]
|
||||
],
|
||||
["Land_Unfinished_Building_01_F",[0,0,0],0,true,true,[["B_HMG_01_F",[-1.87305,5.36523,3.86831],0]],[[[-2.46289,-1.18555,3.68233],0],[[-1.72656,3.4668,6.88683],0]]]
|
||||
];
|
||||
|
||||
_missionLandscape = [
|
||||
["Land_u_Shed_Ind_F",[-29.123,-8.11914,-33.866],0,true,true],
|
||||
["Land_Shed_08_brown_F",[-15.1465,25.9961,-33.871],0,true,true],
|
||||
["Land_Shed_02_F",[26.5762,78.6641,-33.8547],0,true,true],
|
||||
["Land_Wreck_AFV_Wheeled_01_F",[-5.21289,-20.9434,-33.8297],0,true,true]
|
||||
];
|
||||
|
||||
_simpleObjects = [
|
||||
|
||||
];
|
||||
|
||||
_missionLootVehicles = [
|
||||
|
||||
];
|
||||
|
||||
_missionPatrolVehicles = [
|
||||
["B_Truck_01_mover_F",[24.084,13.5703,-33.8635],0,75,75],
|
||||
["B_MRAP_01_hmg_F",[3.02539,16.2363,-33.8629],0,75,75],
|
||||
["B_HMG_01_F",[46.9961,45.3984,-29.9977],0,75,75],
|
||||
["B_GMG_01_F",[-5.16211,-5.00586,-33.8644],0,75,75],
|
||||
["B_Heli_Light_01_dynamicLoadout_F",[-6.61523,8.89844,-33.864],0,75,75],
|
||||
["B_T_Boat_Transport_01_F",[18.582,44.1055,-33.8654],0,75,75],
|
||||
["B_HMG_01_high_F",[30.6055,0.525391,-30.1961],0,75,75],
|
||||
["B_static_AA_F",[30.457,3.54102,-26.9993],0,75,75]
|
||||
];
|
||||
|
||||
_submarinePatrolParameters = [
|
||||
|
||||
];
|
||||
|
||||
_airPatrols = [
|
||||
["B_Heli_Light_01_dynamicLoadout_F",[-6.61523,8.89844,-33.864],0,1000,1000]
|
||||
];
|
||||
|
||||
_missionEmplacedWeapons = [
|
||||
["B_HMG_01_F",[46.9961,45.3984,-29.9977],0],
|
||||
["B_GMG_01_F",[-5.16211,-5.00586,-33.8644],0],
|
||||
["B_HMG_01_high_F",[30.6055,0.525391,-30.1961],0],
|
||||
["B_static_AA_F",[30.457,3.54102,-26.9993],0]
|
||||
];
|
||||
|
||||
_missionGroups = [
|
||||
[[30.0605,46.2383,-33.8646],3,6,"Blue",30,45],
|
||||
[[5.66602,-8.33398,-33.8665],3,6,"Blue",30,45],
|
||||
[[47.1426,43.5,-26.9792],3,6,"Blue",30,45],
|
||||
[[46.4063,38.8477,-30.1837],3,6,"Blue",30,45],
|
||||
[[19.9512,-4.41797,-29.7975],3,6,"Blue",30,45],
|
||||
[[29.0625,-0.0332031,-33.6711],3,6,"Blue",30,45],
|
||||
[[33.7734,-2.30273,-33.5358],3,6,"Blue",30,45]
|
||||
];
|
||||
|
||||
_scubaGroupParameters = [
|
||||
|
||||
];
|
||||
|
||||
_missionLootBoxes = [
|
||||
["Box_IND_Wps_F",[10.7441,1.8418,-33.8658],_crateLoot,_lootCounts,0],
|
||||
["Box_AAF_Equip_F",[13.2188,7.31445,-33.8656],_crateLoot,_lootCounts,0],
|
||||
["Box_IND_AmmoOrd_F",[14.9844,13.168,-33.8657],_crateLoot,_lootCounts,0],
|
||||
["Box_IND_WpsLaunch_F",[10.1504,-2.12109,-33.8658],_crateLoot,_lootCounts,0]
|
||||
];
|
||||
|
||||
/*
|
||||
Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them
|
||||
*/
|
||||
_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 = "atMissionSpawnGround";
|
||||
_loadCratesTiming = "atMissionSpawn";
|
||||
_endCondition = "allKilledOrPlayerNear";
|
||||
_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";
|
305
@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf
Normal file
305
@blckeagls_EDEN/addons/3EDEN_plugin/Export/fn_exportStatic.sqf
Normal file
@ -0,0 +1,305 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
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 = 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["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];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
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["<WARNING> 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","_missionCenter"];
|
||||
/*
|
||||
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 "brush") 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 = "";
|
||||
_markerSize = [0,0];
|
||||
_markerColor = "COLORRED";
|
||||
_markerBrush = "";
|
||||
diag_log format["<WARNING> 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{
|
||||
!((_x get3DENAttribute "objectIsSimple") select 0) &&
|
||||
((typeOf _x) isKindOf "Static") &&
|
||||
!((typeOf _x) isKindOf "Helper")
|
||||
};
|
||||
|
||||
diag_log format["CENTER = %1 | _landscape = %2","ignored",_landscape];
|
||||
private _missionLandscape = [];
|
||||
{
|
||||
private _allowDamage = (_x get3DENAttribute "allowDamage") select 0;
|
||||
private _enableSimulation = (_x get3DENAttribute "enableSimulation") select 0;
|
||||
_missionLandscape pushBack format[' ["%1",%2,%3,%4]',typeOf _x,(getPosATL _x),[vectorDir _x,vectorUp _x], [_allowDamage,_enableSimulation]];
|
||||
}forEach _landscape;
|
||||
|
||||
private _simpleObjects = _objects select {(_x get3DENAttribute "objectIsSimple") select 0};
|
||||
diag_log format["_simpleObjects = %1",_simpleObjects];
|
||||
private _missionSimpleObjects = [];
|
||||
{
|
||||
_missionSimpleObjects pushBack format[' ["%1",%2,%3]',
|
||||
(_x get3DENAttribute "ItemClass") select 0,
|
||||
((_x get3DENAttribute "position") select 0),
|
||||
((_x get3DENAttribute "rotation") select 0) select 2
|
||||
];
|
||||
} 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), [vectorDir _x,vectorUp _x],'_crateLoot','_lootCounts'];
|
||||
} forEach _lootVehicles;
|
||||
|
||||
_missionPatrolVehicles = [];
|
||||
private _patrolVehicles = _objects select {
|
||||
(((typeOf _x) isKindOf "Car") || ((typeOf _x) isKindOf "Tank") || ((typeOf _x) isKindOf "Ship")) &&
|
||||
!((typeOf _x) isKindOf "SDV_01_base_F") &&
|
||||
!(_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,%6]',typeOf _x,(getPosATL _x), [vectorDir _x,vectorUp _x],[true,true],'_crateLoot','_lootCounts'];
|
||||
}forEach _ammoBoxes;
|
||||
|
||||
private _lines = [];
|
||||
private _lineBreak = toString [10];
|
||||
|
||||
_lines pushBack "/*";
|
||||
_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 "privateVars.sqf";';
|
||||
_lines pushBack "";
|
||||
_lines pushBack format["_missionCenter = %1;",_markerPos];
|
||||
|
||||
if !(_markerBrush isEqualTo "") then
|
||||
{
|
||||
_lines pushBack format["_markerType = %1",format['["%1",%2,%3];',_markerType,_markerSize,_markerBrush]];
|
||||
} else {
|
||||
_lines pushBack format["_markerType = %1",format['"%1",%2',_markerType,_markerSize]];
|
||||
};
|
||||
_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 (_missionSimpleObjects 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 "*/";
|
||||
_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";
|
@ -0,0 +1,62 @@
|
||||
|
||||
_cb = "";
|
||||
|
||||
//////////////////
|
||||
// *** OPTIONAL ****
|
||||
// Place a marker over your mission and configure it as you would like to to appear in the tame.
|
||||
// The marker configuration will be included in the output of this script.
|
||||
// Note ** Only the first marker placed will be processed **
|
||||
// Configure Marker
|
||||
/////////////////
|
||||
/*
|
||||
_markerType = ["ELIPSE",[175,175],"GRID"];
|
||||
_markerType = ["mil_triangle",[0,0]];
|
||||
*/
|
||||
|
||||
diag_log format["<< ---- START %1 ---- >>",diag_tickTime];
|
||||
|
||||
_allmkr = allMapMarkers;
|
||||
diag_log format["_allmkr = %1",_allmkr];
|
||||
if (count _allmkr == 0) then
|
||||
//if !(typeName _mk isEqualTo "STRING") then
|
||||
{
|
||||
hint "No Marker Found, no Marker Definitions Will Be generated";
|
||||
uiSleep 5;
|
||||
} else {
|
||||
|
||||
_mk = _allmkr select 0;
|
||||
diag_log format["_mk = %1",_mk];
|
||||
systemChat format["marker shape = %1",markerShape _mk];
|
||||
systemChat format["marker type = %1",markerType _mk];
|
||||
systemChat format["marker size = %1",markerSize _mk];
|
||||
systemChat format["markerColor = %1",markerColor _mk];
|
||||
systemChat format["marker brush = %1",markerBrush _mk];
|
||||
//systemChat
|
||||
switch (toUpper(markerShape _mk)) do
|
||||
{
|
||||
case "ELLIPSE": {
|
||||
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
|
||||
};
|
||||
case "RECTANGLE": {
|
||||
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
|
||||
};
|
||||
case "ICON": {
|
||||
_cb = _cb + format['_markerType = ["%1"];%2',getMarkerType _mk,endl];
|
||||
};
|
||||
};
|
||||
|
||||
_cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl];
|
||||
_cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl];
|
||||
_cb = _cb + format["%1%1",endl];
|
||||
};
|
||||
|
||||
///////////////////
|
||||
// All done, notify the user and copy the output to the clipboard
|
||||
///////////////////
|
||||
_msg = "Marker Data organzied, formated and copied to the Clipboard";
|
||||
hint _msg;
|
||||
systemChat _msg;
|
||||
systemChat format["_cb has %1 characters",count _cb];
|
||||
copyToClipboard _cb;
|
||||
diag_log "DONE";
|
||||
|
@ -0,0 +1 @@
|
||||
CENTER = getPos player;
|
81
@blckeagls_EDEN/addons/3EDEN_plugin/Static/template.sqf
Normal file
81
@blckeagls_EDEN/addons/3EDEN_plugin/Static/template.sqf
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
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 = 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"
|
||||
|
||||
//////////
|
||||
// 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 = 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
|
||||
//_timeOut = -1;
|
||||
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";
|
59
@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp
Normal file
59
@blckeagls_EDEN/addons/3EDEN_plugin/config.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
|
||||
Parts of config.cpp were derived from the Exile_3EDEN editor plugin
|
||||
* and is licensed as follows:
|
||||
* 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/.
|
||||
*/
|
||||
#include "defines.h"
|
||||
class CfgBlck3DEN
|
||||
{
|
||||
class configs
|
||||
{
|
||||
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 = 8;
|
||||
date = "10/05/20";
|
||||
};
|
||||
};
|
||||
|
495
@blckeagls_EDEN/addons/3EDEN_plugin/defines.h
Normal file
495
@blckeagls_EDEN/addons/3EDEN_plugin/defines.h
Normal file
@ -0,0 +1,495 @@
|
||||
// defines.h
|
||||
/*
|
||||
blckeagls 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
Parts of defines.h were derived from the Exile_3EDEN editor plugin
|
||||
* and is licensed as follows:
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
/*
|
||||
**************************************
|
||||
DO NOT CHANGE ANYTHING BELOW THIS LINE
|
||||
**************************************
|
||||
*/
|
||||
class CfgPatches
|
||||
{
|
||||
class GMS_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 about {};
|
||||
class buildingContainer {};
|
||||
class configureGarrisonATL {};
|
||||
class createLootMarker {};
|
||||
class createGarrisonMarker {};
|
||||
class display {};
|
||||
class displayGarrisonMarkers {};
|
||||
class displayLootMarkers {};
|
||||
class exportDynamic {};
|
||||
class getGarrisonInfo {};
|
||||
class getLootVehicleInfo {};
|
||||
class initialize {
|
||||
postInit = 1;
|
||||
};
|
||||
class isInside {};
|
||||
class loadCratesTiming {};
|
||||
class onDrag {};
|
||||
class onRegistered {};
|
||||
class onUnregister {};
|
||||
class removeMarker {};
|
||||
class setDifficulty {};
|
||||
class setCompletionMode {}
|
||||
class setGarrison {};
|
||||
class setLootVehicle {};
|
||||
class setSpawnLocations {};
|
||||
class spawnCratesTiming {};
|
||||
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";
|
||||
//onHistoryChange = "call blck3DEN_fnc_updateObjects";
|
||||
};
|
||||
};
|
||||
|
||||
class Attributes
|
||||
{
|
||||
class Default;
|
||||
|
||||
class Title: Default
|
||||
{
|
||||
class Controls
|
||||
{
|
||||
class Title;
|
||||
};
|
||||
};
|
||||
|
||||
class Combo: Title
|
||||
{
|
||||
class Controls: Controls
|
||||
{
|
||||
class Title: Title {};
|
||||
class Value: ctrlCombo {};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
class Mission
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class Object
|
||||
{
|
||||
class AttributeCategories
|
||||
{
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class CfgVehicles
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class ctrlMenuStrip;
|
||||
class ctrlMenu;
|
||||
|
||||
class display3DEN
|
||||
{
|
||||
class Controls
|
||||
{
|
||||
class MenuStrip: ctrlMenuStrip
|
||||
{
|
||||
|
||||
class Items
|
||||
{
|
||||
items[] += {"Blackeagls"};
|
||||
|
||||
class Blackeagls
|
||||
{
|
||||
text = "GMS";
|
||||
items[] = {
|
||||
"blckAbout3EDENPlugin",
|
||||
"blckSeparator",
|
||||
"blckMissionDifficulty",
|
||||
"blckMissionCompletionMode",
|
||||
"lootSpawnTiming",
|
||||
"loadCratesTiming",
|
||||
"blckSeparator",
|
||||
//"blckMissionMessages",
|
||||
"blckMissionLocation",
|
||||
"blckSeparator",
|
||||
"blck_setGarrison",
|
||||
//"blck_getGarrisonInfo",
|
||||
//"blck_getMissionGarrisonInfo",
|
||||
"blckSeparator",
|
||||
"blck_markLootVehicle",
|
||||
//"blck_getLootVehicleInfo",
|
||||
//"blck_getMissionLootVehicleInfo",
|
||||
"blckSeparator",
|
||||
//"blckSaveStaticMission",
|
||||
"blckSaveDynamicMission",
|
||||
"blckSeparator",
|
||||
"blck3EDENPluginHelp"
|
||||
};
|
||||
};
|
||||
|
||||
class blckAbout3EDENPlugin
|
||||
{
|
||||
text = "3EDEN Plugin Version 1.0 for GMS by Ghostrider-GRG-";
|
||||
action = "call blck3EDEN_fnc_about";
|
||||
};
|
||||
|
||||
class blckSeparator
|
||||
{
|
||||
value = 0;
|
||||
};
|
||||
|
||||
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 = "allKilledOrPlayerNear";
|
||||
};
|
||||
|
||||
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 blckMissionLocation
|
||||
{
|
||||
text = "Toggle Random or Fixed Location";
|
||||
toolTip = "Set whether mission spawns at random or fixed locations";
|
||||
items[] = {
|
||||
"blck_randomLocation",
|
||||
"blck_fixedLocation"
|
||||
};
|
||||
};
|
||||
class blck_randomLocation
|
||||
{
|
||||
text = "Spawn at Random Locations (Default)";
|
||||
action = "['randm'] call blck3DEN_fnc_setSpawnLocations";
|
||||
};
|
||||
class blck_fixedLocation
|
||||
{
|
||||
text = "Always spawn at the same location";
|
||||
toolTip = "Use to have mission respawn at same location";
|
||||
action = "['fixed'] call blck3DEN_fnc_setSpawnLocations";
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
|
||||
class blck_setGarrison
|
||||
{
|
||||
text = "Garrisoned Building Settings";
|
||||
toolTip = "Set garrison status of selected buildings";
|
||||
items[] = {
|
||||
"blck_setGarrisonedState",
|
||||
"blck_getGarrisonInfo",
|
||||
"blck_garrisonMarkers"
|
||||
};
|
||||
};
|
||||
class blck_setGarrisonedState
|
||||
{
|
||||
items[] = {
|
||||
"blck_isGarrisoned",
|
||||
"blck_clearGarrisoned"
|
||||
};
|
||||
text = "Garrison Settings";
|
||||
};
|
||||
class blck_isGarrisoned
|
||||
{
|
||||
text = "Garrison Building";
|
||||
toolTip = "Flag selected buildings to be garrisoned";
|
||||
value = true;
|
||||
action = "[true] call blck3DEN_fnc_setGarrison";
|
||||
};
|
||||
class blck_clearGarrisoned
|
||||
{
|
||||
text = "Remove Garrison";
|
||||
toolTip = "Selected Buildings will Not be Garrisoned";
|
||||
value = false;
|
||||
action = "[false] call blck3DEN_fnc_setGarrison";
|
||||
};
|
||||
class blck_getGarrisonInfo
|
||||
{
|
||||
text = "Get Building Garrisoned Setting";
|
||||
toolTip = "Get the selected buildings garrisoned flag";
|
||||
action = "call blck3DEN_fnc_getGarrisonInfo";
|
||||
};
|
||||
class blck_garrisonMarkers
|
||||
{
|
||||
items[] = {
|
||||
"blck_GarrisonMarkersOn",
|
||||
"blck_GarrisonMarkersOff"
|
||||
};
|
||||
text = "Toggle markers over garrisoned buildings";
|
||||
};
|
||||
class blck_GarrisonMarkersOn
|
||||
{
|
||||
text = "Display Markers over Garrisoned Buildings";
|
||||
action = "[true] call blck3DEN_fnc_displayGarrisonMarkers";
|
||||
};
|
||||
class blck_GarrisonMarkersOff
|
||||
{
|
||||
text = "Hide Markers over Garrisoned Buildings";
|
||||
action = "[false] call blck3DEN_fnc_displayGarrisonMarkers";
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
class blck_markLootVehicle
|
||||
{
|
||||
text = "Loot Vehicle Settings";
|
||||
items[] = {
|
||||
"blck_designateLootVehicleState",
|
||||
"blck_getLootVehicleInfo",
|
||||
"blck_displayLootMarkers"
|
||||
};
|
||||
};
|
||||
class blck_designateLootVehicleState
|
||||
{
|
||||
items[] = {
|
||||
"blck_setAsLootVehicle",
|
||||
"blck_clearLootVehicleFlag"
|
||||
};
|
||||
text = "Loot Vehicle Settings";
|
||||
};
|
||||
class blck_clearLootVehicleFlag
|
||||
{
|
||||
text = "Clear Loot Vehicle Settings";
|
||||
action = "[false] call blck3DEN_fnc_setLootVehicle";
|
||||
};
|
||||
class blck_setAsLootVehicle
|
||||
{
|
||||
text = "Desinate Loot Vehicle";
|
||||
action = "[true] call blck3DEN_fnc_setLootVehicle";
|
||||
};
|
||||
class blck_getLootVehicleInfo
|
||||
{
|
||||
text = "Get setting for selected vehicle";
|
||||
action = "call blck3DEN_fnc_getLootVehicleInfo";
|
||||
};
|
||||
class blck_displayLootMarkers
|
||||
{
|
||||
items[] = {
|
||||
"blck_lootMarkersOn",
|
||||
"blck_lootMarkersOff"
|
||||
};
|
||||
text = "Toggle Loot Vehicle Markers";
|
||||
};
|
||||
class blck_lootMarkersOn
|
||||
{
|
||||
text = "Mark Loot Vehicles / Objects";
|
||||
action = "[true] call blck3DEN_fnc_displayLootMarkers";
|
||||
};
|
||||
class blck_lootMarkersOff
|
||||
{
|
||||
text = "Hide Markers of Loot Vehicles / Objects";
|
||||
action = "[false] call blck3DEN_fnc_displayLootMarkers";
|
||||
};
|
||||
/////////////////////////////
|
||||
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 = "systemChat 'saving dynamic mission';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";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
55
@blckeagls_EDEN/addons/CfgFunctions.h
Normal file
55
@blckeagls_EDEN/addons/CfgFunctions.h
Normal file
@ -0,0 +1,55 @@
|
||||
|
||||
class CfgFunctions
|
||||
{
|
||||
class gms3DEN
|
||||
{
|
||||
class Export
|
||||
{
|
||||
file = "3DEN_plugin\Export";
|
||||
|
||||
//class exportStatic {};
|
||||
};
|
||||
|
||||
class Core
|
||||
{
|
||||
file = "3DEN_plugin\Core";
|
||||
|
||||
class about {};
|
||||
class buildingContainer {};
|
||||
class configureGarrisonATL {};
|
||||
class display {};
|
||||
class displayGarrisonMarkers {};
|
||||
class displayLootMarkers {};
|
||||
class exportDynamic {};
|
||||
class initialize {};
|
||||
class initializeAttributes {};
|
||||
class isInfantryUnit {};
|
||||
class isInVehicle {};
|
||||
class isInside {};
|
||||
class onAttributeLoadGarrison {};
|
||||
class onAttributeLoadGarrisonColor {};
|
||||
class onAttributeLoadLootVeh {};
|
||||
class onAttributeLoadLootVehColor {};
|
||||
class onAttributeSaveGarrison {};
|
||||
class onAttributeSaveGarrisonColor {};
|
||||
class onAttributeSaveLootVeh {};
|
||||
class onAttributeSaveLootVehColor {};
|
||||
class onDrag {};
|
||||
class onLoadGarrison {};
|
||||
class onLoadGarrisonColor {};
|
||||
class onLoadLootVeh {};
|
||||
class onLoadLootVehColor {};
|
||||
class onRegistered {};
|
||||
class onUnregister {};
|
||||
class removeMarker {};
|
||||
class setDifficulty {};
|
||||
class setCompletionMode {}
|
||||
class setGarrison {};
|
||||
class setLoadCratesTiming {};
|
||||
class setLootVehicle {};
|
||||
class setSpawnLocations {};
|
||||
class spawnCratesTiming {};
|
||||
class versionInfo {};
|
||||
};
|
||||
};
|
||||
};
|
53
@blckeagls_EDEN/addons/CfgGMS3DEN.h
Normal file
53
@blckeagls_EDEN/addons/CfgGMS3DEN.h
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
|
||||
class CfgGMS3DEN
|
||||
{
|
||||
class CfgDefaults
|
||||
{
|
||||
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
|
||||
};
|
||||
|
||||
/****************************************
|
||||
DO NOT TOUCH ANYTHING BELOW THIS LINE
|
||||
*****************************************/
|
||||
#include "Cfggms3DENVersion.h"
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
12
@blckeagls_EDEN/addons/CfgPatches.h
Normal file
12
@blckeagls_EDEN/addons/CfgPatches.h
Normal file
@ -0,0 +1,12 @@
|
||||
class CfgPatches
|
||||
{
|
||||
class GMS_3DEN
|
||||
{
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {3DEN};
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
ammo[] = {};
|
||||
};
|
||||
};
|
356
@blckeagls_EDEN/addons/Cfggms3DENDisplay.h
Normal file
356
@blckeagls_EDEN/addons/Cfggms3DENDisplay.h
Normal file
@ -0,0 +1,356 @@
|
||||
#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 Checkbox;
|
||||
class ctrlMenuStrip;
|
||||
class ctrlMenu;
|
||||
|
||||
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 gms3DENCheckBoxGarrisonsControl: CheckBox
|
||||
{
|
||||
onload = "call gms3DEN_fnc_onLoadGarrison;";
|
||||
//onUnload = "diag_log 'onUnload for garrisons'";
|
||||
attributeLoad = "call gms3DEN_fnc_onAttributeLoadGarrison;";
|
||||
//attributeSave = "call gms3DEN_fnc_onAttributeSaveGarrison;";
|
||||
};
|
||||
class gmsGarrisonColorControl: CheckBox
|
||||
{
|
||||
onload = "call gms3DEN_fnc_onLoadGarrisonColor;";
|
||||
//onUnload = "diag_log 'onUnload for garrisons'";
|
||||
attributeLoad = "call gms3DEN_fnc_onAttributeLoadGarrisonColor;";
|
||||
//attributeSave = "call gms3DEN_fnc_onAttributeSaveGarrisonColor;";
|
||||
};
|
||||
class gms3DENCheckboxLootVehControl: CheckBox
|
||||
{
|
||||
onload = "call gms3DEN_fnc_onLoadLootVeh;";
|
||||
//onUnload = "diag_log 'onUnload for loot veh'";
|
||||
onAttributeLoad = "call gms3DEN_fnc_onAttributeLoadLootVeh;";
|
||||
//onAttributeSave = "call gms3DEN_fnc_onAttributeSaveLootVeh;";
|
||||
};
|
||||
class gms3DENCLootVehicleColorControl: CheckBox
|
||||
{
|
||||
onload = "call gms3DEN_fnc_onLoadLootVehColor;";
|
||||
//onUnload = "diag_log 'onUnload for loot veh'";
|
||||
onAttributeLoad = "call gms3DEN_fnc_onAttributeLoadLootVehColor;";
|
||||
//onAttributeSave = "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 = "gmsGarrisonColorControl";
|
||||
//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 = "gms3DENCheckboxLootVehControl";
|
||||
//condition = "";
|
||||
expression = "_this setVariable ['%s',_value];";
|
||||
defaultValue = "false";
|
||||
};
|
||||
class lootVehicleColorAttribute
|
||||
{
|
||||
displayName = "Color On";
|
||||
tooltip = "Check box to color this loot vehicle";
|
||||
property = "gmsLootVehicleColor";
|
||||
control = "gms3DENCLootVehicleColorControl";
|
||||
//condition = "";
|
||||
expression = "_this setVariable ['%s',_value];";
|
||||
defaultValue = "false";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
8
@blckeagls_EDEN/addons/Cfggms3DENVersion.h
Normal file
8
@blckeagls_EDEN/addons/Cfggms3DENVersion.h
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
class CfgVersion
|
||||
{
|
||||
version = 1.0;
|
||||
build = 13;
|
||||
date = "05/01/23";
|
||||
};
|
99
@blckeagls_EDEN/addons/Core/Untitled-1.txt
Normal file
99
@blckeagls_EDEN/addons/Core/Untitled-1.txt
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
Dynamic Mission Generated
|
||||
Using 3DEN Plugin for blckeagls
|
||||
dynamicMission.sqf generated:: blckeagls 3DEN Plugin Version 0 : Build 10 : Build Date 04/26/23
|
||||
By Ghostrider-GRG-
|
||||
*/
|
||||
|
||||
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
||||
#include "\GMS\Missions\GMS_privateVars.sqf"
|
||||
|
||||
_defaultMissionLocations = [];
|
||||
_maxMissionRespawns = -1; // Chage this to a positive number if you want to limit the number of times a mission spawns at the same location
|
||||
_markerType = ["["mil_triangle"]",[[1,1]],"["Solid"]"];
|
||||
_markerColor = "["ColorOrange"]";
|
||||
_startMsg = "TODO: Change approiately";
|
||||
_endMsg = "TODO: Change Appropriately";
|
||||
_markerMissionName = "TODO: Update appropriately";
|
||||
_crateLoot = GMS_BoxLoot_Red;
|
||||
_lootCounts = GMS_lootCountsRed;
|
||||
|
||||
_garrisonedBuilding_ATLsystem = [
|
||||
|
||||
];
|
||||
|
||||
_missionLandscape = [
|
||||
|
||||
];
|
||||
|
||||
_simpleObjects = [
|
||||
|
||||
];
|
||||
|
||||
_missionLootVehicles = [
|
||||
];
|
||||
|
||||
_missionPatrolVehicles = [
|
||||
["B_MBT_01_cannon_F",[-1.9165,34.7493,0],0],
|
||||
["B_LSV_01_unarmed_F",[29.3511,35.4172,0],0],
|
||||
["B_Lifeboat",[30.3169,2.06274,0],0],
|
||||
["B_Lifeboat",[30.3169,2.06274,0],0],
|
||||
["B_MBT_01_arty_F",[29.6714,-29.8103,4.76837e-007],0],
|
||||
["B_APC_Wheeled_01_cannon_F",[-1.9751,-30.1177,0],0],
|
||||
["B_APC_Tracked_01_AA_F",[-66.5991,-29.5686,0],0]
|
||||
];
|
||||
|
||||
_submarinePatrolParameters = [
|
||||
|
||||
];
|
||||
|
||||
_airPatrols = [
|
||||
|
||||
];
|
||||
|
||||
_missionEmplacedWeapons = [
|
||||
["B_HMG_01_A_F",[-35.1045,2.57886,0],0]
|
||||
];
|
||||
|
||||
_missionGroups = [
|
||||
|
||||
];
|
||||
|
||||
_scubaGroupParameters = [
|
||||
|
||||
];
|
||||
|
||||
_missionLootBoxes = [
|
||||
["Box_FIA_Ammo_F",[-22.1069,14.9121,0],_crateLoot,_lootCounts,0]
|
||||
];
|
||||
|
||||
/*
|
||||
Use the parameters below to customize your mission - see the template or blck_configs.sqf for details about each them
|
||||
*/
|
||||
_chanceHeliPatrol = GMS_chanceHeliPatrolRed;
|
||||
_noChoppers = GMS_noPatrolHelisRed;
|
||||
_missionHelis = GMS_patrolHelisRed;
|
||||
_chancePara = GMS_chanceParaRed;
|
||||
_noPara = GMS_noParaRed;
|
||||
_paraTriggerDistance = 400;
|
||||
_chanceLoot = 0.0;
|
||||
_paraLoot = GMS_BoxLoot_Red;
|
||||
_paraLootCounts = GMS_lootCountsRed;
|
||||
_missionLandscapeMode = "precise";
|
||||
_uniforms = GMS_SkinList;
|
||||
_headgear = GMS_headgear;
|
||||
_vests = GMS_vests;
|
||||
_backpacks = GMS_backpacks;
|
||||
_sideArms = GMS_Pistols;
|
||||
_spawnCratesTiming = "atMissionStartGround";
|
||||
_loadCratesTiming = "atMissionStart";
|
||||
_endCondition = allUnitsKilled;
|
||||
_minNoAI = GMS_MinAI_Red;
|
||||
_maxNoAI = GMS_MaxAI_Red;
|
||||
_noAIGroups = GMS_AIGrps_Red;
|
||||
_noVehiclePatrols = GMS_SpawnVeh_Red;
|
||||
_noEmplacedWeapons = GMS_SpawnEmplaced_Red;
|
||||
_submarinePatrols = 0; // Default number of submarine patrols at pirate missions
|
||||
_scubaPatrols = 0; // Default number of scuba diver patrols at pirate missions
|
||||
|
||||
#include "\GMS\Compiles\Missions\GMS_fnc_missionSpawner.sqf";
|
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
_object setVariable["gmsGarrisonColor",_colorOn];
|
||||
if (_colorOn) then {
|
||||
{_object setObjectTexture [_x,gms3DENlootVehicleTexture]} forEach (count (getObjectTextures _object));
|
||||
};
|
4
@blckeagls_EDEN/addons/Core/fn_about.sqf
Normal file
4
@blckeagls_EDEN/addons/Core/fn_about.sqf
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
private _m= format["About called at %1",diag_tickTime];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
43
@blckeagls_EDEN/addons/Core/fn_buildingContainer.sqf
Normal file
43
@blckeagls_EDEN/addons/Core/fn_buildingContainer.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
Returns the builing containing an object or objNull
|
||||
By Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
*/
|
||||
// TODO: Needs testing
|
||||
params["_u",["_category","Building"]];
|
||||
|
||||
private _pos = getPosASL _u;
|
||||
private _above = AGLToASL [_pos select 0, _pos select 1, (_pos select 2) + 100];
|
||||
private _below = AGLtoASL [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10]];
|
||||
private _objAbove = lineIntersectsObjs [_pos, _above, _u];
|
||||
private _objBelow = lineIntersectsObjs [_pos, _below, _u];
|
||||
private _containers = [];
|
||||
private _container = objNull;
|
||||
private _distance = 1000;
|
||||
if !(_objAbove isEqualTo []) then
|
||||
{
|
||||
_containers = _objAbove;
|
||||
} else {
|
||||
if !(_objBelow isEqualTo []) then
|
||||
{
|
||||
_containers = _objBelow;
|
||||
};
|
||||
};
|
||||
if !(_containers isEqualTo []) then
|
||||
{
|
||||
while {!(_containers isEqualTo [])} do
|
||||
{
|
||||
private _obj = _containers deleteAt 0;
|
||||
private _dis = _obj distance _pos;
|
||||
if (_dis < _distance) then {
|
||||
_distance = _dis;
|
||||
_container = _obj;
|
||||
};
|
||||
};
|
||||
};
|
||||
if !(isNull _container) then
|
||||
{
|
||||
private _buildingPos = [_container] call BIS_fnc_buildingPositions;
|
||||
if (_buildingPos isEqualTo []) then {diag_log format["<gmd3DEN> WARNING: a unit or turret was place in a building of classname %1 that can not be entered", typeOf _container]};
|
||||
};
|
||||
_container
|
87
@blckeagls_EDEN/addons/Core/fn_configureGarrisonATL.sqf
Normal file
87
@blckeagls_EDEN/addons/Core/fn_configureGarrisonATL.sqf
Normal file
@ -0,0 +1,87 @@
|
||||
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params[
|
||||
"_building", // An object to be evaluated as a possible location of a garrison
|
||||
"_turrets", // A list of turrets known to be inside something
|
||||
"_groups"]; // A list of groups that are known to be inside something
|
||||
|
||||
diag_log format["configureGarrisonATL Line 10: _this = %1",_this];
|
||||
diag_log format["configureGarrisonATL Line 11: _building = %1",_building];
|
||||
diag_log format["configureGarrisonATL Line 12: _center = %1",_center];
|
||||
diag_log format["configureGarrisonATL Line 13: _turrets = %1",_turrets];
|
||||
diag_log format["configureGarrisonATL Line 14: count _groups = %1 | _groups = %2",count _groups, _groups];
|
||||
|
||||
private _pos = _building get3DENAttribute "position";
|
||||
|
||||
private _count = 0;
|
||||
private _staticsText = [];
|
||||
private _unitsText = [];
|
||||
private _buildingGarrisonATL = [];
|
||||
private _configuredStatics = [];
|
||||
private _configuredUnits = [];
|
||||
private _lineBreak = toString [10];
|
||||
|
||||
for "_i" from 1 to (count _turrets) do
|
||||
{
|
||||
if (_turrets isEqualTo []) exitWith {};
|
||||
private _tur = _turrets deleteAt 0;
|
||||
//_configuredStatics pushBackUnique _tur;
|
||||
private _pos = getPosATL _tur;
|
||||
private _dir = getDir _tur;
|
||||
private _center = getPosATL _container;
|
||||
private _offset = _center vectorDiff _pos;
|
||||
diag_log format["fn_configureGarisonATL Line 39: getPosATL _tur = %1 | getPosATL _container = %2",_pos,_center];
|
||||
_staticsText pushBack [format['%1',typeOf _tur],_offset,_dir];
|
||||
diag_log format["fn_configureGarisonATL Line 41: updated _staticsText to %1",_staticsText];
|
||||
};
|
||||
_staticsText joinString _lineBreak;
|
||||
|
||||
for "_i" from 1 to (count _groups) do
|
||||
{
|
||||
if (_groups isEqualTo []) exitWith {};
|
||||
private _grp = _groups deleteAt 0;
|
||||
private _inside = false;
|
||||
// assume there is a group of 1 and that the leader of the group is in the position to be guarded
|
||||
private _unit = leader _group;
|
||||
//_configuredUnits pushBackUnique _unit;
|
||||
private _pos = getPosATL _unit;
|
||||
private _center = getPosATL _container;
|
||||
private _offset = _pos vectorDiff _center;
|
||||
private _dir = getDir _unit;
|
||||
_unitsText pushBack [_offset,_dir];
|
||||
diag_log format["configureGarrisonATL Line 50: added unit %1 to garison for building %2",_unit,_container];
|
||||
diag_log format["configureGarrisonATL Line 53: updated _unitsText to %1",_unitsText];
|
||||
};
|
||||
_unitsText joinString _lineBreak;
|
||||
|
||||
if !((_staticsText isEqualTo []) && (_unitsText isEqualTo [])) then
|
||||
{
|
||||
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||
diag_log format["configureGarrisonATL: _building %1 | damage %2 | simulation %3",_allowDamage,_enableSimulation];
|
||||
_buildingGarrisonATL = [
|
||||
format["%1",
|
||||
typeOf _building],
|
||||
(getPosATL _building) vectorDiff _center,
|
||||
getDir _building,
|
||||
_allowDamage,
|
||||
_enableSimulation,
|
||||
_staticsText,
|
||||
_unitsText
|
||||
];
|
||||
};
|
||||
|
||||
private "_return";
|
||||
if (_buildingGarrisonATL isEqualTo []) then
|
||||
{
|
||||
_return = [];
|
||||
} else {
|
||||
_return = [_buildingGarrisonATL,_configuredStatics,_configuredUnits];
|
||||
};
|
||||
_return
|
13
@blckeagls_EDEN/addons/Core/fn_display.sqf
Normal file
13
@blckeagls_EDEN/addons/Core/fn_display.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_message"];
|
||||
|
||||
// As found in fn_3DENExportTerrainBuilder.sqf
|
||||
//private _message = ["this is ","an array"];
|
||||
private _lineBreak = toString [10];
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["missionName.sqf", _message joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
30
@blckeagls_EDEN/addons/Core/fn_displayGarrisonMarkers.sqf
Normal file
30
@blckeagls_EDEN/addons/Core/fn_displayGarrisonMarkers.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_state"];
|
||||
all3DENEntities params ["_objects"];
|
||||
_objects = _objects select {_x getVariable["garrisoned",false]};
|
||||
|
||||
missionNameSpace setVariable["blck_displayGarrisonMarkerOn",_state];
|
||||
{
|
||||
if (_state) then // if the request was to show the markers then ....
|
||||
{
|
||||
private _marker = _x getVariable["marker",""];
|
||||
diag_log format["_x = %1 | _marker = %2",_x,_marker];
|
||||
if (_marker isEqualto "") then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_createGarrisonMarker;
|
||||
[_x] call gms3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
} else {
|
||||
blck_displayGarrisonMarkerOn = false;
|
||||
if !(_x getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_removeMarker;
|
||||
};
|
||||
};
|
||||
|
||||
} forEach _objects;
|
27
@blckeagls_EDEN/addons/Core/fn_displayLootMarkers.sqf
Normal file
27
@blckeagls_EDEN/addons/Core/fn_displayLootMarkers.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_state"];
|
||||
all3DENEntities params ["_objects"];
|
||||
_objects = _objects select {_x getVariable ["lootVehicle",false]};
|
||||
|
||||
missionNamespace setVariable["blck_displayLootMarkerOn",_state];
|
||||
{
|
||||
if (_state) then // if the request was to show the markers then ....
|
||||
{
|
||||
if (_x getVariable["marker",""] isEqualto "") then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_createLootMarker;
|
||||
[_x] call gms3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
} else {
|
||||
if !(_x getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_removeMarker;
|
||||
};
|
||||
};
|
||||
|
||||
} forEach _objects;
|
10
@blckeagls_EDEN/addons/Core/fn_endMessage.sqf
Normal file
10
@blckeagls_EDEN/addons/Core/fn_endMessage.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_end"];
|
||||
missionNamespace setVariable["blck_endMessage",_end];
|
||||
systemChat format["End Message set to %1",_end];
|
558
@blckeagls_EDEN/addons/Core/fn_exportDynamic copy.sqf
Normal file
558
@blckeagls_EDEN/addons/Core/fn_exportDynamic copy.sqf
Normal file
@ -0,0 +1,558 @@
|
||||
/*
|
||||
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["<WARNING> 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["<WARNING> 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;
|
438
@blckeagls_EDEN/addons/Core/fn_exportDynamic.sqf
Normal file
438
@blckeagls_EDEN/addons/Core/fn_exportDynamic.sqf
Normal file
@ -0,0 +1,438 @@
|
||||
/*
|
||||
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["<WARNING> 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["<WARNING> More than one marker was found; only the first marker was processed"];
|
||||
};
|
||||
};
|
||||
|
||||
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 = [];
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
if (_obj isKindOf "StaticWeapon") then
|
||||
{
|
||||
private _isGarrison = _obj getVariable["gmsIsGarrison",false];
|
||||
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];
|
||||
};
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
GMS_units = [];
|
||||
GMS_unitsATL = [];
|
||||
{
|
||||
private _units = units _group;
|
||||
{
|
||||
private _unit = _x;
|
||||
private _isGarrisoned = _unit getVariable["gmsIsGarrison",false];
|
||||
if (_isGarrisoned) then {
|
||||
GMS_unitsATL pushBack _unit;
|
||||
} else {
|
||||
GMS_units pushBack _unit;
|
||||
};
|
||||
} forEach _units;
|
||||
//GMS_units pushBack (units _x);
|
||||
} forEach _groups;
|
||||
|
||||
GMS_garrisonedBuildings = [];
|
||||
GMS_objectsToSpawn = [];
|
||||
// Get list of garrisoned buildings based on their attributes
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
if (_obj isKindOf "FloatingStructure_F" || _obj isKindOf "Items_base_F" || _obj isKindOf "Thing" || _obj isKindOf "Static") then
|
||||
{
|
||||
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")];
|
||||
if (_isGarrison) then {
|
||||
GMS_garrisonedBuildings pushBack _obj;
|
||||
} else {
|
||||
GMS_objectsToSpawn pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||
};
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
GMS_missionPatrolVehicles = [];
|
||||
GMS_lootVehicles = [];
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
if (_obj isKindOf "Car" || _obj isKindOf "Tank") then
|
||||
{
|
||||
private _isLoot = _obj getVariable["gmsIsLootVehicle",false];
|
||||
diag_log format["_exportDynamic (227): for LandVehicle %1 _isLoot = %2",_obj,_isLoot];
|
||||
if (_isLoot) then
|
||||
{
|
||||
GMS_lootVehicles pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _obj];
|
||||
} else {
|
||||
GMS_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||
};
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
GMS_missionSimpleObjects = [];
|
||||
// Run through objects and move any simpleObjects and format output.
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
diag_log format["_exportDynamic(228): for _obj %`1 objectIsSimple = %2",_obj, _obj get3DENAttribute "objectIsSimple"];
|
||||
if (_obj get3DENAttribute "objectIsSimple" select 0) then {
|
||||
GMS_missionSimpleObjects pushBack format[' ["%1",%2,%3]',
|
||||
(_obj get3DENAttribute "ItemClass") select 0,
|
||||
((_obj get3DENAttribute "position") select 0) vectorDiff Mission_CENTER,
|
||||
((_obj get3DENAttribute "rotation") select 0) select 2
|
||||
];
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
// Run through objects and format any for output
|
||||
GMS_airPatrols = [];
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
if (_obj isKindOf "Air") then
|
||||
{
|
||||
GMS_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
// 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 = [];
|
||||
for "_i" from 1 to (count _units) do
|
||||
{
|
||||
if (_i > (count _units)) exitWith {};
|
||||
private _unit = _units deleteAt 0;
|
||||
private _isInVehicle = if (vehicle _unit != _unit) then {true} else {false};
|
||||
if (_isInVehicle) then {
|
||||
private _isSurfaceWater = surfaceIsWater (position _unit);
|
||||
if (_surfaceIsWater) then {
|
||||
GMS_scubaGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,blck_minAI,blck_maxAI,GMS_difficulty];
|
||||
} else {
|
||||
GMS_infantryGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,blck_minAI,blck_maxAI,GMS_difficulty];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Run through objects and put any Ammo Crates in a separate array
|
||||
GMS_lootContainers = [];
|
||||
for "_i" from 1 to (count _objects) do
|
||||
{
|
||||
if (_i > (count _objects)) exitWith {};
|
||||
private _obj = _objects deleteAt 0;
|
||||
if (_obj isKindOf "ReammoBox_F" && !(_obj isKindOf "VirtualReammoBox_F")) then {
|
||||
GMS_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER, '_crateLoot','_lootCounts',getDir _obj];
|
||||
} else {
|
||||
_objects pushBack _obj;
|
||||
};
|
||||
};
|
||||
|
||||
diag_log format["_exportDynamic (303): count _objects = %1",count _objects]; // did we capture them all?
|
||||
|
||||
/*
|
||||
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];
|
||||
*/
|
||||
|
||||
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 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]};
|
||||
};
|
||||
_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_lootVehicles 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;
|
31
@blckeagls_EDEN/addons/Core/fn_getLootVehicleInfo.sqf
Normal file
31
@blckeagls_EDEN/addons/Core/fn_getLootVehicleInfo.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship" || (typeOf _x) isKindOf "ThingX"};
|
||||
private "_message";
|
||||
|
||||
if (_objects isEqualTo []) then
|
||||
{
|
||||
_message = "No Cars/Ships/ThingX Selected";
|
||||
} else {
|
||||
if (count _objects == 1) then
|
||||
{
|
||||
if ((_objects select 0) getVariable["lootvehicle",false]) then
|
||||
{
|
||||
_message = format["Vehicle %1 IS a Loot Vehicle",typeOf (_objects select 0)];
|
||||
} else {
|
||||
_message = format["Vehicle %1 is NOT a Loot Vehicle",typeOf (_objects select 0)];
|
||||
};
|
||||
} else {
|
||||
_message = format["% Vehicles Selected. Select a single vehicle then try again",count _objects];
|
||||
};
|
||||
};
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
[_message,"Status"] call BIS_fnc_3DENShowMessage;
|
||||
|
||||
|
11
@blckeagls_EDEN/addons/Core/fn_getMissionGarrisonInfo.sqf
Normal file
11
@blckeagls_EDEN/addons/Core/fn_getMissionGarrisonInfo.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
private _objects = get3DENSelected "object" select {((typeOf _x) isKindOf "House") && [_x] call BIS_fnc_isBuildingEnterable};
|
||||
private _lines = [];
|
||||
private _lineBreak = toString [10];
|
||||
{
|
||||
_message pushBack format["Garrison Flag for Building type %1 at %2 = %3",typeOf _x,getPosATL _x,_x getVariable["garrisoned",false]];
|
||||
} forEach _objects;
|
||||
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["garrisonedBuildings.sqf", _lines joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
||||
|
11
@blckeagls_EDEN/addons/Core/fn_getMissionLootVehicleInfo.sqf
Normal file
11
@blckeagls_EDEN/addons/Core/fn_getMissionLootVehicleInfo.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car"};
|
||||
private _lines = [];
|
||||
private _lineBreak = toString [10];
|
||||
{
|
||||
_message pushBack format["Loot Vehicle Flag for Vehicle type %1 at %2 = %3",typeOf _x,getPosATL _x,_x getVariable["garrisoned",false]];
|
||||
} forEach _objects;
|
||||
|
||||
uiNameSpace setVariable ["Display3DENCopy_data", ["lootVehicles.sqf", _lines joinString _lineBreak]];
|
||||
(findDisplay 313) createdisplay "Display3DENCopy";
|
9
@blckeagls_EDEN/addons/Core/fn_help.sqf
Normal file
9
@blckeagls_EDEN/addons/Core/fn_help.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
private _m = format["Help called at %1",diag_tickTime];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
4
@blckeagls_EDEN/addons/Core/fn_initialize.sqf
Normal file
4
@blckeagls_EDEN/addons/Core/fn_initialize.sqf
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
diag_log format["fn_initialize loaded at %1",diag_tickTime];
|
||||
call gms3DEN_fnc_initializeAttributes;
|
23
@blckeagls_EDEN/addons/Core/fn_initializeAttributes.sqf
Normal file
23
@blckeagls_EDEN/addons/Core/fn_initializeAttributes.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
GMS_difficulty = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "defaultMissionDifficulty");
|
||||
diag_log format["configs returned defaultMissionDifficulty = %1",GMS_difficulty];
|
||||
GMS_lootcrateSpawnTiming = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "defaultLootcrateSpawnTiming");
|
||||
diag_log format["configs returned defaultLootcrateSpawnTiming = %1",GMS_lootcrateSpawnTiming];
|
||||
GMS_lootcrateLoadTiming = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "defaultLootcrateLoadTiming");
|
||||
diag_log format["configs returned defaultLootcrateLoadTiming = %1",GMS_lootcrateLoadTiming];
|
||||
GMS_missionEndState = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "defaultMissionEndState");
|
||||
diag_log format["configs returned defaultMissionEndState = %1",GMS_missionEndState];
|
||||
GMS_startMessage = "TODO: Add a start message";
|
||||
GMS_endMessage = "TODO: Add an end message";
|
||||
GMS_missionLocations = "random";
|
||||
gms3DENGarrisonTexture = getText(configFile >> "CfgGMS3DEN" >> "CfgDefaults" >> "colorGarrisonObject");
|
||||
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];
|
6
@blckeagls_EDEN/addons/Core/fn_isInVehicle.sqf
Normal file
6
@blckeagls_EDEN/addons/Core/fn_isInVehicle.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
params["_unit"];
|
||||
private _vehicle = vehicle _unit;
|
||||
private _isInVehicle = if (_unit isEqualTo _vehicle) then {true} else {false};
|
||||
_isInVehicle
|
17
@blckeagls_EDEN/addons/Core/fn_isInfantryGroup.sqf
Normal file
17
@blckeagls_EDEN/addons/Core/fn_isInfantryGroup.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
private _group = _this select 0;
|
||||
private _units = units _group;
|
||||
private _isInfantry = true;
|
||||
{
|
||||
private _isInside = [_u] call gms3DEN_fnc_isInside;
|
||||
_isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u && !(_isInside)) then {true} else {false};
|
||||
if !(_isInfantry) exitWith {};
|
||||
} forEach _units;
|
||||
_isInfantry
|
14
@blckeagls_EDEN/addons/Core/fn_isInfantryUnit.sqf
Normal file
14
@blckeagls_EDEN/addons/Core/fn_isInfantryUnit.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
private _u = _this select 0;
|
||||
private _isInside = [_u] call gms3DEN_fnc_isInside;
|
||||
private _isInVehicle = [_u] call gms3DEN_fnc_isInVehicle;
|
||||
private _isInfantry = if (_isInside || _isInVehicle) then {false} else {true};
|
||||
|
||||
_isInfantry
|
19
@blckeagls_EDEN/addons/Core/fn_isInside.sqf
Normal file
19
@blckeagls_EDEN/addons/Core/fn_isInside.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
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];
|
||||
private _below = AGLtoASL [_pos select 0, _pos select 1, (_pos select 2) - 10];
|
||||
private _objAbove = lineIntersects [_pos, _above, _u];
|
||||
private _objBelow = lineIntersects [_pos, _below, _u];
|
||||
diag_log format["fn_isInside: _objAbove = %1 | _objBelow = %2",_objAbove,_objBelow];
|
||||
private _isInside = if (_objAbove || _objBelow) then {true} else {false};
|
||||
_isInside
|
||||
|
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
params["_control","_value"];
|
||||
diag_log format["_onAttributeLoadGarrisons: _control = %1 | _value = %2",_control,_value];
|
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
params["_control","_value"];
|
||||
diag_log format["_onAttributeLoadGarrisonsColor: _control = %1 | _value = %2",_control,_value];
|
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
params["_control","_value"];
|
||||
diag_log format["_onLoadAttributeLoadLootVeh: _control = %1 | _value = %2",_control,_value];
|
@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
params["_control","_value"];
|
||||
diag_log format["_onLoadAttributeLoadLootVehColor: _control = %1 | _value = %2",_control,_value];
|
@ -0,0 +1,8 @@
|
||||
|
||||
params["_isGarrison"];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
if (count _selecteObjects == 1) then {
|
||||
(_selectedObjects select 0) setVariable["gmsIsGarrison",_isGarrison];
|
||||
} else {
|
||||
["Changes not applied: you can only configure one object at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
|
||||
params["_colorOn"];
|
||||
|
||||
_object setVariable["gmsGarrisonColor",_colorOn];
|
||||
private _isGarrison = _object getVariable["gmsIsGarrison",false];
|
||||
if (_colorOn && _isGarison) then {
|
||||
{_object setObjectTexture [_x,gms3DENGarrisonTexture]} forEach (count (getObjectTextures _object));
|
||||
} else {
|
||||
{_object setObjectTexture [_x,""]} forEach (count (getObjectTextures _object));
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
|
||||
params["_isLootVeh"];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
if (count _selecteObjects == 1) then {
|
||||
(_selectedObjects select 0) setVariable["gmsIsLootVehicle",_isLootVeh];
|
||||
} else {
|
||||
["Changes not applied: you can only configure one object at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
|
||||
params["_colorOn"];
|
||||
|
||||
_object setVariable["gmsGarrisonColor",_colorOn];
|
||||
private _isLootVeh = _object getVariable["gmsIsLootVehicle",false];
|
||||
if (_colorOn && _isLootVeh) then {
|
||||
{_object setObjectTexture [_x,gms3DENGarrisonTexture]} forEach (count (getObjectTextures _object));
|
||||
} else {
|
||||
{_object setObjectTexture [_x,""]} forEach (count (getObjectTextures _object));
|
||||
};
|
13
@blckeagls_EDEN/addons/Core/fn_onDrag.sqf
Normal file
13
@blckeagls_EDEN/addons/Core/fn_onDrag.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
if !(_object getVariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
private _marker = _object getVariable["marker",""];
|
||||
private _markerPos = getPosATL _object;
|
||||
_marker setPosATL[_markerPos select 0, _markerPos select 1, (_markerPos select 2) + sizeOf _object];
|
||||
};
|
33
@blckeagls_EDEN/addons/Core/fn_onLoadGarrison.sqf
Normal file
33
@blckeagls_EDEN/addons/Core/fn_onLoadGarrison.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
|
||||
|
||||
params ["_displayOrControl", ["_config", configNull]];
|
||||
ⓘ
|
||||
The order of initialisation is as follows:
|
||||
|
||||
Topmost config class (control class)
|
||||
Last config class
|
||||
Display
|
||||
|
||||
This means that during the onLoad event of the upper controls the lower controls do not exist!
|
||||
|
||||
*/
|
||||
|
||||
params ["_displayOrControl", ["_config", configNull]];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
diag_log format["onLoadGarrison: _selectedObjects = %1",_selectedObjects];
|
||||
|
||||
private "_isGarrison";
|
||||
if (count _selectedObjects == 1) then {
|
||||
private _object = (_selectedObjects select 0);
|
||||
_isGarrison = _object getVariable["gmsIsGarrison",false];
|
||||
_displayOrControl cbSetChecked _isGarrison;
|
||||
diag_log format["_isGarrisson = %1 | _obj = %2",_isGarrison,_object];
|
||||
} else {
|
||||
_displayOrControl cbSetChecked false;
|
||||
["You can configure Garrison Status for only ONE vehicle at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
16
@blckeagls_EDEN/addons/Core/fn_onLoadGarrisonColor.sqf
Normal file
16
@blckeagls_EDEN/addons/Core/fn_onLoadGarrisonColor.sqf
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
params ["_displayOrControl", ["_config", configNull]];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
diag_log format["onLoadGarrisonColor: _selectedObjects = %1",_selectedObjects];
|
||||
|
||||
private "_colorOn";
|
||||
if (count _selectedObjects == 1) then {
|
||||
private _object = (_selectedObjects select 0);
|
||||
_colorOn = _object getVariable["gmsGarrisonColor",false];
|
||||
_displayOrControl cbSetChecked _colorOn;
|
||||
diag_log format["_colorOn = %1 | _obj = %2",_colorOn,_object];
|
||||
} else {
|
||||
_displayOrControl cbSetChecked false;
|
||||
["You can configure Garrison Status for only ONE vehicle at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
12
@blckeagls_EDEN/addons/Core/fn_onLoadLootVeh.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_onLoadLootVeh.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
params ["_displayOrControl", ["_config", configNull]];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
|
||||
if (count _objects == 1) then
|
||||
{
|
||||
_displayOrControl cbSetChecked ((_objects select 0) getVariable["gmsIsLootVehicle",false]);
|
||||
} else {
|
||||
_displayOrControl cbSetChecked false;
|
||||
["You can configure Loot Vehicle Status for only ONE vehicle at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
12
@blckeagls_EDEN/addons/Core/fn_onLoadLootVehColor.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_onLoadLootVehColor.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
params ["_displayOrControl", ["_config", configNull]];
|
||||
private _selectedObjects = get3DENSelected "object";
|
||||
|
||||
if (count _objects == 1) then
|
||||
{
|
||||
_displayOrControl cbSetChecked ((_objects select 0) getVariable["gmsLootVehicleColor",false]);
|
||||
} else {
|
||||
_displayOrControl cbSetChecked false;
|
||||
["You can configure Loot Vehicle Status for only ONE vehicle at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||
};
|
28
@blckeagls_EDEN/addons/Core/fn_onRegistered.sqf
Normal file
28
@blckeagls_EDEN/addons/Core/fn_onRegistered.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
switch (true) do
|
||||
{
|
||||
case ((typeOf _object) isKindOf "ThingX" && blck_displayLootMarkerOn): {
|
||||
if !(_object getVariable["lootVehicle",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call gms3DEN_fnc_createLootMarker;
|
||||
[_object] call gms3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
};
|
||||
case ((typeOf _object) isKindOf "House" && blck_displayGarrisonMarkerOn): {
|
||||
if !(_object getVariable["garrisoned",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call gms3DEN_fnc_createGarrisonMarker;
|
||||
[_object] call gms3DEN_fnc_setEventHandlers;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
12
@blckeagls_EDEN/addons/Core/fn_onUnregister.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_onUnregister.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
if !(_object getvariable["marker",""] isEqualTo "") then
|
||||
{
|
||||
[_object] call gms3DEN_fnc_removeMarker;
|
||||
_object setVariable ["marker",nil];
|
||||
};
|
18
@blckeagls_EDEN/addons/Core/fn_removeMarker.sqf
Normal file
18
@blckeagls_EDEN/addons/Core/fn_removeMarker.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object"];
|
||||
|
||||
private _marker = _object getVariable["marker",""];
|
||||
if !(_marker isEqualTo "") then
|
||||
{
|
||||
private _id = get3DENEntityID _marker;
|
||||
delete3DENEntities [_id];
|
||||
_object setVariable["marker",nil];
|
||||
};
|
||||
|
||||
true
|
12
@blckeagls_EDEN/addons/Core/fn_setCompletionMode.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_setCompletionMode.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
#include "gms3DEN_defines.hpp"
|
||||
params["_mode"];
|
||||
missionNameSpace setVariable["GMS_missionEndCondition",_mode];
|
||||
private _m = format["Mission End State updated to %1",GMS_missionEndCondition];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
13
@blckeagls_EDEN/addons/Core/fn_setDifficulty.sqf
Normal file
13
@blckeagls_EDEN/addons/Core/fn_setDifficulty.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
#include "gms3DEN_defines.hpp"
|
||||
params["_difficulty"];
|
||||
GMS_difficulty = _difficulty;
|
||||
private _m = format["Mission Difficulty updated to %1",GMS_difficulty];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
||||
|
14
@blckeagls_EDEN/addons/Core/fn_setEventHandlers.sqf
Normal file
14
@blckeagls_EDEN/addons/Core/fn_setEventHandlers.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
params["_object"];
|
||||
|
||||
_object removeAllEventHandlers "UnregisteredFromWorld3DEN";
|
||||
_object removeAllEventHandlers "RegisteredToWorld3DEN";
|
||||
_object removeAllEventHandlers "Dragged3DEN";
|
||||
_object addEventHandler ["Dragged3DEN",{_this call gms3DEN_fnc_onDrag;}];
|
||||
_object addEventHandler ["UnregisteredFromWorld3DEN",{_this call gms3DEN_fnc_onUnregister;}];
|
||||
_object addEventHandler ["RegisteredToWorld3DEN", {_this call gms3DEN_fnc_onRegistered;}];
|
11
@blckeagls_EDEN/addons/Core/fn_setGarrison.sqf
Normal file
11
@blckeagls_EDEN/addons/Core/fn_setGarrison.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_object","_state"];
|
||||
_object setVariable["Garrisoned",_state];
|
||||
[format["Object Garrison State set to %1",_state], 0] call BIS_fnc_3DENNotification;
|
||||
|
12
@blckeagls_EDEN/addons/Core/fn_setLoadCratesTiming.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_setLoadCratesTiming.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
#include "gms3DEN_defines.hpp"
|
||||
params["_timing"];
|
||||
missionNamespace setVariable["GMS_loadCratesTiming", _timing];
|
||||
private _m = format["Mission Load Crates Timing set to %1",GMS_loadCratesTiming];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
50
@blckeagls_EDEN/addons/Core/fn_setLootVehicle.sqf
Normal file
50
@blckeagls_EDEN/addons/Core/fn_setLootVehicle.sqf
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
sets a flag stored through setVariable for each selected object that meets the filter criteria
|
||||
only objects of type "Car"or "ThingX" are allowed.
|
||||
*/
|
||||
|
||||
params["_state"];
|
||||
private _markerStateON = missionNameSpace getVariable["blck_displayLootMarkerOn",false];
|
||||
[false] call gms3DEN_fnc_displayLootMarkers;
|
||||
private "_message";
|
||||
private _objects = get3DENSelected "object" select {(typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship"}; //
|
||||
if (_objects isEqualTo []) exitWith
|
||||
{
|
||||
_message = "Select one or more vehicles or items of type ThingX to configure";
|
||||
systemChat _message;
|
||||
};
|
||||
{
|
||||
if ((typeOf _x) isKindOf "Car" || (typeOf _x) isKindOf "Ship") then
|
||||
{
|
||||
_x setVariable["lootvehicle",_state];
|
||||
if (blck_displayLootMarkerOn && _state) then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_createLootMarker;
|
||||
[_x] call gms3DEN_fnc_setEventHandlers;
|
||||
} else {
|
||||
if !(_state) then
|
||||
{
|
||||
[_x] call gms3DEN_fnc_removeLootMarker;
|
||||
};
|
||||
};
|
||||
_message = format["Vehicle type %1 set to Loot Vehicle = %1",typeOf _x,_state];
|
||||
systemChat _message;
|
||||
diag_log _message;
|
||||
} else {
|
||||
_message = format["Object with type %1 ignored:: only objects of type Car can be used as loot vehicles",typeOf _x];
|
||||
diag_log _message;
|
||||
systemChat _message;
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
if (_markerStateON) then
|
||||
{
|
||||
[true] call gms3DEN_fnc_displayLootMarkers;
|
||||
};
|
||||
_m = format["Loot Vehicle State of %1 objects updated to %2",count _objects,_state];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
16
@blckeagls_EDEN/addons/Core/fn_setSpawnLocations.sqf
Normal file
16
@blckeagls_EDEN/addons/Core/fn_setSpawnLocations.sqf
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
#include "gms3DEN_defines.hpp"
|
||||
params["_mode"];
|
||||
switch (_mode) do
|
||||
{
|
||||
GMS_missionLocations = "random";
|
||||
GMS_missionLocations= "fixed";
|
||||
};
|
||||
private _m = format["Mission Locations updated to %1",_mode];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
12
@blckeagls_EDEN/addons/Core/fn_spawnCratesTiming.sqf
Normal file
12
@blckeagls_EDEN/addons/Core/fn_spawnCratesTiming.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
#include "gms3DEN_defines.hpp"
|
||||
params["_timing"];
|
||||
GMS_spawnCratesTiming = _timing;
|
||||
private _m= format["Loot Chest Spawn Timing updated to %1",GMS_spawnCratesTiming];
|
||||
systemChat _m;
|
||||
diag_log _m;
|
10
@blckeagls_EDEN/addons/Core/fn_startMessage.sqf
Normal file
10
@blckeagls_EDEN/addons/Core/fn_startMessage.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_start"];
|
||||
missionNamespace setVariable["blck_startMessage",_start];
|
||||
systemChat format["Start Message set to %1",_start];
|
1
@blckeagls_EDEN/addons/Core/fn_test.sqf
Normal file
1
@blckeagls_EDEN/addons/Core/fn_test.sqf
Normal file
@ -0,0 +1 @@
|
||||
diag_log format["executing test.sqf at %1",diag_tickTime];
|
6
@blckeagls_EDEN/addons/Core/fn_toggleStaticSpawns.sqf
Normal file
6
@blckeagls_EDEN/addons/Core/fn_toggleStaticSpawns.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
params["_mode"];
|
||||
_m = format["GMS_missionSpawnMode set to %1",_mode];
|
||||
missionNameSpace setVariable["GMS_missionSpawnMode",_mode];
|
||||
diag_log _m;
|
||||
systemChat _m;
|
18
@blckeagls_EDEN/addons/Core/fn_versionInfo.sqf
Normal file
18
@blckeagls_EDEN/addons/Core/fn_versionInfo.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
GMS 3EDEN Editor Plugin
|
||||
by Ghostrider-GRG-
|
||||
Copyright 2020
|
||||
|
||||
*/
|
||||
|
||||
params["_mode"];
|
||||
|
||||
private _header = format["%4Mission.sqf generated:: blckeagls 3DEN Plugin Version %1 : Build %2 : Build Date %3",
|
||||
getNumber(configFile >> " Cfggms3DEN" >> "CfgVersion" >> "version"),
|
||||
getNumber(configFile >> "Cfggms3DEN" >> "CfgVersion" >> "build"),
|
||||
getText(configFile >> "Cfggms3DEN" >> "CfgVersion" >> "date"),
|
||||
_mode
|
||||
];
|
||||
diag_log _header;
|
||||
_header
|
||||
|
18
@blckeagls_EDEN/addons/Core/gms3DEN_defines.hpp
Normal file
18
@blckeagls_EDEN/addons/Core/gms3DEN_defines.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
These defines were pulled from GMS_RC\Compiles\Init\GMS_defines.hpp
|
||||
*/
|
||||
// Defines for difficulty
|
||||
#define GMS_blue 1
|
||||
#define GMS_red 2
|
||||
#define GMS_green 3
|
||||
#define GMS_orange 4
|
||||
|
||||
// Defines for mission characteristics
|
||||
#define playerNear 0
|
||||
#define allUnitsKilled 1
|
||||
#define allKilledOrPlayerNear 2
|
||||
#define assetSecured 3
|
||||
#define atMissionSpawnGround 0
|
||||
#define atMissionSpawnAir 1
|
||||
#define atMissionEndGround 2
|
||||
#define atMissionEndAir 3
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user