Capitalization of mod filenames

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
User avatar
BlueTemplar
Filter Inserter
Filter Inserter
Posts: 935
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Capitalization of mod filenames

Post by BlueTemplar » Sun Feb 10, 2019 9:16 am

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 ?)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1831
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Capitalization of mod filenames

Post by darkfrei » Sun Feb 10, 2019 12:40 pm

is "_" before or after alphabet?

User avatar
BlueTemplar
Filter Inserter
Filter Inserter
Posts: 935
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Capitalization of mod filenames

Post by BlueTemplar » 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.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1831
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Capitalization of mod filenames

Post by darkfrei » Sun Feb 10, 2019 1:30 pm

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

User avatar
BlueTemplar
Filter Inserter
Filter Inserter
Posts: 935
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Capitalization of mod filenames

Post by BlueTemplar » Sun Feb 10, 2019 2:20 pm

Even the lower-case ones ?
(Then Lua/C++/Factorio might have their own rules...)

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

Re: Capitalization of mod filenames

Post by bobingabout » Mon Feb 11, 2019 9:22 am

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

Post Reply

Return to “Modding discussion”

Who is online

Users browsing this forum: No registered users and 0 guests