Page 1 of 1

Add conditional Dependency for mod

Posted: Wed Apr 25, 2018 4:14 am
by usafphoenix
Would it be possible to add a new operand for declaring a dependency of one mod IF another mod is enabled?

During some of my debugging for cross-compatibility between mods, i come across a mod that was written in such a way that normally it doesn't interact with mod-B, but if a check for mod-C is true, it then EXPECTS mod-B to exist, which causes the game to crash. we already have mandatory dependency, and optional dependency, but there may be some cases where we want to check if a certain mod exists, change our mod a certain way, which then makes another mod REQUIRED. this, i understand, would require a new operand to be implemented, but could solve some edge-case issues modders and debuggers come across.

(and before anyone states, "well that mod is just written poorly": Yes, you are right, but sometimes these things happen. Especially when a list of mods by a single author are produced but a player chooses to play with only some of them. Nested If-elseIf statements can fix any/all problems that NOT having a conditional-dependency option in the info.json of a mod, but also: all that can be avoided, too, by simply having a single check-IF before loading the mod. )

Re: Add conditional Dependency for mod

Posted: Wed Apr 25, 2018 6:07 am
by Arch666Angel
That is something a mod author has to take care of: erroring out because of false assumptions is a matter of not enough or wrong logic writing up the mod code in the first place (yes I have a lot of experience producing these errors :) )