Added bsic tools for pulling configs from editor
This commit is contained in:
parent
8353017190
commit
57c2db770b
53
Tools/Directions.txt
Normal file
53
Tools/Directions.txt
Normal file
@ -0,0 +1,53 @@
|
||||
Tools for blckeagls
|
||||
|
||||
These tools should facilitate exporting information from the editor when creating new static or dynamic missions.
|
||||
|
||||
I will cover configuration of Static Missions first.
|
||||
|
||||
Because the tools are not yet available as a plug in for the editor, you need to do a bit of preparation to use them but its nothing too difficult.
|
||||
|
||||
/////////////////////
|
||||
The basic steps are:
|
||||
/////////////////////
|
||||
Lay out your mission in the editor.
|
||||
Note that the first thing you do should be to place a unit who will be your player character while you use the tools.
|
||||
Then, place the units, vehicles, structures, loot crates, and any other elements.
|
||||
Ror static missions be sure to also place a marker.
|
||||
|
||||
Now, copy the sqf files from the tool folders into your mission folder.
|
||||
'Play' the mission.
|
||||
Tools will be available through the action menu.
|
||||
|
||||
For static missions, just scrolll through the options with your mouse wheel and select the option to "".
|
||||
The mission configurations will be copied to the clipboard.
|
||||
Alt-Tab out and open your favorite text editor, then paste the output into a new file.
|
||||
You are now ready to modify the static mission template by pasting in the information about markers and various units.
|
||||
Note that you will have to defin a few variables like _crateLoot and_lootCounts.
|
||||
|
||||
Any other variables you wish to adjust in the template can be modified at this time.
|
||||
|
||||
|
||||
For dynamic missions, the steps are similar but a bit more is involved.
|
||||
|
||||
First, configure yoru mission as above.
|
||||
|
||||
Hit Play.
|
||||
Set a mission center which is used to calculate the relative position of objects.
|
||||
You can define it by placing a traffic cone with a light on it then selecting the action menu choice to use it a the center OR
|
||||
by moving to the spot you want to be the center and selecting the appropriate option.
|
||||
Next just select the menu option you want for the mode in which configs are exported. There are two possible methods to export configurations
|
||||
the first dumps everything into a single list of objects.
|
||||
The second pre-configures the definitions used in the mission file.
|
||||
The output is copied to the clipboard as above.
|
||||
Once the script is done just paste ito you script editor and merge that content with a mission template.
|
||||
|
||||
////////////////
|
||||
CONFIGURATION
|
||||
///////////////
|
||||
|
||||
Variables used are defined in init.sqf
|
||||
|
||||
//////////////
|
||||
Limitations
|
||||
/////////////
|
||||
For some reason, at this time, the Z coordinate of objects is corrupted during export of dynamic missions.
|
3
Tools/centerAtPlayerPos.sqf
Normal file
3
Tools/centerAtPlayerPos.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
CENTER = getPos player;
|
||||
systemChat format["Center set to %1",CENTER];
|
3
Tools/clearCenter.sqf
Normal file
3
Tools/clearCenter.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
CENTER = nil;
|
||||
systemChat format["Center set to nil"];
|
197
Tools/configurForStaticMission.sqf
Normal file
197
Tools/configurForStaticMission.sqf
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
"StaticWeapon"
|
||||
"Car","Tank"
|
||||
"Air","Plane","Helicopter"
|
||||
"Ship",
|
||||
"Man"
|
||||
|
||||
(_x get3DENAttribute 'enableSimulation') select 0,
|
||||
(_x get3DENAttribute 'allowDamage') select 0
|
||||
|
||||
_missionLandscape = [
|
||||
["Land_Cargo_HQ_V2_F",[22885.4,16756.8,3.19],[[0,1,0],[0,0,1]],[true,false]],
|
||||
_missionEmplacedWeapons = [
|
||||
["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
|
||||
_aiGroupParameters = [
|
||||
["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
|
||||
[[22819.4,16929.5,0],"red",1, 75, 10]
|
||||
_vehiclePatrolParameters = [
|
||||
["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10]
|
||||
_airPatrols = [
|
||||
[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
|
||||
|
||||
_missionCenter = [22584.9,15304.8,0];
|
||||
_markerLabel = "";
|
||||
//_markerType = ["ELIPSE",[200,200],"GRID"];
|
||||
// An alternative would be:
|
||||
_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers
|
||||
_markerColor = "ColorRed"; // This can be any valid Arma Marker Color
|
||||
*/
|
||||
///////////////////
|
||||
// Ensure that a center has been set
|
||||
///////////////////
|
||||
_cb = "";
|
||||
diag_log "========== <START> ==========================";
|
||||
//////////////////
|
||||
// Configure Marker
|
||||
/////////////////
|
||||
_mk = allMapMarkers select 0;
|
||||
_cb = _cb + format["_missionCenter = %1;%2",markerPos _mk,endl];
|
||||
_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];
|
||||
|
||||
if ((getMarkerType _mk) in ["ELIPSE","RECTANGLE"]) then
|
||||
{
|
||||
_cb = _cb + format['_markerBrush = "%1";%2',markerBrush _mk,endl];
|
||||
_cb = _cb + format['_markerSize = "%1";%2',getMarkerSize _mk,endl];
|
||||
};
|
||||
_cb = _cb + format["%1%1",endl];
|
||||
///////////////////
|
||||
// Configure info for mission landscape
|
||||
///////////////////
|
||||
_land = allMissionObjects "Static";
|
||||
systemChat format["%1 static objects",count _land];
|
||||
_cb = _cb + format["_missionLandscape = [",endl];
|
||||
{
|
||||
_line = format["[%1,%2,[%3,%4],%5,%6]",typeOf _x,getPosATL _x,VectorDir _x, vectorUp _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 "Static";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup information for infantry groups
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionGroups = ["];
|
||||
{
|
||||
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
|
||||
if !(surfaceIsWater (getPos _x)) then
|
||||
{
|
||||
_line = format['[%1,%2,[%3,%4],%5,%6]',getPosATL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime];
|
||||
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+ format["_aiScubaGroupParameters = ["];
|
||||
{
|
||||
//[[22920.4,16887.3,3.19144],"red",[1,2], 75,120],
|
||||
if (surfaceIsWater (getPos _x)) then
|
||||
{
|
||||
_line = format['[%1,%2,[%3,%4],%5,%6]',getPosATL _x,aiDifficulty,minAI,maxAI,patrolRadius,AI_respawnTime];
|
||||
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];
|
||||
|
||||
///////////////////
|
||||
// Setup Info for vehicle patrols
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionPatrolVehicles = ["];
|
||||
{
|
||||
if !((typeOf _x) isKindOf "SDV_01_base_F") then
|
||||
{
|
||||
_line = format["[%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiVehiclePatrolRadius,vehiclePatrolRespawnTime]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10]
|
||||
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];
|
||||
|
||||
///////////////////
|
||||
// Configs for Air Patrols
|
||||
///////////////////
|
||||
_cb = _cb + "_airPatrols = [";
|
||||
//[selectRandom _aircraftTypes,[22830.2,16618.1,11.4549],"blue",1000,60]
|
||||
{
|
||||
_line = format["%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiAircraftPatrolRadius,aiAircraftPatrolRespawnTime];
|
||||
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 static/emplaced weapons
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionEmplacedWeapons = ["];
|
||||
{
|
||||
// ["B_HMG_01_high_F",[22883.5,16757.6,6.31652],"blue",0,10]
|
||||
_line = format['[%1,%2,%3,%4,%5]',typeOf _x,getPosATL _x,aiDifficulty,0,staticWeaponRespawnTime];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach allMissionObjects "StaticWeapon";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
_cb = _cb + "_submarinePatrolParameters = [";
|
||||
{
|
||||
if ((typeOf _x) isKindOf "SDV_01_base_F") then
|
||||
{
|
||||
_line = format["[%1,%2,%3,%4,%5]",typeOf _x, getPosATL _x, aiDifficulty,aiSubmarinePatrolRadius,vehicleSubmarineRespawnTime]; //["B_G_Offroad_01_armed_F",[22809.5,16699.2,0],"blue",600,10]
|
||||
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];
|
||||
|
||||
_cb = _cb + "_missionLootBoxes = [";
|
||||
{
|
||||
// [selectRandom blck_crateTypes,[22904.8,16742.5,6.30195],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts]
|
||||
_line = format["%1,%2,%3,[true,false],_crateLoot,_lootCounts]",typeOf _x,getPosATL _x,[VectorDir _x, VectorUp _x]];
|
||||
systemChat _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach allMissionObjects "ThingX";
|
||||
_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;
|
||||
//if (true) exitWith{diag_log _cb};
|
154
Tools/dynaicMissionTemplate.sqf
Normal file
154
Tools/dynaicMissionTemplate.sqf
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
Mission Template by Ghostrider [GRG]
|
||||
|
||||
--------------------------
|
||||
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 Blue Mission with template = default2";
|
||||
|
||||
_crateLoot = blck_BoxLoot_Blue;
|
||||
/*
|
||||
You can use a customized loot array if you like. The format is as follows. note that for each category you can give a number or a range.
|
||||
_crateLoot = [
|
||||
[// Weapons
|
||||
["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"]
|
||||
],
|
||||
[//Magazines
|
||||
["10Rnd_93x64_DMR_05_Mag" ,1,4]
|
||||
],
|
||||
[ // Optics
|
||||
["optic_KHS_tan",1,3]
|
||||
],
|
||||
[// Materials and supplies
|
||||
["Exile_Item_CamoTentKit",1,6]
|
||||
],
|
||||
[//Items
|
||||
["Exile_Item_MountainDupe",1,3]
|
||||
],
|
||||
[ // Backpacks
|
||||
["B_OutdoorPack_tan",1,2]
|
||||
]
|
||||
];
|
||||
*/
|
||||
_lootCounts = blck_lootCountsBlue;
|
||||
/*
|
||||
You can use a customized array here if you like; note that you can give a value or a range.
|
||||
// values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively.
|
||||
blck_lootCountsOrange = [
|
||||
[6,8], // Weapons
|
||||
[24,32], // Magazines
|
||||
[5,10], // Optics
|
||||
[25,35], // materials(cinder etc)
|
||||
16, // items (food etc)
|
||||
1 // backpacks
|
||||
]; // Orange
|
||||
*/
|
||||
_startMsg = "A group of Bandits was sighted in a nearby sector! Check the Blue marker on your map for the location!";
|
||||
_endMsg = "The Sector at the Blue Marker is under survivor control!";
|
||||
_markerLabel = "";
|
||||
_markerType = ["ELIPSE",[175,175],"GRID"];
|
||||
_markerColor = "ColorBlue";
|
||||
_markerMissionName = "Bandit Patrol";
|
||||
_missionLandscapeMode = "precise"; // acceptable values are "none","random","precise"
|
||||
_missionLandscape = [
|
||||
["Flag_AAF_F",[3,3,0],0,[false,false]],
|
||||
["Land_dp_transformer_F",[1.698242,-10.4668,-0.00763702],271.32,[true,false]],
|
||||
["Land_Wreck_BRDM2_F",[1.37012,13.498,0.00109863],184.487,[true,false]],
|
||||
["Land_BagBunker_Small_F",[18.4512,-3.66406,0.00780487],305.003,[true,false]],
|
||||
["Land_Cargo_HQ_V1_F",[-20.1367,11.7539,0],90.8565,1,0,[],"","",true,false]],
|
||||
["Land_BagBunker_Small_F",[-22.707,-3.75586,-0.0130234],44.9901,[true,false]],
|
||||
["Land_Cargo_House_V1_F",[24.3584,7.45313,0.00111389],91.6329,[true,false]],
|
||||
["StorageBladder_01_fuel_forest_F",[1.29492,29.3184,0.000999451],179.65,[true,false]],
|
||||
["Land_GarbageBags_F",[-9.45996,31.252,0.02005],184.595,[true,false]],
|
||||
["Land_GarbageBags_F",[-13.0459,32.668,-0.0283051],184.595,[true,false]],
|
||||
["Land_GarbageBags_F",[-11.5957,33.125,-0.598007],184.595,[true,false]],
|
||||
["Land_GarbageBags_F",[-8.98145,34.5801,-0.00514221],184.592,[true,false]],
|
||||
["Land_Addon_02_V1_ruins_F",[24.8369,24.6582,-0.00820923],90.9637,[true,false]],
|
||||
["Land_GarbageBags_F",[-10.9443,35.0449,0.577057],184.592,[true,false]],
|
||||
["Land_Cargo20_military_green_F",[14.6533,32.9004,0.000480652],90.0989,[true,false]],
|
||||
["Land_BagBunker_Small_F",[-23.0186,28.6738,-0.0271301],120.012,[true,false]],
|
||||
["Land_BagBunker_Small_F",[37.1504,34.5742,0.0146866],255,[true,false]]
|
||||
]; // list of objects to spawn as landscape; // list of objects to spawn as landscape
|
||||
|
||||
_missionLootBoxes = [
|
||||
["Box_NATO_Wps_F",[3,-3,0],_crateLoot,[4,10,2,5,5,1]], // Standard loot crate with standard loadout
|
||||
["Land_PaperBox_C_EPOCH",[-4,-3,0],_crateLoot,[0,0,0,10,10,3]], // No Weapons, Magazines, or optics; 10 each construction supplies and food/drink items, 3 backpacks
|
||||
["Land_CargoBox_V1_F",[3,4,0],_crateLoot,[0,10,2,5,5,1]]
|
||||
]; // Parameters are "Box Item Code", array defining the loot to be spawned, and position.
|
||||
|
||||
// blck_lootCountsBlue= [4,12,3,6,6,1];
|
||||
_missionLootVehicles = [
|
||||
["I_G_Offroad_01_armed_F",[-8,8,0],_crateLoot,[0,10,2,5,5,1]],
|
||||
["I_G_Offroad_01_armed_F",[8,17,0],_crateLoot,[0,10,2,5,5,1]]
|
||||
]; // Parameters are "vehiclel type", offset relative to mission center, loot array, items to load from each category of the loot array.
|
||||
// ["B_HMG_01_high_F"/*,"B_GMG_01_high_F","O_static_AT_F"*/];
|
||||
|
||||
_missionGroups =
|
||||
[
|
||||
//_x params["_position","_minAI","_maxAI","_skillLevel","_minPatrolRadius","_maxPatrolRadius"];
|
||||
[[-10.9121,-10.9824,-1.20243],5,7,"Green",5,12],
|
||||
[[-10.2305,10.0215,-0.941586],5,7,"Green",5,12],
|
||||
[[10.5605,-10.4043,-0.00143886],5,7,"Green",5,12],
|
||||
[[10.61133,10.5918,-0.001438863],5,7,"Green",5,12]
|
||||
]; // Can be used to define spawn positions of AI patrols
|
||||
|
||||
_missionEmplacedWeapons = [
|
||||
["B_HMG_01_high_F",[-10,-15,0]],
|
||||
["B_GMG_01_high_F",[10,12,0]],
|
||||
["O_static_AT_F",[-10,10,0]]
|
||||
]; // can be used to define the type and precise placement of static weapons [["wep",[1,2,3]] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
|
||||
|
||||
_missionPatrolVehicles = [
|
||||
["B_MRAP_01_hmg_F",[27.8945,100.275,0],0,[true,false]],
|
||||
["B_MRAP_01_hmg_F",[-84.7793,72.2617,9.53674e-007],0,[true,false]],
|
||||
["B_MRAP_01_gmg_F",[-87.8457,-109.947,7.15256e-007],0,[true,false]]
|
||||
];
|
||||
// Change _useMines to true/false below to enable mission-specific settings.
|
||||
_useMines = blck_useMines;
|
||||
_minNoAI = blck_MinAI_Blue;
|
||||
_maxNoAI = blck_MaxAI_Blue;
|
||||
_noAIGroups = blck_AIGrps_Blue;
|
||||
_noVehiclePatrols = blck_SpawnVeh_Blue;
|
||||
_noEmplacedWeapons = blck_SpawnEmplaced_Blue;
|
||||
//_uniforms = blck_SkinList;
|
||||
|
||||
_uniforms = ["U_OrestesBody","U_NikosAgedBody","U_NikosBody"];
|
||||
|
||||
_headgear = ["H_StrawHat_dark","H_StrawHat","H_Hat_brown","H_Hat_grey"];
|
||||
_weaponList = ["blue"] call blck_fnc_selectAILoadout;
|
||||
/*
|
||||
_weaponList = [
|
||||
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F",
|
||||
"LMG_Mk200_F","LMG_Zafir_F"
|
||||
];
|
||||
*/
|
||||
_sideArms = blck_Pistols;
|
||||
_vests = blck_vests;
|
||||
/*
|
||||
_vests = [
|
||||
"V_PlateCarrierSpec_blk","V_PlateCarrierSpec_mtp","V_PlateCarrierGL_blk","V_PlateCarrierGL_mtp","V_PlateCarrierIAGL_oli"
|
||||
};
|
||||
*/
|
||||
_backpacks = blck_backpacks;
|
||||
/*
|
||||
_backpacks =
|
||||
{
|
||||
|
||||
};
|
||||
*/
|
||||
//_chancePara = blck_chanceParaBlue; // Setting this in the mission file overrides the defaults
|
||||
_noPara = blck_noParaBlue; // Setting this in the mission file overrides the defaults
|
||||
//_chanceHeliPatrol = blck_chanceHeliPatrolBlue; // Setting this in the mission file overrides the defaults
|
||||
_noChoppers = blck_noPatrolHelisBlue;
|
||||
_missionHelis = blck_patrolHelisBlue;
|
||||
_endCondition = "allKilledOrPlayerNear"; // Options are "allUnitsKilled", "playerNear", "allKilledOrPlayerNear"
|
||||
//_timeOut = -1;
|
||||
#include "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionSpawner.sqf";
|
26
Tools/init.sqf
Normal file
26
Tools/init.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
aiDifficulty = "green";
|
||||
minAI = 5;
|
||||
maxAI = 6;
|
||||
minAIpatrolRadius = 25;
|
||||
maxAIpatrolRadius = 40;
|
||||
|
||||
|
||||
////////////////
|
||||
patrolRadius = 40;
|
||||
AI_respawnTime = 600;
|
||||
aiVehiclePatrolRadius = 600;
|
||||
vehiclePatrolRespawnTime = 600;
|
||||
aiAircraftPatrolRadius = 1000;
|
||||
aiAircraftPatrolRespawnTime = 600;
|
||||
staticWeaponRespawnTime = 600;
|
||||
aiShipPatrolRadius = 600;
|
||||
aiShipPatrolRespawnTime = 600;
|
||||
aiSubmarinePatrolRadius = 200;
|
||||
vehicleSubmarineRespawnTime = 600;
|
||||
|
||||
player addAction["Center on Player","centerAtPlayerPos.sqf"];
|
||||
player addAction["Center on Road Cone","setCenterAtNearestRoadCone.sqf"];
|
||||
player addAction["Clear Center","clearCenter.sqf"];
|
||||
player AddAction["Add Relative Position for All Mission Objects to Clipboard","pullAllRelativeUnclassified.sqf"];
|
||||
player addAction["Add Dynamic Mission Configuration to Clipboard","pullRelativeClassified.sqf"];
|
||||
player addAction["Add Static Mission Configuration to Clipboard","configurForStaticMission.sqf"];
|
15
Tools/pullAllRelativeUnclassified.sqf
Normal file
15
Tools/pullAllRelativeUnclassified.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
if (isNil "CENTER") exitWith {systemChat "Please define the mission center"};
|
||||
|
||||
_obj = [];
|
||||
_cb = "";
|
||||
_mo = allMissionObjects "All";
|
||||
{
|
||||
_line = format["[%1,%2,%3]",typeOf _x, (CENTER vectorDiff (getPosASL _x)),getDir _x];
|
||||
systemChat format["%1",_line];
|
||||
_obj pushBack _line;
|
||||
_cb = _cb + format["%1,%2",_line,endl];
|
||||
}forEach _mo;
|
||||
copyToClipboard _cb;
|
||||
_msg = format["Objects formated for output and copied to clipboard at %1",diag_tickTime];
|
||||
systemChat _msg;
|
||||
hint _msg;
|
161
Tools/pullRelativeclassified.sqf
Normal file
161
Tools/pullRelativeclassified.sqf
Normal file
@ -0,0 +1,161 @@
|
||||
/*
|
||||
"StaticWeapon"
|
||||
"Car","Tank"
|
||||
"Air","Plane","Helicopter"
|
||||
"Ship",
|
||||
"Man"
|
||||
"ThingX"
|
||||
|
||||
(_x get3DENAttribute 'enableSimulation') select 0,
|
||||
(_x get3DENAttribute 'allowDamage') select 0
|
||||
*/
|
||||
///////////////////
|
||||
// Ensure that a center has been set
|
||||
///////////////////
|
||||
if (isNil "CENTER") exitWith {systemChat "Please define the mission center"};
|
||||
|
||||
diag_log "========== <START> ==========================";
|
||||
_fn_getRelPos_x = {
|
||||
_opz = (getPos (_this select 0)) select 2;
|
||||
_cpz = CENTER select 2;
|
||||
_zd = _opz - _cpz;
|
||||
private _p = (getPos (_this select 0)) vectorDiff CENTER;
|
||||
_p set [2,_zd];
|
||||
_p;
|
||||
};
|
||||
///////////////////
|
||||
// Configure info for mission landscape
|
||||
///////////////////
|
||||
_land = allMissionObjects "Static";
|
||||
//systemChat format["%1 static objects",count _land];
|
||||
_cb = format["_missionLandscape = [",endl];
|
||||
_landscape = allMissionObjects "Static";
|
||||
//systemchat format["%1 objects found",count _landscape];
|
||||
//uiSleep 3;
|
||||
{
|
||||
//systemChat format["typeOf %1 | posn %2",typeOf _x, getPosASL _x];
|
||||
//systemChat format["get3DENAttirbute 'enableSimulation' = 51",(_x get3DENAttribute "enableSimulation") select 0];
|
||||
//uiSleep 2;
|
||||
_line = format["[%1,%2,%3,%4,%5]",typeOf _x,[_x] call _fn_getRelPos_x,getDir _x, 'true','true'];
|
||||
diag_log _line;
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach _landscape;
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup information for infantry groups
|
||||
///////////////////
|
||||
_cb = _cb +format["_missionGroups = ["];
|
||||
{
|
||||
_line = format['[%1,%2,%3,%4,%5,%6]',[_x] call _fn_getRelPos_x,aiDifficulty,minAI,maxAI,minAIpatrolRadius,maxAIpatrolRadius];
|
||||
//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];
|
||||
|
||||
///////////////////
|
||||
// Setup Info for vehicle patrols
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionPatrolVehicles = ["];
|
||||
{
|
||||
if (_x getVariable["lootVehilcle",0] == 0) then
|
||||
{
|
||||
_line = format['[%1,%2,%3]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x];
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank"));
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// Setup Info for loot vehicles
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionLootVehicles = ["];
|
||||
{
|
||||
if (_x getVariable["lootVehilcle",0] == 1) then
|
||||
{
|
||||
//["Exile_Car_Van_Box_Guerilla02",[22896.8,16790.1,3.18987],[[0,1,0],[0,0,1]],[true,false], _crateLoot, [[1,2],[4,6],[2,6],[5,8],6,1]],
|
||||
_line = format['[%1,%2,%3,_crateLoot,_lootCounts]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x];
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
};
|
||||
}forEach ((allMissionObjects "Car") + (allMissionObjects "Tank"));
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
//////////////////
|
||||
// Setup Info for loot crates
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionLootBoxes = ["];
|
||||
{
|
||||
//[selectRandom blck_crateTypes,[22893,16766.8,6.31652],[[0,1,0],[0,0,1]],[true,false], _crateLoot, _lootCounts],
|
||||
systemChat format["Crate %1 | pos %2",_x, getPosATL _x];
|
||||
_line = format['[%1,%2,%3,_crateLoot,_lootCounts]',typeOf _x,[_x] call _fn_getRelPos_x,getDir _x];
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach ((allMissionObjects "ThingX"));
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
///////////////////
|
||||
// for future use
|
||||
///////////////////
|
||||
{
|
||||
|
||||
}forEach allMissionObjects "Air";
|
||||
|
||||
///////////////////
|
||||
// Setup info for static/emplaced weapons
|
||||
///////////////////
|
||||
_cb = _cb + format["_missionEmplacedWeapons = ["];
|
||||
{
|
||||
systemChat format["HMB %1 | pos %2",_x, getPosATL _x];
|
||||
_line = format['[%1,%2]',typeOf _x,[_x] call _fn_getRelPos_x];
|
||||
if (_forEachIndex == 0) then
|
||||
{
|
||||
_cb = _cb + format["%1%2",endl,_line];
|
||||
} else {
|
||||
_cb = _cb + format[",%1%2",endl,_line];
|
||||
};
|
||||
}forEach allMissionObjects "StaticWeapon";
|
||||
_cb = _cb + format["%1];%1%1",endl];
|
||||
|
||||
///////////////////
|
||||
// If needed you can uncomment this and configure using the schema above
|
||||
///////////////////
|
||||
/*
|
||||
_ship = [];
|
||||
{
|
||||
_cn = typeOf _x;
|
||||
_ship pushback format['[%1,%2,"green"]',_cn,getPos _x];
|
||||
} forEach allMissionObjects "Ship";
|
||||
*/
|
||||
|
||||
///////////////////
|
||||
// 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;
|
||||
//if (true) exitWith{diag_log _cb};
|
3
Tools/setCenterAtNearestRoadCone.sqf
Normal file
3
Tools/setCenterAtNearestRoadCone.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
_cone = "RoadCone_L_F";
|
||||
CENTER = getpos (nearestObject[getPos player, _cone]);
|
||||
systemChat format["Center set to %1",CENTER];
|
128
Tools/staticMissionTemplate.sqf
Normal file
128
Tools/staticMissionTemplate.sqf
Normal file
@ -0,0 +1,128 @@
|
||||
/*
|
||||
This is a simple mission using precisely placed loot crates and infantry, static weapons and vehicle patrols.
|
||||
See the accompanying example mission in the exampleMission folder to get an idea how I laid this out.
|
||||
Note that I laid out the mission in EDEN editor, exported the mission using the exportAll function of M3EDEN editor. then copied, pasted and apporpriately edidet the specific categories of items to be spawned.
|
||||
*/
|
||||
/*
|
||||
by Ghostrider [GRG]
|
||||
|
||||
--------------------------
|
||||
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/
|
||||
*/
|
||||
private ["_markerLabel","_endMsg","_startMsg","_lootCounts","_crateLoot","_markerMissionName","_missionLandscapeMode","_missionLandscape",
|
||||
"_missionLootBoxes","_missionLootVehicles","_missionEmplacedWeapons","_minNoAI","_maxNoAI","_noAIGroups","_noVehiclePatrols","_noEmplacedWeapons",
|
||||
"_uniforms","_headgear","_chanceReinforcements","_noPara","_helipatrol","_endCondition","_markerColor","_markerType","_useMines","_difficulty","_mission","_missionCenter"];
|
||||
|
||||
_mission = "UMS mission example #2"; // Included for additional documentation. Not intended to be spawned as a mission per se.
|
||||
_difficulty = "red"; // Skill level of AI (blue, red, green etc)
|
||||
diag_log format["[blckeagls UMS missions] STARTED initializing mission %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
|
||||
_crateLoot = blck_BoxLoot_Orange; // You can use a customized _crateLoot configuration by defining an array here. It must follow the following format shown for a hypothetical loot array called _customLootArray
|
||||
/*
|
||||
_customLootArray =
|
||||
// Loot is grouped as [weapons],[magazines],[items] in order to be able to use the correct function to load the item into the crate later on.
|
||||
// Each item consist of the following information ["ItemName",minNum, maxNum] where min is the smallest number added and min+max is the largest number added.
|
||||
|
||||
[
|
||||
[// Weapons
|
||||
|
||||
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"]
|
||||
],
|
||||
[//Magazines
|
||||
["10Rnd_93x64_DMR_05_Mag" ,1,5]
|
||||
],
|
||||
[ // Optics
|
||||
["optic_KHS_tan",1,3]
|
||||
],
|
||||
[// Materials and supplies
|
||||
["Exile_Item_MetalScrews",3,10]
|
||||
//
|
||||
],
|
||||
[//Items
|
||||
["Exile_Item_MountainDupe",1,3]
|
||||
],
|
||||
[ // Backpacks
|
||||
["B_OutdoorPack_tan",1,2]
|
||||
]
|
||||
];
|
||||
*/
|
||||
|
||||
_lootCounts = blck_lootCountsRed; // You can use a customized set of loot counts or one that is predefined but it must follow the following format:
|
||||
// values are: number of things from the weapons, magazines, optics, materials(cinder etc), items (food etc) and backpacks arrays to add, respectively.
|
||||
// blck_lootCountsOrange = [[6,8],[24,32],[5,10],[25,35],16,1]; // Orange
|
||||
_missionCenter = [22584.9,15304.8,0]; // I pulled this from the position of the marker.
|
||||
_markerLabel = "";
|
||||
//_markerType = ["ELIPSE",[200,200],"GRID"];
|
||||
// An alternative would be:
|
||||
_markerType = ["mil_triangle",[0,0]]; // You can replace mil_triangle with any other valid Arma 3 marker type https://community.bistudio.com/wiki/cfgMarkers
|
||||
_markerColor = "ColorRed"; // This can be any valid Arma Marker Color
|
||||
_markerMissionName = "Bad Fishermen Live Here";
|
||||
_missionLandscapeMode = "precise"; // acceptable values are "random","precise"
|
||||
// In precise mode objects will be spawned at the relative positions specified.
|
||||
// In the random mode, objects will be randomly spawned within the mission area.
|
||||
_missionLandscape = [ // Paste appropriate lines from M3EDEN output here.
|
||||
|
||||
]; // list of objects to spawn as landscape using output from M3EDEN editor.
|
||||
|
||||
_missionLootBoxes = [ // Paste appropriate lines from M3EDEN editor output here, then add the appropriate lootArray
|
||||
|
||||
]; // If this array is empty a single loot chest will be added at the center. If you add items loot chest(s) will be spawned in specific positions.
|
||||
|
||||
|
||||
|
||||
_missionLootVehicles = [ // Paste appropriate lines from the output of M3EDEN Editor here and add the loot crate type and loot counts at the end of each entry as shown in the example below.
|
||||
|
||||
]; // [ ["vehicleClassName", [px, py, pz] /* possition at which to spawn*/, _loot /* pointer to array of loot (see below)];
|
||||
// When blank nothing is spawned.
|
||||
// You can use the same format used for _missionLootBoxes to add vehicles with/without loot.
|
||||
|
||||
_noEmplacedWeapons = blck_SpawnEmplaced_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4]
|
||||
//format: _noEmplacedWeapons = [2,3]; // a range of values
|
||||
// or _noEmplacedWeapons = 3; // a constant number of emplaced weps per misison
|
||||
// Note that this value is ignored if you define static weapon positions and types in the array below.
|
||||
_missionEmplacedWeapons = [
|
||||
|
||||
];
|
||||
// example [ ["emplacedClassName",[px, py, pz] /* position to spawn weapon */, difficulty /* difficulty of AI manning weapon (blue, red etc)] ];
|
||||
// can be used to define the precise placement of static weapons [[1,2,3] /*loc 1*/, [2,3,4] /*loc 2*/]; if blank random locations will be used
|
||||
// If the number of possible locations exceeds the number of emplaced weapons specified above then only some of the locations in the array will have emplaced weapons spawned.
|
||||
// If you leave this array blank then emplaced weapons will be spawned at random locations around the mission using the default list of emplace weapons.
|
||||
|
||||
_minNoAI = blck_MinAI_Red; // Modify as needed
|
||||
_maxNoAI = blck_MaxAI_Red; // Modify as needed.
|
||||
_noAIGroups = blck_AIGrps_Red; // Modify as needed; note that these values are ignored of you specify AI patrols in the array below.
|
||||
_aiGroupParameters = [
|
||||
// [ [px, py, pz] /* position*/, "difficulty", 4 /*Number to Spawn*/, 150 /*radius of patrol*/]
|
||||
|
||||
];
|
||||
_aiScubaGroupParameters = [
|
||||
|
||||
];
|
||||
_noVehiclePatrols = blck_SpawnVeh_Red; // Modified as needed; can be a numberic value (e.g. 3) or range presented as [2,4];
|
||||
// Note that this value is ignored if you define vehicle patrols in the array below.
|
||||
_vehiclePatrolParameters = [
|
||||
|
||||
]; //[ ["vehicleClassName",[px,py,pz] /* center of patrol area */, difficulty /* blue, red etc*/, patrol radius] ]
|
||||
// When this array is empty, vehicle patrols will be scattered randomely around the mission.
|
||||
// Allows you to define the location of the center of the patrol, vehicle type spawned, radius to patrol, and AI difficulty (blue, red, green etc).
|
||||
|
||||
_submarinePatrolParameters = [
|
||||
|
||||
];
|
||||
|
||||
_aircraftTypes = blck_patrolHelisRed; // You can use one of the pre-defined lists in blck_configs or your own custom array.
|
||||
_noAirPatrols = blck_noPatrolHelisRed; // You can use one of the pre-defined values or a custom one. acceptable values are integers (1,2,3) or a range such as [2,4];
|
||||
// Note: this value is ignored if you specify air patrols in the array below.
|
||||
_airPatrols = [
|
||||
|
||||
];
|
||||
|
||||
// Change _useMines to true/false below to enable mission-specific settings.
|
||||
_useMines = false; // Set to false if you have vehicles patrolling nearby.
|
||||
|
||||
#include "\q\addons\custom_server\Missions\UMS\code\GMS_fnc_sm_initializeUMSStaticMission.sqf";
|
||||
|
||||
diag_log format["[blckeagls static missions] COMPLETED initializing misions %1 position at %2 difficulty %3",_mission,_missionCenter,_difficulty];
|
Loading…
Reference in New Issue
Block a user