JamesWilko / Payday-2-BLT-Lua

Mods folder that controls the ingame aspects of the Payday 2 BLT.
MIT License
16 stars 26 forks source link

Check mod id for dependencies #48

Closed Luffyyy closed 7 years ago

Luffyyy commented 7 years ago

Mods like BeardLib no longer use paydaymods updating method and because of that mods that define BeardLib in their dependencies still get an alert that the dependency is not installed, so to solve it we can simply check the id of the mod.

BangL commented 7 years ago

this is a very bad solution, to be honest.

  1. the mod identifier of the mod is not the same as the update identifier at all. (the fact that it is the same string in beardlib, does not mean this is true for all mods)
  2. this dependency check was made to auto-solve missing dependencies. so anything else than the update identifier would not make sense at all, since the blt wont be able to solve the missing dependencies anyways, it does not know how or where to download it.

i can kinda see why beardlib step away from the blt updater though. in my opinion the most elegant solution would be to introduce actual beardlib "compatibility" into the blt, by adding a special case into the blt's dep. check: when "beardlib" is found, create a fake download query which actually downlods beardlib from its non-blt url and installs it. of course the user should get a proper warning/info about whats happening here.

this would make sure the beardlib dep can still be solved by the blt, and anything after that is out of its hand. (the beardlib should maybe introduce its own dep-solve process as well then, since we have a second layer of possible dependencies now)

Luffyyy commented 7 years ago

I Don't like the idea of doing a special case because it's library which is supposed to be separated. Two possible solutions if you don't like this one:

  1. A different key for dependencies check(this would be inside BeardLib's mod.txt), for example dep_id, update_id, etc.

  2. Mods will need to provide an exact link(inside the dependencies array) which BLT will download the mod from again BeardLib would have the link defined inside the mod.txt so it can check.

I don't mind that BLT would just tell the user that he doesn't have that mod and it cannot solve it, most people should know what dependencies they need for the said mod.

BangL commented 7 years ago

A different key for dependencies check(this would be inside BeardLib's mod.txt), for example dep_id, update_id, etc.

there you go.. that new PR should cover what you need then ;)