Garry's Mod Wiki

Revision Difference

Lua_Folder_Structure#511446

<removed>This article contains outdated/incorrect information.</removed>⤶ ⤶ The structure of the Lua folder can be confusing. Here's a rundown:⤶ &lt;ul&gt;&lt;li&gt; **lua**⤶ &lt;ul&gt;&lt;li&gt; **autorun** - all files are automatically loaded on Lua start.⤶ &lt;ul&gt;&lt;li&gt; **client** - autorun client scripts.⤶ &lt;/li&gt;&lt;li&gt; **server** - autorun server scripts.⤶ &lt;/li&gt;&lt;li&gt; **shared** - autorun shared (both cl_ and sv_) scripts.⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; **includes** - init.lua loaded on start.⤶ &lt;ul&gt;&lt;li&gt; **enum** - Loaded on start. Contains all enum files.⤶ &lt;/li&gt;&lt;li&gt; **extensions** - Loaded on start. Extends existing libraries and types.⤶ &lt;/li&gt;&lt;li&gt; **modules** - Contains all modules.⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; _**downloaded** - Clientside downloaded files⤶ &lt;ul&gt;&lt;li&gt; **.cache** - Contains cached versions of all downloaded files (to prevent constantly redownloading)⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; **postprocess** - Run by client on startup⤶ &lt;/li&gt;&lt;/ul&gt;⤶ ⤶ ----⤶ ⤶ &lt;/li&gt;&lt;li&gt; **gamemodes** - Contains gamemodes. Gamemodes are only run when they're required (either by the map setting the gamemode or by another gamemode being derived from that gamemode).⤶ &lt;ul&gt;&lt;li&gt; **base** - Entities in this folder exist in every Gamemode⤶ &lt;ul&gt;&lt;li&gt; **entities** - All scripted items come under this directory.⤶ &lt;ul&gt;&lt;li&gt; **weapons** - Scripted Weapons⤶ &lt;/li&gt;&lt;li&gt; **entities** - Scripted Entities⤶ &lt;/li&gt;&lt;li&gt; **effects** - Scripted Effects⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; **gamemode** - All Gamemode scripts go in here.⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; **other gamemodes**⤶ &lt;ul&gt;&lt;li&gt; **entities** - All scripted items come under this directory.⤶ &lt;ul&gt;&lt;li&gt; **weapons** - Scripted Weapons⤶ &lt;/li&gt;&lt;li&gt; **entities** - Scripted Entities⤶ &lt;/li&gt;&lt;li&gt; **effects** - Scripted Effects⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;li&gt; **gamemode** - All Gamemode scripts go in here.⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;/ul&gt;⤶ &lt;/li&gt;&lt;/ul&gt;⤶ ⤶ `Source: [GMod Wiki](https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index66fb-2.html)`