Jump to content
Sign in to follow this  
Sam75

Change weapon config ?

Recommended Posts

I would like to increase or even turn off self-destruction of rpg7 rockets, real ones are supposed to self destruct at 900m, in the game it seems to me that it's way more than 900m, how can I edit this value ?

thanks

Share this post


Link to post
Share on other sites

You can extend the RPG config entry:

class CfgPatches
{
class Sam_better_RPG
{
	units[] = {};
	weapons[] = {"RPG7V"};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWeapons"}; //Let original config be loaded first
};
};

class CfgWeapons
{
class Launcher;
class RPG7V : Launcher
{
	timeToLive = 5;
};
};

Share this post


Link to post
Share on other sites
You can extend the RPG config entry:

class CfgPatches
{
class Sam_better_RPG
{
	units[] = {};
	weapons[] = {"RPG7V"};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWeapons"}; //Let original config be loaded first
};
};

class CfgWeapons
{
class Launcher;
class RPG7V : Launcher
{
	timeToLive = 5;
};
};

and where do I put this ?

I tried to edit original config.bin from weapon.pbo but I get an error when I try to convert the new config.cpp to config.bin

Share this post


Link to post
Share on other sites

Create a folder, call it myaddon. Create a new file within this folder and call it config.cpp, paste the text from above into it.

Pack the folder with your favorite PBO tool.

Share this post


Link to post
Share on other sites

class CfgPatches 
{ 
   class Sam_better_RPG 
   { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"CAWeapons"}; 
   }; 
}; 

class CfgAmmo { 

/*extern*/ class RocketCore;
/*extern*/ class Rocketbase;


       class R_RPG18_AT: RocketBase {
	model = "\ca\weapons\m136_Rocket";
	hit = 300;
	indirectHit = 7.500000;
	indirectHitRange = 1;
	cost = 200;
	timeToLive = 10;
	initTime = 0;
	thrust = 80;
	thrustTime = 10;
	maxSpeed = 115;
	sideAirFriction = 0.500000;
	fuseDistance = 5;
	visibleFire = 24;
	audibleFire = 16;
	CraterEffects = "ATRocketCrater";
	explosionEffects = "ATRocketExplosion";
	effectsMissile = "missile2";
	whistleDist = 2;
};
};

Can't get it working without turning off ace mod, any idea why ?

Share this post


Link to post
Share on other sites

ACE probably overrides the settings. Either define the ACE weapon class in required addons, or use load your change as mod after ACE (E:\ARMA 2\arma2.exe -mod=@ACE;@myAddon).

BTW, you don't have to write out all of the values, only the values you want to change are necessary.

Here's an example:

class CfgPatches 
{ 
   class Sam_better_RPG 
   { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"CAWeapons", "ACE_ammo_config_name_here"}; 
   }; 
}; 

class CfgAmmo
{ 
   //class RocketCore; - don't need this
   class Rocketbase;

    class R_RPG18_AT: RocketBase
   {
       timeToLive = 10;
   };
};

Edited by Deadfast

Share this post


Link to post
Share on other sites

can I include my addon into my mission (mission is also .pbo, why do i need another pbo in addons folder?) ?

---------- Post added at 20:16 ---------- Previous post was at 19:58 ----------

If yes, then how?

Share this post


Link to post
Share on other sites

great pity

Edited by TBCVAMP
Sorry wrong place in fourms

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  

×