Page 1 of 1

Check for presence of other mods

Posted: Sun Apr 10, 2016 9:34 pm
by SirRichie
Hi,

what are possible ways to check for the presence of other mods (those that you may optionally depend on)?
You can -of course- check for the presence of one of the entities the mod in question adds to the game. But that only works for entity-creating mods.

Is there a generic interface? I thought there was but cannot find any kind of documentation on that.

Re: Check for presence of other mods

Posted: Sun Apr 10, 2016 9:56 pm
by Adil
Biggest amount of information is on wiki.
There's no single function which tells you "yes" or "no".
Generally, you expect the other mod to be doing something and can check whether this something was done. If no entity is added by mod then you're probably talking about some modifications.
Also, mods may export interface, RSO does that.
Probably most sensible solution would be asking the author of the mod to add a dummy interface to it.

Re: Check for presence of other mods

Posted: Mon Apr 11, 2016 5:14 am
by Rseding91
I've added read access to the active mods and the versions runtime for 0.13. For 0.12 the best you can do is check for a known entity/item from the other mod.

Re: Check for presence of other mods

Posted: Mon Apr 11, 2016 6:40 am
by SirRichie
Thanks for the replies.
I actually looked through the wiki and other mods' code. Problem being with negative search that it is hard to know that something actually does not exist.

Anyway, good news that it is available in 0.13 and I will check for entities in the meantime.