Allow hiding optional dependencies

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Allow hiding optional dependencies

Post 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.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Allow hiding optional dependencies

Post 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.
thedarkbunny
Inserter
Inserter
Posts: 46
Joined: Mon Oct 23, 2017 10:46 pm
Contact:

Re: Allow hiding optional dependencies

Post by thedarkbunny »

In that case, personal preference would be a tilde.

Code: Select all

  "dependencies"    : [
    "~ the_other_mod >= 0.1.0"
    ]
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Allow hiding optional dependencies

Post by steinio »

I bet nobody would care why you add an optional dependency.

You just overcomplicating things...
Image

Transport Belt Repair Man

View unread Posts
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Allow hiding optional dependencies

Post 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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow hiding optional dependencies

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow hiding optional dependencies

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14368
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow hiding optional dependencies

Post by Rseding91 »

I've added this to my to-do for 0.17.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow hiding optional dependencies

Post by eradicator »

Rseding91 wrote:I've added this to my to-do for 0.17.
Thank you very much :).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14368
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow hiding optional dependencies

Post by Rseding91 »

It's now added for 0.17. It uses the form "(?)".
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow hiding optional dependencies

Post 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.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Allow hiding optional dependencies

Post by steinio »

How is this called? An optional optional dependency?

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

Transport Belt Repair Man

View unread Posts
Post Reply

Return to “Implemented mod requests”