Jump to content
Sign in to follow this  
drunken officer

Changing Cargo value of a box (configfile)

Recommended Posts

Hello. I set 4 boxes (B_supplyCrate_F; [ArmA3 NATO-box] ) into my base.

Now i want to change the maximum cargospace, NOT clear the space.

I tried many ways but nothing happends. All the ways don't change the cargospace.

Here my way:

serverinit:

dof_paladin_boxloadspace = getNumber (configFile >> "CfgVehicles" >> Typeof _x >> "maximumload"); 
dof_paladin_boxloadspace = dof_paladin_boxloadspace + 50000;
} forEAch [box_base_1, box_base_2,box_base_3, box_base_4];

i tried with:

dof_paladin_boxloadspace = getNumber (configFile >> "CfgVehicles" >> Typeof _x >> "maximumload"); 
_X setVariable ["dof_paladin_boxloadspace",50000, true];
} forEAch [box_base_1, box_base_2,box_base_3, box_base_4];

it tried it, to use this code in the init line:

dof_paladin_boxloadspace = getNumber (configFile >> "CfgVehicles" >> Typeof box_base_1 >> "maximumload"); 
dof_paladin_boxloadspace = dof_paladin_boxloadspace + 50000;

Can somebody show me how to do?

Share this post


Link to post
Share on other sites

You cannot change config values with script, you'll need an addon (mod) for that. There is nothing you can do.

Share this post


Link to post
Share on other sites

The only way I know how to change the cargo value of a box is to write a new config for the box, and changing the maximumLoad to whatever value you want.. Here is the config I used for a small and large empty box, hopefully this helps you out.

class CfgPatches
{
   class empty_box
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {};
};
};
class CfgVehicles 
{
   class Box_NATO_Wps_F;
   class Ix2_Small_Empty_Box : Box_NATO_Wps_F
   {
       displayName = "Small Empty Box";
       descriptionShort = "Small Empty";
	transportmaxmagazines = 9999;
	transportmaxweapons = 9999;
	transportMaxBackpacks = 9999;
	SLX_XEH_DISABLED = 0;

	class TransportItems {};
	class TransportMagazines {};
	class TransportWeapons {};
       maximumLoad = 10000;
   };

   class B_supplyCrate_F;
   class Ix2_Large_Empty_Box : B_supplyCrate_F
   {
       displayName = "Large Empty Box";
       descriptionShort = "Large Empty";
	transportmaxmagazines = 9999;
	transportmaxweapons = 9999;
	transportMaxBackpacks = 9999;
	SLX_XEH_DISABLED = 0;

	class TransportItems {};
	class TransportMagazines {};
	class TransportWeapons {};
       maximumLoad = 1000000;
   };
};

Share this post


Link to post
Share on other sites
The only way I know how to change the cargo value of a box is to write a new config for the box, and changing the maximumLoad to whatever value you want.. Here is the config I used for a small and large empty box, hopefully this helps you out.

class CfgPatches
{
   class empty_box
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {};
};
};
class CfgVehicles 
{
   class Box_NATO_Wps_F;
   class Ix2_Small_Empty_Box : Box_NATO_Wps_F
   {
       displayName = "Small Empty Box";
       descriptionShort = "Small Empty";
	transportmaxmagazines = 9999;
	transportmaxweapons = 9999;
	transportMaxBackpacks = 9999;
	SLX_XEH_DISABLED = 0;

	class TransportItems {};
	class TransportMagazines {};
	class TransportWeapons {};
       maximumLoad = 10000;
   };

   class B_supplyCrate_F;
   class Ix2_Large_Empty_Box : B_supplyCrate_F
   {
       displayName = "Large Empty Box";
       descriptionShort = "Large Empty";
	transportmaxmagazines = 9999;
	transportmaxweapons = 9999;
	transportMaxBackpacks = 9999;
	SLX_XEH_DISABLED = 0;

	class TransportItems {};
	class TransportMagazines {};
	class TransportWeapons {};
       maximumLoad = 1000000;
   };
};

Hi, sorry for bumping this... Ghostjaeger script, is a script? is something I can add in description.ext without any problem?

Thanks in advance.

Share this post


Link to post
Share on other sites
Hi, sorry for bumping this... Ghostjaeger script, is a script? is something I can add in description.ext without any problem?

Thanks in advance.

That's a config I posted, I don't know of any scripts that change the amount of what goes into a box.

Share this post


Link to post
Share on other sites

I mean, if I place this on description.ext, my box will have more capacity?

Share this post


Link to post
Share on other sites

Negative. That config is for addon only.

There is currently no way of increasing capacity of cargo containers by scripting. Unless you script something else to it, like adding items via actions or something like that. SOmething not exactly pretty.

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
Sign in to follow this  

×