DummyCore

DummyCore

1M Downloads

mcmod.info file missing

QORTEC opened this issue · 6 comments

commented

There is no mcmod.info file included with Dummy Core 1.13.

I have scripts that automatically process mods based on the information in the mcmod.info file...
If you could add a mcmod.info file for the next release it would be helpful.

commented

There is no mcmod.info file in any of my mods. Is it really necessary? I do not want to mess with my gradle.build files to make it create mcmod.info for me... I guess that(messing with my gradle.build files to make it create mcmod.info) really should not be that big of a problem though...

commented

mcmod.info is not technically necessary, however it is best practice to include one.

The mcmod.info file is responsible for providing the following useful information:
modid: ID of mod [name without spaces]
name: The mods name (can use spaces... stylized however you like)
version: mod version
mcversion: version of minecraft
url: main website for the mod
dependencies: a list of mods that are required for this mod to work [list of modids]

The dependencies is especially, when a mod is missing that you depend on your mod wont crash Minecraft, instead forge will display a message that a required mod is missing and the player should add that mod in order to load the game.

As you can see the mcmod.info is written in json.

[{
  "modid": "DummyCore",
  "name": "DummyCore",
  "description": "DummyCore is an API used by DummyThinking team to make mods...",
  "version": "${version}",
  "mcversion": "${mcversion}",
  "url": "http://minecraft.curseforge.com/projects/dummycore",
  "updateUrl": "",
  "authorList": ["Modbder"],
  "credits": "",
  "logoFile": "",
  "screenshots": [],
  "dependencies": []
}]

As you can see I used ${version} and ${mcversion} these are variables that are automatically replaced with the correct information when you build your mod using gradle.

commented

I know how they are created, I was just asking if it is really needed. Sure, I will make my gradle.build to include them automatically.

commented

Based on the high quality of your mods I though that you probably knew how gradle and mcmod.info works... I prefer to give more information then less.

If the mcmod.info file is missing then mod will try to load normally, Forge will kick up a small one line error saying that it couldn’t find that file, and when Minecraft is fully loaded your mod will not be displayed in the mods list.

The only real benefit [for you the author] for including a mcmod.info file is that people will stop bugging with bug reports when a dependency is missing, since forge is supposed to stop loading upon noticing the missing dependency and notify the user.

There are a few people like me who wrote scripts that read the mcmod.info file inside the mod to retreave key information, I use modid, version, mcversion. Upon retrieving this information my script stores the jar and creates necessary symbolic links... If it's missing it causes a minor annoyance since I need to manually declare the information for each file using an override...

commented

[quote]
The only real benefit [for you the author] for including a mcmod.info file is that people will stop bugging with bug reports when a dependency is missing, since forge is supposed to stop loading upon noticing the missing dependency and notify the user.
[/quote]

They are not bugging me, and they will not - forge allows dependencies to be set in the @mod annotation.

[quote]
and when Minecraft is fully loaded your mod will not be displayed in the mods list.
[/quote]

The mod does get displayed anyway. It will display something like "ask the mod author to provide a mcmod.info" there, but not for me - I am generating the ModMetadata object for the forge 'on the fly'
https://github.com/Modbder/DummyCore/blob/master/DummyCore/Core/CoreInitialiser.java#L63

But sure, I have to change the version numbers in the script anyway, so it should be very simple for me to make gradle generate one, if that helps you.

commented

I think that I have managed to make my build script include one bu default. Feel free to open the issue if it fails ;)