LavaGang / MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono
https://discord.gg/2Wn3N2P
Apache License 2.0
2.25k stars 461 forks source link

[Enhancement]: Steam Workshop Support #241

Open eterlan opened 2 years ago

eterlan commented 2 years ago

Describe the new feature or enhancement

Thanks for your great plugin! It would be nice if I can hide the console or customize Mod path in the user config file, how do you think about that?

slxdy commented 2 years ago

At the moment, it's already possible to hide the console using the --melonloader.hideconsole launch argument (however I still feel like it should be a config, and the configs themselves should become more exposed).

For the custom Mods path config, could you give a few examples to prove that it would be useful in any way?

TrevTV commented 2 years ago

You can change the main directory for all of MelonLoader's folders (including Mods) by giving a directory alongside --melonloader.basedir, though you still need version.dll in the game's directory to load it and have everything else in a different folder.

eterlan commented 2 years ago

At the moment, it's already possible to hide the console using the --melonloader.hideconsole launch argument (however I still feel like it should be a config, and the configs themselves should become more exposed).

For the custom Mods path config, could you give a few examples to prove that it would be useful in any way?

Thanks for reply! Actually I'm develop a game, and I would like to use Steam workshop, which use different folder in steamapp/workshop/xxx1/dll, so.. Another question is may I control which mod to load? Do you have any API to control this?

eterlan commented 2 years ago

You can change the main directory for all of MelonLoader's folders (including Mods) by giving a directory alongside --melonloader.basedir, though you still need version.dll in the game's directory to load it and have everything else in a different folder.

Thanks for reply! Good to know that.

loukylor commented 2 years ago

At the moment, it's already possible to hide the console using the --melonloader.hideconsole launch argument (however I still feel like it should be a config, and the configs themselves should become more exposed). For the custom Mods path config, could you give a few examples to prove that it would be useful in any way?

Thanks for reply! Actually I'm develop a game, and I would like to use Steam workshop, which use different folder in steamapp/workshop/xxx1/dll, so.. Another question is may I control which mod to load? Do you have any API to control this?

There is no set API, given that mods initialize sequentially, so it wouldn't make much sense to have a mod stop the initialization of another. However, a simple way to do this is to just use a plugin and move any mods you don't want to load can be moved out of the mod folder (possibly into a subfolder or completely separate folder).

Another way that gives more flexibility (like disabling mods at runtime) would be to create your own set of events for mods to subscribe to.