Jump to content
Sign in to follow this  
CameronMcDonald

Weapon Import Woes

Recommended Posts

Hey everyone,

It's been a long time (early ArmA 1) since I touched weapon modding. I was working on getting a good friend's ( :) ) weapon ingame and working OK, but have run into some problems.

Firstly, how in the hell do I fix this?

Boobs.

- I've had a thorough look at the model. The proxy is the standard ca/weapons/zasleh2_proxy (which won't load in O2, by the way... error 48 or something) and it is defined as zasleh, so why in tarnation is it all the way over there, and why won't it bugger off when it's supposed to?

...kind of reminds me of the ole 1.96 Resistance errors, but I never had to deal with that.

---------- Post added at 08:57 PM ---------- Previous post was at 08:36 PM ----------

I'll get my config up shortly. Done some searching here, so I may solve it shortly.

---------- Post added at 09:10 PM ---------- Previous post was at 08:57 PM ----------

...sorted. :D

Share this post


Link to post
Share on other sites

Can you post your solution too? Someone else could find it useful when they have similar issues ;).

Share this post


Link to post
Share on other sites

Solution was as follows:

A weapon needs to be recognised by the game as being, well, a weapon, therefore:

class CfgPatches 
{
class YOURWEAPON {
units[] = {};
weapons[] = {"YOURWEAPON"};
requiredVersion = 1.05;
requiredAddons[] = {"CAWeapons"};
};
};

...is required so that the game understands this most important fact. Now, the muzzleflash selection, "zasleh," is hardcoded into the game as being the muzzleflash. If not inherited by your weapon, the game will treat it as just another part of your model rather than the muzzleflash (hence it never goes away).

So, straight after the above code, we write:

class CfgSkeletons 
{
class YOURWEAPON
	{
	isDiscrete=0;
	skeletonInherit="";
	skeletonBones[]=
		{
		"trigger", "",
		"bolt", "",
		"bolt_catch", "",
		"magazine", "",
		};
	};
};

class CfgModels
{
class Default { sections[] = {}; sectionsInherit=""; };
class Weapon: default {};
class YOURWEAPON:Weapon 
	{
	skeletonName="YOURWEAPON";
	class Animations {};
	sections[]={"zasleh"};
	sectionsInherit="";
	};
};

This ensures your weapon has the zasleh inherited and therefore, should work. Be advised that the skeleton bit up there is a bit more extensive than it needs to be with regards to bones, etc.

As a final point, try and keep your names in the config and P3D the same - there are some which MUST be the same as your P3D. For example, I found it easiest simply to use CWR_XM177E2 in this case in the place of YOURWEAPON.

Share this post


Link to post
Share on other sites

Blargh, as much as I hate double-posting, it's better than double-topic'ing.

Now I have a very strange problem. The muzzleflash is working correctly (i.e., it appears when I shoot and disappears when I stop shooting). However, the first time I run the game (I usually start up in the editor to test), when shooting, the muzzle flash appears... not on the gun, but over there, in the grass.

It's kind of similar to what's going on in the first picture, except it appears/disappears when shooting (like it should).

The second time I run the game it appears perfectly correctly (on the rifle's end, and only when shooting).

Anyone got any ideas on how to fix this?

EDIT - Cancel my life, binarising fixes this error nicely. :D

Edited by CameronMcDonald

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  

×