Added tool for generating dynamic missions from within the editor

This commit is contained in:
Chris Cardozo 2020-08-09 20:36:38 -04:00
parent 4c83429b96
commit 5b15fa15b9
21 changed files with 1349 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
diag_log format["About called at %1",diag_tickTime];

View File

@ -0,0 +1,24 @@
/*
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];
//diag_log format["_surfacesAbove = %1",_surfacesAbove];
{
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];
diag_log format["_surfacesBelow = %1",_surfacesBelow];
{
if ((_x select 2) isKindOf _category && !(_x isEqualTo _u)) exitWith {_building = (_x select 2)};
} forEach _surfacesBelow;
};
diag_log format["_fn_buildingContainer: _u = %1 | _building = %2",_u,_building];
_building

View File

@ -0,0 +1,8 @@
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";

View File

@ -0,0 +1,2 @@
diag_log format["Help called at %1",diag_tickTime];

View File

@ -0,0 +1,57 @@
blck_dynamicStartMessage = "TODO: Change approiately";
blck_dynamicEndMessage = "TODO: Change Appropriately";
blck_dynamicCrateLoot = "_crateLoot = blck_BoxLoot_Green;";
blck_dynamicCrateLootCounts = "_lootCounts = blck_lootCountsGreen;";
blck_dynamicmarkerMissionName = '_markerMissionName = "TODO: Update appropriately";';
blck_dynamicMissionDifficulty = "Blue";
diag_log format["Initilization Complete for 3EDEN plugin for blckeagls"];
/*
_markerMissionName = "Research Center";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Green;
_maxNoAI = blck_MaxAI_Green;
_noAIGroups = blck_AIGrps_Green;
_noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
_vests = blck_vests;
_backpacks = blck_backpacks;
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
_sideArms = blck_Pistols;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.0; // The chance that a loot crate will be dropped with paratroops.
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
// Setting this in the mission file overrides the defaults
diag_log format["Inilized 3EDEN Plugin for blckeagles"];

View File

@ -0,0 +1,11 @@
/*
Returns true if a unit is on foot otherwise returns false.
By Ghostrider-GRG-
Copyright 2020
*/
private _u = _this select 0;
private _isInfantry = if ((_u isKindOf "Man") && (vehicle _u) isEqualTo _u) then {true} else {false};
//diag_log format["_fn_isInfantry: _isInfantry = %1",_isInfantry];
_isInfantry

View File

@ -0,0 +1,43 @@
/*
Determine if an object is inside or ontop of another object base on line of sight.
Returns true if this is the case, false otherwise.
By Ghostrider-GRG-
Copyright 2020
*/
// returns true if an object is inside, underneath or on top of a building otherwise returns false.
//////////////////////
// Determin if a unit is inside a building using two separate checkVisibility
//////////////////////
params["_u",["_category","House"]];
private _pos = getPosASL _u;
private _above = lineIntersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u];
private _below = lineintersects [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 2],_u];
//diag_log format["_fn_isInside: _u %1 | _category = %5 | typeOf _u %4 | _above %2 | _below %3 ",_u,_above,_below,typeOf _u, _category];
// If there is something above or below the object do a quick double-check to make sure there is a building there and not something else.
if (_above) then // test if any surfaces above are from buildingPos
{
private _surfacesAbove = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) + 100],_u,_u,true,100];
_above = false;
{
//diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
if ((_x select 2) isKindOf _category) then {_above = true};
}forEach _surfacesAbove;
};
if (_below) then
{
private _surfacesBelow = lineInterSectsSurfaces [_pos, [_pos select 0, _pos select 1, (_pos select 2) - 10],_u,_u,true,100];
_above = false;
{
//diag_log format["_fn_isInside: _x-2 = %2 | typeOf _x = %3",_x,_x select 2,typeOf (_x select 2)];
if ((_x select 2) isKindOf _category) then {_above = true};
}forEach _surfacesBelow;
};
private _isInside = if (_above || _below) then {true} else {false};
//diag_log format["_fn_isInside: _isInside = %1",_isInside];
_isInside

View File

