Thommy88 10 Posted June 11, 2010 hi guys plz anyone can help me.... how i can create the config for a weapon??? i do this.... class CfgWeapons { class Default {}; class MGun: Default {}; class Riffle: MGun {}; class SniperRiffle : Riffle {}; class M21 : SniperRiffle{}; class Carcano: M21 { model="\Carcano_mod_1891\carcano"; displayName="Carcano mod 1891"; displayNameMagazine="6,5mm Caliber"; magazines[]={"Carcano"}; ammo=BulletSniper; picture="\Carcano_mod_1891\carcano.paa"; }; }; class CfgVehicles { class All{}; class AllVehicles:All{}; class Land:AllVehicles{}; class Man:Land{}; class Soldier:Man{} class Civilian:Soldier{}; class StalkerHunter:Civilian { access=2 displayName="Fante Carcano"; weapons{}={"Throw,"Put","Carcano"}; magazines[]={"Carcano","Carcano","Carcano"}; }; }; HELP ME! PLZ!!!!!!!!!!!! Share this post Link to post Share on other sites
W0lle 1046 Posted June 11, 2010 And where is the "Carcano" Magazine defined? There is no M21 in ArmA2, so inheriting from that weapon ain't working. Use the M24 or the Huntingrifle instead. There is also no "BulletSniper" Ammotype available in ArmA2 as far as I know. And there is the class CfgPatches section missing as well. With all that missing and incorrect stuff in there it's no wonder nothing works. Looks like you are using a config snippet from OFP and try to make it work in ArmA2. And please stop writing in all capital letters (aka screaming) here. Share this post Link to post Share on other sites
Thommy88 10 Posted June 11, 2010 sorry fors caps :/ then my config is bad :) u can help a sec??? class CfgWeapons { class Default {}; class MGun: Default {}; class Riffle: MGun {}; class SniperRiffle : Riffle {}; class M24 : SniperRiffle{}; class Carcano: M24 { model="\Carcano_mod_1891\carcano"; displayName="Carcano mod 1891"; displayNameMagazine="6,5mm Caliber"; magazines[]={"Carcano"}; ammo=BulletSniper; picture="\Carcano_mod_1891\carcano.paa"; }; }; class CfgVehicles { class All{}; class AllVehicles:All{}; class Land:AllVehicles{}; class Man:Land{}; class Soldier:Man{} class Civilian:Soldier{}; class StalkerHunter:Civilian { access=2 displayName="Fante Carcano"; weapons{}={"Throw,"Put","Carcano"}; magazines[]={"Carcano","Carcano","Carcano"}; }; }; can u correct it? is for a test but i don't understand i have to create a model.cfg..then cpp and the bin...how???? Share this post Link to post Share on other sites
W0lle 1046 Posted June 11, 2010 I will not write the config for you because else you never learn. ;) You need at least to add two more classes to your config: class CfgPatches in which you define the name of your addon, required other addons and so on class CfgMagazines in which you define the Carcano magazine you are using. Below is the config from our CWR² M21 rifle, you can take the required pieces from there: class CfgPatches { class CWR2_M21 { requiredAddons[]={"CAWeapons"}; weapons[]={"M21"}; units[]={}; }; }; class Mode_SemiAuto; class CfgMagazines { class 5Rnd_762x51_M24; class M21: 5Rnd_762x51_M24 { displayName=$STR_MN_CWR2_M21; picture=cwr2\weapons\cwr2_m21\data\equip\m_m21.paa; descriptionshort=$STR_DSS_CWR2_M21Mag; count=20; }; }; class CfgWeapons { class M24; class M21: M24 { displayName=$STR_DN_CWR2_M21; model=CurrentPath\cwr2_m21.p3d; picture=CurrentPath\data\equip\w_m21.paa; descriptionshort=$STR_DSS_CWR2_M21; modelOptics="\ca\weapons\2Dscope_MilDot_10"; opticsFlare=1; opticsDisablePeripherialVision=1; opticsZoomMin=0.04; opticsZoomMax=0.12; distanceZoomMin=400; distanceZoomMax=80; begin1[]={"ca\sounds\weapons\rifles\sniper_single_01",1.77828,1,1000}; begin2[]={"ca\sounds\weapons\rifles\sniper_single_02",1.77828,1,1000}; soundBegin[]={"begin1",0.5,"begin2",0.5}; drySound[]={"\ca\Weapons\Data\Sound\M21_dry_v1",0.0316228,1}; reloadMagazineSound[]={"\ca\Weapons\Data\Sound\M24_reload_v5a",0.794328,1,20}; magazines[]={"M21"}; modes[]={"Single"}; class Single: Mode_SemiAuto { sound[]={"\ca\Weapons\Data\Sound\mk12_ivanverze",10,1,1000}; dispersion=0.00045; recoil="recoil_single_primary_3outof10"; recoilProne="recoil_single_primary_prone_3outof10"; minRange=0; minRangeProbab=0.3; midRange=400; midRangeProbab=0.7; maxRange=800; maxRangeProbab=0.05; aiRateOfFire=10; aiRateOfFireDistance=800; }; class Library { libTextDesc=$STR_LIB_CWR2_M21; }; }; }; The descriptionshort line is not really required and libTextDesc line you need to change to your own text. If you don't use a stringtable for your descriptions then you need to write the text in the line. Like displayName=$STR_DN_CWR2_M21; is replaced with displayName="M21"; The model.cfg is no big problem if you have no animated parts at your weapon. Best is you use the model.cfg from the BI sample models. Share this post Link to post Share on other sites
Thommy88 10 Posted June 11, 2010 (edited) class CfgPatches { class Carcano { requiredAddons[]={}; weapons[]={"Carcano"}; units[]={}; }; }; class Mode_SemiAuto; class CfgMagazines { class 5Rnd_65x51_Carcano; class M21: 5Rnd_65x51_Carcano { displayName=$Carcano; picture=Carcano_mod_1891\m_m21.paa; descriptionshort=$CarcanoMag; count=20; }; }; class CfgWeapons { class M24; class M21: M24 { displayName=$Carcano mod.1891; model=Carcano_mod_1891\carcano.p3d; picture=Carcano_mod_1891\w_m21.paa; descriptionshort=$Carcano; modelOptics="\ca\weapons\2Dscope_MilDot_10"; opticsFlare=1; opticsDisablePeripherialVision=1; opticsZoomMin=0.04; opticsZoomMax=0.12; distanceZoomMin=400; distanceZoomMax=80; begin1[]={"ca\sounds\weapons\rifles\sniper_single_01",1.77828,1,1000}; begin2[]={"ca\sounds\weapons\rifles\sniper_single_02",1.77828,1,1000}; soundBegin[]={"begin1",0.5,"begin2",0.5}; drySound[]={"\ca\Weapons\Data\Sound\M21_dry_v1",0.0316228,1}; reloadMagazineSound[]={"\ca\Weapons\Data\Sound\M24_reload_v5a",0.794328,1,20}; magazines[]={"Carcano"}; modes[]={"Single"}; class Single: Mode_SemiAuto { sound[]={"\ca\Weapons\Data\Sound\mk12_ivanverze",10,1,1000}; dispersion=0.00045; recoil="recoil_single_primary_3outof10"; recoilProne="recoil_single_primary_prone_3outof10"; minRange=0; minRangeProbab=0.3; midRange=400; midRangeProbab=0.7; maxRange=800; maxRangeProbab=0.05; aiRateOfFire=10; aiRateOfFireDistance=800; }; class Library { libTextDesc=$Carcano; }; }; }; look is correct now??? then how i can create bin? Edited June 11, 2010 by Thommy88 Share this post Link to post Share on other sites
W0lle 1046 Posted June 11, 2010 Almost... class CfgPatches { class Carcano { requiredAddons[]={}; weapons[]={"Carcano"}; units[]={}; }; }; class Mode_SemiAuto; class CfgMagazines { class 5Rnd_762x51_M24; // The class in this line must exist already, 5Rnd_65x51_Carcano is not present in A2 class Carcano: 5Rnd_762x51_M24 { displayName="Carcano Mag."; picture=Carcano_mod_1891\m_m21.paa; // this image must be present in your model folder descriptionshort="My Carcano Magazine"; count=20; }; }; class CfgWeapons { class M24; class M21: M24 { displayName="Carcano mod.1891"; model=Carcano_mod_1891\carcano.p3d; picture=Carcano_mod_1891\w_m21.paa; // this image must be present in your model folder descriptionshort="My Carcano rifle"; modelOptics="\ca\weapons\2Dscope_MilDot_10"; opticsFlare=1; opticsDisablePeripherialVision=1; opticsZoomMin=0.04; opticsZoomMax=0.12; distanceZoomMin=400; distanceZoomMax=80; begin1[]={"ca\sounds\weapons\rifles\sniper_single_01",1.77828,1,1000}; begin2[]={"ca\sounds\weapons\rifles\sniper_single_02",1.77828,1,1000}; soundBegin[]={"begin1",0.5,"begin2",0.5}; drySound[]={"\ca\Weapons\Data\Sound\M21_dry_v1",0.0316228,1}; reloadMagazineSound[]={"\ca\Weapons\Data\Sound\M24_reload_v5a",0.794328,1,20}; magazines[]={"Carcano"}; modes[]={"Single"}; class Single: Mode_SemiAuto { sound[]={"\ca\Weapons\Data\Sound\mk12_ivanverze",10,1,1000}; dispersion=0.00045; recoil="recoil_single_primary_3outof10"; recoilProne="recoil_single_primary_prone_3outof10"; minRange=0; minRangeProbab=0.3; midRange=400; midRangeProbab=0.7; maxRange=800; maxRangeProbab=0.05; aiRateOfFire=10; aiRateOfFireDistance=800; }; class Library { libTextDesc="This is my Carcano rifle"; }; }; }; the config.bin is created when you binarize the model folder with BinPBO. However you first need to get it working without any bugs. Binarizing the addon is the last step in the process. Share this post Link to post Share on other sites