Garry's Mod Wiki

Revision Difference

Lua_Loading_Order#523930

<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⤶ ⤶ - `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