Jump to content

Recommended Posts

Hello!

 

I have an issue. First of all, I tried to create Warfare scenario with CDF vs Russia. Everything seemed right, however the BLUFOR side had USMC weapon equipped and all the structures were producing USMC Faction Gear, Infantry and Vehicles. 

I tried to find some already made scenarios with CDF Faction which was not successfull. Do somebody have CTI mission with at least CDF Faction or any idea how can I make the CDF faction work in my mission?

Share this post


Link to post
Share on other sites

Warfare factories produce units from the default factions until customized by scripts.  The A2 default West faction is USMC.
In multiplayer, the mission team leaders also receive a default weapons loadout unless customized by script.  The default A2 West loadout is M-16 with grenades.
But in singleplayer, the mission team leaders receive whatever weapons their units have from the editor.

 

The multiplayer mission "04: Civil War" has CDF fighting against Insurgent forces.  It provides a good example how West factories and such can be switched to CDF, but doesn't switch the team leader loadout from default, they still have M-16.

 

So to customize your mission, set a custom init script.  In editor, put this in the Warfare init field:

this SetVariable ["customInitMissionScript","InitMission.sqf"];

 

Then create a custom init script.  Go into you mission folder and create a file "InitMission.sqf".
In the file, put this:

BIS_WF_Common SetVariable ["customInitCommonScript","Common\Init\Init_Common.sqf"];	// Using a custom common script.
BIS_WF_Common SetVariable ["customInitServerScript",""];				// Using core server script (Must always be included even when no custom server script is used.)

 

Two custom common init scripts are needed.  One to switch general things (faction, AI units, support vehicles, loadout), and the other to switch the factories and defenses.

In your mission folder, create a folder "Common".

In the Common folder, create a subfolder "Init".
In the Init subfolder, create a file "Init_Common.sqf".  In the file, put all of this:
 

Spoiler

BIS_WF_Common SetVariable ["westFactions",[Localize "STR_FN_CDF"]];
BIS_WF_Common SetVariable ["WestHQIdentity","WFHQ_CZ"];

WSOLDIER = "CDF_Soldier";
WMEDIC = "CDF_Soldier_Medic";
WCREW = "CDF_Soldier_Crew";
WPILOT = "CDF_Soldier_Pilot";

VGWSOLDIER = WSOLDIER;

WREPAIRTRUCK = "UralRepair_CDF";
WSALVAGETRUCK = "WarfareSalvageTruck_CDF";
WSUPPLYTRUCK = "WarfareSupplyTruck_CDF";
WAMMOTRUCK = "WarfareReammoTruck_CDF";
WFUELTRUCK = "UralRefuel_CDF";

westDefaultWeapons = ["AK_74"];
westDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

westSpecOpDefaultWeapons = ["AKS_74_pso"];
westSpecOpDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

[] Call Compile PreprocessFile "Common\Config\Config_Structures.sqf";

 

 

In the Common folder, create a subfolder "Config".
In the Config subfolder, create a file "Config_Structures.sqf".  In the file, put all of this:
 

Spoiler

//*****************************************************************************************
//Description: Base structure configurations.
//*****************************************************************************************

//WEST STRUCTURES
_v		= ["Headquarters"];					//_v - variable name
_n		= ["BMP2_HQ_CDF_unfolded"];				//_n - building classname
_d		= [Localize "STRWFWESTHQ"];				//_d - description (translated).
_f		= [[Localize "STR_FN_CDF"]];				//_f - Faction that structure belongs to and/or faction units structure can build.
_c		= [100];						//_c - cost (in supplies), for stationary defenses cost is in money.
_t		= [30];							//_t - time to build
_i		= ["\CA\Warfare2\Images\con_hq.paa"];			//_i - Image on construction menu.
_p		= [100];						//_p - Probability of AI commander creating structure (per minute).
_s		= ["HQSite"];						//_s - script executed to build
_a		= [corePath + "Client\Action\Action_Headquarters.sqs"];	//_a - action added to player when in range
_dis		= [15];							//_dis - distance from structure to place a unit created by it.
_dir		= [0];							//_dir - direction from structure to place a unit created by it.
_h		= [3];							//_h - structure height (unused)

