Jump to content
Sign in to follow this  
TraxusIV

Difficulty modding optics

Recommended Posts

Ok, so first off, disclaimer: I have no idea what I'm doing.

Now that that's out of the way, here's my problem: I'm trying to mod the optic_Hamr to give it night vision and thermal. Secondary goal is to increase the magnification and provide for multiple zeroing ranges. My motivation is that I'm impatient for a thermal scope, and this seemed like a tractable introduction for me to weapon/accessory making.

My approach was to create a config.cpp, rapify it, then pbo the whole thing and plunk it into a mod folder.

The contents of the config are below. Using EliteNess 2.93, the rapify and pbo creation went off without a hitch, the game loads perfectly, and even recognizes the mod in the little mod selection screen. But when I use an RCO (the Hamr's proper name) in game, I get no zoom, no nvg or thermal mode, and basically no indication that the mod took hold.

What am I most likely doing wrong?

Code here:

class CfgPatches
{
class TraxusIV_Hamr_TI_mod
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F"};
};
};
class cfgWeapons
{
class ItemCore;
class InventoryOpticsItem_Base_F;
class optic_Hamr: ItemCore
{
	class ItemInfo: InventoryOpticsItem_Base_F
	{
		class OpticsModes
		{
			class HAMR_scope
			{
				opticsID = 2;
				useModelOptics = 1;
				opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
				opticsZoomMin = 0.03615;
				opticsZoomMax = 0.0723;
				opticsZoomInit = 0.0723;
				memoryPointCamera = "opticView";
				visionMode[] = {"Normal","NVG","Ti"};
				thermalMode[] = {0,1};
				opticsFlare = 1;
				opticsDisablePeripherialVision = 1;
				distanceZoomMin = 300;
				distanceZoomMax = 0;
				cameraDir = "";
			};
		};
	};
};
};

Share this post


Link to post
Share on other sites

Ah, sorry about the misplacement. As I said I have no idea what I'm doing ;). Anyway, the distanceZoomMax = 0 is a typo. Supposed to be 300. I'll try changing the required addon and see if that makes it go.

---------- Post added at 09:09 ---------- Previous post was at 07:36 ----------

The "A3_Weapons_F_Acc" did the trick, thanks!

Share this post


Link to post
Share on other sites

Hey,

I hope my post won't be looked at like a flame thing or anything like that since I just registered right now cause I need some help myself with a scripting thing.

But if you are looking for Thermal Optics, Uncertain already uploaded some wich I think are really neat, I put them into my own mission and they really do their job.

Since you want your optics to be a little more individual (magnification and such) I think this won't help much. But I think if you take a look at them it may help you with your own modification.

And here goes the link Edit: I'm not allowed to post a link since I just registered, maybe someone else can put it up, Thermal/ NV Optics by Uncertain

I hope this might come in handy for your further progress.

Greetings, Porky243

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  

×