mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
Add Editor Plugin
This commit is contained in:
parent
3fd9251dc1
commit
db1720900f
BIN
@GMS_EDEN/addons/3DEN_plugin.pbo
Normal file
BIN
@GMS_EDEN/addons/3DEN_plugin.pbo
Normal file
Binary file not shown.
1
@GMS_EDEN/addons/3DEN_plugin/$PBOPREFIX$
Normal file
1
@GMS_EDEN/addons/3DEN_plugin/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
addons\3DENplugin
|
265
@GMS_EDEN/addons/3DEN_plugin/Cfggms3DENDisplay-1.h
Normal file
265
@GMS_EDEN/addons/3DEN_plugin/Cfggms3DENDisplay-1.h
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
#include "Core\gms3DEN_defines.hpp"
|
||||||
|
|
||||||
|
// Include Eden Editor UI macros
|
||||||
|
// For attributes, you'll be interested in these:
|
||||||
|
// ATTRIBUTE_TITLE_W - title width
|
||||||
|
// ATTRIBUTE_CONTENT_W - content width
|
||||||
|
#include "\a3\3DEN\UI\macros.inc"
|
||||||
|
|
||||||
|
|
||||||
|
#include "Core\gms3DEN_defines.hpp"
|
||||||
|
|
||||||
|
// Include Eden Editor UI macros
|
||||||
|
// For attributes, you'll be interested in these:
|
||||||
|
// ATTRIBUTE_TITLE_W - title width
|
||||||
|
// ATTRIBUTE_CONTENT_W - content width
|
||||||
|
#include "\a3\3DEN\UI\macros.inc"
|
||||||
|
|
||||||
|
class Default;
|
||||||
|
class Title: Default;
|
||||||
|
{
|
||||||
|
class Controls
|
||||||
|
{
|
||||||
|
class Title;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Checkbox;
|
||||||
|
class ctrlMenuStrip;
|
||||||
|
class ctrlMenu;
|
||||||
|
|
||||||
|
class display3DEN
|
||||||
|
{
|
||||||
|
class Controls
|
||||||
|
{
|
||||||
|
class MenuStrip: ctrlMenuStrip
|
||||||
|
{
|
||||||
|
class Items
|
||||||
|
{
|
||||||
|
// Additions to the menu strip to export missions and seek help
|
||||||
|
// ************************************************************
|
||||||
|
items[] += {"GMS_configure","GMS_export","GMS_support"};
|
||||||
|
|
||||||
|
/*
|
||||||
|
The menu for exporting missions is defined here
|
||||||
|
*/
|
||||||
|
class GMS_export {
|
||||||
|
items[]= {
|
||||||
|
"GMS_exportDynamic"
|
||||||
|
};
|
||||||
|
text = "Export Mission";
|
||||||
|
toolTip = "Export GMS Missions";
|
||||||
|
};
|
||||||
|
class GMS_exportDynamic {
|
||||||
|
text = "Export Mission";
|
||||||
|
//toolTip = "Export Dynamic Mission";
|
||||||
|
action = "call gms3DEN_fnc_exportDynamic";
|
||||||
|
picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa";
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
menus for those seeking support are here
|
||||||
|
*/
|
||||||
|
class GMS_support {
|
||||||
|
items[] = {
|
||||||
|
"GMS_help",
|
||||||
|
"GMS_about"
|
||||||
|
};
|
||||||
|
text = "Plugin Support";
|
||||||
|
};
|
||||||
|
class GMS_help {
|
||||||
|
text = "Help";
|
||||||
|
action = "call gms3DEN_fnc_Help";
|
||||||
|
//picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa";
|
||||||
|
};
|
||||||
|
class GMS_about {
|
||||||
|
text = "3EDEN Plugin Version 1.0 for GMS by Ghostrider-GRG-";
|
||||||
|
action = "call blck3EDEN_fnc_about";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
All menus for configuring a GMS mission are defined here
|
||||||
|
*/
|
||||||
|
|
||||||
|
class GMS_configure {
|
||||||
|
items[] = {
|
||||||
|
"GMS_difficulty",
|
||||||
|
"GMS_crateSpawn",
|
||||||
|
"GMS_lootSpawn",
|
||||||
|
"GMS_location_Respawns",
|
||||||
|
"GMS_MissionCompletionMode"
|
||||||
|
//"GMS_editMissionSettings"
|
||||||
|
};
|
||||||
|
text = "Configure Mission";
|
||||||
|
toolTip = "Adjust Mission Settings";
|
||||||
|
};
|
||||||
|
|
||||||
|
class GMS_difficulty {
|
||||||
|
text = "Difficulty";
|
||||||
|
toolTip = "Set Mission Difficulty";
|
||||||
|
items[] = {
|
||||||
|
"GMS_difficultyBlue",
|
||||||
|
"GMS_difficultyRed",
|
||||||
|
"GMS_difficultyGreen",
|
||||||
|
"GMS_difficultyOrange"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_difficultyBlue
|
||||||
|
{
|
||||||
|
text = "Set Mission Difficutly to EASY (Blue)";
|
||||||
|
action = "['Blue'] call gms3DEN_fnc_setDifficulty;";
|
||||||
|
value = GMS_blue;
|
||||||
|
};
|
||||||
|
class GMS_difficultyRed
|
||||||
|
{
|
||||||
|
text = "Set Mission Difficulty to MEDIUM (Red)";
|
||||||
|
action = "['Red'] call gms3DEN_fnc_setDifficulty;";
|
||||||
|
value = GMS_red;
|
||||||
|
};
|
||||||
|
class GMS_difficultyGreen
|
||||||
|
{
|
||||||
|
text = "Set Mission Difficult To HARD (Green)";
|
||||||
|
action = "['Green'] call gms3DEN_fnc_setDifficulty;";
|
||||||
|
value = GMS_green;
|
||||||
|
};
|
||||||
|
class GMS_difficultyOrange
|
||||||
|
{
|
||||||
|
text = "Set Mission Difficulty to Very HARD (Orange)";
|
||||||
|
action = "['Orange'] call gms3DEN_fnc_setDifficulty;";
|
||||||
|
value = GMS_orange;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GMS_MissionCompletionMode
|
||||||
|
{
|
||||||
|
text = "Set the Criterial for Mission Completion";
|
||||||
|
items[] = {
|
||||||
|
"GMS_playerNear",
|
||||||
|
"GMS_allUnitsKilled",
|
||||||
|
"GMS_allKilledOrPlayerNear",
|
||||||
|
"GMS_assetSecured"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_allUnitsKilled
|
||||||
|
{
|
||||||
|
text = "All AI Dead";
|
||||||
|
toolTip = "Mission is complete only when All AI are Dead";
|
||||||
|
action = "['allUnitsKilled'] call gms3DEN_fnc_setCompletionMode;";
|
||||||
|
value = allUnitsKilled;
|
||||||
|
};
|
||||||
|
class GMS_playerNear
|
||||||
|
{
|
||||||
|
text = "Player near mission center";
|
||||||
|
toolTip = "MIssion is Complete when a player reaches the mission center";
|
||||||
|
action = "['playerNear'] call gms3DEN_fnc_setCompletionMode;";
|
||||||
|
value = playerNear;
|
||||||
|
};
|
||||||
|
class GMS_allKilledOrPlayerNear
|
||||||
|
{
|
||||||
|
text = "Units Dead / Player @ Center";
|
||||||
|
toolTip = "Mission is Complete when all units are dead or a player reaches mission center";
|
||||||
|
action = "['allKilledOrPlayerNear'] call gms3DEN_fnc_setCompletionMode;";
|
||||||
|
value = allKilledOrPlayerNear;
|
||||||
|
};
|
||||||
|
class GMS_assetSecured
|
||||||
|
{
|
||||||
|
text = "Asset Secured";
|
||||||
|
toolTip = "Mission is Complete when the asset is secured";
|
||||||
|
action = "[assetSecured] call gms3DEN_fnc_setCompletionMode;";
|
||||||
|
value = allKilledOrPlayerNear;
|
||||||
|
};
|
||||||
|
class GMS_location_Respawns
|
||||||
|
{
|
||||||
|
text = "Set Mission Spawns (static vs random)";
|
||||||
|
//action = "edit3DENMissionAttributes 'setAsStaticMission'";
|
||||||
|
items[] = {
|
||||||
|
"GMS_dynamicMission",
|
||||||
|
"GMS_staticMission"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_dynamicMission
|
||||||
|
{
|
||||||
|
text = "Configure as Dynamic Mission";
|
||||||
|
action = "['dynamic'] call gms3DEN_fnc_setSpawnLocations";
|
||||||
|
};
|
||||||
|
class GMS_staticMission
|
||||||
|
{
|
||||||
|
text = "Configure Static Mission";
|
||||||
|
action = "['static'] call gms3DEN_fnc_setSpawnLocations";
|
||||||
|
};
|
||||||
|
class GMS_crateSpawn {
|
||||||
|
text = "Set When Crates Spawn";
|
||||||
|
toolTip = "Set when crates are spawned";
|
||||||
|
items[] = {
|
||||||
|
"GMS_atMissionSpawnGround",
|
||||||
|
"GMS_atMissionSpawnAir",
|
||||||
|
"GMS_atMissionEndGround",
|
||||||
|
"GMS_atMissionEndAir"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_atMissionSpawnGround
|
||||||
|
{
|
||||||
|
text = "At Spawn Ground";
|
||||||
|
toolTip = "Crates are spawned on the ground at mission startup";
|
||||||
|
action = "['atMissionSpawnGround'] call gms3DEN_fnc_spawnCratesTiming;";
|
||||||
|
};
|
||||||
|
class GMS_atMissionSpawnAir
|
||||||
|
{
|
||||||
|
text = "At Spawn Air";
|
||||||
|
toolTip = "Crates are spawned in the air at mission startup";
|
||||||
|
action = "['atMissionSpawnAir'] call gms3DEN_fnc_spawnCratesTiming;";
|
||||||
|
};
|
||||||
|
class GMS_atMissionEndGround
|
||||||
|
{
|
||||||
|
text = "At End Ground";
|
||||||
|
toolTip = "Crates are spawned on the ground at mission completion";
|
||||||
|
action = "['atMissionEndGround'] call gms3DEN_fnc_spawnCratesTiming;";
|
||||||
|
};
|
||||||
|
class GMS_atMissionEndAir
|
||||||
|
{
|
||||||
|
text = "At End Air";
|
||||||
|
toodTip = "Crates are spawned in the air at mission completion";
|
||||||
|
action = "['atMissionEndAir'] call gms3DEN_fnc_spawnCratesTiming;";
|
||||||
|
};
|
||||||
|
|
||||||
|
class GMS_lootSpawn {
|
||||||
|
text = "Set timing for loading crates";
|
||||||
|
items[] = {
|
||||||
|
"GMS_atMissionSpawn",
|
||||||
|
"GMS_atMissionCompletion"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_atMissionSpawn
|
||||||
|
{
|
||||||
|
text = "At Spawn";
|
||||||
|
toolTip = "Load crates when the mission spawns";
|
||||||
|
action = "['atMissionSpawn'] call gms3DEN_fnc_setLoadCratesTiming";
|
||||||
|
};
|
||||||
|
class GMS_atMissionCompletion
|
||||||
|
{
|
||||||
|
text = "At Completion";
|
||||||
|
toolTip = "Load crates when the mission is complete";
|
||||||
|
action = "['atMissionCompletion'] call gms3DEN_fnc_setLoadCratesTiming";
|
||||||
|
};
|
||||||
|
|
||||||
|
class GMS_static {
|
||||||
|
text = "Set if Mission is Static/Dynamic";
|
||||||
|
toolTip = "Toggle between static and random mission locations";
|
||||||
|
items[] = {
|
||||||
|
"GMS_setToDynamic",
|
||||||
|
"GMS_setToStatic"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class GMS_setToDynamic {
|
||||||
|
text = "Dynamic";
|
||||||
|
toolType = "Set mission to be spawned at random location";
|
||||||
|
action = "['dynamic'] call gms3DEN_fnc_toggleStaticSpawns";
|
||||||
|
};
|
||||||
|
class GMS_setToStatic {
|
||||||
|
text = "Static";
|
||||||
|
toolTip = "Set mission to respawn at the same location each time";
|
||||||
|
action = "['static'] call gms3DEN_fnc_toggleStaticSpawns";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
_object setVariable["gmsGarrisonColor",_colorOn];
|
||||||
|
if (_colorOn) then {
|
||||||
|
{_object setObjectTexture [_x,gms3DENlootVehicleTexture]} forEach (count (getObjectTextures _object));
|
||||||
|
};
|
4
@GMS_EDEN/addons/3DEN_plugin/Core/fn_about.sqf
Normal file
4
@GMS_EDEN/addons/3DEN_plugin/Core/fn_about.sqf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
private _m= format["About called at %1",diag_tickTime];
|
||||||
|
systemChat _m;
|
||||||
|
diag_log _m;
|
@ -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
|
15
@GMS_EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf
Normal file
15
@GMS_EDEN/addons/3DEN_plugin/Core/fn_buildingContainer.sqf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
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];
|
||||||
|
private _surfacesBelow = lineIntersectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 100],_u,_u,true,10];
|
||||||
|
{
|
||||||
|
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
|
||||||
|
} forEach _surfacesAbove + _surfacesbelow;
|
||||||
|
diag_log format["_buildingContainer: _u = %1| _buildig = %2",_u,_building];
|
||||||
|
_building
|
@ -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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_display.sqf
Normal file
13
@GMS_EDEN/addons/3DEN_plugin/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";
|
@ -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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_displayLootMarkers.sqf
Normal file
27
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_endMessage.sqf
Normal file
10
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_exportDynamic copy.sqf
Normal file
558
@GMS_EDEN/addons/3DEN_plugin/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;
|
463
@GMS_EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf
Normal file
463
@GMS_EDEN/addons/3DEN_plugin/Core/fn_exportDynamic.sqf
Normal file
@ -0,0 +1,463 @@
|
|||||||
|
/*
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
if (GMS_difficulty isEqualTo "") then {
|
||||||
|
GMS_difficulty isEqualTo "Red";
|
||||||
|
};
|
||||||
|
diag_log format["Line 41: typeName GMS_difficulty = %1 | GMS_difficulty = %2",typeName GMS_difficulty, GMS_difficulty];
|
||||||
|
};
|
||||||
|
if (isNil "GMS_dynamicStartMessage") then
|
||||||
|
{
|
||||||
|
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 = [];
|
||||||
|
private _turrets = _objects select {_x isKindOf "StaticWeapon"};
|
||||||
|
{
|
||||||
|
private _obj = _x;
|
||||||
|
//private _isGarrison = _obj getVariable["gmsIsGarrison",false];
|
||||||
|
private _isGarrison = _obj call gms3DEN_fnc_isInside;
|
||||||
|
diag_log format["_exportDynamic (188): for StaticWeapon _obj %` _isGarrison = %2",_obj,_isGarrison];
|
||||||
|
if (_isGarrison) then {
|
||||||
|
GMS_turretsATL pushBack _obj;
|
||||||
|
} else {
|
||||||
|
GMS_staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||||
|
};
|
||||||
|
} forEach _turrets;
|
||||||
|
|
||||||
|
diag_log format["Line 181: count GMS_staticWeapons = %1 | count GMS_turretsATL = %2",count GMS_staticWeapons, count GMS_turretsATL];
|
||||||
|
diag_log format["Line 182: count _groups = %1",count _groups];
|
||||||
|
GMS_units = [];
|
||||||
|
GMS_unitsATL = [];
|
||||||
|
{
|
||||||
|
private _group = _x;
|
||||||
|
private _units = units _group;
|
||||||
|
{
|
||||||
|
private _unit = _x;
|
||||||
|
if (vehicle _unit isEqualTo _unit) then
|
||||||
|
{
|
||||||
|
//private _isGarrisoned = _unit getVariable["gmsIsGarrison",false];
|
||||||
|
private _isGarrisoned = _unit call gms3DEN_fnc_isInside;
|
||||||
|
if (_isGarrisoned) then {
|
||||||
|
GMS_unitsATL pushBack _unit;
|
||||||
|
} else {
|
||||||
|
GMS_units pushBack _unit;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _units;
|
||||||
|
//GMS_units pushBack (units _x);
|
||||||
|
} forEach _groups;
|
||||||
|
diag_log format["Line 198: count GMS_units = %1 | count GMS_unitsATL = %2",count GMS_units, count GMS_unitsATL];
|
||||||
|
|
||||||
|
private _props = _objects select {!(_x isKindOf "ReammoBox_F") && (_x isKindOf "FloatingStructure_F" || _x isKindOf "Items_base_F" || _x isKindOf "Thing" || _x isKindOf "Static")};
|
||||||
|
diag_log format["Line 201: count _props = %1",count _props];
|
||||||
|
GMS_garrisonedBuildings = [];
|
||||||
|
GMS_objectsToSpawn = [];
|
||||||
|
GMS_missionSimpleObjects = [];
|
||||||
|
// Get list of garrisoned buildings based on their attributes
|
||||||
|
{
|
||||||
|
private _obj = _x;
|
||||||
|
if (_obj get3DENAttribute "objectIsSimple" select 0) then {
|
||||||
|
diag_log format["Line 209: adding simpleObject displayName %1",getText(configFile >> "CfgVehicles" >> typeOf _obj >> "displayName")];
|
||||||
|
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 {
|
||||||
|
private _isGarrison = _obj getVariable["gmsIsGarrison",false];
|
||||||
|
diag_log format["_exportDynamic(207): for Object %1 typeOf %3 _isGarrison = %2",_obj,_isGarrison,getText(configFile >> "CfgVehicles" >> typeOf _obj >> "displayName")];
|
||||||
|
private _turrets = [];
|
||||||
|
private _units = [];
|
||||||
|
{
|
||||||
|
private _building = [_x] call gms3DEN_fnc_buildingContainer;
|
||||||
|
diag_log format["Line 225: _obj = %1 | _building = %2", _obj,_building];
|
||||||
|
if (_obj isEqualTo _building) then {
|
||||||
|
private _unit = _x;
|
||||||
|
private _pos = getPosATL _unit;
|
||||||
|
private _center = getPosATL _building;
|
||||||
|
private _offset = _pos vectorDiff _center;
|
||||||
|
private _dir = getDir _unit;
|
||||||
|
_units pushBack [_offset,_dir];
|
||||||
|
};
|
||||||
|
} forEach GMS_unitsATL;
|
||||||
|
diag_log format["Line 234: for building %1 located at %2 _units = %3",_building,getPos _building,_units];
|
||||||
|
{
|
||||||
|
private _building = [_x] call gms3DEN_fnc_buildingContainer;
|
||||||
|
diag_log format["Line 225: _obj = %1 | _building = %2", _obj,_building];
|
||||||
|
if (_obj isEqualTo _building) then {
|
||||||
|
private _tur = _x;
|
||||||
|
private _pos = getPosATL _tur;
|
||||||
|
private _dir = getDir _tur;
|
||||||
|
private _center = getPosATL _building;
|
||||||
|
private _offset = _center vectorDiff _pos;
|
||||||
|
_turrets pushBack [format['%1',typeOf _tur],_offset,_dir];
|
||||||
|
};
|
||||||
|
} forEach GMS_turretsATL;
|
||||||
|
diag_log format["Line 246: for building %1 located at %2 _turrets = %3",_building, getPos _building,_turrets];
|
||||||
|
|
||||||
|
if ((_turrets isEqualTo []) && (_units isEqualTo [])) then
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Treat this like an ordinary building
|
||||||
|
*/
|
||||||
|
GMS_objectsToSpawn pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
Treat this like a garrisoned building
|
||||||
|
*/
|
||||||
|
private _building = _obj;
|
||||||
|
private _allowDamage = (_building get3DENAttribute "allowDamage") select 0;
|
||||||
|
private _enableSimulation = (_building get3DENAttribute "enableSimulation") select 0;
|
||||||
|
diag_log format["Line 249: _building %1 | damage %2 | simulation %3",_allowDamage,_enableSimulation];
|
||||||
|
_buildingGarrisonATL = [
|
||||||
|
format["%1",
|
||||||
|
typeOf _building],
|
||||||
|
getPosATL _building,
|
||||||
|
getDir _building,
|
||||||
|
_allowDamage,
|
||||||
|
_enableSimulation,
|
||||||
|
_turrets,
|
||||||
|
_units
|
||||||
|
];
|
||||||
|
GMS_garrisonedBuildings pushBack _buildingGarrisonATL;
|
||||||
|
diag_log format["Line 274: count ", count GMS_garrisonedBuildings, [_buildingGarrisonATL,_configuredStatics,_configuredUnits]];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _props;
|
||||||
|
|
||||||
|
private _vehicles = _objects select {_x isKindOf "Car" || _x isKindOf "Tank" || _x isKindOf "Ship"};
|
||||||
|
GMS_missionPatrolVehicles = [];
|
||||||
|
GMS_lootVehicles = [];
|
||||||
|
GMS_subPatrols = [];
|
||||||
|
{
|
||||||
|
private _obj = _x;
|
||||||
|
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 {
|
||||||
|
if (_obj isKindOf "SDV_01_base_F") then {
|
||||||
|
GMS_subPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff Mission_CENTER,getDir _x];
|
||||||
|
} else {
|
||||||
|
GMS_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _vehicles;
|
||||||
|
|
||||||
|
private _aircraft = _objects select {_x isKindOf "Air"};
|
||||||
|
// Run through objects and format any for output
|
||||||
|
GMS_airPatrols = [];
|
||||||
|
{
|
||||||
|
private _obj = _x;
|
||||||
|
GMS_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER,getDir _obj];
|
||||||
|
} forEach _aircraft;
|
||||||
|
|
||||||
|
diag_log format["Line 254: GMS_difficulty = %1 | GMS_minAI = %2 | GMS_maxAI = %3", GMS_difficulty, GMS_minAI, GMS_maxAI];
|
||||||
|
// Run through groups and sort them based on whether they still have units and if they are/are not in a building.
|
||||||
|
GMS_infantryGroups = [];
|
||||||
|
GMS_scubaGroups = [];
|
||||||
|
{
|
||||||
|
private _unit = _x;
|
||||||
|
private _isInVehicle = if (vehicle _unit isEqualTo _unit) then {false} else {true};
|
||||||
|
private _isSurfaceWater = surfaceIsWater (position _unit);
|
||||||
|
diag_log format["Line 261: _unit = %1 | _isInVehicle = %2 | _isSurfaceWater = %3",_unit, _isInVehicle, _isSurfaceWater];
|
||||||
|
if !(_isInVehicle) then {
|
||||||
|
if (_isSurfaceWater) then {
|
||||||
|
GMS_scubaGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty];
|
||||||
|
} else {
|
||||||
|
GMS_infantryGroups pushBack format[' [%1,%2,%3,"%4"]',(getPosATL _unit) vectorDiff Mission_CENTER,GMS_minAI,GMS_maxAI,GMS_difficulty];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach GMS_units;
|
||||||
|
|
||||||
|
diag_log format["_exportDynamic (288): count _objects = %1",count _objects]; // are there any objects left to process ?
|
||||||
|
|
||||||
|
private _lootBoxes = _objects select {_x isKindOf "ReammoBox_F"};
|
||||||
|
// Run through objects and put any Ammo Crates in a separate array
|
||||||
|
GMS_lootContainers = [];
|
||||||
|
{
|
||||||
|
private _obj = _x;
|
||||||
|
GMS_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _obj,(getPosATL _obj) vectorDiff Mission_CENTER, '_crateLoot','_lootCounts',getDir _obj];
|
||||||
|
} forEach _lootBoxes;
|
||||||
|
|
||||||
|
diag_log format["_exportDynamic (303): count _objects = %1",count _objects]; // did we capture them all?
|
||||||
|
|
||||||
|
diag_log format["exportDynamic Line 489: all data organized, formating text output"];
|
||||||
|
private _lines = [];
|
||||||
|
private _lineBreak = toString [10];
|
||||||
|
|
||||||
|
_lines pushBack "/*";
|
||||||
|
_lines pushBack " Dynamic Mission Generated";
|
||||||
|
_lines pushBack " 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_garrisonedBuildings 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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_getLootVehicleInfo.sqf
Normal file
31
@GMS_EDEN/addons/3DEN_plugin/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;
|
||||||
|
|
||||||
|
|
@ -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";
|
9
@GMS_EDEN/addons/3DEN_plugin/Core/fn_help.sqf
Normal file
9
@GMS_EDEN/addons/3DEN_plugin/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;
|
5
@GMS_EDEN/addons/3DEN_plugin/Core/fn_initialize.sqf
Normal file
5
@GMS_EDEN/addons/3DEN_plugin/Core/fn_initialize.sqf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
diag_log format["fn_initialize loaded at %1",diag_tickTime];
|
||||||
|
call gms3DEN_fnc_initializeAttributes;
|
||||||
|
diag_log call gms3DEN_fnc_versioninfo;
|
@ -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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_isInVehicle.sqf
Normal file
6
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_isInfantryGroup.sqf
Normal file
17
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_isInfantryUnit.sqf
Normal file
14
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_isInside.sqf
Normal file
19
@GMS_EDEN/addons/3DEN_plugin/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,_u];
|
||||||
|
private _objBelow = lineIntersects [_pos, _below, _u,_u];
|
||||||
|
private _isInside = if (_objAbove || _objBelow) then {true} else {false};
|
||||||
|
diag_log format["fn_isInside: _u = %4 | _objAbove = %1 | _objBelow = %2 | _isInside %3",_objAbove,_objBelow,_isInside,_u];
|
||||||
|
_isInside
|
||||||
|
|
@ -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,10 @@
|
|||||||
|
|
||||||
|
params["_isGarrison"];
|
||||||
|
private _isGarrison;
|
||||||
|
private _selectedObjects = get3DENSelected "object";
|
||||||
|
diag_log format["onAttributeSaveGarrison: _isGarrison %1 | _selectedObjects %2",_isGarrison,_selectedObjects];
|
||||||
|
if (count _selecteObjects == 1) then {
|
||||||
|
private _object = _selectedObjects select 0;
|
||||||
|
private _isGarrison = _object getVariable["gmsIsGarrison",false];
|
||||||
|
_object setVariable["gmsIsGarrison",_isGarrison];
|
||||||
|
};
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
params["_control"];
|
||||||
|
private _isColorOn = ctrlChecked _control;
|
||||||
|
private _selectedObjects = get3DENSelected "object";
|
||||||
|
diag_log format["onAttributeSaveGarrisonColor: _control %1 | _isGarrison %2 | _selectedObjects %3",_control,_isColorOn,_selectedObjects];
|
||||||
|
if (count _selecteObjects == 1) then {
|
||||||
|
private _object = _selectedObjects select 0;
|
||||||
|
private _isGarrison = _object getVariable["gmsIsGarrison",false];
|
||||||
|
_object setVariable["gmsGarrisonColor",_isColorOn];
|
||||||
|
if (_isColor && _isGarrison) then {
|
||||||
|
{_object setObjectTexture [_x,gms3DENGarrisonTexture]} forEach (count (getObjectTextures _object));
|
||||||
|
} else {
|
||||||
|
{_object setObjectTexture [_x,""]} forEach (count (getObjectTextures _object));
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
params["_control"];
|
||||||
|
private _isLootVeh = ctrlChecked _control;
|
||||||
|
private _selectedObjects = get3DENSelected "object";
|
||||||
|
diag_log format["onAttributeSaveLootVeh: _control %1 | _isGarrison %2 | _selectedObjects %3",_control,_isLootVeh,_selectedObjects];
|
||||||
|
if (count _selecteObjects == 1) then {
|
||||||
|
private _object = _selectedObjects select 0;
|
||||||
|
_object setVariable["gmsIsLootVehicle",_isLootVeh];
|
||||||
|
} else {
|
||||||
|
["Changes not applied: you can only configure one object at a time","ERROR"] call BIS_fnc_3DENShowMessage;
|
||||||
|
};
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
params["_control"];
|
||||||
|
private _isColorOn = ctrlChecked _control;
|
||||||
|
private _selectedObjects = get3DENSelected "object";
|
||||||
|
diag_log format["onAttributeSaveLootVehColor: _control %1 | _isGarrison %2 | _selectedObjects %3",_control,_isColorOn,_selectedObjects];
|
||||||
|
if (count _selecteObjects == 1) then {
|
||||||
|
private _object = _selectedObjects select 0;
|
||||||
|
private _isLootVeh = _object getVariable["gmsIsLootVehicle",false];
|
||||||
|
_object setVariable["gmsLootVehicleColor",_isColorOn];
|
||||||
|
if (_isColor && gmsIsLootVehicle) then {
|
||||||
|
{_object setObjectTexture [_x,gms3DENlootVehicleTexture]} forEach (count (getObjectTextures _object));
|
||||||
|
} else {
|
||||||
|
{_object setObjectTexture [_x,""]} forEach (count (getObjectTextures _object));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
13
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onDrag.sqf
Normal file
13
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onLoadGarrison.sqf
Normal file
33
@GMS_EDEN/addons/3DEN_plugin/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",true];
|
||||||
|
_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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onLoadGarrisonColor.sqf
Normal file
16
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onLoadLootVeh.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onLoadLootVehColor.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onRegistered.sqf
Normal file
28
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_onUnregister.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_removeMarker.sqf
Normal file
18
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setCompletionMode.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setDifficulty.sqf
Normal file
13
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setEventHandlers.sqf
Normal file
14
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setGarrison.sqf
Normal file
11
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setLoadCratesTiming.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setLootVehicle.sqf
Normal file
50
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_setSpawnLocations.sqf
Normal file
16
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_spawnCratesTiming.sqf
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_startMessage.sqf
Normal file
10
@GMS_EDEN/addons/3DEN_plugin/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
@GMS_EDEN/addons/3DEN_plugin/Core/fn_test.sqf
Normal file
1
@GMS_EDEN/addons/3DEN_plugin/Core/fn_test.sqf
Normal file
@ -0,0 +1 @@
|
|||||||
|
diag_log format["executing test.sqf at %1",diag_tickTime];
|
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
params["_mode"];
|
||||||
|
_m = format["GMS_missionSpawnMode set to %1",_mode];
|
||||||
|
missionNameSpace setVariable["GMS_missionSpawnMode",_mode];
|
||||||
|
diag_log _m;
|
||||||
|
systemChat _m;
|
19
@GMS_EDEN/addons/3DEN_plugin/Core/fn_versionInfo.sqf
Normal file
19
@GMS_EDEN/addons/3DEN_plugin/Core/fn_versionInfo.sqf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
GMS 3EDEN Editor Plugin
|
||||||
|
by Ghostrider-GRG-
|
||||||
|
Copyright 2020
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
params[["_mode",""]];
|
||||||
|
|
||||||
|
private _header = format
|
||||||
|
["GMS 3DEN Plugin Version %1 : Build %2 : Build Date %3",
|
||||||
|
getNumber(configFile >> "CfgGMS3DENVersion" >> "version"),
|
||||||
|
getNumber(configFile >> "CfgGMS3DENVersion" >> "build"),
|
||||||
|
getText(configFile >> "CfgGMS3DENVersion" >> "date"),
|
||||||
|
_mode
|
||||||
|
];
|
||||||
|
|
||||||
|
_header
|
||||||
|
|
15
@GMS_EDEN/addons/3DEN_plugin/Core/gms3DEN_defines.hpp
Normal file
15
@GMS_EDEN/addons/3DEN_plugin/Core/gms3DEN_defines.hpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
#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
|
45
@GMS_EDEN/addons/3DEN_plugin/Static/pullMarkerInfo.sqf
Normal file
45
@GMS_EDEN/addons/3DEN_plugin/Static/pullMarkerInfo.sqf
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
diag_log format["<< ---- START %1 ---- >>",diag_tickTime];
|
||||||
|
|
||||||
|
all3DENEntities params ["_objects","_groups","_triggers","_systems","_waypoints","_markers","_layers","_comments"];
|
||||||
|
private["_m1","_markerPos","_markerType","_markerShape","_markerColor","_markerText","_markerBrush","_markerSize","_markerAlpha"];
|
||||||
|
if (_markers isEqualTo []) then
|
||||||
|
{
|
||||||
|
diag_log "No Marker Found, no Marker Definitions Will Be generated";
|
||||||
|
} else {
|
||||||
|
private _m1 = _markers select 0;
|
||||||
|
diag_log format["_m1 = %1",_m1];
|
||||||
|
_markerPosition = _m1 get3DENAttribute "Position"; // Returns expected value
|
||||||
|
_markerText = _m1 get3DENAttribute "Text"; // Returns expected value
|
||||||
|
_markerColor = _m1 get3DENAttribute "baseColor"; //Returns Null
|
||||||
|
_markerShape = (_m1 get3DENAttribute "markerType") select 0; // Returns [-1] if not a rectangular or elipsoid marker]
|
||||||
|
_markerAlpha = _m1 get3DENAttribute "alpha";
|
||||||
|
_markerType = (_m1 get3DENAttribute "itemClass") select 0; // Returns "" if not an icon type marker
|
||||||
|
_markerBrush = _m1 get3DENAttribute "brush";
|
||||||
|
_markerSize = _m1 get3DENAttribute "size2";
|
||||||
|
_markerRotation = _m1 get3DENAttribute "rotation";
|
||||||
|
diag_log format["typeName _markerType = %1 | markerType = %2 | typeName _markerShape = %3 | markerShape = %4", typeName _markerType, _markerType, typeName _markerShape, _markerShape];
|
||||||
|
diag_log format["typeName _markerPosition = %1 | _markerPosition = %2 | typeName _markerRotation = %3 | _markerRotation = %4",typeName _markerPosition,_markerPosition,typeName _markerRotation,_markerRotation];
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (_markerShape == -1) then
|
||||||
|
{
|
||||||
|
// The marker is an icon
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_markerSize = _m1 get3DENAttribute "size2"; // Returns Null
|
||||||
|
_markerBrush = _m1 get3DENAttribute " brush";
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
_lines pushBack format["_markerPosition = %1",_markerPosition];
|
||||||
|
_lines pushBack format["_markerText = %1",_markerText];
|
||||||
|
_lines pushBack format["_markerColor = %1",_markerColor];
|
||||||
|
_lines pushBack format["_markerType = %1", _markerType];
|
||||||
|
_lines pushBack format["_markerShape = %1",_markerShape];
|
||||||
|
_lines pushBack format["_markerAlpha = %1",_markerAlpha];
|
||||||
|
_lines pushBack format["_markerBrush = %1",_markerBrush];
|
||||||
|
_lines pushBack format["_markerSize = %1",_markerSize];
|
||||||
|
_lines pushBack format["_markerRotation = %1",_markerRotation];
|
||||||
|
*/
|
||||||
|
*/
|
@ -0,0 +1 @@
|
|||||||
|
CENTER = getPos player;
|
81
@GMS_EDEN/addons/3DEN_plugin/Static/template.sqf
Normal file
81
@GMS_EDEN/addons/3DEN_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 = bGMS_lootCountsGreen;
|
||||||
|
_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!";
|
||||||
|
_endMsg = "The Sector at the Green Marker is under survivor control!";
|
||||||
|
|
||||||
|
_markerMissionName = "Research Center";
|
||||||
|
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
|
||||||
|
|
||||||
|
//////////
|
||||||
|
// Past the output of the script here
|
||||||
|
|
||||||
|
|
||||||
|
//////////
|
||||||
|
// The lines below define additional variables you may wish to configure.
|
||||||
|
|
||||||
|
|
||||||
|
// Change _useMines to true/false below to enable mission-specific settings.
|
||||||
|
_useMines = blck_useMines;
|
||||||
|
_minNoAI = blck_MinAI_Green;
|
||||||
|
_maxNoAI = blck_MaxAI_Green;
|
||||||
|
_noAIGroups = blck_AIGrps_Green;
|
||||||
|
_noVehiclePatrols = blck_SpawnVeh_Green;
|
||||||
|
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
|
||||||
|
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
|
||||||
|
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
|
||||||
|
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
|
||||||
|
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
|
||||||
|
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
|
||||||
|
// Change _useMines to true/false below to enable mission-specific settings.
|
||||||
|
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
|
||||||
|
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
|
||||||
|
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
|
||||||
|
_vests = blck_vests;
|
||||||
|
_backpacks = blck_backpacks;
|
||||||
|
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
|
||||||
|
_sideArms = blck_Pistols;
|
||||||
|
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
|
||||||
|
_noChoppers = blck_noPatrolHelisBlue;
|
||||||
|
_missionHelis = blck_patrolHelisBlue;
|
||||||
|
|
||||||
|
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
|
||||||
|
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
|
||||||
|
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
|
||||||
|
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
|
||||||
|
_chanceLoot = 0.0;
|
||||||
|
_paraLoot = blck_BoxLoot_Blue;
|
||||||
|
_paraLootCounts = bGMS_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
|
||||||
|
|
||||||
|
_spawnCratesTiming = GMS_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
|
||||||
|
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
|
||||||
|
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
|
||||||
|
_loadCratesTiming = GMS_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn";
|
||||||
|
// Pertains only to crates spawned at mission spawn.
|
||||||
|
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
|
||||||
|
|
||||||
|
// Examples:
|
||||||
|
// To spawn crates at mission start loaded with gear set GMS_spawnCratesTiming = "atMissionSpawnGround" && GMS_loadCratesTiming = "atMissionSpawn"
|
||||||
|
// To spawn crates at mission start but load gear only after the mission is completed set GMS_spawnCratesTiming = "atMissionSpawnGround" && GMS_loadCratesTiming = "atMissionCompletion"
|
||||||
|
// To spawn crates on the ground at mission completion set GMS_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
|
||||||
|
// To spawn crates in the air and drop them by chutes set GMS_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
|
||||||
|
_endCondition = GMS_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
|
||||||
|
// Setting this in the mission file overrides the defaults
|
||||||
|
//_timeOut = -1;
|
||||||
|
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";
|
39
@GMS_EDEN/addons/3DEN_plugin/To Do List
Normal file
39
@GMS_EDEN/addons/3DEN_plugin/To Do List
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
Build 10
|
||||||
|
Test that mission center is defined in the following cases:
|
||||||
|
- no marker and no object pre-identified as defining the mission center: works.
|
||||||
|
- no marker and an object pre-identified as defining the mission center: works.
|
||||||
|
- the mission marker is present with a text label
|
||||||
|
- the mission marker is present without a text label
|
||||||
|
|
||||||
|
Build 11
|
||||||
|
- reorganize and rename the Cfg Files in a way that makes more sense. Done.
|
||||||
|
- test that coding of static and random spawn positions is properly done: Done.
|
||||||
|
- Moved menus for mission configuration to the Attributes Menu
|
||||||
|
|
||||||
|
Build 12.
|
||||||
|
-Add option to set an attribute for loot vehicles.
|
||||||
|
-Check that all necessary default configs are present and consistently spelled thorughout the code.
|
||||||
|
|
||||||
|
Build 13
|
||||||
|
Test that mission objects are added to proper arrays excluding units and garrisoned buildings.
|
||||||
|
|
||||||
|
- wheeled vehicles: working
|
||||||
|
- tracked vehicles other than tanks: working
|
||||||
|
- tanks: working
|
||||||
|
- helis and planes: working
|
||||||
|
- surface vessels: working
|
||||||
|
- subs: working
|
||||||
|
- turrets - working for turrets outisde of any structure.
|
||||||
|
|
||||||
|
- loot crates
|
||||||
|
- simple objects
|
||||||
|
- anything that is not a building (landscape)
|
||||||
|
- everything that is a building
|
||||||
|
|
||||||
|
|
||||||
|
Long-term TODO:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
6
@GMS_EDEN/addons/3DEN_plugin/To Do List copy
Normal file
6
@GMS_EDEN/addons/3DEN_plugin/To Do List copy
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
20
@GMS_EDEN/addons/3DEN_plugin/config.cpp
Normal file
20
@GMS_EDEN/addons/3DEN_plugin/config.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
GMS 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 "Core\gms3DEN_defines.hpp"
|
||||||
|
#include "gmsCfgPatches.h"
|
||||||
|
#include "gmsCfgFunctions.h"
|
||||||
|
#include "gmsCfg3DENVersion.h"
|
||||||
|
#include "gmsCfg3DENsettings.h"
|
||||||
|
//#include "settings.h"
|
||||||
|
#include "gmsCfg3DEN.h"
|
||||||
|
#include "gmsCfg3DENDisplay.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
179
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DEN.h
Normal file
179
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DEN.h
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
class Default;
|
||||||
|
class Title: Default
|
||||||
|
{
|
||||||
|
class Controls
|
||||||
|
{
|
||||||
|
class Title;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class RscCheckBox;
|
||||||
|
class Checkbox;
|
||||||
|
|
||||||
|
class cfg3DEN
|
||||||
|
{
|
||||||
|
class EventHandlers
|
||||||
|
{
|
||||||
|
class gms3DEN
|
||||||
|
{
|
||||||
|
OnMissionLoad = "diag_log format['Mission loaded at %1',diag_tickTime]; call gms3DEN_fnc_initialize";
|
||||||
|
OnMissionNew = "diag_log format['New Mission Created at %1',diag_tickTime]; call gms3DEN_fnc_initialize";
|
||||||
|
//onHistoryChange = "call gms3DEN_fnc_updateObjects";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Mission
|
||||||
|
{
|
||||||
|
class gms3DENmissionSettings
|
||||||
|
{
|
||||||
|
displayName = "Mission Settings";
|
||||||
|
// display = "Display3DENEditAttributesPreview"; // Optional - display for attributes window. Must have the same structure and IDCs as the default Display3DENEditAttributes
|
||||||
|
class AttributeCategories
|
||||||
|
{
|
||||||
|
class gms3DENCategory
|
||||||
|
{
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
class missionStartMessage
|
||||||
|
{
|
||||||
|
property = "gmsMissionStartMessage";
|
||||||
|
};
|
||||||
|
class missionEndMessage
|
||||||
|
{
|
||||||
|
property = "gmsMissionEndMessage";
|
||||||
|
};
|
||||||
|
class missionDifficulty
|
||||||
|
{
|
||||||
|
property = "gmsMissionDifficulty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Attributes
|
||||||
|
{
|
||||||
|
|
||||||
|
class gms3DENCheckBoxGarrisonsControl: Title
|
||||||
|
{
|
||||||
|
onload = "call gms3DEN_fnc_onLoadGarrison;";
|
||||||
|
onUnload = "diag_log 'onUnload for garrisons'";
|
||||||
|
onCheckedChanged = "diag_log format['onCheckedChanged %1',_this];";
|
||||||
|
attributeLoad = "(_this controlsGroupCtrl 100) ctrlSetText _value; [_this,_value] call gms3DEN_fnc_onAttributeLoadGarrison;";
|
||||||
|
attributeSave = "[cbChecked (this controlsGroupCtrl 100)] call gms3DEN_fnc_onAttributeSaveGarrison;";
|
||||||
|
|
||||||
|
class Controls: Controls
|
||||||
|
{
|
||||||
|
class Title: Title {};
|
||||||
|
class Value: CheckBox {};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
class gmsGarrisonColorControl: Title
|
||||||
|
{
|
||||||
|
onload = "call gms3DEN_fnc_onLoadGarrisonColor;";
|
||||||
|
//onUnload = "diag_log 'onUnload for garrisons'";
|
||||||
|
attributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadGarrisonColor;";
|
||||||
|
attributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveGarrisonColor;";
|
||||||
|
class Controls: Controls
|
||||||
|
{
|
||||||
|
class Title: Title {};
|
||||||
|
class Value: CheckBox
|
||||||
|
{
|
||||||
|
idc = 101;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class gms3DENCheckboxLootVehControl: Title
|
||||||
|
{
|
||||||
|
onload = "call gms3DEN_fnc_onLoadLootVeh;";
|
||||||
|
//onUnload = "diag_log 'onUnload for loot veh'";
|
||||||
|
onAttributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadLootVeh;";
|
||||||
|
onAttributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveLootVeh;";
|
||||||
|
class Controls: Controls
|
||||||
|
{
|
||||||
|
class Title: Title {};
|
||||||
|
class Value: CheckBox
|
||||||
|
{
|
||||||
|
idc = 102;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class gms3DENCLootVehicleColorControl: Title
|
||||||
|
{
|
||||||
|
onload = "call gms3DEN_fnc_onLoadLootVehColor;";
|
||||||
|
//onUnload = "diag_log 'onUnload for loot veh'";
|
||||||
|
onAttributeLoad = "[_this,_value] call gms3DEN_fnc_onAttributeLoadLootVehColor;";
|
||||||
|
onAttributeSave = "[_this,_value] call gms3DEN_fnc_onAttributeSaveLootVeh;";
|
||||||
|
class Controls: Controls
|
||||||
|
{
|
||||||
|
class Title: Title {};
|
||||||
|
class Value: CheckBox
|
||||||
|
{
|
||||||
|
idc = 103;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
239
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h
Normal file
239
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENDisplay.h
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class ctrlMenuStrip;
|
||||||
|
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
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h
Normal file
8
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENVersion.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class CfgGMS3DENVersion
|
||||||
|
{
|
||||||
|
version = 1.02;
|
||||||
|
build = 15;
|
||||||
|
date = "09/22/23";
|
||||||
|
};
|
51
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h
Normal file
51
@GMS_EDEN/addons/3DEN_plugin/gmsCfg3DENsettings.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
*****************************************/
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
55
@GMS_EDEN/addons/3DEN_plugin/gmsCfgFunctions.h
Normal file
55
@GMS_EDEN/addons/3DEN_plugin/gmsCfgFunctions.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 {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
12
@GMS_EDEN/addons/3DEN_plugin/gmsCfgPatches.h
Normal file
12
@GMS_EDEN/addons/3DEN_plugin/gmsCfgPatches.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
class CfgPatches
|
||||||
|
{
|
||||||
|
class GMS_3DEN
|
||||||
|
{
|
||||||
|
requiredVersion = 0.1;
|
||||||
|
requiredAddons[] = {3DEN};
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
magazines[] = {};
|
||||||
|
ammo[] = {};
|
||||||
|
};
|
||||||
|
};
|
15
@GMS_EDEN/addons/3DEN_plugin/testIntersects.sqf
Normal file
15
@GMS_EDEN/addons/3DEN_plugin/testIntersects.sqf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
private _obj = cursorObject;
|
||||||
|
private _pos = getPosATL _obj;
|
||||||
|
private _startPos = _pos;
|
||||||
|
private _endPos = [_pos select 0, _pos select 1, (_pos select 2) + 100];
|
||||||
|
private _objIntersect = lineIntersectsObjs [_startPos, _endPos,_obj,_obj,true];
|
||||||
|
private _count = count _ojbIntersect;
|
||||||
|
systemChat format["count = %1",_count];
|
||||||
|
if !(_count isEqualTo 0) then
|
||||||
|
{
|
||||||
|
private _firstObj = _objIntersect select 0;
|
||||||
|
private _lastObj = _objIntersect select ((count _objIntersect) - 1);
|
||||||
|
_m = format["first Obj = %1 | last Obj = %2 | cursorObj = %3",_firstObj,_lastObj, _obj];
|
||||||
|
systemChat _m;
|
||||||
|
diag_log _m;
|
||||||
|
};
|
7
@GMS_EDEN/addons/Guidelines.txt
Normal file
7
@GMS_EDEN/addons/Guidelines.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Features:
|
||||||
|
|
||||||
|
Exports static or dynamic missions preformated in .sqf code. Simply paste the output of the editor into a new .sqf file, edit entires to refine mission parameters and add the name of the mission file to GMS_missionLists.
|
||||||
|
Captures simple objects, sets allow dammage and allow similation according to editor settings, and captures marker configurations.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user