Jump to content

Recommended Posts

Hi.

How can I add requiredAddons to a mod? I know it should be added to the config.bin (or .cpp) and I know the structure should be something like this:

class CfgPatches
{
	class My_Mod
		{
			units[] = { };
			weapons[] = { };
			requiredAddons[] = {"CBA_Extended_EventHandlers"};
			version = "0.993";
			versionStr = "0.993";
			versionDesc= "My Mod";
			versionAr[] = {1,0,0};
			author[] = {"Me"};
		};
};

But I don't know where you get the name of the required mod from. For example, in the above code I don't know where the name "CBA_Extended_EventHandlers" comes from. (I know what it is though!)

Can someone please explain it to me?

Share this post


Link to post
Share on other sites

It's the cfgPatches classname of the config you are inheriting the item from.

The equivalent name of

	class My_Mod

in your above example

So if I was to make another mod that depends on your above mod i would have a cfgpatches like

class CfgPatches
{
	class da12thMonkey_addon
		{
			units[] = { };
			weapons[] = { };
			requiredAddons[] = {"My_Mod"};
			version = "2.00";
			versionDesc= "da12thMonkey's Mod";
			author[] = {"da12thMonkey"};
		};
};
  • Like 2

Share this post


Link to post
Share on other sites
15 minutes ago, da12thMonkey said:

It's the cfgPatches classname of the config you are inheriting the item from.

The equivalent name of


	class My_Mod

in your above example

So if I was to make another mod that depends on your above mod i would have a cfgpatches like


class CfgPatches
{
	class da12thMonkey_addon
		{
			units[] = { };
			weapons[] = { };
			requiredAddons[] = {"My_Mod"};
			version = "2.00";
			versionDesc= "da12thMonkey's Mod";
			author[] = {"da12thMonkey"};
		};
};

Thank you

Share this post


Link to post
Share on other sites
On 9/14/2017 at 3:10 PM, da12thMonkey said:

It's the cfgPatches classname of the config you are inheriting the item from.

The equivalent name of


	class My_Mod

in your above example

So if I was to make another mod that depends on your above mod i would have a cfgpatches like


class CfgPatches
{
	class da12thMonkey_addon
		{
			units[] = { };
			weapons[] = { };
			requiredAddons[] = {"My_Mod"};
			version = "2.00";
			versionDesc= "da12thMonkey's Mod";
			author[] = {"da12thMonkey"};
		};
};

 

My friend.

 

If my addon make use only of vanila Arma 3 content i can use requiredAddons[] = {};?

Share this post


Link to post
Share on other sites

Yeah. Most simply you can use

requiredAddons[] = {"A3_Data_F_Enoch_Loadorder"};

Which is the latest cfgPatches class for Arma 3, to ensure your data loads after all the BI data that you are referencing or modifying

  • Like 1

Share this post


Link to post
Share on other sites
On 11/3/2019 at 11:32 PM, BRPVP said:

If my addon make use only of vanila Arma 3 content i can use requiredAddons[] = {};?

No.

Guess @da12thMonkey 's "Yeah" was a typo and he really meant "No"

  • Like 1

Share this post


Link to post
Share on other sites

Indeed. I just read it as "I can use requiredaddons..." The {}; brackets implying an empty array, didn't register in my mind, sorry

You should have something in the array if you are inheriting properties from existing BI classes, just to ensure your addon is definitely loaded after all the BI stuff has been parsed

  • Like 2

Share this post


Link to post
Share on other sites

Thanks,

My last release was with {} and no problems at all, but i'm adding "A3_Data_F_Enoch_Loadorder" for the next release.

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

×