setupMissionArrays

setupMissionArrays

« posted: Oct 15, 2016, 07:46 AM »
What is the difference between these 2 sqf?

The known, vanilla one:

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: setupMissionArrays.sqf
// @file Author: AgentRev

if (!isServer) exitWith {};

MainMissions =
[
// Mission filename, weight
["mission_ArmedDiversquad", 1],
["mission_Coastal_Convoy", 1],
["mission_Convoy", 1],
["mission_HostileHeliFormation", 0.5],
["mission_APC", 1],
["mission_MBT", 1],
["mission_LightArmVeh", 1],
["mission_ArmedHeli", 1],
["mission_CivHeli", 1]
];

SideMissions =
[
["mission_HostileHelicopter", 0.5],
["mission_MiniConvoy", 1],
["mission_SunkenSupplies", 1],
["mission_TownInvasion", 2],
["mission_Outpost", 3],
["mission_Truck", 1]
];

MoneyMissions =
[
["mission_MoneyShipment", 1],
["mission_SunkenTreasure", 1]
];

MissionSpawnMarkers = (allMapMarkers select {["Mission_", _x] call fn_startsWith}) apply {[_x, false]};
ForestMissionMarkers = (allMapMarkers select {["ForestMission_", _x] call fn_startsWith}) apply {[_x, false]};
SunkenMissionMarkers = (allMapMarkers select {["SunkenMission_", _x] call fn_startsWith}) apply {[_x, false]};

if !(ForestMissionMarkers isEqualTo []) then
{
SideMissions append
[
["mission_AirWreck", 3],
["mission_WepCache", 3]
];
};

LandConvoyPaths = (call compile preprocessFileLineNumbers "mapConfig\convoys\landConvoysList.sqf") apply {[_x, false]};
CoastalConvoyPaths = (call compile preprocessFileLineNumbers "mapConfig\convoys\coastalConvoysList.sqf") apply {[_x, false]};

MainMissions = [MainMissions, [["A3W_heliPatrolMissions", ["mission_Coastal_Convoy", "mission_HostileHeliFormation"]], ["A3W_underWaterMissions", ["mission_ArmedDiversquad"]]]] call removeDisabledMissions;
SideMissions = [SideMissions, [["A3W_heliPatrolMissions", ["mission_HostileHelicopter"]], ["A3W_underWaterMissions", ["mission_SunkenSupplies"]]]] call removeDisabledMissions;
MoneyMissions = [MoneyMissions, [["A3W_underWaterMissions", ["mission_SunkenTreasure"]]]] call removeDisabledMissions;

{ _x set [2, false] } forEach MainMissions;
{ _x set [2, false] } forEach SideMissions;
{ _x set [2, false] } forEach MoneyMissions;

and this one ..

Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: setupMissionArrays.sqf
// @file Author: AgentRev

if (!isServer) exitWith {};

MainMissions = MainMissions;

SideMissions = SideMissions;

MoneyMissions = MoneyMissions;

MainMissions = [MainMissions, [["A3W_heliPatrolMissions", ["mission_Coastal_Convoy", "mission_HostileHeliFormation", "mission_HostileJetFormation"]], ["A3W_underWaterMissions", ["mission_ArmedDiversquad"]]]] call removeDisabledMissions;
SideMissions = [SideMissions, [["A3W_heliPatrolMissions", ["mission_HostileHelicopter", "mission_HostileJet"]], ["A3W_underWaterMissions", ["mission_SunkenSupplies"]]]] call removeDisabledMissions;
MoneyMissions = [MoneyMissions, [["A3W_underWaterMissions", ["mission_SunkenTreasure"]]]] call removeDisabledMissions;

{ _x set [2, false] } forEach MainMissions;
{ _x set [2, false] } forEach SideMissions;
{ _x set [2, false] } forEach MoneyMissions;

MissionSpawnMarkers = [];
SunkenMissionMarkers = [];
RoadblockMissionMarkers =[];
SniperMissionMarkers =[];
{
switch (true) do
{
case (["Mission_", _x] call fn_startsWith):
{
MissionSpawnMarkers pushBack [_x, false];
};
case (["SunkenMission_", _x] call fn_startsWith):
{
SunkenMissionMarkers pushBack [_x, false];
};
case (["RoadBlock_", _x] call fn_startsWith):
{
RoadblockMissionMarkers pushBack [_x, false];
};
};
} forEach allMapMarkers;

LandConvoyPaths = [];
{
LandConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\landConvoysList.sqf");

CoastalConvoyPaths = [];
{
CoastalConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\coastalConvoysList.sqf");

PatrolConvoyPaths = [];
{
PatrolConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\patrolConvoysList.sqf");
  • Offline Ltc-Bullet
  • First Blood
  • ***
  • Posts: 53
  • Founder of EZ Company Gaming

Re: setupMissionArrays

« Reply #1 posted: Oct 15, 2016, 09:54 PM »
Yea I really want to know that too
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 576
  • Http://www.Fractured-Gaming.com

Re: setupMissionArrays

« Reply #2 posted: Oct 16, 2016, 02:05 AM »
The top 1 is to call for mission arrays locally (within the PBO) and the bottom 1 is to call for mission arrays externally. (Main Config.)

Code: [Select]
MissionSpawnMarkers = [];
SunkenMissionMarkers = [];
RoadblockMissionMarkers =[];
SniperMissionMarkers =[];
=========================================
LandConvoyPaths = [];
{
LandConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\landConvoysList.sqf");

CoastalConvoyPaths = [];
{
CoastalConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\coastalConvoysList.sqf");

PatrolConvoyPaths = [];
{
PatrolConvoyPaths pushBack [_x, false];
} forEach (call compile preprocessFileLineNumbers "mapConfig\convoys\patrolConvoysList.sqf");
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!

https://github.com/Fractured-Gaming-Official/Frac_v1.3.Stratis

Re: setupMissionArrays

« Reply #3 posted: Oct 16, 2016, 09:28 AM »
Oh. ok. thx.  :)