Jump to content

Harybo

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Posts posted by Harybo


  1. Hi,

    I'm new to Arma modding and have for the last few days trying to create a weapon addon of a bolt action rifle. To begin with, I already had a model for it and downloaded the Arma 2 sample files so that I could use the Lee-Enfield files as reference and for help since this weapon is the closest to the one I am trying to implement. I then aligned and scaled my model according to how the Lee-Enfield was in Oxygen 2 and applied textures and materials. After this I created a mod folder with the config.cpp and model.cfg files from the Lee-Enfield. Then I got a stringtable from another weapon mod and added my own strings and then configured them in the config.cpp file. When I launched the game and spawned the weapon, the model showed up with the texture on it, and I could reload and fire it with ammo. However, when in the inventory screen, there was no name or description of the gun and the shots fired from it did also not inflict any damage. Furthermore, when I used ironsights, the aim went below where the weapon was placed, like this: 2014_01_27_00002.jpg

    Here is also a copy of my config.cpp file if anyone has the time and is kind enough to take a look. The only things I changed in it was the model name, display picture, and the name and description(which did not work). I may also have changed some of the Lee-Enfield sections to "Mauser".

    class CfgPatches
    {
    class CAWeapons_E_Mauser
    {
    	units[] = {};
    	weapons[] = {"rnd_mauser"};
    	requiredVersion = 1.02;
    	requiredAddons[] = {"CAWeapons_E","CAWeapons"};
    };
    };
    class CfgAmmo
    {
    class BulletBase;
    class B_303_Ball: BulletBase
    {
    	hit=11;indirectHit=0;indirectHitRange=0;
    	visibleFire=18;
    	audibleFire=18;
    	visibleFireTime=2;
    	cost = 1.2;
    	airLock=1;
    	tracerStartTime = -1;
    	airFriction = -0.00071225;
    	typicalSpeed=750;
    	caliber=0.9;
    };
    };
    class CfgMagazines
    {
    class CA_Magazine;
    class 10x_303: CA_Magazine
    {
    	scope = 2;
    	displayName = $STR_MN_Mauser; // TODO
    	descriptionShort = $STR_DSS_5RND_Mauser; // TODO
    	picture="\random\data\m_garand_ca.paa"; // TODO add proper picture
    	count=10;
    	ammo = B_303_Ball;
    	initSpeed = 750;
    
    };
    };
    class CfgWeapons
    {
    class Rifle;
    class Mauser : Rifle
    {
      	htMin = 1;
       		htMax = 420;
       		afMax = 0;
       		mfMax = 0;
       		mFact = 1;
       		tBody = 100;
    
    	scope = 2;
    	displayName = $STR_DN_Mauser; //TODO
    	model="\random\random.p3d";
    	picture="\random\data\w_garand_ca.paa";
    	UiPicture="\CA\weapons\data\Ico\i_regular_CA.paa"; // TODO ICONS
    
    
    	handAnim[]={"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\LeeEnfield.rtm"};
    	dexterity = 1.61;	// 4kg weight
    	magazines[]={10x_303};
    
    	opticsDisablePeripherialVision = 0;
    	opticsPPEffects[]={};
    	distanceZoomMin=300;
    	distanceZoomMax=300;
    
    	minRange=0;minRangeProbab=0.10;
    	midRange=150;midRangeProbab=0.7;
    	maxRange=300;maxRangeProbab=0.05;
    
    	aiRateOfFire=8.0; //Rg 10.0;
    	aiRateOfFireDistance=600;
    	dispersion=0.0005;
    
    	class Library {libTextDesc = $STR_EP1_LIB_LeeEnfield;}; // TODO
    	descriptionShort = $STR_DSS_Mauser; // TODO
    
    	begin1[]={"Ca\Sounds_E\Weapons_E\Enfield\Enfield_4", db5, 1,1500};
    	soundBegin[]={begin1,1};
    	reloadMagazineSound[]={"Ca\sounds\Weapons\rifles\M1014-reload",db-40,1,20};
    	drySound[]={"Ca\sounds\Weapons\rifles\dry",db-40,1,10};
    
    
    	reloadTime=2;
    	backgroundReload = 1;
    	recoil = "recoil_single_primary_6outof10";
    	recoilProne = "recoil_single_primary_prone_5outof10";
    
    	value = 1000;
    };
    };

    Lastly, I also saw that my model was see-through or sort of turned inside out when loaded in game, but from my experience with other modding I think that its just because of how it was modeled (something to do with making normals consistent) before I imported it into Oxygen 2 as a .obj file, but if it is not that and for some other reason, then I'm just wondering if there is something that can be done in Oxygen 2 change that.

    http://s2.postimg.org/tx1iub2nd/2014_01_27_00001.jpg (112 kB)

    Sorry for making such a long post with a shit ton of questions, but from what I've seen there is really a lack of tutorials for certain types of Arma modding, so any type of help from anyone who knows would be greatly appreciated

    Thanks

×