Revision Difference
Lua_Loading_Order#525299
<cat>Dev.Lua</cat>
This list shows the order of loading Lua files in Garry's Mod.
<note>GMod filesystem combines all scripts into one folder. `addon/myaddon/lua/entities/` and `gamemodes/base/gamemoded/entities/entities/` will be merged with `lua/entities/`.</note>
<note>This is a list of client loading order</note>
- `includes/init.lua` - Everything from `includes/` is included from this file
- `derma/init.lua` - Everything from `derma/` is included from this file
- `gamemodes/base/gamemode/cl_init.lua` - Everything from `gamemodes/base/gamemode/` is included from this file
- `autorun/` - Ascending order⤶
- `autorun/client/` - Ascending order⤶
- `postprocess/` - Ascending order⤶
- `vgui/` - Ascending order⤶
- `matproxy/` - Ascending order⤶
- `autorun/` - Ascending order (Descending on Linux)⤶
- `autorun/client/` - Ascending order (Descending on Linux)⤶
- `postprocess/` - Ascending order (Descending on Linux)⤶
- `vgui/` - Ascending order (Descending on Linux)⤶
- `matproxy/` - Ascending order (Descending on Linux)⤶
- `skins/` - Only `default.lua`
- `gamemodes/*gamemode*/gamemode/cl_init.lua` - Everything from `gamemodes/*gamemode*/gamemode/` is included from this file
- `weapons/` - Ascending order⤶
- `weapons/gmod_tool/stools/` - Ascending order⤶
- `entities/` - Ascending order⤶
- `effects/` - Ascending order
- `gamemodes/*gamemodename*/gamemode/cl_init.lua` - Everything from `gamemodes/*gamemodename*/gamemode/` is included from this file
- `weapons/` - Ascending order (Descending on Linux)⤶
- `weapons/gmod_tool/stools/` - Ascending order (Descending on Linux)⤶
- `entities/` - Ascending order (Descending on Linux)⤶
- `effects/` - Ascending order (Descending on Linux)