S&box Wiki

Revision Difference

.addon_schema#546324

<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": "*.*",⤶ "ident": "facepunch.dm98",⤶ "type": "game"⤶ }⤶ ```⤶ ⤶ ⤶ ## 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}`.⤶ ⤶ ## Type⤶ ⤶ The `type` field decides if your addon is a game or a map. No real effect is known so far.⤶ ⤶ ## Unused properties⤶ ⤶ The following properties exist but have no effect so there is no need to set them:⤶ ⤶ * `"tags"` - multiple tags split by `;`