S&box Wiki

File Structure

S&box addons have a general file structure. Most addons will follow this structure but these folders are not required and should only be created if they serve a purpose in your addon. Addons may have minor changes to the structure or naming of these folders.

This may be a good reference if you are looking for a structure to start with. Some examples in the default addons include sbox\addons\base\ which follows this structure, while others like sbox\addons\citizen\ will have minor changes. FacePunch's GitHub Page is also a good reference for addon file structures.

This list is not complete. It may have extraneous or missing information.

The Root File Structure

sbox\addons\<addon-name>\ .localization\ code\ config\ decals\ fonts\ items\ maps\ materials\ menu\ models\ particles\ postprocessing\ resources\ shaders\ sounds\ ?surfaces\ textures\ ui\

Deeper File Structures

Some folders have a deeper file structure such as code, maps, and models. Although the code folder's file structure will be highly variable, some common folders will usually be present.

  • sbox\addons\<project-name>\code\
sbox\addons\<project-name>\code\ ai\ api\ decals\ entities\ extenstions\ gameconfigs\ leaderboards\ map\ menu\ players\ styles\ systems\ ui\ utility\ Events.cs EntityReference.cs <addon-name>Game.cs
  • sbox\addons\<project-name>\maps\
sbox\addons\<project-name>\maps\ prefabs\ reference\
  • sbox\addons\<project-name>\models\
sbox\addons\<project-name>\models\ materials\ mesh\ textures\