Garry's Mod Wiki

Revision Difference

Lua_Loading_Order#526891

<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>GMod filesystem combines all scripts into one folder. `addon/myaddon/lua/entities/` and `gamemodes/base/gamemode/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 (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/*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)