Page 1 of 2

Mod filename rules for 0.10.7 and later

Posted: Thu Aug 14, 2014 9:53 am
by cube
Starting with 0.10.7, we are adding more strict mod filename rules.

In versions <= 0.10.6, the mod name was determined only from the filename. this means that mod in file FooMod.zip was called FooMod and mod in directory BarMod/ was called BarMod, regardless of the content of their info.json file.
0.10.7 has two changes:
1) Mod filename must match the name from info.json. This check is case sensitive We silently supposed that this would happen for all mods, it should have been made more clear ... now you will get a very uncompromising error message :-)
2) Mod filename may optionally contain version number separated by underscore. If the version number is present, it must again match the version from info.json.

The filename format without version number is deprecated since 0.10.7 and will eventually (in 0.11.0, probably) be completely disabled.


Edit:
Sorry, I should have explained it better.
example

Also we would like to make a recommendations for mod names, so that your mod directory looks a little cleaner.
Our current idea is lowercase mod name with minus signs separating words and underscores separating modules i.e. my-super-mod_planes-and-helicopters_6.4.16.zip. Discuss

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Aug 14, 2014 10:02 am
by drs9999
Sounds legit.

What happens if the user/player has installed 2 version of the same mod?
E.g. my-mod_1.0.0 and my-mod_1.1.0 ?

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Aug 14, 2014 12:52 pm
by cube

Code: Select all

14:51:33 Error None: Duplicate mod example-mod.

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Aug 14, 2014 1:56 pm
by drs9999
Ok, thx

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Aug 15, 2014 3:05 pm
by Holy-Fire
WTF... Now instead of being able to relax and play the game, I get a ton of error messages which I have no idea how to fix. I changed the mod folder, now there's something about the graphics...

I guess it's my fault for not reading the changelog before upgrading, but I didn't expect something that will make the game unplayable.

Oh well, at least I managed to downgrade successfully until I can sort this out.

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Aug 15, 2014 8:45 pm
by safan
to solve this, don't change the name of the directory, but open the json file and change the name of the mod to what the directory is named

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Aug 15, 2014 9:22 pm
by bobingabout
I could do with a better explanation for how the version number requirement in directory/zip file name.

if I understand correctly, naming the directory exactly the same as listed in the info.json file will work fine.
naming the zip file the name_#.#.#.zip is needed to work, where #.#.# = the version number in the info.json file.

is this accurate, or is the version number required for directories too?

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Aug 15, 2014 9:24 pm
by bulldog98
bobingabout wrote:I could do with a better explanation for how the version number requirement in directory/zip file name.

if I understand correctly, naming the directory exactly the same as listed in the info.json file will work fine.
naming the zip file the name_#.#.#.zip is needed to work, where #.#.# = the version number in the info.json file.

is this accurate?
If you mean the folder within a zip it's as far as I've seen right, but if you have bare folders you need to name them also name_#.#.#

Re: Mod filename rules for 0.10.7 and later

Posted: Sat Aug 16, 2014 3:08 am
by bobingabout
Well, I'm going to stick to the "old" method for now, MAYBE adding a version number to zip files, and just say the mods are for 0.10.x, since it is an optional thing in 0.10.7.
Then if they break in 0.11.0, well, most mods broke from 0.9.8 to 0.10.0 anyway, so, I'll just release them in the new format when 0.11.0 hits, as I did from 0.9.8 to 0.10.0.

Re: Mod filename rules for 0.10.7 and later

Posted: Sat Aug 16, 2014 8:57 am
by cube
Edited the first post.

Re: Mod filename rules for 0.10.7 and later

Posted: Sat Aug 16, 2014 2:57 pm
by bobingabout
Okay, the example helps make it more clear.
So, V0.10.7+, directory/zip name must = mod name, and the version number is optional, and what works for a bare directory, works for a directory in a zip, works for a zip filename.
I like it.

but in V0.11.x the version number will be mandatory?
Not sure about he mandatory version number part, but I can understand the desire to force people to make keeping track of versions easier.

Re: Mod filename rules for 0.10.7 and later

Posted: Sat Aug 16, 2014 5:28 pm
by Holy-Fire
safan wrote:to solve this, don't change the name of the directory, but open the json file and change the name of the mod to what the directory is named
Hmm... The error message I got on loading confused me. I thought adding the version number was mandatory (and this, of course, cannot be worked around by changing the mod name). Now I see that the actual problem was a mismatch in the names.

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Sep 04, 2014 12:08 pm
by ludsoe
I don't like the forced version number in the .zip name. That will hurt my batch file that I made to condense and prepare my mods for release. Whats the official reasoning on that.

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Sep 04, 2014 12:20 pm
by DaveMcW
cube wrote:Also we would like to make a recommendations for mod names, so that your mod directory looks a little cleaner.
Our current idea is lowercase mod name with minus signs separating words and underscores separating modules i.e. my-super-mod_planes-and-helicopters_6.4.16.zip. Discuss
The mod filename is displayed in yellow on every recipe. I would rather use capital letters and spaces to make it look pretty. Or maybe you could replace that with the mod title?

Re: Mod filename rules for 0.10.7 and later

Posted: Thu Sep 04, 2014 6:05 pm
by Vitduo
ludsoe wrote:I don't like the forced version number in the .zip name. That will hurt my batch file that I made to condense and prepare my mods for release. Whats the official reasoning on that.
+1
It breaks my system of the multi-version translations.

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Sep 05, 2014 3:40 am
by starxplor
What is with all the zip file name stuff, the zip file is for backup, and unzipped directory goes in the mods directory?

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Sep 05, 2014 3:46 am
by FreeER
starxplor wrote:What is with all the zip file name stuff, the zip file is for backup, and unzipped directory goes in the mods directory?
given proper naming of the mod zip, folder, and information given in the info.json, Factorio is capable of loading the mod from the zip, no need to unzip it. My guess as to the file name requirements is conformity (multiple reasons this can be nice) and ease of coding (no need to check for multiple possible "correct" setups), but I'm mostly just guessing with this.

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Sep 05, 2014 11:52 am
by cube
Mostly just conformity, make the mods directory look clear and understandable. (I personally voted against this, though :-) ) There has to be double loading anyway because of the transition period in 0.10.x

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Sep 05, 2014 6:03 pm
by bobingabout
I still think that the version number should be optional as it is now, but if it requires double loading, I can see why its a transition to mandatory.

Re: Mod filename rules for 0.10.7 and later

Posted: Fri Sep 05, 2014 6:17 pm
by Rseding91
Vitduo wrote:
ludsoe wrote:I don't like the forced version number in the .zip name. That will hurt my batch file that I made to condense and prepare my mods for release. Whats the official reasoning on that.
+1
It breaks my system of the multi-version translations.
You can easily do this system with the new name scheme. Just use variables in the batch files.