Posted August 26, 201312 yr Hey guys, I want to make my mod modular, so people just install whatever parts they want. Is there anything special I'd need to do? Does each module need to be its own "mod"? http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
August 26, 201312 yr I'd look into Build Craft, that should give you some clues. I haven't looked into it myself yet but I figure each module is a mod with dependency on the core module If you guys dont get it.. then well ya.. try harder...
August 26, 201312 yr pretty much, just put everything in common in a core mod (different meaning of core then like those who change the code at runtime ) kinda like how buildcraft used to be, you install the core and you add wtv you want after how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 30, 201312 yr Author BC Isn't modular any more though is it? I don't remember it ever being modular in fact... Is there any other open-source mods which are modular? The main thing I need is "disable X if Y module isn't installed". For example, one of my modules will be an economy system. If that's installed, then everything else should have a pre-defined value - so obviously I don't want it to crash when X module isn't installed I want those values to be set within the module, so say I have a module called Food, then a burger should tell Economy how much it's worth, not Economy saying the burger is worth X. That way other people could theoretically make modules to work with my mod too. That's just a simple example, I could probably just use a variable for that but hopefully you get what I mean. http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
August 30, 201312 yr Use FML inter mod message system with IMCEvent ? Make an abstract core and only implement in modules ?
August 30, 201312 yr meh, for the burger example, i would simply make a config files "id -> price" and if you want to check if something is installed: boolean economyPresent = false; try{ Class.forName("com.flenix.economy.Core") economyPresent = true; }catch(Exception e){ println("economy mod not present, skipping") } if(economyPresent){ loadEconomyMod() } how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.