import.json
plugins/<id>/mod/import.json (importVersion 1). A local-content import recipe, referenced by mod/spice.json’s importer.recipe. Describes a format-1 recipe for Melange’s built-in local importer (docs/importers.md in the Melange repo). tools/store.py validates the same rules by hand (no JSON Schema library dependency); this file documents them for other tooling.
Generated from schema/import-1.schema.json (JSON Schema). The validator, tools/store.py, applies the same rules.
Top level
Section titled “Top level”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
importVersion |
integer | yes | Must be 1. |
|
format |
integer | yes | One of: 1. |
|
id |
string | yes | Pattern: ^[a-z0-9][a-z0-9.-]{0,47}$. |
|
name |
string | yes | 1 to 80 characters. | |
content |
object | yes | See content. |
|
sources |
object[] | yes | 1 to 4 items. See sources[]. |
|
reader |
object | yes | See reader. |
|
select |
object | yes | See select. |
|
categories |
object[] | yes | 1 to 8 items. See categories[]. |
|
modes |
object | |||
groups |
object[] | yes | 1 to 8 items. See groups[]. |
|
transform |
object | yes | See transform. |
|
output |
object | yes | See output. |
No other properties are allowed.
content
Section titled “content”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
title |
string | yes | 1 to 64 characters. | |
publisher |
string | yes | 1 to 64 characters. | |
termsUrl |
string | yes | Pattern: ^https://. Format: uri. |
|
credit |
string | yes | 1 to 300 characters. |
No other properties are allowed.
sources[]
Section titled “sources[]”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | yes | 1 to 32 characters. | |
name |
string | yes | 1 to 80 characters. | |
urls |
string[] | yes | 1 to 4 items. Each item: pattern: ^https://; format: uri. |
|
fileName |
string | yes | Pattern: ^[A-Za-z0-9._ -]{1,64}\.zip$. |
|
size |
integer | yes | From 1 to 536870912. | |
sha256 |
string | yes | Pattern: ^[0-9a-f]{64}$. |
No other properties are allowed.
reader
Section titled “reader”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type |
string | yes | Must be "w4-registry". |
|
root |
string | yes | ||
registry |
string | yes | ||
titles |
string[] | |||
descriptors |
string | yes | ||
maps |
string[] | yes | ||
previews |
string |
No other properties are allowed.
select
Section titled “select”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
levelType |
integer | integer[] | yes | Either integer (From 0 to 64) or integer[] (1 to 8 items. items: From 0 to 64). | |
skipKeySuffix |
string | |||
require |
string[] | |||
exclude |
string[] | At most 64 items. | ||
vanilla |
object[] | At most 32 items. See select.vanilla[]. |
||
expect |
object | yes | See select.expect. |
No other properties are allowed.
select.vanilla[]
Section titled “select.vanilla[]”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
file |
string | yes | At least 1 character. | |
sha256 |
object | yes |
No other properties are allowed.
select.expect
Section titled “select.expect”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
maps |
integer | yes | From 0 to 256. | |
fromArchive |
integer | yes | Minimum 0. | |
fromGame |
integer | yes | Minimum 0. |
No other properties are allowed.
categories[]
Section titled “categories[]”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | yes | 1 to 32 characters. | |
label |
string | yes | 1 to 80 characters. | |
scriptsEqual |
string[] | |||
scriptsWithin |
string[] | |||
default |
boolean | |||
hidden |
boolean |
No other properties are allowed.
groups[]
Section titled “groups[]”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | yes | 1 to 32 characters. | |
label |
string | yes | 1 to 80 characters. | |
match |
string[] | |||
vanilla |
boolean | |||
default |
boolean |
No other properties are allowed.
transform
Section titled “transform”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
stem |
object | yes | See transform.stem. |
|
descriptor |
string | yes | Must be "rebuild". |
|
timeOfDay |
object | See transform.timeOfDay. |
||
title |
object | See transform.title. |
||
author |
string | |||
textures |
string | yes | Must be "vanilla". |
|
scripts |
string | yes | Must be "drop". |
|
survivor |
boolean | |||
previews |
string |
No other properties are allowed.
transform.stem
Section titled “transform.stem”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
slugMax |
integer | Minimum 1. | ||
hashKeep |
integer | Minimum 0. | ||
hashHex |
integer | Minimum 0. |
No other properties are allowed.
transform.timeOfDay
Section titled “transform.timeOfDay”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
allowed |
string[] | |||
fallback |
string |
No other properties are allowed.
transform.title
Section titled “transform.title”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
max |
integer | Minimum 1. | ||
fallback |
string |
No other properties are allowed.
output
Section titled “output”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
packPrefix |
string | yes | ||
version |
string | yes | ||
perPack |
integer | yes | From 1 to 32. | |
order |
array | Must be ["category","fileName"]. |
||
newPackBefore |
string[] | |||
packName |
string | yes | Pattern: [{]n[}]. At most 70 characters. |
|
packDescription |
string | yes |
No other properties are allowed.