Add conditional Dependency for mod

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

usafphoenix
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Sun Aug 06, 2017 9:42 am
Contact:

Add conditional Dependency for mod

Post 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. )
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: Add conditional Dependency for mod

Post 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 :) )
Post Reply

Return to “Ideas and Suggestions”