Jump to content
Sign in to follow this  
Donny

Custom Weapon Item - Model.cfg

Recommended Posts

Hello,

after some searching the forums I have only found questions about how to make attachements working on the weapons.

So I create this to ask for help, if someone of you knows what I am doing wrong.

I have made my own Weapon model and an own Optics model.

My Problem is, the Optic is available in the Inventory, but it can not get assigned onto any weapon - the Iteminfo changes to red when I want to drag and drop it onto the rifle.

(A3 Attachements are working on my own weapon - btw)

I tried that with a pre configured weaponclass and with putting the optic via init line into the soldiers gear.

I have tried two different ways to include it with the model.cfg, one times as weapon and another time as default - but nothing changes it its behaviour even a missing model.cfg dont changes something.

Is there a memory point on the p3d I am missing? Or is there a special way to define it at the model cfg?

As I have deleted my model.cfg with the last try I cant show it up at the moment, but here is my config entry:

class cfgWeapons
{
	class ItemCore;
	class InventoryOpticsItem_Base_F;	
	class doy_idz_ZF: ItemCore
	{
		scope = 2;
		displayName="IDZ ZF + RSA 1 Optic";
		picture="\A3\weapons_F\Data\UI\gear_acco_Arco_CA.paa";
		model = "\doy\idz-weapons\attachements\doy_idz_ZF";	
		weaponInfoType = "RscWeaponZeroing"; 
		class ItemInfo: InventoryOpticsItem_Base_F
		{	
			mass = 7;
			modeloptics = "\doy\idz-weapons\attachements\doy_idz_Optik_G36";
			memoryPointCamera = "eye";
			class OpticsModes
			{
				class doy_idz_zf_optics
				{
					opticsID = 1;
					useModelOptics = true;
					opticsPPEffects[]={"OpticsCHAbera1","OpticsBlur1"};
					opticsZoomMin = 0.0555;
					opticsZoomMax = 0.1300;
					opticsZoomInit= 0.1300;
					discreteDistance[] = {100,300,400,500,600,700,800,900,1000};
					discreteDistanceInitIndex = 1;	
					distanceZoomMin = 100;
					distanceZoomMax = 1000;	
					nFovLimit = 0.07;
					discretefov[] = {0.1300,0.0555};
					discreteInitIndex = 0;						
					modeloptics = "\doy\idz-weapons\attachements\doy_idz_Optik_G36"; 
					memoryPointCamera = "opticView";
					visionMode[] = {"Normal"};
					opticsFlare = true;
					opticsDisablePeripherialVision = true;
					cameraDir = "";
				};
				class doy_idz_rsa_opt: doy_idz_zf_optics
				{
					opticsID = 2;
					useModelOptics = false;
					opticsFlare = false;
					opticsDisablePeripherialVision = false;
					opticsZoomMin=0.375; 
					opticsZoomMax=1.1;  
					opticsZoomInit=0.75;
					memoryPointCamera = "eye";
					visionMode[] = {};
					discretefov[] = {};
				};	
			};
		};
	};
};

I hope it is just a small thing to fix.

Cheers, Donny.

Share this post


Link to post
Share on other sites

I tried this as well, but it is not working.

As references I took also the Config entries from the A3 Optic Items in the Six Config Browser.

Does it something to do with the WeaponInfotype?

I take "RscWeaponZeroing" for it as in the origninal scopes too.

And still the same, Item appears as Item but is not attachable.

Share this post


Link to post
Share on other sites

Do you have a class WeaponSlotsInfo for your weapon that contains the classnames of your new attachments?

	class WeaponSlotsInfo : WeaponSlotsInfo {
		class MuzzleSlot : SlotInfo {
			linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
			compatibleItems[] = {"list of muzzle items"};
		};

		class CowsSlot : SlotInfo {
			linkProxy = "\A3\data_f\proxies\weapon_slots\TOP";
			compatibleItems[] = {"list of optics"};
		};

		class PointerSlot : PointerSlot {
			linkProxy = "\A3\data_f\proxies\weapon_slots\SIDE";
			compatibleItems[] = {"list of attachments"};
		};
	};

Share this post


Link to post
Share on other sites

Well I know when you make custom weapons you have to define in the weapon config what specific sights, muzzles, and side pointers are compatible for each weapon. Maybe this could be the problem

Share this post


Link to post
Share on other sites

Oha that works, thank you for that! http://i.imgur.com/Sd8oGO6.jpg

So, it is unpossible to use Custom Optics and attachments on A3 Weapons?

Because this Optic only works on my Weapon now, or maybe it is in need of a little patch config entry for alle A3 weapons to get the custom ones working?

In the other way, you can attache every Item on your weapon without this definition - strange.

But, it is working and this was really the last thing I was thinking about!

Thanks!

Share this post


Link to post
Share on other sites

It's possible to 'patch' the BIS weapons to use your attachments but it'll create conflicts with other addons that attempt to do the same.

Share this post


Link to post
Share on other sites

The issue with BI weapons and custom attachments is due to how the current attachment compatibility system works -- the simplest way to think of it would be "whitelisting" instead of "blacklisting", although in practice it's more "this weapon is compatible with these specific attachments and no others" instead of "this weapon is compatible with any attachments that meet certain requirements" (i.e. mounting type of Picatinny rail).

Currently this means that an attachment is not automatically compatible with a weapon unless it's specifically added to that weapon's compatibility list; as an example, GvsE had to release an alternate config for the MP7 (GvsE's port of Christian.1987's MP7) specifically for compatibility with FHQ Accessories and R3F's weapons & accessories pack.

Share this post


Link to post
Share on other sites

You are right, it is a good question what is better.

But some simple Otpics and Laser/Flash attachements are compatible to the most weapons and also adjustable because the 22mm Picatinny Rail is very common.

Maybe it would be some Ticket worth to make it easier - but again from another point of view, when creating a weapon you create its normal optics to it to have them for this weapon and I think people who are going to use this are not going to use the Optics on other weapons?

Share this post


Link to post
Share on other sites

Nice, I was searching if there is one existing at the moment :)

Thanks

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  

×