Check for presence of other mods

Place to get help with not working mods / modding interface.
Post Reply
SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Check for presence of other mods

Post 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.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Check for presence of other mods

Post 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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13219
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Check for presence of other mods

Post 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.
If you want to get ahold of me I'm almost always on Discord.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Check for presence of other mods

Post 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.

Post Reply

Return to “Modding help”