Jump to content
bertishero

Problems creating ace compatibility files

Recommended Posts

So i'm going to start this off by saying i have no previous experience modding anything arma 3. But after finding out that some of the scopes in my modpack don't allow for ace adjustment i thought i would give it a go. After some time spend looking at other pbo's and the ace wiki i got my first mod working, a compat mod for ace and RKSL attachements. There is a small problem though i can't seem to fix niether do i have any clue how to. The scope works fine with ace adjustment but for some reason i'm still able to change the zeroing the vanilla way. what i'm asking is can anyone help my fix this or help me find a solution?

this is the code i used
 

class CfgWeapons {
	class ItemCore;
    class InventoryOpticsItem_Base_F; // ItemInfo base class
	class RKSL_optic_PMII_312 : ItemCore {
        ace_scopeZeroRange = 100; // Overwrites the ace_setting default zero range
        ace_scopeHeightAboveRail = 4.2235;  // Distance between center of scope and rail in centimeters
        ace_scopeAdjust_vertical[] = {-1, 12};  // Maxmimum vertical adjustment limits
        ace_scopeAdjust_horizontal[] = {-6, 6};  // Maximum horizontal adjustment limits
        ace_scopeAdjust_verticalIncrement = 0.1;  // Vertical increment
        ace_scopeAdjust_horizontalIncrement = 0.1;  // Horizontal increment
        class ItemInfo: InventoryOpticsItem_Base_F {
            class OpticsModes {
                class Snip {
                    discreteDistance[] = {100};
                    discreteDistanceInitIndex = 0;
                };
            };
        };
    };
};

 

Share this post


Link to post
Share on other sites

Is your requiredAddons entry in your CfgPatches correct? I can't see it in here.
Also I have already seen a RKSL compat elsewhere which should be doing exactly this already.

Share this post


Link to post
Share on other sites

Also, form memory the "vanilla method" requires you expand on this part:

                    discreteDistance[] = {100};
                    discreteDistanceInitIndex = 0;

to something like this:

		discreteDistance[] = {100,200,300,400,500,600,700,800};
		discreteDistanceInitIndex = 2;

In the above example, the rifle can be zeroed from 100m up to 800m at 100m increments. It defaults to 300m (i.e. 100m is 0, 200m is 1, 300m is 2 etc.).

Share this post


Link to post
Share on other sites
2 hours ago, Jackal326 said:

Also, form memory the "vanilla method" requires you expand on this part:

He wants to disable zeroing, not enable it.

Share this post


Link to post
Share on other sites

in the cfgpatches i put this

class CfgPatches{
	class ace_compat_RKSL_attachements{
		name="ACE3 - RKSL attachements compatibility"
		units[]={};
		weapons[]={};
		requiredVersion=3.00;
		requiredAddons[]=
		{
			"RKSL_PM_525",
			"RKSL_PM_II"
		};
		author="bertishero";
	};
};
#include "CfgWeapons.hpp"

i saw there was a copat file for the scopes while digging in the ace addon optional files but on the workshop there is no rksl ace compat or at least i couldn't find it. so i thought i could try and make one. I tried with the optional addon in the ace files and that one worked fine but i can't figure out why mine doesn't. and this point i'm too invested in trying to make it work so i know when i have to do something along the same lines in the future.

Share this post


Link to post
Share on other sites
5 hours ago, bertishero said:

but on the workshop there is no rksl ace compat or at least i couldn't find it

It's included in the ACE download.

Just compare yours against the ace one and find all differences.

 

5 hours ago, bertishero said:

requiredVersion=3.00;

uh. what? We are on version 1.92 currently.

Share this post


Link to post
Share on other sites

oh i though it was the required version of the required addons. I mean i could use the normal ACE aptional but i like having everything on the workshop makes it easier for me to share modsets and use em in my group. I know it isn't dificult to use local mods but some people are quite stupid. It was allready a pain for some to use a modset and don't get me started on getting TFAR to work for everyone (i know you are the current dev) i mean i like the mod and i want to use it but i've had so many issues with it that i will wait untill it is hopefully a bit more stable. when it comes to the compat file i checked the ACE one only thing i could find that it has is a script component file but i can't find the files it is references to i might ask a few friends to help me out and hopefully get it figured out.
 

#define COMPONENT compat_rksl_pm_ii
#define COMPONENT_BEAUTIFIED RKSL PMII Compatibility

#include "\z\ace\addons\main\script_mod.hpp"

#include "\z\ace\addons\main\script_macros.hpp"

 

Share this post


Link to post
Share on other sites
5 hours ago, bertishero said:

"\z\ace\addons\main\script_mod.hpp"

https://github.com/acemod/ACE3/blob/master/addons/main/script_mod.hpp

 

5 hours ago, bertishero said:

"\z\ace\addons\main\script_macros.hpp"

https://github.com/acemod/ACE3/blob/master/addons/main/script_macros.hpp

 

Comparing the RKSL compat code with yours looks like they are both identical. So no idea what's going wrong then.
Though I'd say your mod isn't being loaded at all when the requiredVersion is not supported.

Share this post


Link to post
Share on other sites
On 5/9/2019 at 5:03 PM, Dedmen said:

He wants to disable zeroing, not enable it.

Whoops! Misread the post 🙄

 

6 hours ago, Dedmen said:

[...]
Though I'd say your mod isn't being loaded at all when the requiredVersion is not supported.

I'm surprised it isn't throwing an error on starting the game tbfh...

Share this post


Link to post
Share on other sites

i changed that version later bc i thought it was for required addons before it was set to1.88 same as the ace one.

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

×