Start here

Editor set-up

The game checks every pack file against a schema. The same schemas, with the notes the Mod Studio shows beside each field, give your editor autocomplete, hover notes and red underlines for mistakes as you type.

Visual Studio Code#

  1. Download data-pack-schemas.zip.
  2. Unzip it into your pack’s folder. It holds a .vscode folder: .vscode/schemas/ with one schema per kind of file, and .vscode/settings.json, which tells the editor which schema checks which file.
  3. Open the pack’s folder in Visual Studio Code. Type " in a record for its fields, hover over a field for its note, and look for red underlines.

The settings map each schema onto the places the game reads, like this:

{
  "json.schemas": [
    {
      "fileMatch": [
        "**/mod.json"
      ],
      "url": "./.vscode/schemas/mod.schema.json"
    },
    {
      "fileMatch": [
        "**/data/tours.json",
        "**/data/tours/**/*.json"
      ],
      "url": "./.vscode/schemas/tours.schema.json"
    },
    {
      "fileMatch": [
        "**/data/venues.json",
        "**/data/venues/**/*.json"
      ],
      "url": "./.vscode/schemas/venues.schema.json"
    },
    …
  ]
}

The .vscode folder is only for your editor: leave it out of the zip you share. The game ignores it either way.

Other editors#

Any editor that understands JSON Schema (draft 2020-12) can use the files in .vscode/schemas/. Each is also on this site, by name, for linking to directly: players.schema.json, mod.schema.json and so on, one for each content type in the reference.

What the schemas do not check#

A schema checks each file on its own: field names, types, ranges, options and patterns. The game checks more when it loads your pack, so look at the Mods screen as well:

  • that new ids start with your pack’s id, and that no id is used twice;
  • that the records your records name exist: venues, tours, rivals, stories, kit slots;
  • that your pictures and sound files are there, of the right kind and size;
  • that a file is in a place the game reads.

The schemas match game version 0.50.32. When the game adds or changes fields, download them again.

Written for Darts Player Simulator 0.50.32. Built from the game's own schemas and its base pack.