Page 1 of 1

Capitalization of mod filenames

Posted: Sun Feb 10, 2019 9:16 am
by BlueTemplar
GrumpyJoe wrote:
Sun Feb 10, 2019 5:38 am
has anyone reported the "bug" that in the mod list capital letters are sorted first, then the lower ones, still alphabeticly? I just noticed that when looking for "air filter" when i didn´t find it at the top of the list of mods to sync
Not *really* a bug - filesystems are "close to the metal", and the lexicographic order used in computers today places 'Z' before 'a'.

To make it worse, mod load order, when no dependencies are specified, depends on lexicographic order -
(well, it *has* to depend on something !).
I'm willing to bet that some mod authors already used capitalization to resolve mod load order issues !

Sadly, it would seem that there aren't any really common best practices for capitalization in file naming - the one that I found that I like the most is to reserve capitals for Important Files, ALL-CAPS for the REALLY IMPORTANT ones.
(Not only that makes them more visible, if you list the files in the case-sensitive order, they would be listed first.)

In Factorio's case that would mean that the only (non-user-created) capitalized files in the mods folder should be Mod-settings.dat and Mod-list.json (currently not capitalized). (Perhaps they even should be ALL-CAPS ?)

Re: Capitalization of mod filenames

Posted: Sun Feb 10, 2019 12:40 pm
by darkfrei
is "_" before or after alphabet?

Re: Capitalization of mod filenames

Posted: Sun Feb 10, 2019 1:02 pm
by BlueTemplar
In ASCII... between ! :p
(along with [ \ ] ^ `)

Though "case-smart" File Explorers, like Windows' Explorer and Xfce's Thunar, seem to put by default _ before A.

Re: Capitalization of mod filenames

Posted: Sun Feb 10, 2019 1:30 pm
by darkfrei
BlueTemplar wrote:
Sun Feb 10, 2019 1:02 pm
In ASCII... between ! :p
(along with [ \ ] ^ `)

Though "case-smart" File Explorers, like Windows' Explorer and Xfce's Thunar, seem to put by default _ before A.
but I get that mods win names "_"..name loaded after than all another mods. Like https://mods.factorio.com/mod/_IconSize

Re: Capitalization of mod filenames

Posted: Sun Feb 10, 2019 2:20 pm
by BlueTemplar
Even the lower-case ones ?
(Then Lua/C++/Factorio might have their own rules...)

Re: Capitalization of mod filenames

Posted: Mon Feb 11, 2019 9:22 am
by bobingabout
I just follow base's example. All filenames are all lowercase.

Heck, I'm just not a fan of shift or caps-lock really, look at my name, starts with a lower case b.