S&box Wiki

Revision Difference

.addon_schema#544177

<cat>Code.Misc</cat> <title>Addon Config Schema</title> An example addon config file from the [Minimal Game](https://github.com/Facepunch/sbox-minimal) showing the minimum configuration required to create an addon. ``` { "sharedassets": "*.*"⤶ "sharedassets": "*.*",⤶ "ident": "facepunch.dm98"⤶ } ``` ## Shared Assets Filter The `sharedassets` field is a search string required to send code and content from the server to clients. ``` "sharedassets": "*.*" ``` The search string will match against files in the addon's directory. It can contain a combination of valid literal path and wildcard (* and ?) characters, but doesn't support regular expressions. <warning>If this is an empty string or null - no code or content will be sent to clients.</warning> ⤶ ## Ident⤶ ⤶ The `ident` field specifies which package your addon is from. This allows local addons to use the config from the API, meaning on your local game page you'll get icons for your addon.⤶ ⤶ You get your package name from the [Dev Site](https://sbox.facepunch.com/dev/) it will look like: `organisation.package` ⤶ Defaults to `local.{addonfoldername}`.⤶ ## Unused properties The following properties exist but have no effect so there is no need to set them: * `"version"`⤶ * `"title"`⤶ * `"description"`⤶ * `"tags"` - multiple tags split by `;`⤶ * `"icon"` - icon not displayed anywhere. * `"tags"` - multiple tags split by `;`⤶ * `"type"` - speculation that it's to specify a game or a map