Results 1 to 5 of 5

Thread: How to edit units gear in Description.ext

  1. #1

    How to edit units gear in Description.ext

    How do I alter units default gear in Description.ext?
    I mean, is it possible to redefine unit's gear classes in description.ext so its not necessary to use those annoying init commands neither addons?

  2. #2
    Well, the gear is classed within the actual unit's configuration parent class so my guess would be no. Most configuring for ArmA is never done mission-side unless it they are sounds or what-not.
    My Work/ Projects

    - Life Project RPG (ArmA 2 Roleplay Mod)
    - Extended Functions Library
    - Loot System

    Spoiler:

  3. #3
    The weapons and ammunition defined in the Description.ext allow one to reequip units during the briefing phase to tune the loadouts to suit your preferences. The init commands are still the best manner to ensure you preferred gear and weapon combinations are used by units. Simply write these out once and save them in a document to be cut and pasted to your heart's content in as many different missions as you like.

    Regards,

    Sander

  4. #4
    This doesn't use description.ext, but lets you organize multiple loadouts for multiple units with just a single short command in each unit's init.

    Think this idea was originally from a FOLK mission, but here ya go:

    Unit's init:

    Code:
    0 = [this, "M16A2GL"] call compile preprocessFile "scripts\assigngear.sqf";
    The script that assigns the ammo based on your "M16A2GL" name:

    Code:
    // 0 = [this, "M16A2GL"] call compile preprocessFile "scripts\assigngear.sqf";
    
    _unit = _this select 0;
    _strLoadout = _this select 1;
    
    if (!isServer) exitWith {};
    
    removeAllWeapons _unit;
    
    switch (_strLoadout) do
    {   
    	case "M249":
    	{
    	     	{_unit addMagazine "200Rnd_556x45_M249";} forEach [1,2,3,4];
          	_unit addWeapon "M249_EP1";
    		{_unit addMagazine "HandGrenade_West";} forEach [1,2];
    		_unit addMagazine "SmokeShell";
    		_unit addMagazine "SmokeShellGreen";
    	};
    	
    	case "M16A2GL":
    	{
    	     	{_unit addMagazine "30Rnd_556x45_Stanag";} forEach [1,2,3,4,5,6,7,8];
    	     	{_unit addMagazine "1Rnd_HE_M203";} forEach [1,2,3,4,5];
    	     	{_unit addMagazine "FlareWhite_M203";} forEach [1,2,3];
          	_unit addWeapon "M16A2GL";
    		{_unit addMagazine "HandGrenade_West";} forEach [1,2];
    		_unit addMagazine "SmokeShell";
    		_unit addMagazine "SmokeShellGreen";
    		_unit addWeapon "M136";
    	};
    	case "SATCHELS":
    	{
    	     	{_unit addMagazine "30Rnd_556x45_Stanag";} forEach [1,2,3,4,5,6];
    	     	{_unit addMagazine "1Rnd_HE_M203";} forEach [1,2,3,4,5];
    	     	{_unit addMagazine "FlareWhite_M203";} forEach [1,2,3];
          	_unit addWeapon "M16A2GL";
    		{_unit addMagazine "PipeBomb";} forEach [1,2];
    		_unit addMagazine "SmokeShell";
    		_unit addMagazine "SmokeShellGreen";
    	};
    	case "M16A2GLTL":
    	{
    	     	{_unit addMagazine "30Rnd_556x45_Stanag";} forEach [1,2,3,4,5,6,7,8];
    	     	{_unit addMagazine "1Rnd_HE_M203";} forEach [1,2,3,4,5];
    	     	{_unit addMagazine "FlareWhite_M203";} forEach [1,2,3];
          	_unit addWeapon "M16A2GL";
    		{_unit addMagazine "HandGrenade_West";} forEach [1,2];
    		_unit addMagazine "SmokeShell";
    		_unit addMagazine "SmokeShellGreen";
    		_unit addWeapon "binocular";
    	};	
    };
    
    if (!(_unit hasWeapon "itemGPS")) then
    {
    //	_unit addWeapon "itemGPS";  // Uncomment to give everyone a GPS
    };
    if (!(_unit hasWeapon "LaserDesignator") && !(_unit hasWeapon "Binocular_Vector")) then
    {
    //	_unit addWeapon "binocular";  // Uncomment to give everyone binocs
    };
    
    // Stan had NVGs
    if (_unit == btz8) then {
    	_unit addWeapon "NVGoggles";
    };
    
    // Kiwi had a GPS
    if (_unit == btz6) then {
    	_unit addWeapon "ItemGPS";
    };
    
    // Vince had a pistol.
    if (_unit == btz2) then {
    	{_unit removeMagazine "FlareWhite_M203";} forEach [1,2,3];
         	{_unit addMagazine "15Rnd_9x19_M9";} forEach [1,2,3];
    	_unit addWeapon "M9";	
    };
    
    _primaryWeapon = primaryWeapon _unit;
    _unit selectweapon _primaryWeapon;
    // Fix for weapons with grenade launcher
    _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles");
    _unit selectWeapon (_muzzles select 0);
    That version was edited for a specific mission with old school items, but you can mix and match and add new loadout strings if you wanted to.

  5. #5
    Thank you all. But I'm interested only in configuring.
    I think I should have posted in Addons session.

Similar Threads

  1. Defining new vehicles and gear in description.ext
    By Moach_Mayhem in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Mar 7 2010, 05:50
  2. description.ext in MP: Gear selection?
    By Fer in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Jan 2 2007, 16:35
  3. Description.ext
    By Goodspeed in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 1
    Last Post: Mar 24 2002, 08:19
  4. Description.ext help
    By WaTz in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Mar 18 2002, 06:15
  5. description.ext
    By Fenix83 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Jan 17 2002, 14:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •