Mod filename rules for 0.10.7 and later

Looking for a mod? Have a review on a mod you'd like to share?
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Mod filename rules for 0.10.7 and later

Post by cube » Thu Aug 14, 2014 9:53 am

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

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by drs9999 » Thu Aug 14, 2014 10:02 am

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 ?

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by cube » Thu Aug 14, 2014 12:52 pm

Code: Select all

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

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by drs9999 » Thu Aug 14, 2014 1:56 pm

Ok, thx

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by Holy-Fire » Fri Aug 15, 2014 3:05 pm

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.

safan
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 23, 2013 7:26 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by safan » Fri Aug 15, 2014 8:45 pm

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

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6835
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by bobingabout » Fri Aug 15, 2014 9:22 pm

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?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

bulldog98
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Tue Apr 08, 2014 6:40 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by bulldog98 » Fri Aug 15, 2014 9:24 pm

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_#.#.#

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6835
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by bobingabout » Sat Aug 16, 2014 3:08 am

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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by cube » Sat Aug 16, 2014 8:57 am

Edited the first post.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6835
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by bobingabout » Sat Aug 16, 2014 2:57 pm

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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by Holy-Fire » Sat Aug 16, 2014 5:28 pm

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.

User avatar
ludsoe
Fast Inserter
Fast Inserter
Posts: 243
Joined: Tue Feb 11, 2014 8:16 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by ludsoe » Thu Sep 04, 2014 12:08 pm

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.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2942
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by DaveMcW » Thu Sep 04, 2014 12:20 pm

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?

Vitduo
Fast Inserter
Fast Inserter
Posts: 182
Joined: Sun Nov 17, 2013 7:28 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by Vitduo » Thu Sep 04, 2014 6:05 pm

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.

starxplor
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun May 18, 2014 11:25 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by starxplor » Fri Sep 05, 2014 3:40 am

What is with all the zip file name stuff, the zip file is for backup, and unzipped directory goes in the mods directory?

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by FreeER » Fri Sep 05, 2014 3:46 am

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.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by cube » Fri Sep 05, 2014 11:52 am

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

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6835
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by bobingabout » Fri Sep 05, 2014 6:03 pm

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.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9856
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Mod filename rules for 0.10.7 and later

Post by Rseding91 » Fri Sep 05, 2014 6:17 pm

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.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Questions, reviews and ratings”

Who is online

Users browsing this forum: No registered users