Wolfmyths/Myth-Mod-Manager

Mod type detection

Opened this issue · 3 comments

When installing a mod via MMM, what if there was a way to tell what type of mod it is automatically.

I don't know enough about payday 2 modding to know.

There are ways to tell, but differentiating between overrides and maps can end up being a bit hacky.

A mod will always have a mod.txt file (duh), but it can have a main.xml or add.xml or supermod.xml.

An override doesn't have a mod.txt file, but it can have a main.xml and/or add.xml or neither.

A map will always have a main.xml.

Essentially, check the top level directory of the folder. If there's a mod.txt, it's a mod. If there's no mod.txt or main.xml, it's an override. If there's a main.xml and it contains a 'level' tag, then it's a map, else it's an override.

This mod_overrides mod has a mod.txt and a main.xml though :(
https://modworkshop.net/mod/40788
image

That mod.txt doesn't do anything, I think it was an artifact the mod author left in while testing, because the lua hook handled in the mod.txt is handled in the main.xml as well.