Skip to Content
Foundry Apparatus
Error Codes

FA-SCH-002

Available since 0.1.0

A required field is missing, or a field has the wrong kind of value.

SeverityError: the definition is not loaded
Categoryschema
MessageField '{field}' is missing or has the wrong type (expected {expected}).
SuggestionAdd '{field}' with a value of type {expected}.
Since0.1.0

Why this happened

A required field is missing, or a field has the wrong kind of value: text where a number is expected, a number written in quotes, a list where one value is expected. The message names the field and the kind of value it expects.

Wrong

A machine without display_name, and a recipe whose duration is written as text:

{
  "schema_version": 1,
  "id": "mypack:smelt_iron",
  "type": "foundry_apparatus:machine_recipe",
  "machines": [
    "mypack:iron_smelter"
  ],
  "duration": "100"
}
recipes/smelt_iron.json:8:15 /duration [FA-SCH-002] Field 'duration' is missing or has the wrong type (expected integer).

Fixed

{
  "schema_version": 1,
  "id": "mypack:smelt_iron",
  "type": "foundry_apparatus:machine_recipe",
  "machines": [
    "mypack:iron_smelter"
  ],
  "duration": 100
}

How to fix

  1. Find the field named in the message (the path after the line number, such as /duration).
  2. If it is missing, add it. If it is there, give it the expected kind of value: numbers without quotes, text in quotes, lists in [ ].
  3. The reference pages list every field with its type.

On this page