Page 1 of 1

Allow hiding optional dependencies

Posted: Thu Jun 21, 2018 3:24 pm
by eradicator
What?
Allow specifying an optional dependency that is not shown in the in-game mod menu.

Why?
Sometimes fixing a cross-mod bug requires forcing a specific loading order. Mostly because the_other_mod does a too generic change in data-final-fixes (very few mods use data-updates). For example the_other_mod can do something like this:

Code: Select all

--unconditionally add a new crafting category
--messes up special player types that are supposed to have limited crafting
for _,x in pairs(data.raw.player) do
  table.insert(x.crafting_categories,'new-stuff-x')
  end
If the author of the_other_mod is unwilling or unavailable to implement a better solution then i have to force my mod to load after it, which requires using an optional dependency.

What's the problem?
The problem is that an optional dependency suggests that my mod a) does something positive when i detect the_other_mod, and b) that i endorse using the_other_mod, when infact the opposite might be the case. Thus i would like to make the dependency invisible. Could be as simple as specifying ! instead of ?.

Code: Select all

  "dependencies"    : [
    "! the_other_mod >= 0.1.0"
    ]
As this is a pure GUI change i hope it can be fit into the rewrite :). Thank you for reading.

Re: Allow hiding optional dependencies

Posted: Thu Jun 21, 2018 6:02 pm
by orzelek
Might be useful but exclamation mark is already taken.
Using it means that your mod is incompatibile with that mod and should be disabled if it's present.

Re: Allow hiding optional dependencies

Posted: Thu Jun 21, 2018 6:18 pm
by thedarkbunny
In that case, personal preference would be a tilde.

Code: Select all

  "dependencies"    : [
    "~ the_other_mod >= 0.1.0"
    ]

Re: Allow hiding optional dependencies

Posted: Thu Jun 21, 2018 6:34 pm
by steinio
I bet nobody would care why you add an optional dependency.

You just overcomplicating things...

Re: Allow hiding optional dependencies

Posted: Fri Jun 22, 2018 9:54 am
by bobingabout
Optional dependancies are actually a huge pain in the arse...

I added DyTech as optional to force his mods to load first if they exist, next thing I know, I have people complaining that they can't play my mods because they can't get hold of a required mod, DyTech... it just really confuses people when the game tells them that it's a dependancy. Gamers don't care about optional dependancies, modders care about them, and they can see those by opening into.json.

Additionally, the option to not load if another mod is present is also a good thing that could be added.

Re: Allow hiding optional dependencies

Posted: Fri Jun 22, 2018 9:57 am
by Bilka
bobingabout wrote:Additionally, the option to not load if another mod is present is also a good thing that could be added.
That already exists, use a ! in front of the mod name.

Re: Allow hiding optional dependencies

Posted: Fri Jun 22, 2018 1:41 pm
by eradicator
bobingabout wrote:I added DyTech as optional to force his mods to load first if they exist, next thing I know, I have people complaining that they can't play my mods because they can't get hold of a required mod, DyTech... it just really confuses people when the game tells them that it's a dependancy. Gamers don't care about optional dependancies, modders care about them, and they can see those by opening info.json.
Thanks for your support! Hopefully your word carries more weight than mine :).
As for the symbol i don't really care what is used, there's lots of unused ones left.

Re: Allow hiding optional dependencies

Posted: Fri Jun 22, 2018 2:10 pm
by Rseding91
I've added this to my to-do for 0.17.

Re: Allow hiding optional dependencies

Posted: Fri Jun 22, 2018 2:14 pm
by eradicator
Rseding91 wrote:I've added this to my to-do for 0.17.
Thank you very much :).

Re: Allow hiding optional dependencies

Posted: Sun Jun 24, 2018 4:55 pm
by Rseding91
It's now added for 0.17. It uses the form "(?)".

Re: Allow hiding optional dependencies

Posted: Sun Jun 24, 2018 10:19 pm
by eradicator
Rseding91 wrote:It's now added for 0.17. It uses the form "(?)".
Great, i wasn't sure if multi-symbol was an option. But that fits perfectly.

Re: Allow hiding optional dependencies

Posted: Mon Jun 25, 2018 2:42 pm
by steinio
How is this called? An optional optional dependency?

So i demand an optional incompatible flag '(!)'