If your addons aren't loading, read this - Seemingly undocumented change in how file-system addons work

Not sure if this is widely known but I was searching around for why my addons weren’t working a week or so ago and couldn’t find anything.

Also not sure if this is the right place to discuss this.

First of all, the symptoms:
Some of your legacy/filesystem addons don’t load. When you start the server, you get the correct messages such as:

But the addon doesn’t run at all. For example, a test addon like the following will not output anything to the console.

/lua/autorun/test.lua



print("The test addon is running")


The solution:

For some reason, as far as I can figure out, addon names can no longer contain spaces or capital letters. (Although they seem to work fine if the first letter is a capital) So if your addon has a folder called “testAddon by YM”, rename it to “test-addon-by-ym”.

If that doesn’t fix it, SOMETIMES it will not accept an addon with a blank addon.txt file. Sometimes it will accept these, but sometimes it wont. If you’ve tried the above with no luck, edit (or create) /addon.txt to look something like this:



"AddonInfo"
{
        "name"              "Test Addon"
        "version"           "1.0"
        "up_date"           ""
        "author_name"       "YoshieMaster"
        "author_email"      ""
        "info"              "Tests WTF is going on with filesystem addons in the latest GMOD versions."
}


Anyway, hope someone out there finds this useful.

I hope this isn’t against some rule, if so could a mod please edit it out? Just in case someone is Googling for the issue, I’ll put this here to help them find this thread:

GMOD Lua legacy addons/filesystem addons no longer work stopped working steampipe update

Also, if you have any information about why this change happened or what the specific new requirements are, please let me know.

Well right now I have a problem with 2 NPCs.
I created in addons 2 different NPCs that has different name,entity name. For some reasons only one is loading the other one doesn’t but if in addons is only one is working. I tested both of them and are working.

addon.txt is not needed. Spaces in folder name should be fine, capital letters are not, because Linux.

What if you deleted that blank file? addon.txt shouldn’t be a requirement.

hmm interesting. A script I was using that worked perfectly suddenly stopped working so this might be the reason

Ah, thanks for that info. I hadn’t realised the Linux version had been released. Also, my add-ons wont run without addon.txt, but YMMV.