@ -0,0 +1,90 @@
/*
Output from GRG Plugin for blckeagls
For Credits and Acknowledgements see the Readme and comments
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
_markerType = [,[0,0],];
_markerColor = ;
_startMsg = TODO: Change approiately;
_endMsg = TODO: Change Appropriately;
_markerMissionName = TODO: Update appropriately;
_crateLoot = blck_BoxLoot_Blue;
_lootCounts = blck_lootCountsBlue;
_missionLandscape = [
];
_simpleObjects = [
];
_missionPatrolVehicles = [
["B_MRAP_01_hmg_F",array,0],
["B_Truck_01_mover_F",array,0]
];
_submarinePatrolParameters = [
];
_airPatrols = [
["B_Heli_Light_01_dynamicLoadout_F",array,0]
];
_missionEmplacedWeapons = [
["B_GMG_01_F",array,0],
["B_HMG_01_F",array,0]
];
_missionGroups = [
,[array,3,6,"Red",30,45],
,[array,3,6,"Red",30,45]
];
_scubaGroupParameters = [
];
_missionLootBoxes = [
["Box_IND_Wps_F",array,_crateLoot,_lootCounts,0],
["Box_AAF_Equip_F",array,_crateLoot,_lootCounts,0],
["Box_IND_AmmoOrd_F",array,_crateLoot,_lootCounts,0],
["Box_IND_WpsLaunch_F",array,_crateLoot,_lootCounts,0]
];
_missionLandscapeMode = "precise";
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Blue];
_maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_minNoAI = blck_MinAI_Blue;
_maxNoAI = blck_MaxAI_Blue;
_noAIGroups = blck_AIGrps_Blue;
_noVehiclePatrols = blck_SpawnVeh_Blue;
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
_uniforms = blck_SkinList;
_headgear = blck_headgear;
_vests = blck_vests;
_backpacks = blck_backpacks;
_weaponList = ['Blue'] call blck_fnc_selectAILoadout;
_sideArms = blck_Pistols;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_chancePara = blck_chanceParaBlue;
_noPara = blck_noParaBlue;
_paraTriggerDistance = 400;
_paraSkill = 'Blue';
_chanceLoot = 0.0;
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsBlue;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -0,0 +1,254 @@
#define aiDifficulty "Red"
#define minAI 3
#define maxAI 6
#define minPatrolRadius 30
#define maxPatrolRadius 45
#define AI_respawnTime 600
#define aiVehiclePatrolRadius 75
#define vehiclePatrolRespawnTime 600
#define staticWeaponRespawnTime 600
#define aiAircraftPatrolRespawnTime 600
#define aiAircraftPatrolRadius 1700
#define oddsOfGarrison 0.67
#define maxGarrisonStatics 3
#define maxGarrisonUnits 4
#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls
#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient.
#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction.
#define objectAtMissionCenter "RoadCone_L_F"
#define lootVehicleMarker "Sign_Arrow_F"
#define landVehicles "LandVehicle"
private _entities = all3DENEntities;
diag_log format["Dynamic Export called at %1",diag_tickTime];
if (isNil "blck_dynamicStartMessage") then
{
blck_dynamicStartMessage = "TODO: Change approiately";
};
if (isNil "blck_dynamicEndMessage") then
{
blck_dynamicEndMessage = "TODO: Change Appropriately";
};
if (isNil "blck_dynamicCrateLoot") then
{
blck_dynamicCrateLoot = "_crateLoot = blck_BoxLoot_Green;";
};
if (isNil "blck_dynamicCrateLootCounts") then {
blck_dynamicCrateLootCounts = "_lootCounts = blck_lootCountsGreen;";
};
if (isNil "blck_dynamicmarkerMissionName") then
{
blck_dynamicmarkerMissionName = "TODO: Update appropriately";
};
if (isNil "blck_dynamicMissionDifficulty") then
{
blck_dynamicMissionDifficulty = "Blue";
};
private _markers = _entities select 5;
diag_log format["_markers = %1",_markers];
private ["_m1","_type","_shape","_size","_color","_brush"];
if !(_markers isEqualTo []) then {
_m1 = _markers select 0;
_type = markerType _m1;
_shape = markerShape _m1;
_size = markerSize _m1;
_color = markerColor _m1;
_brush = markerBrush _m1;
CENTER = markerPos _m1;
} else {
_type = "mil_square";
_shape = "null";
_size = "[0,0]";
_color = "COLORRED";
_brush = "null";
CENTER = [0,0,0];
};
diag_log format["_m1 = %1 | _type = %2 | _shape = %3 | _size = %4 | _color = %5 | _brush = %6",_m1,markerType _m1,markerShape _m1,MarkerSize _m1, markercolor _m1,markerbrush _m1];
private _garrisonedBuildings = [];
private _missionLootVehicles = [];
private _staticObjects = allMissionObjects "Static" select {!(isSimpleObject _x) && (_x in _garrisonedBuildings) && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)};
if (CENTER isEqualTo [0,0,0]) then {CENTER = getPosATL (_staticObjects select 0)};
private _missionLandscape = [];
diag_log format["_missionLandscape: %1",_staticObjects];
{
_missionLandscape pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
}forEach _staticObjects;
private _simpleObjects = allMissionObjects "Static" select {isSimpleObject _x};
diag_log format["_simpleObjects = %1",_simpleObjects];
private _missionSimpleObjects = [];
{
if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then
{
_missionSimpleObjects pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
};
} forEach _simpleObjects;
private _missionPatrolVehicles = [];
private _patrolVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship") select {!((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles)};
diag_log format["_patrolVehicles = _count = %2 | %1",_patrolVehicles,count _patrolVehicles];
{
_missionPatrolVehicles pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
}forEach _patrolVehicles;
private _subs = allMissionObjects "SDV_01_base_F" select {((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles)};
private _subPatrols = [];
diag_log format["_subs = %1",_subs];
{
_lines pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
} forEach _subs;
private _airvehicles = allMissionObjects "Air";
private _airPatrols = [];
diag_log format["_airPatrolvehicles = %1",_airvehicles];
{
_airPatrols pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
} forEach _airvehicles;
private _allstaticWeapons = allMissionObjects "StaticWeapon";
private _staticWeapons = [];
diag_log format["_staticWeapons = %1",_staticWeapons];
{
_staticWeapons pushBack format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
} forEach _allstaticWeapons;
private _isInside = false;
private _infantry = allMissionObjects "Man" select {!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x) && ((vehicle _x isEqualTo _x))};
diag_log format["_infantry = %1",_infantry];
_infantryGroups = [];
{
_infantryGroups pushBack format[' ,[%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
} forEach _infantry;
private _scuba = allMissionObjects "Man" select {(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x) && ((vehicle _x isEqualTo _x))};
diag_log format["_scuba = %1",_scuba];
private _scubaGroups = [];
{
_scubaGroups pushBack format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
} forEach _scuba;
private _lootBoxes = ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F"));
diag_log format["_lootBoxes = %1",_lootBoxes];
private _lootContainers = [];
{
_lootContainers pushBack format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x];
}forEach _lootBoxes;
private _lines = [];
private _lineBreak = toString [10];
_lines pushBack "/*";
_lines pushBack " Output from GRG Plugin for blckeagls";
_lines pushBack " For Credits and Acknowledgements see the Readme and comments";
_lines pushBack "*/";
_lines pushBack "";
_lines pushBack '#include "\q\addons\custom_server\Configs\blck_defines.hpp";';
_lines pushBack '#include "\q\addons\custom_server\Missions\privateVars.sqf";';
_lines pushBack "";
_lines pushBack format["_markerType = %1",format["[%1,%2,%3];",_type,_size,_brush]];
_lines pushBack format["_markerColor = %1;",_color];
_lines pushBack format['_startMsg = %1;',blck_dynamicStartMessage];
_lines pushBack format['_endMsg = %1;',blck_dynamicEndMessage];
_lines pushBack format['_markerMissionName = %1;',blck_dynamicmarkerMissionName];
_lines pushBack format['_crateLoot = blck_BoxLoot_%1;',blck_dynamicMissionDifficulty];
_lines pushBack format['_lootCounts = blck_lootCounts%1;',blck_dynamicMissionDifficulty];
_lines pushBack "";
_lines pushBack "_missionLandscape = [";
_lines pushback (_missionLandscape joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_simpleObjects = [";
_lines pushback (_simpleObjects joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_missionPatrolVehicles = [";
_lines pushback (_missionPatrolVehicles joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_submarinePatrolParameters = [";
_lines pushback (_subPatrols joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_airPatrols = [";
_lines pushback (_airPatrols joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_missionEmplacedWeapons = [";
_lines pushback (_staticWeapons joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_missionGroups = [";
_lines pushback (_infantryGroups joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_scubaGroupParameters = [";
_lines pushback (_scubaGroups joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack "_missionLootBoxes = [";
_lines pushback (_lootContainers joinString (format [",%1", _lineBreak]));
_lines pushBack "];";
_lines pushBack "";
_lines pushBack '_missionLandscapeMode = "precise";'; // acceptable values are "none","random","precise"';
_lines pushBack "_useMines = blck_useMines;";
_lines pushBack format["_minNoAI = blck_MinAI_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_maxNoAI = blck_MaxAI_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format ["_minNoAI = blck_MinAI_%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_lines pushBack format["_maxNoAI = blck_MaxAI_Blue;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_noAIGroups = blck_AIGrps_%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_noVehiclePatrols = blck_SpawnVeh_%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_noEmplacedWeapons = blck_SpawnEmplaced_%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_linse pushBack "_useMines = blck_useMines;"; // Setting this in the mission file overrides the defaults
_lines pushBack "_uniforms = blck_SkinList;"; // Setting this in the mission file overrides the defaults
_lines pushBack "_headgear = blck_headgear;"; // Setting this in the mission file overrides the defaults
_lines pushBack "_vests = blck_vests;";
_lines pushBack "_backpacks = blck_backpacks;";
_lines pushBack format["_weaponList = ['%1'] call blck_fnc_selectAILoadout;",blck_dynamicMissionDifficulty];
_lines pushBack "_sideArms = blck_Pistols;";
_lines pushBack format["_chanceHeliPatrol = blck_chanceHeliPatrol%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_noChoppers = blck_noPatrolHelis%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_missionHelis = blck_patrolHelis%1;",blck_dynamicMissionDifficulty];
_lines pushBack "";
_lines pushBack format["_chancePara = blck_chancePara%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_noPara = blck_noPara%1;",blck_dynamicMissionDifficulty]; // Setting this in the mission file overrides the defaults
_lines pushBack format["_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.
_lines pushBack format["_paraSkill = '%1';",blck_dynamicMissionDifficulty]; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_lines pushBack format["_chanceLoot = 0.0;"]; // The chance that a loot crate will be dropped with paratroops.
_lines pushBack format["_paraLoot = blck_BoxLoot_%1;",blck_dynamicMissionDifficulty];
_lines pushBack format["_paraLootCounts = blck_lootCounts%1;",blck_dynamicMissionDifficulty]; // Throw in something more exotic than found at a normal blue mission.
_lines pushBack '#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";';
// As found in fn_3DENExportTerrainBuilder.sqf
uiNameSpace setVariable ["Display3DENCopy_data", ["dynamicMission.sqf", _lines joinString _lineBreak]];
(findDisplay 313) createdisplay "Display3DENCopy";
/*
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.0; // The chance that a loot crate will be dropped with paratroops.
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
// Setting this in the mission file overrides the defaults

View File

@ -0,0 +1,20 @@
diag_log format["Dynamic Export called at %1",diag_tickTime];
private _lines = [];
private _lineBreak = toString [10];
_lines pushBack "/*";
_lines pushBack " Ourput from GRG Plugin for blckeagls";
_lines pushBack " For Credits and Acknowledgements see the Readme and comments";
_lines pushBack "*/";
_lines pushBack "";
_lines pushBack '#include "\q\addons\custom_server\Configs\blck_defines.hpp";';
_lines pushBack '#include "\q\addons\custom_server\Missions\privateVars.sqf";';
// As found in fn_3DENExportTerrainBuilder.sqf
uiNameSpace setVariable ["Display3DENCopy_data", ["dynamicMission.sqf", _lines joinString _lineBreak]];
(findDisplay 313) createdisplay "Display3DENCopy";

View File

@ -0,0 +1,411 @@
diag_log "========== <START> ==========================";
private _markers = all3DENEntities select 5;
///////////////////
// Define some values for our AI
// Change values of these variables to suit your needs
///////////////////
#define aiDifficulty "Red"
#define minAI 3
#define maxAI 6
#define minPatrolRadius 30
#define maxPatrolRadius 45
#define AI_respawnTime 600
#define aiVehiclePatrolRadius 75
#define vehiclePatrolRespawnTime 600
#define staticWeaponRespawnTime 600
#define aiAircraftPatrolRespawnTime 600
#define aiAircraftPatrolRadius 1700
#define oddsOfGarrison 0.67
#define maxGarrisonStatics 3
#define maxGarrisonUnits 4
#define typesGarrisonStatics [] // When empty a static will be randomly chosen from the defaults for blckeagls
#define garrisonMarkerObject "Sign_Sphere100cm_F" // This can be anything you like. I find this large sphere easy to see and convenient.
#define unitMarkerObject "Sign_Arrow_Direction_Green_F" // This can be anything. I chose this arrow type because it allows you to easily indicate direction.
#define objectAtMissionCenter "RoadCone_L_F"
#define lootVehicleMarker "Sign_Arrow_F"
#define landVehicles "LandVehicle"
///////////////////
// Define the coordinates of the center of the mission.
///////////////////
if (isNil "CENTER") then
{
CENTER = [0,0,0];
};
if (CENTER isEqualTo [0,0,0]) then
{
hint "Please define a center point for your mission";
_obj = allMissionObjects objectAtMissionCenter;
_obj1 = _obj select 0;
diag_log format["Determining position of first roadcone found which is located at %1 with player found at %2",getPos _obj1,position Player];
if (count _obj > 0) then
{
CENTER = [3,3,0] vectorAdd (getPosATL _obj1);
};
hint format["Position of Road Cone at %1 used to define mission center",CENTER];
diag_log format["Position of Road Cone at %1 used to define mission center",CENTER];
diag_log format["Player located at position %1",position player];
};
diag_log format["CENTER Set to %1",CENTER];
///////////////////
// Identify any buildings in which a garrison should be spawned using the Arma building positions.
// Tell the script which buildings to garrison by placing an object inside that designates them as such.
// I use a large yellow sphere for this purpose.
// The function below assembles a list of such buildings for use in defining the data for mission buildings.
///////////////////
_cb = "";
//////////////////
// *** OPTIONAL ****
// Place a marker over your mission and configure it as you would like to to appear in the tame.
// The marker configuration will be included in the output of this script.
// Note ** Only the first marker placed will be processed **
// Configure Marker
/////////////////
diag_log format["<< ---- pullDynamicMision: START %1 ---- >>",diag_tickTime];
////////////////////////
// Begin pulling data here
///////////////////////
_cb = _cb + format["_garrisonedBuildings_BuildingPosnSystem = [",endl];
_helpers = allMissionObjects garrisonMarkerObject;
//diag_log format["_helpers = %1",_helpers];
{
if ( (typeOf _x) isEqualTo garrisonMarkerObject) then
{
private _isInside = [_x] call _fn_isInside;
if (_isInside) then
{
_building = [_x] call _fn_buildingContainer;
_garrisonedBuildings pushbackunique _building;
_garrisonedBuildings pushbackunique _x;
// data structure ["building Classname",[/*building pos*/],/*building dir*/,/*odds of garrison*/, /*Max Statics*/,/*types statics*/,/*max units*/],
// 1 2 3 4 5 6 7 8 9
_line = format[' ["%1",%2,%3,%4,%5,%6,%7,%8,%9]',typeOf _building,(getPosATL _building) vectorDiff CENTER,getDir _building, 'true','true',oddsOfGarrison,maxGarrisonStatics,typesGarrisonStatics,maxGarrisonUnits];
systemChat _line;
//diag_log _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
};
} forEach _helpers;
_cb = _cb + format["%1];%1%1",endl];
_logging = format["_garrisonedBuildings = %1",_garrisonedBuildings];
diag_log _logging;
systemChat _logging;
//diag_log format["_cb = %1%2",endl,_cb];
/*
This bit will set up the garrison for each building having units and / or statics inside it or on top.
Coding must ensure that nothing is repeated but everything is captured.
*/
_fn_configureGarrisonForBuildingATL = {
private["_b","_staticsInBuilding","_unitsInBuilding","_staticsText","_unitsText","_buildingGarrisonATL","_staticsInBuilding","_unitsInBuilding","_count"];
_b = _this select 0;
_count = 0;
if (_b in _garrisonedBuildings) exitWith {""};
_staticsText = "";
_unitsText = "";
_buildingGarrisonATL = "";
_staticsInBuilding = nearestObjects[getPosATL _building,["StaticWeapon"],sizeOf (typeOf _building)];
{
if !(_x in _configuredStatics) then
{
_isInside = [_x] call _fn_isInside;
if (_isInside) then {_building = [_x] call _fn_buildingContainer};
if (_b isEqualTo _building) then
{
_configuredStatics pushBackUnique _x;
//_configuredStaticsPositions pushBack (getPosATL _x) vectorDiff CENTER;
if (_staticsText isEqualTo "") then
{
_staticsText = format['["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
} else {
_staticsText = _staticsText + format[',["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
};
};
};
} forEach _staticsInBuilding;
_unitsInBuilding = nearestObjects[getPosATL _building,[unitMarkerObject],sizeOf (typeOf _building)];
{
if !(_x in _configuredUnits) then
{
_isInside = [_x] call _fn_isInside;
if (_isInside) then {_building = [_x] call _fn_buildingContainer};
if (_b isEqualTo _building) then
{
_configuredUnits pushBackUnique _x;
if (_unitsText isEqualTo "") then
{
_unitsText = format["[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
} else {
_unitsText = _unitsText + format[",[%1,%2]",(getPosATL _x) vectorDiff (getPosATL _b),getDir _x];
};
_count = _count + 1;
};
};
} forEach _unitsInBuilding;
if ( !(_staticsText isEqualTo "") || !(_unitsText isEqualTo "")) then
{
_buildingGarrisonATL = format[' ["%1",%2,%3,%4,%5,[%6],[%7]]',typeOf _b,(getPosATL _b) vectorDiff CENTER,getDir _b,'true','true',_staticsText,_unitsText];
_garrisonedBuildings pushBackUnique _b;
};
_buildingGarrisonATL
};
private _count = 0;
_cb = _cb + "_garrisonedBuilding_ATLsystem = [";
{
private _isInside = [_x] call _fn_isInside;
if (_isInside) then
{
private _building = [_x] call _fn_buildingContainer;
private _include = if ( !(_building in _garrisonedBuildings) && !((typeOf _building) isEqualTo unitMarkerObject) && !((typeOf _building) isEqualTo garrisonMarkerObject)) then {true} else {false};
if (_include) then
{
//diag_log format["_x = %1 | _building = %1",_x,_building];
private _buildingGarrisonInformation = [_building] call _fn_configureGarrisonForBuildingATL;
diag_log format["_buildingGarrisonInformation = %1",_buildingGarrisonInformation];
if !(_buildingGarrisonInformation isEqualTo "") then
{
if (_count == 0) then
{
_cb = _cb + format["%1%2",endl,_buildingGarrisonInformation];
} else {
_cb = _cb + format[",%1%2",endl,_buildingGarrisonInformation];
};
_count = _count + 1;
};
};
};
} forEach ((allMissionObjects "StaticWeapon") + (allMissionObjects "Man") + (allMissionObjects unitMarkerObject));
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Configure info remaining mission landscape
///////////////////
_land = allMissionObjects "Static";
_count = 0;
_cb = _cb + format["_missionLandscape = [",endl];
{
diag_log format["evaluating mission landscape: _x = %1 | typeOf _x = %1",_x, typeOf _x];
//diag_log format["evaluating mission landscape: _x %1 | typeOf _x %1",_x, _x isKindOf "Helper_Base_F"];
if !(_x in _garrisonedBuildings && !((typeOf _x) isEqualTo unitMarkerObject) && !((typeOf _x) isEqualTo garrisonMarkerObject)) then
{
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
systemChat _line;
if (_count == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
_count = _count + 1;
};
}forEach allMissionObjects "Static";
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Configure loot boxes
///////////////////
_cb = _cb + "_missionLootBoxes = [";
{
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _x,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
}forEach ((allMissionObjects "ReammoBox") + (allMissionObjects "ReammoBox_F"));
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Setup Info for loot vehicles
///////////////////
_missionLootVehicles = [];
_missionVehicles = ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship");
_lootVehicleMarkers = allMissionObjects lootVehicleMarker;
diag_log format["_lootVehicleMarkers = %1",_lootVehicleMarkers];
_cb = _cb + format["_missionLootVehicles = ["];
{
_kindOf = "nothing";
_isInside = [_x,"Car"] call _fn_isInside;
if (_isInside) then {_kindOf = "Car"};
if !(_isInside) then {_isInside = [_x,"Ship"] call _fn_isInside};
if (_isInside) then {_kindOf = "Ship"};
if (_isInside) then
{
_object = [_x,_kindOf] call _fn_buildingContainer;
diag_log format["object %1 is inside object %2",_x,_object];
_missionLootVehicles pushBack _object;
_line = format[' ["%1",%2,%3,%4,%5]',typeOf _object,(getPosATL _x) vectorDiff CENTER, '_crateLoot','_lootCounts',getDir _x];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
} forEach allMissionObjects lootVehicleMarker;
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Setup Info for vehicle patrols
///////////////////
_cb = _cb + format["_missionPatrolVehicles = ["];
{
if ( !((typeOf _x) isKindOf "SDV_01_base_F") && !(_x in _missionLootVehicles) ) then
{
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank") + allMissionObjects "Ship");
_cb = _cb + format["%1];%1%1",endl];
_cb = _cb + "_submarinePatrolParameters = [";
{
if ((typeOf _x) isKindOf "SDV_01_base_F") then
{
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
}forEach allMissionObjects "Ship";
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Configs for Air Patrols
///////////////////
_cb = _cb + "_airPatrols = [";
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
{
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
}forEach allMissionObjects "Air";
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Setup info for remaining static/emplaced weapons
///////////////////
_count = 0;
_cb = _cb + format["_missionEmplacedWeapons = ["];
{
//if !(_x in _configuredStatics) then
private _isInside = [_x] call _fn_isInside;
if !(_isInside) then
{
// ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
_line = format[' ["%1",%2,%3]',typeOf _x,(getPosATL _x) vectorDiff CENTER,getDir _x, 'true','true'];
systemChat _line;
if (_count == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
_count = _count + 1;
};
}forEach allMissionObjects "StaticWeapon";
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// Setup information for infantry groups spawning outside buildings
///////////////////
_cb = _cb + format["_missionGroups = ["];
{
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
_isInside = [_x] call _fn_isInside;
_isInfantry = [_x] call _fn_isInfantry;
//diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry];
if (_isInfantry) then
{
if (!(surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then
{
_line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
};
}forEach allMissionObjects "Man";
_cb = _cb + format["%1];%1%1",endl];
_cb = _cb + "_scubaGroupParameters = [";
{
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
_isInside = [_x] call _fn_isInside;
_isInfantry = [_x] call _fn_isInfantry;
//diag_log format["_missionGroups: _unit %1 | _isInside %2 _isInfantry %3",_x,_isInside,_isInfantry];
if (_isInfantry) then
{
if ((surfaceIsWater (getPos _x)) && !(_isInside) && !(isPlayer _x)) then
{
_line = format[' [%1,%2,%3,"%4",%5,%6]',(getPosATL _x) vectorDiff CENTER,minAI,maxAI,aiDifficulty,minPatrolRadius,maxPatrolRadius];
systemChat _line;
if (_forEachIndex == 0) then
{
_cb = _cb + format["%1%2",endl,_line];
} else {
_cb = _cb + format[",%1%2",endl,_line];
};
};
};
}forEach allMissionObjects "Man";
_cb = _cb + format["%1];%1%1",endl];
///////////////////
// All done, notify the user and copy the output to the clipboard
///////////////////
_msg = "All Objects organzied, formated and copied to the Clipboard";
hint _msg;
systemChat _msg;
systemChat format["_cb has %1 characters",count _cb];
copyToClipboard _cb;
diag_log "DONE";

View File

@ -0,0 +1,62 @@
_cb = "";
//////////////////
// *** OPTIONAL ****
// Place a marker over your mission and configure it as you would like to to appear in the tame.
// The marker configuration will be included in the output of this script.
// Note ** Only the first marker placed will be processed **
// Configure Marker
/////////////////
/*
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerType = ["mil_triangle",[0,0]];
*/
diag_log format["<< ---- START %1 ---- >>",diag_tickTime];
_allmkr = allMapMarkers;
diag_log format["_allmkr = %1",_allmkr];
if (count _allmkr == 0) then
//if !(typeName _mk isEqualTo "STRING") then
{
hint "No Marker Found, no Marker Definitions Will Be generated";
uiSleep 5;
} else {
_mk = _allmkr select 0;
diag_log format["_mk = %1",_mk];
systemChat format["marker shape = %1",markerShape _mk];
systemChat format["marker type = %1",markerType _mk];
systemChat format["marker size = %1",markerSize _mk];
systemChat format["markerColor = %1",markerColor _mk];
systemChat format["marker brush = %1",markerBrush _mk];
//systemChat
switch (toUpper(markerShape _mk)) do
{
case "ELLIPSE": {
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
};
case "RECTANGLE": {
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
};
case "ICON": {
_cb = _cb + format['_markerType = ["%1"];%2',getMarkerType _mk,endl];
};
};
_cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl];
_cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl];
_cb = _cb + format["%1%1",endl];
};
///////////////////
// All done, notify the user and copy the output to the clipboard
///////////////////
_msg = "Marker Data organzied, formated and copied to the Clipboard";
hint _msg;
systemChat _msg;
systemChat format["_cb has %1 characters",count _cb];
copyToClipboard _cb;
diag_log "DONE";

View File

@ -0,0 +1 @@
CENTER = getPos player;

View File

@ -0,0 +1,71 @@
/*
Mission Template by Ghostrider [GRG]
Mission Compositions by Bill prepared for ghostridergaming
Copyright 2016
Last modified 3/20/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = default";
_crateLoot = blck_BoxLoot_G;reen
_lootCounts = blck_lootCountsGreen;
_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!";
_endMsg = "The Sector at the Green Marker is under survivor control!";
_markerMissionName = "Research Center";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Green;
_maxNoAI = blck_MaxAI_Green;
_noAIGroups = blck_AIGrps_Green;
_noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
_vests = blck_vests;
_backpacks = blck_backpacks;
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
_sideArms = blck_Pistols;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.0; // The chance that a loot crate will be dropped with paratroops.
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
// Setting this in the mission file overrides the defaults
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -0,0 +1,21 @@
Variables to define
marker parameters
Marker Text
Mission start message
Mission end message
Mission level
To pull units:
private _units = allUnits;
To pull objects:
_center = allMissionObejcts "RoadCone_L_F";
_buildings = allMissionObjects "Building";
_things = allMissionObjects "ThingX";
_baseObjects = _buildings append _things;
_static = allMissionObejcts "StaticWeapon";
_vehicles = allMissionObejcts "Car" + allMissionObejcts "Tank" + allMissionObejcts "Ship";
_air = allMissionObejcts "Air";

View File

@ -0,0 +1,62 @@
_cb = "";
//////////////////
// *** OPTIONAL ****
// Place a marker over your mission and configure it as you would like to to appear in the tame.
// The marker configuration will be included in the output of this script.
// Note ** Only the first marker placed will be processed **
// Configure Marker
/////////////////
/*
_markerType = ["ELIPSE",[175,175],"GRID"];
_markerType = ["mil_triangle",[0,0]];
*/
diag_log format["<< ---- START %1 ---- >>",diag_tickTime];
_allmkr = allMapMarkers;
diag_log format["_allmkr = %1",_allmkr];
if (count _allmkr == 0) then
//if !(typeName _mk isEqualTo "STRING") then
{
hint "No Marker Found, no Marker Definitions Will Be generated";
uiSleep 5;
} else {
_mk = _allmkr select 0;
diag_log format["_mk = %1",_mk];
systemChat format["marker shape = %1",markerShape _mk];
systemChat format["marker type = %1",markerType _mk];
systemChat format["marker size = %1",markerSize _mk];
systemChat format["markerColor = %1",markerColor _mk];
systemChat format["marker brush = %1",markerBrush _mk];
//systemChat
switch (toUpper(markerShape _mk)) do
{
case "ELLIPSE": {
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
};
case "RECTANGLE": {
_cb = _cb + format['_markerType = ["%1",%2,"%3"];%4',toUpper(MarkerShape _mk),getMarkerSize _mk,toUpper(markerBrush _mk),endl];
};
case "ICON": {
_cb = _cb + format['_markerType = ["%1"];%2',getMarkerType _mk,endl];
};
};
_cb = _cb + format['_markerColor = "%1";%2',markerColor _mk,endl];
_cb = _cb + format['_markerLabel = "%1";%2',MarkerText _mk,endl];
_cb = _cb + format["%1%1",endl];
};
///////////////////
// All done, notify the user and copy the output to the clipboard
///////////////////
_msg = "Marker Data organzied, formated and copied to the Clipboard";
hint _msg;
systemChat _msg;
systemChat format["_cb has %1 characters",count _cb];
copyToClipboard _cb;
diag_log "DONE";

View File

@ -0,0 +1 @@
CENTER = getPos player;

View File

@ -0,0 +1,81 @@
/*
Mission Template by Ghostrider [GRG]
Mission Compositions by Bill prepared for ghostridergaming
Copyright 2016
Last modified 3/20/17
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#include "\q\addons\custom_server\Missions\privateVars.sqf";
//diag_log "[blckeagls] Spawning Green Mission with template = default";
_crateLoot = blck_BoxLoot_Green;
_lootCounts = blck_lootCountsGreen;
_startMsg = "An enemy research center was sighted in a nearby sector! Check the Green marker on your map for the location!";
_endMsg = "The Sector at the Green Marker is under survivor control!";
_markerMissionName = "Research Center";
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
//////////
// Past the output of the script here
//////////
// The lines below define additional variables you may wish to configure.
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines;
_minNoAI = blck_MinAI_Green;
_maxNoAI = blck_MaxAI_Green;
_noAIGroups = blck_AIGrps_Green;
_noVehiclePatrols = blck_SpawnVeh_Green;
_noEmplacedWeapons = blck_SpawnEmplaced_Green;
_minNoAI = blck_MinAI_Blue; // Setting this in the mission file overrides the defaults such as blck_MinAI_Blue
_maxNoAI = blck_MaxAI_Blue; // Setting this in the mission file overrides the defaults
_noAIGroups = blck_AIGrps_Blue; // Setting this in the mission file overrides the defaults
_noVehiclePatrols = blck_SpawnVeh_Blue; // Setting this in the mission file overrides the defaults
_noEmplacedWeapons = blck_SpawnEmplaced_Blue; // Setting this in the mission file overrides the defaults
// Change _useMines to true/false below to enable mission-specific settings.
_useMines = blck_useMines; // Setting this in the mission file overrides the defaults
_uniforms = blck_SkinList; // Setting this in the mission file overrides the defaults
_headgear = blck_headgear; // Setting this in the mission file overrides the defaults
_vests = blck_vests;
_backpacks = blck_backpacks;
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
_sideArms = blck_Pistols;
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
_noChoppers = blck_noPatrolHelisBlue;
_missionHelis = blck_patrolHelisBlue;
_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
_paraTriggerDistance = 400; // Distance from mission at which a player triggers these reinforcements and any supplemental loot. // To have paras spawn at the time the mission spawns with/without accompanying loot set this to 0.
_paraSkill = "red"; // Choose any skill you like; bump up skill or add AI to justify more valuable loot.
_chanceLoot = 0.0;
_paraLoot = blck_BoxLoot_Blue;
_paraLootCounts = blck_lootCountsRed; // Throw in something more exotic than found at a normal blue mission.
_spawnCratesTiming = blck_spawnCratesTiming; // Choices: "atMissionSpawnGround","atMissionEndGround","atMissionEndAir".
// Crates spawned in the air will be spawned at mission center or the position(s) defined in the mission file and dropped under a parachute.
// This sets the default value but can be overridden by defining _spawnCrateTiming in the file defining a particular mission.
_loadCratesTiming = blck_loadCratesTiming; // valid choices are "atMissionCompletion" and "atMissionSpawn";
// Pertains only to crates spawned at mission spawn.
// This sets the default but can be overridden for specific missions by defining _loadCratesTiming
// Examples:
// To spawn crates at mission start loaded with gear set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionSpawn"
// To spawn crates at mission start but load gear only after the mission is completed set blck_spawnCratesTiming = "atMissionSpawnGround" && blck_loadCratesTiming = "atMissionCompletion"
// To spawn crates on the ground at mission completion set blck_spawnCratesTiming = "atMissionEndGround" // Note that a loaded crate will be spawned.
// To spawn crates in the air and drop them by chutes set blck_spawnCratesTiming = "atMissionEndAir" // Note that a loaded crate will be spawned.
_endCondition = blck_missionEndCondition; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
// Setting this in the mission file overrides the defaults
//_timeOut = -1;
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";

View File

@ -0,0 +1,128 @@
/*
*/
class CfgPatches
{
class blckeagls_3den
{
requiredVersion = 0.1;
requiredAddons[] = {"3den"};
units[] = {};
weapons[] = {};
magazines[] = {};
ammo[] = {};
};
};
///////////////////////////////////////////////////////////////////////////////
class CfgFunctions
{
class blck3EDEN
{
class Export
{
file = "3EDEN_plugin\Export";
class exportDynamic {};
class exportStatic {};
//class buildingContainer {};
//class isInfantry {};
//class isInside {};
//class saveInitPlayerLocal {};
//class saveWeather {};
//class saveMarkers {};
//class exportCheck {};
};
class Core
{
file = "3EDEN_plugin\Core";
class help {};
class about {};
class init {
postInit = 1;
};
};
};
};
///////////////////////////////////////////////////////////////////////////////
class ctrlCombo;
///////////////////////////////////////////////////////////////////////////////
class ctrlMenuStrip;
class display3DEN
{
class Controls
{
class MenuStrip: ctrlMenuStrip
{
class Items
{
items[] += {"Blackeagls"};
class Blackeagls
{
text = "Blackeagls";
items[] = {
"blckAbout3EDENPlugin",
"blckSeparator",
"blckSaveStaticMission",
"blckSaveDynamicMission",
"blck3EDENPluginHelp"
};
};
class blckAbout3EDENPlugin
{
text = "3EDEN Plugin Version 1.0 for BlckEagls by Ghostrider-GRG-";
action = "call blck3EDEN_fnc_about";
};
class blckSeparator
{
value = 0;
};
class blckSaveStaticMission
{
text = "Save StaticMission";
action = "call blck3EDEN_fnc_exportStatic";
picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa";
};
class blckSaveDynamicMission
{
text = "Save Dynamic Mission";
action = "call blck3EDEN_fnc_exportDynamic";
picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa";
};
class Blck3EDENPluginHelp
{
text = "Help";
action = "call blck3EDEN_fnc_Help";
//picture = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\save_ca.paa";
};
};
};
};
};
///////////////////////////////////////////////////////////////////////////////
class CfgVehicles
{
class B_Soldier_base_F;
//
};