Konijima Posted March 4, 2022 Share Posted March 4, 2022 Would be great to have an option in the `mod.info` to prevent my mod of loading if an other mod ID is found to be enabled. This way we can have multiple mods into a single workshop project that offer different flavor without overwriting each other when people auto-enable them all. Example: disableIf=OtherModID name=FlavourRed id=FlavourRed disableIf=FlavourBlue disableIf=FalvourYellow AuthenticPeach and Tchernobill 2 Link to comment Share on other sites More sharing options...
AuthenticPeach Posted March 4, 2022 Share Posted March 4, 2022 Yeah I would definitely have some uses for this. Often I get request for a certain "flavor" of the mod I created. I want X without these features, so I make a separate module and I tell them to choose either or. But things get auto enabled or they don't read. So it would be good if we have this as an opposite function to "require". Link to comment Share on other sites More sharing options...
Tchernobill Posted March 16, 2022 Share Posted March 16, 2022 function isModEnabled(modname) local actmods = getActivatedMods(); for i=0, actmods:size()-1, 1 do if actmods:get(i) == modname then return true; end end return false; end if not isModEnabled("AuthenticZ") then --do my conditional stuff here only if AuthenticZ is not loaded aside this mod end Not sure this is what you want but I think it is what you ask. You'll have to put it in all your lua files and it also requires you Never override file names. but as you should already not override whole files, I guess it's ok. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now