Jump to content
Sign in to follow this  
kerozen

Activate item only when addon is present

Recommended Posts

I want to make a reskin of some TFAR backpacks but i don't want to create a dependency to the main mod. Is there a way i can make it so the code only activates if TFAR is present in the load order?

Share this post


Link to post
Share on other sites

Yes, quite easily. When creating the addon, add TFAR to the "requiredAddons" inside your addon's CfgPatches class.

This will give you a small notification if you launch the game without TFAR, but the addon enabled, but the game will not load it, and there will be no issues with it.

 

Although I don't quite understand, what you are trying to achieve with this, since your addon would always require TFAR to properly work anyways...

Share this post


Link to post
Share on other sites

I asked with TFAR but i'm guessing it works for other mods too. Like ACE or CUP. We don't always use ACE or CUP in our missions so i don't want to create a dependency on those mods and only have the reskins and features available when they are loaded.

 

Thanks for the help

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  

×