OFPEC Forum
Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: fallujahmedic on 22 Oct 2008, 20:37:08
-
(http://www.navweaps.com/Weapons/WNUS_5-62_mk45_Preble_shot_pic.jpg)
I am currently working on a MK 45 5"/62 and am trying to work around getting the correct damage values. I tried using the 120mm from the M1, but it was too wimpy for what I was working toward.
Note: posted this once before, but the power went out as I hit post :o
:whistle: Wow, sorry about that, dont know what I was thinking.
I meant to ask, "does anyone have some suggestions on how to go about this?" I'm used to using the standard weapons, but have never delved into what it would take to make a weapon of this sort work. I'd appreciate any help you could provide.
-
And do you have a related question? If not this thread will be locked...
-
edited
-
All the data is in the Weapons Config sample from BIS
When assign a weapon to an addon we do this for example
weapons[] = {"M119" };
magazines[] = {"30Rnd_105mmHE_M119" };
But instead, lets change it;
weapons[] = {"FALL_M119" };
magazines[] = {"30Rnd_105mmHE_FALL_M119" };
Now start with the new AMMO
This is standard shell in the M119 Magazine
class CfgAmmo {
class ShellBase; // extend the class
class Sh_105_HE : ShellBase {
hit = 50;
indirectHit = 20;
indirectHitRange = 7;
typicalSpeed = 1300;
explosive = 0.800000;
cost = 300;
model = "\ca\Weapons\shell";
};
};
Make your own shell like this;
class CfgAmmo {
class Sh_105_HE; // extend the class
class FALL_Sh_105_HE : Sh_105_HE {
hit = 50;
indirectHit = 20;
indirectHitRange = 7;
typicalSpeed = 1300;
explosive = 0.800000;
cost = 300;
};
};
Now play with the Values in there to change the "Power" and the radius of effect.
Examples
120 Shell
----------------------
hit = 80;
indirectHit = 30;
indirectHitRange = 5;
typicalSpeed = 1300;
explosive = 0.800000;
cost = 300;
---------------------
125_SABOT
-----------------------
hit = 650;
indirectHit = 0;
indirectHitRange = 0;
typicalSpeed = 1800;
cost = 1000;
deflecting = 15;
explosionEffects = "";
-----------------------
Once finished with the ammo, config the new MAGAZINE
This is standard MAGAZINE for the M119
class CfgMagazines
{
class VehicleMagazine // extended class
class 30Rnd_105mmHE_M119 : VehicleMagazine {
scope = 2;
displayName = "$STR_DN_HE";
ammo = "Sh_105_HE";
count = 30;
initSpeed = 1100;
};
};
Make you own
class CfgMagazines
{
class VehicleMagazine // extended class
class 30Rnd_105mmHE_FALL_M119 : VehicleMagazine {
scope = 2;
displayName = "$STR_DN_HE";
ammo = "Sh_105_HE";
count = 30;
initSpeed = 1100;
};
};
Now make your new WEAPON
This was the standard M119
class cfgWeapons {
class CannonCore; // extended class
class M119 : CannonCore {
scope = 1;
displayName = "$STR_DN_M119";
sound[] = {"\ca\Weapons\Data\Sound\gun120",316.227783,1 };
reloadSound[] = {"\ca\Weapons\Data\Sound\gun120reload",1.000000,1 };
magazines[] = {"30Rnd_105mmHE_M119" };
minRange = 1;
minRangeProbab = 0.100000;
midRange = 12000;
midRangeProbab = 0.700000;
maxRange = 19000;
maxRangeProbab = 0.100000;
reloadTime = 20;
magazineReloadTime = 8;
maxLeadSpeed = 100;
autoReload = 1;
canLock = 0;
};
};
Make a copy (that you can modify parameters on)
class cfgWeapons {
class M119; // extended class
class FALL_M119 : M119 {
scope = 1;
displayName = "MY GUN";
sound[] = {"\ca\Weapons\Data\Sound\gun120",316.227783,1 };
reloadSound[] = {"\ca\Weapons\Data\Sound\gun120reload",1.000000,1 };
magazines[] = {"30Rnd_105mmHE_FALL_M119" };
minRange = 1;
minRangeProbab = 0.100000;
midRange = 12000;
midRangeProbab = 0.700000;
maxRange = 19000;
maxRangeProbab = 0.100000;
reloadTime = 20;
magazineReloadTime = 8;
maxLeadSpeed = 100;
autoReload = 1;
canLock = 0;
};
};
This should provide you with custom AMMO, MAGAZINES and WEAPON.
Adjust each to get the "bang" you want.
-
Ladies and gentlemen, a round of applause please for Gnat! :clap:
-
:clap: :clap: :clap:
Thank you very much!!
-
No problem.
Just a clarification to make things easier.
When you extend / copy an existing class (ammo, weapon or anything really), you don't have to re-define all the lines again.
You can simply just define the lines that you want to be different.
Example of the WEAPON, if you are only changing a few lines of the original M119, you could simply define your weapon like this;
class cfgWeapons {
class M119; // extended class
class FALL_M119 : M119 {
displayName = "MY GUN";
magazines[] = {"30Rnd_105mmHE_FALL_M119" };
maxRangeProbab = 0.400000;
reloadTime = 5;
magazineReloadTime = 1;
};
};
Quicker and shorter and easier to see the changes.