_v = _v		+ ["Barracks"];
_n = _n		+ ["CDF_WarfareBBarracks"];
_d = _d		+ [Localize "STRWFWESTBARRACKS"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [100];
_t = _t		+ [30];
_i = _i		+ ["\CA\Warfare2\Images\con_barracks.paa"];
_p = _p		+ [400];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_Barracks.sqs"];
_dis = _dis	+ [18];
_dir = _dir	+ [90];
_h = _h		+ [3];

_v = _v		+ ["Light"];
_n = _n		+ ["CDF_WarfareBLightFactory"];
_d = _d		+ [Localize "STRWFWESTLIGHTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [400];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_LightFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4.5];

_v = _v		+ ["Heavy"];
_n = _n		+ ["CDF_WarfareBHeavyFactory"];
_d = _d		+ [Localize "STRWFWESTHEAVYFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [1000];
_t = _t		+ [50];
_i = _i		+ ["\CA\Warfare2\Images\con_heavy.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_HeavyFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4];

_v = _v		+ ["Aircraft"];
_n = _n		+ ["CDF_WarfareBAircraftFactory"];
_d = _d		+ [Localize "STRWFWESTAIRCRAFTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2000];
_t = _t		+ [70];
_i = _i		+ ["\CA\Warfare2\Images\con_aircraft.paa"];
_p = _p		+ [8];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_AircraftFactory.sqs"];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

_v = _v		+ ["ServicePoint"];
_n = _n		+ ["CDF_WarfareBVehicleServicePoint"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [15];
_s = _s		+ ["VehicleServicePointSite"];
_a = _a		+ [""];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

WESTAIRPORTTYPE = Count _v;
WESTDEPOTTYPE = Count _v + 1;
WESTMHQNAME = "BMP2_HQ_CDF";
WESTFLAGPOLE = "\ca\data\flag_chernarus_co.paa";

westStructures = _v;
westStructureNames = _n;
westStructureDescriptions = _d;
westStructureFactions = _f;
westStructureCosts = _c;
westStructureTimes = _t;
westStructureImages = _i;
westStructureChances = _p;
westStructureDistances = _dis;
westStructureDirections = _dir;
westStructureScripts = _s;
westStructureActions = _a;
westStructureHeights = _h;

//Note that cost of defenses is in money instead of supplies.
//WEST STATIONARY DEFENSES
_v		= ["MGNest"];
_n		= ["CDF_WarfareBMGNest_PK"];
_d		= [Localize "STRWFBWESTMGNEST"];
_f		= [[Localize "STR_FN_CDF"]];
_c		= [200];
_t		= [0];
_i		= ["\CA\Warfare2\Images\con_mg_nest.paa"];
_p		= [25];
_pt		= [5];					//_pt - Probability of AI creating structure (per minute) in a town.
_s		= ["StationaryDefense"];
_a		= [""];
_dis		= [0];
_dir		= [0];
_h		= [0];

_v = _v		+ ["DSHKM"];
_n = _n		+ ["DSHKM_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [5];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["AGS30"];
_n = _n		+ ["AGS_CDF"];
_d = _d		+ [Localize "STR_DN_AGS30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [300];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [4];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SPG9"];
_n = _n		+ ["SPG9_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_at_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [3];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ZU23"];
_n = _n		+ ["ZU23_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_aa_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["D30"];
_n = _n		+ ["D30_CDF"];
_d = _d		+ [Localize "STR_DN_D30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2500];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gun.paa"];
_p = _p		+ [50];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SmallWall"];
_n = _n		+ ["Land_HBarrier3"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["MediumWall"];
_n = _n		+ ["Land_HBarrier5"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall2.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["LargeWall"];
_n = _n		+ ["Land_HBarrier_large"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall3.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Sandbags"];
_n = _n		+ ["Land_fort_bagfence_long"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsCorner"];
_n = _n		+ ["Land_fort_bagfence_corner"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsRound"];
_n = _n		+ ["Land_fort_bagfence_round"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["FortifiedNest"];
_n = _n		+ ["Land_fortified_nest_small"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["BarbedWire"];
_n = _n		+ ["Fort_RazorWire"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Rampart"];
_n = _n		+ ["Land_fort_rampart"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ArtilleryRampart"];
_n = _n		+ ["Land_fort_artillery_nest"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

westDefenses = _v;
westDefenseNames = _n;
westDefenseDescriptions = _d;
westDefenseFactions = _f;
westDefenseCosts = _c;
westDefenseTimes = _t;
westDefenseImages = _i;
westDefenseChances = _p;
westDefenseTownChances = _pt;
westDefenseDistances = _dis;
westDefenseDirections = _dir;
westDefenseScripts = _s;
westDefenseActions = _a;
westDefenseHeights = _h;

 

 

Save file, save mission, and preview.

If done correctly, West should be CDF factories producing CDF units, weapons and vehicles.  Mission team leaders should have CDF weapons instead of M-16.

 

My A2 Warfare mission editing videos thus far:

Creating Basic Warfare Missions in Editor

Adding Respawn and Parameters to Warfare Missions

 

Hope this helps.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, opusfmspol said:

Warfare factories produce units from the default factions until customized by scripts.  The A2 default West faction is USMC.
In multiplayer, the mission team leaders also receive a default weapons loadout unless customized by script.  The default A2 West loadout is M-16 with grenades.
But in singleplayer, the mission team leaders receive whatever weapons their units have from the editor.

 

The multiplayer mission "04: Civil War" has CDF fighting against Insurgent forces.  It provides a good example how West factories and such can be switched to CDF, but doesn't switch the team leader loadout from default, they still have M-16.

 

So to customize your mission, set a custom init script.  In editor, put this in the Warfare init field:


this SetVariable ["customInitMissionScript","InitMission.sqf"];

 

Then create a custom init script.  Go into you mission folder and create a file "InitMission.sqf".
In the file, put this:


BIS_WF_Common SetVariable ["customInitCommonScript","Common\Init\Init_Common.sqf"];	// Using a custom common script.
BIS_WF_Common SetVariable ["customInitServerScript",""];				// Using core server script (Must always be included even when no custom server script is used.)

 

Two custom common init scripts are needed.  One to switch general things (faction, AI units, support vehicles, loadout), and the other to switch the factories and defenses.

In your mission folder, create a folder "Common".

In the Common folder, create a subfolder "Init".
In the Init subfolder, create a file "Init_Common.sqf".  In the file, put all of this:
 

  Reveal hidden contents


BIS_WF_Common SetVariable ["westFactions",[Localize "STR_FN_CDF"]];
BIS_WF_Common SetVariable ["WestHQIdentity","WFHQ_CZ"];

WSOLDIER = "CDF_Soldier";
WMEDIC = "CDF_Soldier_Medic";
WCREW = "CDF_Soldier_Crew";
WPILOT = "CDF_Soldier_Pilot";

VGWSOLDIER = WSOLDIER;

WREPAIRTRUCK = "UralRepair_CDF";
WSALVAGETRUCK = "WarfareSalvageTruck_CDF";
WSUPPLYTRUCK = "WarfareSupplyTruck_CDF";
WAMMOTRUCK = "WarfareReammoTruck_CDF";
WFUELTRUCK = "UralRefuel_CDF";

westDefaultWeapons = ["AK_74"];
westDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

westSpecOpDefaultWeapons = ["AKS_74_pso"];
westSpecOpDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

[] Call Compile PreprocessFile "Common\Config\Config_Structures.sqf";

 

 

In the Common folder, create a subfolder "Config".
In the Config subfolder, create a file "Config_Structures.sqf".  In the file, put all of this:
 

  Reveal hidden contents


//*****************************************************************************************
//Description: Base structure configurations.
//*****************************************************************************************

//WEST STRUCTURES
_v		= ["Headquarters"];					//_v - variable name
_n		= ["BMP2_HQ_CDF_unfolded"];				//_n - building classname
_d		= [Localize "STRWFWESTHQ"];				//_d - description (translated).
_f		= [[Localize "STR_FN_CDF"]];				//_f - Faction that structure belongs to and/or faction units structure can build.
_c		= [100];						//_c - cost (in supplies), for stationary defenses cost is in money.
_t		= [30];							//_t - time to build
_i		= ["\CA\Warfare2\Images\con_hq.paa"];			//_i - Image on construction menu.
_p		= [100];						//_p - Probability of AI commander creating structure (per minute).
_s		= ["HQSite"];						//_s - script executed to build
_a		= [corePath + "Client\Action\Action_Headquarters.sqs"];	//_a - action added to player when in range
_dis		= [15];							//_dis - distance from structure to place a unit created by it.
_dir		= [0];							//_dir - direction from structure to place a unit created by it.
_h		= [3];							//_h - structure height (unused)

_v = _v		+ ["Barracks"];
_n = _n		+ ["CDF_WarfareBBarracks"];
_d = _d		+ [Localize "STRWFWESTBARRACKS"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [100];
_t = _t		+ [30];
_i = _i		+ ["\CA\Warfare2\Images\con_barracks.paa"];
_p = _p		+ [400];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_Barracks.sqs"];
_dis = _dis	+ [18];
_dir = _dir	+ [90];
_h = _h		+ [3];

_v = _v		+ ["Light"];
_n = _n		+ ["CDF_WarfareBLightFactory"];
_d = _d		+ [Localize "STRWFWESTLIGHTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [400];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_LightFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4.5];

_v = _v		+ ["Heavy"];
_n = _n		+ ["CDF_WarfareBHeavyFactory"];
_d = _d		+ [Localize "STRWFWESTHEAVYFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [1000];
_t = _t		+ [50];
_i = _i		+ ["\CA\Warfare2\Images\con_heavy.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_HeavyFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4];

_v = _v		+ ["Aircraft"];
_n = _n		+ ["CDF_WarfareBAircraftFactory"];
_d = _d		+ [Localize "STRWFWESTAIRCRAFTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2000];
_t = _t		+ [70];
_i = _i		+ ["\CA\Warfare2\Images\con_aircraft.paa"];
_p = _p		+ [8];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_AircraftFactory.sqs"];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

_v = _v		+ ["ServicePoint"];
_n = _n		+ ["CDF_WarfareBVehicleServicePoint"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [15];
_s = _s		+ ["VehicleServicePointSite"];
_a = _a		+ [""];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

WESTAIRPORTTYPE = Count _v;
WESTDEPOTTYPE = Count _v + 1;
WESTMHQNAME = "BMP2_HQ_CDF";
WESTFLAGPOLE = "\ca\data\flag_chernarus_co.paa";

westStructures = _v;
westStructureNames = _n;
westStructureDescriptions = _d;
westStructureFactions = _f;
westStructureCosts = _c;
westStructureTimes = _t;
westStructureImages = _i;
westStructureChances = _p;
westStructureDistances = _dis;
westStructureDirections = _dir;
westStructureScripts = _s;
westStructureActions = _a;
westStructureHeights = _h;

//Note that cost of defenses is in money instead of supplies.
//WEST STATIONARY DEFENSES
_v		= ["MGNest"];
_n		= ["CDF_WarfareBMGNest_PK"];
_d		= [Localize "STRWFBWESTMGNEST"];
_f		= [[Localize "STR_FN_CDF"]];
_c		= [200];
_t		= [0];
_i		= ["\CA\Warfare2\Images\con_mg_nest.paa"];
_p		= [25];
_pt		= [5];					//_pt - Probability of AI creating structure (per minute) in a town.
_s		= ["StationaryDefense"];
_a		= [""];
_dis		= [0];
_dir		= [0];
_h		= [0];

_v = _v		+ ["DSHKM"];
_n = _n		+ ["DSHKM_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [5];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["AGS30"];
_n = _n		+ ["AGS_CDF"];
_d = _d		+ [Localize "STR_DN_AGS30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [300];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [4];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SPG9"];
_n = _n		+ ["SPG9_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_at_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [3];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ZU23"];
_n = _n		+ ["ZU23_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_aa_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["D30"];
_n = _n		+ ["D30_CDF"];
_d = _d		+ [Localize "STR_DN_D30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2500];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gun.paa"];
_p = _p		+ [50];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SmallWall"];
_n = _n		+ ["Land_HBarrier3"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["MediumWall"];
_n = _n		+ ["Land_HBarrier5"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall2.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["LargeWall"];
_n = _n		+ ["Land_HBarrier_large"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall3.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Sandbags"];
_n = _n		+ ["Land_fort_bagfence_long"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsCorner"];
_n = _n		+ ["Land_fort_bagfence_corner"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsRound"];
_n = _n		+ ["Land_fort_bagfence_round"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["FortifiedNest"];
_n = _n		+ ["Land_fortified_nest_small"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["BarbedWire"];
_n = _n		+ ["Fort_RazorWire"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Rampart"];
_n = _n		+ ["Land_fort_rampart"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ArtilleryRampart"];
_n = _n		+ ["Land_fort_artillery_nest"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

westDefenses = _v;
westDefenseNames = _n;
westDefenseDescriptions = _d;
westDefenseFactions = _f;
westDefenseCosts = _c;
westDefenseTimes = _t;
westDefenseImages = _i;
westDefenseChances = _p;
westDefenseTownChances = _pt;
westDefenseDistances = _dis;
westDefenseDirections = _dir;
westDefenseScripts = _s;
westDefenseActions = _a;
westDefenseHeights = _h;

 

 

Save file, save mission, and preview.

If done correctly, West should be CDF factories producing CDF units, weapons and vehicles.  Mission team leaders should have CDF weapons instead of M-16.

 

My A2 Warfare mission editing videos thus far:

Creating Basic Warfare Missions in Editor

Adding Respawn and Parameters to Warfare Missions

 

Hope this helps.

It seems to work now,

 

Thank you a lot 🙂

Share this post


Link to post
Share on other sites
6 hours ago, opusfmspol said:

Warfare factories produce units from the default factions until customized by scripts.  The A2 default West faction is USMC.
In multiplayer, the mission team leaders also receive a default weapons loadout unless customized by script.  The default A2 West loadout is M-16 with grenades.
But in singleplayer, the mission team leaders receive whatever weapons their units have from the editor.

 

The multiplayer mission "04: Civil War" has CDF fighting against Insurgent forces.  It provides a good example how West factories and such can be switched to CDF, but doesn't switch the team leader loadout from default, they still have M-16.

 

So to customize your mission, set a custom init script.  In editor, put this in the Warfare init field:


this SetVariable ["customInitMissionScript","InitMission.sqf"];

 

Then create a custom init script.  Go into you mission folder and create a file "InitMission.sqf".
In the file, put this:


BIS_WF_Common SetVariable ["customInitCommonScript","Common\Init\Init_Common.sqf"];	// Using a custom common script.
BIS_WF_Common SetVariable ["customInitServerScript",""];				// Using core server script (Must always be included even when no custom server script is used.)

 

Two custom common init scripts are needed.  One to switch general things (faction, AI units, support vehicles, loadout), and the other to switch the factories and defenses.

In your mission folder, create a folder "Common".

In the Common folder, create a subfolder "Init".
In the Init subfolder, create a file "Init_Common.sqf".  In the file, put all of this:
 

  Reveal hidden contents


BIS_WF_Common SetVariable ["westFactions",[Localize "STR_FN_CDF"]];
BIS_WF_Common SetVariable ["WestHQIdentity","WFHQ_CZ"];

WSOLDIER = "CDF_Soldier";
WMEDIC = "CDF_Soldier_Medic";
WCREW = "CDF_Soldier_Crew";
WPILOT = "CDF_Soldier_Pilot";

VGWSOLDIER = WSOLDIER;

WREPAIRTRUCK = "UralRepair_CDF";
WSALVAGETRUCK = "WarfareSalvageTruck_CDF";
WSUPPLYTRUCK = "WarfareSupplyTruck_CDF";
WAMMOTRUCK = "WarfareReammoTruck_CDF";
WFUELTRUCK = "UralRefuel_CDF";

westDefaultWeapons = ["AK_74"];
westDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

westSpecOpDefaultWeapons = ["AKS_74_pso"];
westSpecOpDefaultAmmo = ["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade","HandGrenade","HandGrenade","HandGrenade"];

[] Call Compile PreprocessFile "Common\Config\Config_Structures.sqf";

 

 

In the Common folder, create a subfolder "Config".
In the Config subfolder, create a file "Config_Structures.sqf".  In the file, put all of this:
 

  Reveal hidden contents


//*****************************************************************************************
//Description: Base structure configurations.
//*****************************************************************************************

//WEST STRUCTURES
_v		= ["Headquarters"];					//_v - variable name
_n		= ["BMP2_HQ_CDF_unfolded"];				//_n - building classname
_d		= [Localize "STRWFWESTHQ"];				//_d - description (translated).
_f		= [[Localize "STR_FN_CDF"]];				//_f - Faction that structure belongs to and/or faction units structure can build.
_c		= [100];						//_c - cost (in supplies), for stationary defenses cost is in money.
_t		= [30];							//_t - time to build
_i		= ["\CA\Warfare2\Images\con_hq.paa"];			//_i - Image on construction menu.
_p		= [100];						//_p - Probability of AI commander creating structure (per minute).
_s		= ["HQSite"];						//_s - script executed to build
_a		= [corePath + "Client\Action\Action_Headquarters.sqs"];	//_a - action added to player when in range
_dis		= [15];							//_dis - distance from structure to place a unit created by it.
_dir		= [0];							//_dir - direction from structure to place a unit created by it.
_h		= [3];							//_h - structure height (unused)

_v = _v		+ ["Barracks"];
_n = _n		+ ["CDF_WarfareBBarracks"];
_d = _d		+ [Localize "STRWFWESTBARRACKS"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [100];
_t = _t		+ [30];
_i = _i		+ ["\CA\Warfare2\Images\con_barracks.paa"];
_p = _p		+ [400];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_Barracks.sqs"];
_dis = _dis	+ [18];
_dir = _dir	+ [90];
_h = _h		+ [3];

_v = _v		+ ["Light"];
_n = _n		+ ["CDF_WarfareBLightFactory"];
_d = _d		+ [Localize "STRWFWESTLIGHTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [400];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_LightFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4.5];

_v = _v		+ ["Heavy"];
_n = _n		+ ["CDF_WarfareBHeavyFactory"];
_d = _d		+ [Localize "STRWFWESTHEAVYFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [1000];
_t = _t		+ [50];
_i = _i		+ ["\CA\Warfare2\Images\con_heavy.paa"];
_p = _p		+ [100];
_s = _s		+ ["MediumSite"];
_a = _a		+ [corePath + "Client\Action\Action_HeavyFactory.sqs"];
_dis = _dis	+ [20];
_dir = _dir	+ [90];
_h = _h		+ [4];

_v = _v		+ ["Aircraft"];
_n = _n		+ ["CDF_WarfareBAircraftFactory"];
_d = _d		+ [Localize "STRWFWESTAIRCRAFTFACTORY"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2000];
_t = _t		+ [70];
_i = _i		+ ["\CA\Warfare2\Images\con_aircraft.paa"];
_p = _p		+ [8];
_s = _s		+ ["SmallSite"];
_a = _a		+ [corePath + "Client\Action\Action_AircraftFactory.sqs"];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

_v = _v		+ ["ServicePoint"];
_n = _n		+ ["CDF_WarfareBVehicleServicePoint"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [40];
_i = _i		+ ["\CA\Warfare2\Images\con_light.paa"];
_p = _p		+ [15];
_s = _s		+ ["VehicleServicePointSite"];
_a = _a		+ [""];
_dis = _dis	+ [21];
_dir = _dir	+ [90];
_h = _h		+ [5.5];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

WESTAIRPORTTYPE = Count _v;
WESTDEPOTTYPE = Count _v + 1;
WESTMHQNAME = "BMP2_HQ_CDF";
WESTFLAGPOLE = "\ca\data\flag_chernarus_co.paa";

westStructures = _v;
westStructureNames = _n;
westStructureDescriptions = _d;
westStructureFactions = _f;
westStructureCosts = _c;
westStructureTimes = _t;
westStructureImages = _i;
westStructureChances = _p;
westStructureDistances = _dis;
westStructureDirections = _dir;
westStructureScripts = _s;
westStructureActions = _a;
westStructureHeights = _h;

//Note that cost of defenses is in money instead of supplies.
//WEST STATIONARY DEFENSES
_v		= ["MGNest"];
_n		= ["CDF_WarfareBMGNest_PK"];
_d		= [Localize "STRWFBWESTMGNEST"];
_f		= [[Localize "STR_FN_CDF"]];
_c		= [200];
_t		= [0];
_i		= ["\CA\Warfare2\Images\con_mg_nest.paa"];
_p		= [25];
_pt		= [5];					//_pt - Probability of AI creating structure (per minute) in a town.
_s		= ["StationaryDefense"];
_a		= [""];
_dis		= [0];
_dir		= [0];
_h		= [0];

_v = _v		+ ["DSHKM"];
_n = _n		+ ["DSHKM_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [200];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [5];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["AGS30"];
_n = _n		+ ["AGS_CDF"];
_d = _d		+ [Localize "STR_DN_AGS30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [300];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gl.paa"];
_p = _p		+ [25];
_pt = _pt	+ [4];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SPG9"];
_n = _n		+ ["SPG9_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_at_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [3];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ZU23"];
_n = _n		+ ["ZU23_CDF"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [Localize "STR_FN_CDF"];
_c = _c		+ [400];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_aa_pod.paa"];
_p = _p		+ [40];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["D30"];
_n = _n		+ ["D30_CDF"];
_d = _d		+ [Localize "STR_DN_D30"];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [2500];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_gun.paa"];
_p = _p		+ [50];
_pt = _pt	+ [1];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SmallWall"];
_n = _n		+ ["Land_HBarrier3"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["MediumWall"];
_n = _n		+ ["Land_HBarrier5"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall2.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["LargeWall"];
_n = _n		+ ["Land_HBarrier_large"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall3.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Sandbags"];
_n = _n		+ ["Land_fort_bagfence_long"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsCorner"];
_n = _n		+ ["Land_fort_bagfence_corner"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["SandbagsRound"];
_n = _n		+ ["Land_fort_bagfence_round"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [10];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["FortifiedNest"];
_n = _n		+ ["Land_fortified_nest_small"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [50];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["BarbedWire"];
_n = _n		+ ["Fort_RazorWire"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["Rampart"];
_n = _n		+ ["Land_fort_rampart"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [25];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

_v = _v		+ ["ArtilleryRampart"];
_n = _n		+ ["Land_fort_artillery_nest"];
_d = _d		+ [GetText (configFile >> "CfgVehicles" >> (_n Select (Count _n - 1)) >> "displayName")];
_f = _f		+ [[Localize "STR_FN_CDF"]];
_c = _c		+ [75];
_t = _t		+ [0];
_i = _i		+ ["\CA\Warfare2\Images\con_wall1.paa"];
_p = _p		+ [0];
_pt = _pt	+ [0];
_s = _s		+ ["StationaryDefense"];
_a = _a		+ [""];
_dis = _dis	+ [0];
_dir = _dir	+ [0];
_h = _h		+ [0];

for [{_count = Count _v - 1},{_count >= 0},{_count = _count - 1}] do
{
	Call Compile Format["WEST%1TYPE = %2",_v Select _count,_count];
};

westDefenses = _v;
westDefenseNames = _n;
westDefenseDescriptions = _d;
westDefenseFactions = _f;
westDefenseCosts = _c;
westDefenseTimes = _t;
westDefenseImages = _i;
westDefenseChances = _p;
westDefenseTownChances = _pt;
westDefenseDistances = _dis;
westDefenseDirections = _dir;
westDefenseScripts = _s;
westDefenseActions = _a;
westDefenseHeights = _h;

 

 

Save file, save mission, and preview.

If done correctly, West should be CDF factories producing CDF units, weapons and vehicles.  Mission team leaders should have CDF weapons instead of M-16.

 

My A2 Warfare mission editing videos thus far:

Creating Basic Warfare Missions in Editor

Adding Respawn and Parameters to Warfare Missions

 

Hope this helps.

 

 

Hey!

 

Could you also provide information, how can I add purchesable su-25 and other aiplanes for CDF and Russian side using Aiport WF Object or by using any other way? Because the Aircraft Factory itself produces only helicopters.  Thank you in advance 🙂 

Share this post


Link to post
Share on other sites

In A2 Warfare, fixed wing aircraft are available from capturable airports, which are not factories a Commander builds but fixed structures to capture, like towns and camps.

 

They're empty objects added into a mission.  The multiplayer mission "Superpowers" and single-player scenario "Bear Rising" both provide good examples how to set them up.

 

Place an Empty -> Warfare Buildings -> Airport object alongside where you want planes to spawn (like an airport taxiway, or end of a runway).
In the Name field, give the airport a name, i.e.  Airport1.  (This is important to prevent a script error from occurring.)
Have it run the update script for Warfare airports.  Put this code in the init field:

nul = [this,Localize "str_wf2_gl_airport"] ExecVM "ca\Warfare2\Scripts\Server\Server_UpdateAirport.sqf"; this SetVariable ["markerName","Airport1"];

 

When facing the object's direction, the hangar doors are at the bottom of the object, so face it away from the taxiway/runway spawn point.

 

Create the marker for the Airport.  Name: Airport1,   type: Icon,   color: default,   icon: Circle,   text: @str_wf2_gl_airport
Then move the marker right on top of the airport object.

 

Save mission and preview.
When your unit runs into the hangar, the airport captured message should show, marker should change color, and planes should be available to purchase.

 

Some extra notes:
The Airport object is part of A2 content, it's not part of standalone OA.  That's likely why the "Mountain Warfare" missions in OA don't include capturable airports, the hangar is only available in Arma 2 and Combined Ops.  Standalone Arrowhead doesn't have it; but a Combined Ops player can create capturable airports on OA maps because they do have the object.

 

If anyone plays Resistance side, there won't be any aircraft to purchase.  Default Resistance side has no fixed-wing aircraft.

 

In multiplayer, JIP players won't see the updated marker color for friendly captured airports.  To have their markers update when joining, add this code to an "initJIPcompatible.sqf" file in the mission folder:

Spoiler

// Unlike players who join at start, JIP game begins before their WF Client finishes initializing.
// Wait for Client to finish initializing.
if (IsNil "BIS_WF_CoreClientInitialized") then {BIS_WF_CoreClientInitialized = false};
WaitUntil {BIS_WF_CoreClientInitialized};

// Update airport markers "Airport1", "Airport2" and "Airport3" when they exist.
{
	if !(isNil _x) then 
	{
		_airport = Call Compile _x;
		_nul = _airport Spawn 
		{
			WaitUntil {sleep 1; !(isNil {_this getVariable "side"})};
			_side = _this getVariable "side";

			// Only reveal to JIP the airports that are friendly captured, not unknown or enemy held.
			if ([_side,sideJoined] Call BIS_WF_AreAllies) then
			{
				if (BIS_WF_RelativeSideColors) then
				{
					(_this GetVariable "markerName") SetMarkerColorLocal (_side Call BIS_WF_GetSideColor);
				} else {
					(_this GetVariable "markerName") SetMarkerColorLocal (_side Call BIS_WF_GetSideColorAbsolute);
				};
			};
		};
	};
} forEach ["Airport1","Airport2","Airport3"];

true

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×