Capitalization of mod filenames

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

Capitalization of mod filenames

Post 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 ?)
BobDiggity (mod-scenario-pack)

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

Re: Capitalization of mod filenames

Post by darkfrei »

is "_" before or after alphabet?

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

Re: Capitalization of mod filenames

Post 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.
BobDiggity (mod-scenario-pack)

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

Re: Capitalization of mod filenames

Post 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

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

Re: Capitalization of mod filenames

Post by BlueTemplar »

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

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

Re: Capitalization of mod filenames

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

Post Reply

Return to “Modding discussion”