kuplion

[Release] Fix ASDG JR / CBA Attachment Compatibility at Traders

26 posts in this topic

Nothing too fancy here, just a quick edit to fix weapon/attachment compatibility at Traders when using ASDG JR. Thanks to @happydayz for answering my Qs and pointing me in the right direction when I was being a n00b.

ASDG JR Version:

CBA Version:

Tested with a Black MXM in the screenshots.

Before:

UNMiMD8.jpg

After:

20Tdm9R.jpg

Installation

Exile.MapName/config.cpp example:

class CfgExileCustomCode 
{
	/*
		You can overwrite every single file of our code without touching it.
		To do that, add the function name you want to overwrite plus the 
		path to your custom file here. If you wonder how this works, have a
		look at our bootstrap/fn_preInit.sqf function.

		Simply add the following scheme here:

		<Function Name of Exile> = "<New File Name>";

		Example:

		ExileClient_util_fusRoDah = "myaddon\myfunction.sqf";
	*/
	
      // ASDG / CUP Compatible Gear
      ExileClient_util_gear_getCompatibleWeaponItems = "Custom\ASDGCompatibleGear\ExileClient_util_gear_getCompatibleWeaponItems.sqf";
      ExileClient_util_item_getCompatibleWeaponItems = "Custom\ASDGCompatibleGear\ExileClient_util_item_getCompatibleWeaponItems.sqf";
    
      // One or the other here, not both..      
          
      // CBA Compatible Gear
      ExileClient_util_gear_getCompatibleWeaponItems = "Custom\CBACompatibleGear\ExileClient_util_gear_getCompatibleWeaponItems.sqf";
      ExileClient_util_item_getCompatibleWeaponItems = "Custom\CBACompatibleGear\ExileClient_util_item_getCompatibleWeaponItems.sqf";
	
}; 

9qfBKkr.png

And copy the files to here:

WCnm7ou.png

Edited by kuplion
Uploaded to Github..
  • Like 8

Share this post


Link to post
Share on other sites
{
	_getcompatibleItems = [_weaponClassName, _x] call asdg_fnc_compatibleItems;
	_compatibleItems append _getcompatibleItems;

}forEach [101,201,301,302];

You can change this to  (slightly faster)

[_weaponClassName] call asdg_fnc_compatibleItems;


Nice find/fix

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement
32 minutes ago, Torndeco said:

{
	_getcompatibleItems = [_weaponClassName, _x] call asdg_fnc_compatibleItems;
	_compatibleItems append _getcompatibleItems;

}forEach [101,201,301,302];

You can change this to  (slightly faster)


[_weaponClassName] call asdg_fnc_compatibleItems;


Nice find/fix

Thank you. I'll update it.

Someone else figured this out for CBA but I've just swapped it out for ASDG, but thank you. :)

Share this post


Link to post
Share on other sites

Once again @kuplion great work man. I always have players asking my admins/me why there is only a few attachments that work for each gun when there are tons of attachments to choose from. It's such a hassle explaining to them the whole ordeal. This is a very helpful/needed script that works flawlessly with all the mods that I have running. Mods with attachments/weapons I run are as follows: 

-FHQ Accessories 

-RHS: AFRF

-RHS: USAF

of course the Exile and Arma attachments/weapons work as well

10/10 :monkey:

 

  • Like 1

Share this post


Link to post
Share on other sites
On 10/20/2016 at 4:46 AM, kuplion said:

OP updated to include CBA attachment fix too.

Doesnt work with CUP=( I am using CBA as well. I tested it... I took cup off and left cba on it seems to work fine, So something with cups Cfgs maby?

Edited by DIamond

Share this post


Link to post
Share on other sites
8 hours ago, DIamond said:

Doesnt work with CUP=( I am using CBA as well. I tested it... I took cup off and left cba on it seems to work fine, So something with cups Cfgs maby?

It should work with CUP unless they've drastically changed something, as I used to use this code with CUP.

I'll double check I've not made a mistake somewhere and get back to you.

EDIT: Just to confirm, is it the traders that aren't working, or compatibility when trying to attach a attachment to a weapon? Can you check whether the AMS (Black) shows as compatible (in the traders) with the Black MXM for you?

Edited by kuplion
  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, kuplion said:

It should work with CUP unless they've drastically changed something, as I used to use this code with CUP.

I'll double check I've not made a mistake somewhere and get back to you.

EDIT: Just to confirm, is it the traders that aren't working, or compatibility when trying to attach a attachment to a weapon? Can you check whether the AMS (Black) shows as compatible (in the traders) with the Black MXM for you?

I tried it and got this.    compatibility when trying to get a attach attachment to a weapon

http://images.akamai.steamusercontent.com/ugc/245836995517710794/DFCEB3F8C7C2829949D6D8819CB12AB880C32214/ 

Edited by DIamond

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.