Quest definitions are most easily set up using JSON. To make it even easier, a JSON schema for the quest format exists in the repository at docs/questschema.json. You can hook this up to your editors to provide autocomplete and pop-up documentation for every element of the quest definition format.
In order to enable these features in your editor, you need to set up a JSON Schema mapping.
- Open Settings
- Go to Extensions > JSON
- Ensure that Schema Download is Enabled
- Under Schemas, click Edit in settings.json
- Use the following setting or similar:
"json.schemas": [
{
"fileMatch": [
"*.suqs.json"
],
"url": "https://raw.githubusercontent.com/sinbad/SUQS/schema_v4/docs/questschema.json"
}
]
This means if you save your JSON quest files as Anything.suqs.json, they will automatically gain auto-complete and tooltips for all properties. You could link the schema from your local drive as well, but this URL format means you're not dependent on that.
- Open Settings
- Go to Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings
- Add a new entry, name it however you like
- Set the URL to "https://raw.githubusercontent.com/sinbad/SUQS/schema_v4/docs/questschema.json"
- Set the Schema Version to 7
- Add a file pattern of *.suqs.json
- Save