Welcome to the WarMod Series Website

Click here to edit subtitle

Adding weapons and Equip to Insurgency

When you add to insurgency it wont be in the mission.sqm.

For example to add weapons to the load out menu when your ingame do the following:

Adding weapons and Equip to Insurgency

Tools
1. Extract the the insurgency.pbo using elitness, or extract.pbo, you can find these tools here:
http://dev-heaven.net/projects/mikero-pbodll/files

Folders
2.Open the insurgency folder (insurgency0_76.takistan) this is the one i'm using for the example.
Inside the folder look for a folder that says common, and open it, got to step 3.

The Common folder and files
3. In the common folder look for a script that says:
defines.sqf you will need to open it and add some code to it that i provide as an example, to open it you will need Armaedit:
http://www.armaholic.com/page.php?id...light=ARMAEDIT
(yes it says its for Arma1, but it works for Arma2OA and CO, jsut install it and then double click on the defines script,
and then scroll towards the bottom. go to the next step.

Editing the Defines script
4. in the defines script here is the lsit of codes I have added, now these codes are basically weapon
classnames for Blufor, heres my defines script below with the all the codes I added (bolded):

Code:
#define DEBUG		false  //Constants #define VIEWDISTANCE		1500 #define SPAWNRANGE 			500 #define WEP_DESPAWN_RANGE	100 #define REM_PLAYER_BODY		180 #define MAX_FLY_TIME		45  //Misc Functions // getDirTo - vector of X towards Y in degrees while Y can be either a position or an object;  // if X is in the East of Y, vector is from 0.01° to 179.99° and if on the West it's from -0.01° to -179.99° (N is 0°, S is 180°) #define getDirTo(X,Y)       (((if(typeName Y == "OBJECT")then{getPosATL Y}else{Y} select 0) - (getPosATL X select 0)) atan2 ((if(typeName Y == "OBJECT")then{getPosATL Y}else{Y} select 1) - (getPosATL X select 1)))    //Params if (isNil "paramsArray") then {     if (isClass (missionConfigFile/"Params")) then {         for "_i" from 0 to (count (missionConfigFile/"Params") - 1) do {             _paramName = configName ((missionConfigFile >> "Params") select _i);             missionNamespace setVariable [_paramName, getNumber (missionConfigFile >> "Params" >> _paramName >> "default")];         };     }; } else {     for "_i" from 0 to (count paramsArray - 1) do {         missionNamespace setVariable [configName ((missionConfigFile >> "Params") select _i), paramsArray select _i];     }; };   #define startLocation       (if(isDead(MHQ))then{HQ}else{MHQ}) #define startPos            (getPosATL fieldHospital) #define livesLeft           (startLives - westDeaths)  //AI #define infDeleteTime      30  //String Functions #define squadNumber(X)      call compile toString[toArray(str X) select 7] #define squadString(X)      ("Hitman1" + str squadNumber(X)) #define squadUnitStrings(X)	[X+"1",X+"2",X+"3",X+"4",X+"5"] #define unitNumber(X)		call compile toString[toArray(str X) select (count toArray(str X) - 1)] #define vehicleSquad(X)     (call compile ("Hitman1" + str unitNumber(X))) #define getName(X)          (playerNames select (westPlayerStrings find str X)) #define squadLeader(X)      (squadString(X)+"1")  // these macros do NOT return the actual name of the unit - these are only for text references #define squadVictor(X)      ("Victor-1-" + str squadNumber(X)) #define vehicleID(X)		("Hitman-1-" + str unitNumber(X)) #define squadID(X)          ("Hitman-1-" + str squadNumber(X)) #define unitID(X)           ("Hitman-1-" + str squadNumber(X) + "-" + str unitNumber(X))  #define victorID(X)         (\ if(typeOf X == ATVTYPE)then{"ATV-1-" + str unitNumber(X)}else{\ if(typeOf X == HELITYPE)then{"Heli"}else{\ if(typeOf X == MHQTYPE)then{"MHQ"}else{\ "Victor-1-" + str unitNumber(X)}}})  #define IEDList             ["BAF_ied_v1","BAF_ied_v2","BAF_ied_v3","BAF_ied_v4"] #define cacheType 			"GuerillaCacheBox_EP1" #define ammoBoxType			"UNBasicWeapons_EP1" #define westVehicles 		[humv11,humv12,humv13,humv14,atv11,atv12,atv13,atv14,heli,MHQ] #define westVehicleStrings	["humv11","humv12","humv13","humv14","atv11","atv12","atv13","atv14","heli","MHQ"] #define westPlayerStrings	["Hitman111","Hitman112","Hitman113","Hitman114","Hitman115","Hitman121","Hitman122","Hitman123","Hitman124","Hitman125","Hitman131","Hitman132","Hitman133","Hitman134","Hitman135","Hitman141","Hitman142","Hitman143","Hitman144","Hitman145"] #define eastPlayerStrings   ["east1","east2","east3","east4"]  #define westAllClasses		(westSoldierClasses + westVehicleClasses) #define eastStationaryGuns	["KORD_high_UN_EP1","DSHKM_TK_INS_EP1","ZU23_TK_INS_EP1","AGS_TK_INS_EP1"] #define eastVclClasses		["BRDM2_TK_EP1","M113_TK_EP1","BTR60_TK_EP1","LandRover_MG_TK_INS_EP1","LandRover_SPG9_TK_INS_EP1","T34_TK_EP1","T55_TK_EP1","KORD_high_UN_EP1","DSHKM_TK_INS_EP1","ZU23_TK_INS_EP1","AGS_TK_INS_EP1"] #define eastRanks			["CAPTAIN","LIEUTENANT","SERGEANT","CORPORAL","PRIVATE"]  #define eastInfClasses		[\ "TK_INS_Warlord_EP1",\ "TK_INS_Soldier_TL_EP1",\ "TK_INS_Bonesetter_EP1",\ "TK_INS_Soldier_AT_EP1",\ "TK_INS_Soldier_AT_EP1",\ "TK_INS_Soldier_AT_EP1",\ "TK_INS_Soldier_MG_EP1",\ "TK_INS_Soldier_AR_EP1",\ "TK_INS_Soldier_AAT_EP1",\ "TK_INS_Soldier_EP1",\ "TK_INS_Soldier_2_EP1",\ "TK_INS_Soldier_3_EP1",\ "TK_INS_Soldier_4_EP1"\ ]  #define eastAllClasses      (eastInfClasses + eastStationaryGuns + eastVclClasses)  #define legalMagazines [\ "30Rnd_9x19_MP5",\ "30Rnd_9x19_MP5SD",\ "5x_22_LR_17_HMR",\ "8Rnd_B_Beneli_74Slug",\ "8Rnd_B_Beneli_Pellets",\ "5Rnd_127x99_as50",\ "5rnd_127x99_as50",\ "20Rnd_762x51_DMR",\ "10x_303",\ "5Rnd_127x99_as50",\ "5rnd_127x99_as50",\ "200Rnd_556x45_L110A1",\ "5Rnd_86x70_L115A1",\ "100Rnd_762x54_PK",\ "75Rnd_545x39_RPK",\ "10Rnd_762x54_SVD",\ "8Rnd_9x18_Makarov",\ "6Rnd_45ACP",\ "20Rnd_B_765x17_Ball",\ "30Rnd_9x19_UZI",\ "PG7V",\ "PG7VL",\ "PG7VR",\ "OG7",\ "RPG18",\ "Strela",\ "20Rnd_762x51_FNFAL",\ "30Rnd_545x39_AK",\ "30Rnd_762x39_AK47",\ "30Rnd_556x45_Stanag",\ "5Rnd_762x51_M24",\ "10Rnd_127x99_m107",\ "100Rnd_762x51_M240",\ "200Rnd_556x45_M249",\ "20Rnd_762x51_B_SCAR",\ "20rnd_762x51_B_SCAR",\ "Laserbatteries",\ "Javelin",\ "SMAW_HEAA",\ "SMAW_HEDP",\ "Mine",\ "PipeBomb",\ "15Rnd_9x19_M9",\ "7Rnd_45ACP_1911",\ "17Rnd_9x19_glock17",\ "HandGrenade_West",\ "HandGrenade_East",\ "SmokeShell",\ "1Rnd_HE_M203",\ "1Rnd_Smoke_M203",\ "IR_Strobe_Target",\ "IR_Strobe_Marker",\ "SmokeShellRed",\ "SmokeShellGreen",\ "SmokeShellBlue",\ "SmokeShellYellow",\ "SmokeShellOrange",\ "SmokeShellPurple",\ "FlareWhite_M203",\ "FlareYellow_M203",\ "FlareGreen_M203",\ "FlareRed_M203",\ "1Rnd_SmokeRed_M203",\ "1Rnd_SmokeGreen_M203",\ "1Rnd_SmokeYellow_M203",\ "1Rnd_HE_GP25",\ "FlareWhite_GP25",\ "FlareGreen_GP25",\ "FlareRed_GP25",\ "FlareYellow_GP25",\ "1Rnd_Smoke_GP25",\ "1Rnd_SmokeRed_GP25",\ "1Rnd_SmokeGreen_GP25",\ "1Rnd_SmokeYellow_GP25"\ ]
You can add those if you wish or add your own but basically when you add ammo which is what these classnames are the you
have to put in the same context as everything else in the list.

Folders
Common folder/Client/gear

Step 5.
Ok were still in the common folder, now find the client folder, and open it.

Client folder /gear
6. In the client folder your going to look for the gear folder, open the
gear folder and look for the load outs script, open the script, I will list below what I did in the script which
weapons I added and what ammo, you can add these yourself and see them ingame:

Loadouts.sqf
Code:
if isWest then { 	#ifndef __BAF__ 		primaries = [ 		"MP5A5", 		"MP5SD", 		"M16A2", 		"M16A2GL", 		"M14_EP1", 		"M24_des_EP1", 		"SVD_des_EP1", 		"m107", 		"huntingrifle", 		"M1014", 		"M240", 		"m240_scoped_EP1", 		"M249_EP1", 		"M249_TWS_EP1", 		"M249_m145_EP1", 		"Mk_48_DES_EP1", 		"M4A1", 		"M4A3_CCO_EP1", 		"M4A3_RCO_GL_EP1", 		"SCAR_L_CQC", 		"SCAR_L_CQC_Holo", 		"SCAR_L_STD_Mk4CQT", 		"SCAR_L_STD_EGLM_RCO", 		"SCAR_L_CQC_EGLM_Holo", 		"SCAR_L_STD_EGLM_TWS", 		"SCAR_L_STD_HOLO", 		"SCAR_H_CQC_CCO", 		"SCAR_H_STD_EGLM_Spect" 		];  		secondaries = [ 		"M136", 		"Javelin", 		"SMAW", 		"RPG7V", 		"US_Assault_Pack_EP1", 		"US_Assault_Pack_Ammo_EP1", 		"US_Assault_Pack_AmmoSAW_EP1", 		"US_Assault_Pack_Explosives_EP1", 		"US_Patrol_Pack_EP1", 		"US_Patrol_Pack_Ammo_EP1", 		"US_Patrol_Pack_Specops_EP1", 		"US_Backpack_EP1", 		"US_Backpack_AmmoMG_EP1", 		"US_Backpack_AT_EP1", 		"US_Backpack_Specops_EP1", 		"Tripod_Bag", 		"M252_US_Bag_EP1", 		"TOW_TriPod_US_Bag_EP1", 		"MK19_TriPod_US_Bag_EP1", 		"M2HD_mini_TriPod_US_Bag_EP1", 		"M2StaticMG_US_Bag_EP1" 		];  		sidearms = ["Colt1911","M9","glock17_EP1"];  		misc = [ 		"HandGrenade_West", 		"IR_Strobe_Target", 		"IR_Strobe_Marker", 		"SmokeShell", 		"SmokeShellRed", 		"SmokeShellGreen", 		"SmokeShellBlue", 		"SmokeShellYellow", 		"SmokeShellOrange", 		"SmokeShellPurple", 		"FlareWhite_M203", 		"FlareYellow_M203", 		"FlareGreen_M203", 		"FlareRed_M203", 		"1Rnd_HE_M203", 		"1Rnd_Smoke_M203", 		"1Rnd_SmokeRed_M203", 		"1Rnd_SmokeGreen_M203", 		"1Rnd_SmokeYellow_M203", 		"Laserdesignator", 		"Mine", 		"PipeBomb", 		"Binocular", 		"NVGoggles", 		"Binocular_Vector", 		"ItemCompass", 		"ItemGPS", 		"ItemMap", 		"ItemRadio", 		"ItemWatch" 		]; 	#else 		primaries = [ 		"M14_EP1", 		"BAF_L110A1_Aim", 		"BAF_L7A2_GPMG", 		"BAF_L85A2_RIS_ACOG", 		"BAF_L85A2_RIS_CWS", 		"BAF_L85A2_RIS_Holo", 		"BAF_L85A2_RIS_SUSAT", 		"BAF_L85A2_UGL_ACOG", 		"BAF_L85A2_UGL_Holo", 		"BAF_L85A2_UGL_SUSAT", 		"BAF_L86A2_ACOG", 		"BAF_LRR_scoped", 		"M16A2", 		"M16A2GL", 		"M4A1", 		"M4A3_CCO_EP1", 		"M4A3_RCO_GL_EP1" 		];  		secondaries = [ 		"BAF_NLAW_Launcher", 		"Javelin", 		"BAF_AssaultPack_RifleAmmo", 		"BAF_AssaultPack_ARAmmo", 		"BAF_AssaultPack_MGAmmo", 		"BAF_AssaultPack_ATAmmo", 		"BAF_AssaultPack_HATAmmo", 		"BAF_AssaultPack_Special", 		"BAF_AssaultPack_FAC", 		"BAF_AssaultPack_HAAAmmo", 		"BAF_AssaultPack_LRRAmmo", 		"Tripod_Bag", 		"M252_US_Bag_EP1", 		"TOW_TriPod_US_Bag_EP1", 		"MK19_TriPod_US_Bag_EP1", 		"M2HD_mini_TriPod_US_Bag_EP1", 		"M2StaticMG_US_Bag_EP1" 		];  		sidearms = ["Colt1911","M9","glock17_EP1"];  		misc = [ 		"BAF_L109A1_HE", 		"IR_Strobe_Target", 		"IR_Strobe_Marker", 		"SmokeShell", 		"SmokeShellRed", 		"SmokeShellGreen", 		"SmokeShellBlue", 		"SmokeShellYellow", 		"SmokeShellOrange", 		"SmokeShellPurple", 		"FlareWhite_M203", 		"FlareYellow_M203", 		"FlareGreen_M203", 		"FlareRed_M203", 		"1Rnd_HE_M203", 		"1Rnd_Smoke_M203", 		"1Rnd_SmokeRed_M203", 		"1Rnd_SmokeGreen_M203", 		"1Rnd_SmokeYellow_M203", 		"Laserdesignator", 		"Mine", 		"PipeBomb", 		"Binocular", 		"NVGoggles", 		"Binocular_Vector", 		"ItemCompass", 		"ItemGPS", 		"ItemMap", 		"ItemRadio", 		"ItemWatch" 		]; 	#endif };
Again what I bolded is what i added, but I think i added a few more then those dont recall,
its been 2-3 months since I edited insurgency.

What you can do is just copy and paste the entire thing and just save it.

Once your done editing all those, then close all the folders and then pbo the folder.

Note: that when you first extract insurgency there is 2 folders, one that says insurgency, and
another folder sayig the same thing inside with all the files, and scripts, what you will need to do is get rid of
that first folder and only have just insurgency with the scripts and files inside. Why because the mission wont load if you dont.

If you want to preset up the parameters (ingame features) for the game without having to change the parameters
every time you get ingame its really is just a matter of editing the description.exe and finding the parameters you wish to change.

 

Members Area

Testimonials

  • "Gunter, thank you so much for this. Love this compilation. Made / makes my life so much easier and just adds so much. Thank you for taking the time to go through all these mods ..."
    by nubbin77
    A2WarMod v 1.4
  • "Great stuff here! its nice to have all these in one package! "
    Nightrain
    COWarMod release
  • "Fantastic package mate. Love the way you've combined it all yet kept it modular so that we can tweak it to our heart's content! "
    domokun
    COWarMod release

Donate!