I got this idea browsing Steam forum.
Instead of adding modules directly, it is logical to add mod support as soon as possible and then just add workshop support.
To tell you the truth I don't like the idea that game simply loads classes form mods folder (at least it seemed that way). Isn't it possible to write a trojan or spam bot as a loadable part of the game this way??? I suppose, mods folder should always be composed of (and limited to) raw data like images, sound files, configuration files and be processed by the game on load (or some other way... I'm not a game dev, sorry).
@Zark If you don't think of adding mods before it is planned, at least write what do you think about steam workshop... they say it's not that tricky.
I've been thinking about modding and workshop support a fair amount recently. So first, I absolutely agree that loading classes from the mods folder is a scary way of doing modding. You have to absolutely trust the modder not to write malicious code.
So I could create a modding system that simply lets you add data-driven mods, adding new modules mostly. OTOH, every single mod that's been made or announced so far would be impossible to do in a purely data-driven way. And there's a big example of a modding community that uses Java source code modification and seems not to have suffered by it too much: Minecraft.
Finally, Steam Workshop support is something that has to occur at some point. Annoyingly, the Steam API is only available in C++ and Steampuppy, the Java library I use for talking to Steam, doesn't have workshop support. So I'm going to have to extend it to do so, or see if I can use the web Steam API, or something.
Hmm... Let me think...
Okay, you are right, java-code mods are better. But, you can add some limits. For example, "load only" filter or "don't load" filter. Other option is to make some page on your site where all mods will be checked for maliciois code by some trusted people. Or may be there can be other filter to what the app can do... Like mods can write only to mods folders... The problem is, I don't see any easier way now. May be it's ok just to let people do what they want... Trust pays off. Yea, there are some magnificent mods on Minecraft.
The workshop seems easier =D There was a way to add C++ code into java. It slows things down, but works. (at least it is possible on android api. not sure about java itself, sorry) Also web is a fine idea. What's the problem to make down-/upload system?
It's harder to make mods cooperate (remember MineCraft's Forge?). Like if 2 mods add the same file but with different values... But, it's not about Workshop already. For the beginning u may make single mod at the same time (like a prostitute, it sucks but works).
What a mess... Sorry, I have a headache.. And legs hurt too.. And arms.. And everything else too. Ahh.. better I go eat smth =D
Er. Yeah, you can call C++ from Java, I just don't have much experience with it, and I need to make it work cross-platform too, sigh.
Don't worry. I'm ok)
Hmm... Then easiest way is to use web option.