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:⤶
<ul><li> **lua**⤶
<ul><li> **autorun** - all files are automatically loaded on Lua start.⤶
<ul><li> **client** - autorun client scripts.⤶
</li><li> **server** - autorun server scripts.⤶
</li><li> **shared** - autorun shared (both cl_ and sv_) scripts.⤶
</li></ul>⤶
</li><li> **includes** - init.lua loaded on start.⤶
<ul><li> **enum** - Loaded on start. Contains all enum files.⤶
</li><li> **extensions** - Loaded on start. Extends existing libraries and types.⤶
</li><li> **modules** - Contains all modules.⤶
</li></ul>⤶
</li><li> _**downloaded** - Clientside downloaded files⤶
<ul><li> **.cache** - Contains cached versions of all downloaded files (to prevent constantly redownloading)⤶
</li></ul>⤶
</li><li> **postprocess** - Run by client on startup⤶
</li></ul>⤶
⤶
----⤶
⤶
</li><li> **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).⤶
<ul><li> **base** - Entities in this folder exist in every Gamemode⤶
<ul><li> **entities** - All scripted items come under this directory.⤶
<ul><li> **weapons** - Scripted Weapons⤶
</li><li> **entities** - Scripted Entities⤶
</li><li> **effects** - Scripted Effects⤶
</li></ul>⤶
</li><li> **gamemode** - All Gamemode scripts go in here.⤶
</li></ul>⤶
</li><li> **other gamemodes**⤶
<ul><li> **entities** - All scripted items come under this directory.⤶
<ul><li> **weapons** - Scripted Weapons⤶
</li><li> **entities** - Scripted Entities⤶
</li><li> **effects** - Scripted Effects⤶
</li></ul>⤶
</li><li> **gamemode** - All Gamemode scripts go in here.⤶
</li></ul>⤶
</li></ul>⤶
</li></ul>⤶
⤶
`Source: [GMod Wiki](https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index66fb-2.html)`