new-horizons/NewHorizons/Schemas/addon_manifest_schema.json
2025-04-19 03:39:03 +00:00

192 lines
7.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Addon Manifest Schema",
"type": "object",
"description": "Describes the New Horizons addon itself",
"additionalProperties": false,
"properties": {
"achievements": {
"type": "array",
"description": "Achievements for this mod if the user is playing with Achievements+\nAchievement icons must be put in a folder named \"icons\"\nThe icon for the mod must match the name of the mod (e.g., New Horizons.png)\nThe icons for achievements must match their unique IDs (e.g., NH_WARP_DRIVE.png)",
"items": {
"$ref": "#/definitions/AchievementInfo"
}
},
"credits": {
"type": "array",
"description": "Credits info for this mod. A list of contributors and their roles separated by #. For example: xen#New Horizons dev.",
"items": {
"type": "string"
}
},
"popupMessage": {
"type": "string",
"description": "A pop-up message for the first time a user runs the add-on"
},
"repeatPopup": {
"type": "boolean",
"description": "If popupMessage is set, should it repeat every time the game starts or only once"
},
"preloadAssetBundles": {
"type": "array",
"description": "These asset bundles will be loaded on the title screen and stay loaded. Will improve initial load time at the cost of increased memory use.\nThe path is the relative directory of the asset bundle in the mod folder.",
"items": {
"type": "string"
}
},
"subtitlePath": {
"type": "string",
"description": "The path to the addons subtitle for the main menu.\nDefaults to \"subtitle.png\".\nThe dimensions of the Echoes of the Eye subtitle is 669 x 67, so aim for that size"
},
"gameOver": {
"type": "array",
"description": "Custom game over messages for this mod. This can either display a title card before looping like in EOTE, or show a message and roll credits like the various time loop escape endings.\nYou must set a dialogue condition for the game over sequence to run.",
"items": {
"$ref": "#/definitions/GameOverModule"
}
},
"$schema": {
"type": "string",
"description": "The schema to validate with"
}
},
"definitions": {
"AchievementInfo": {
"type": "object",
"description": "Info for an achievement to be used with the Achievements+ mod.",
"additionalProperties": false,
"properties": {
"ID": {
"type": "string",
"description": "The unique ID of the achievement. This must be globally unique, meaning all achivements for\nyou mod should start with something to identify the mod they are from. For example, Real Solar System\nuses \"RSS_\" and Signals+ would use \"SIGNALS_PLUS_\"."
},
"secret": {
"type": "boolean",
"description": "Should the name and description of the achievement be hidden until it is unlocked. Good for hiding spoilers!"
},
"factIDs": {
"type": "array",
"description": "A list of facts that must be discovered before this achievement is unlocked. You can also set the achievement\nto be unlocked by a reveal trigger in Props -> Reveals. Optional.",
"items": {
"type": "string"
}
},
"signalIDs": {
"type": "array",
"description": "A list of signals that must be discovered before this achievement is unlocked. Optional.",
"items": {
"type": "string"
}
},
"conditionIDs": {
"type": "array",
"description": "A list of conditions that must be true before this achievement is unlocked. Conditions can be set via dialogue. Optional.",
"items": {
"type": "string"
}
}
}
},
"GameOverModule": {
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"description": "Text displayed in orange on game over. For localization, put translations under UI."
},
"colour": {
"description": "Change the colour of the game over text. Leave empty to use the default orange.",
"$ref": "#/definitions/MColor"
},
"condition": {
"type": "string",
"description": "Condition that must be true for this game over to trigger. If this is on a LoadCreditsVolume, leave empty to always trigger this game over.\nNote this is a regular dialogue condition, not a persistent condition."
},
"audio": {
"type": "string",
"description": "The audio to use for the credits music. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.\nCredits will be silent unless this attribute is specified.\nNote: only applies when creditsType is set to \"custom\"."
},
"audioVolume": {
"type": "number",
"description": "The length of the fade in and out for the credits music.\nNote: only applies when creditsType is set to \"custom\".",
"format": "float",
"default": 1.0
},
"audioLooping": {
"type": "boolean",
"description": "Determines if the credits music should loop.\nNote: only applies when creditsType is set to \"custom\".",
"default": false
},
"length": {
"type": "number",
"description": "Duration of the credits scroll in seconds.\nNote: only applies when creditsType is set to \"custom\".",
"format": "float",
"default": 120.0
},
"creditsType": {
"description": "The type of credits that will run after the game over message is shown",
"default": "fast",
"$ref": "#/definitions/NHCreditsType"
}
}
},
"MColor": {
"type": "object",
"additionalProperties": false,
"properties": {
"r": {
"type": "integer",
"description": "The red component of this colour from 0-255, higher values will make the colour glow if applicable.",
"format": "int32",
"maximum": 2147483647.0,
"minimum": 0.0
},
"g": {
"type": "integer",
"description": "The green component of this colour from 0-255, higher values will make the colour glow if applicable.",
"format": "int32",
"maximum": 2147483647.0,
"minimum": 0.0
},
"b": {
"type": "integer",
"description": "The blue component of this colour from 0-255, higher values will make the colour glow if applicable.",
"format": "int32",
"maximum": 2147483647.0,
"minimum": 0.0
},
"a": {
"type": "integer",
"description": "The alpha (opacity) component of this colour",
"format": "int32",
"default": 255,
"maximum": 255.0,
"minimum": 0.0
}
}
},
"NHCreditsType": {
"type": "string",
"description": "",
"x-enumNames": [
"Fast",
"Final",
"Kazoo",
"Custom",
"None"
],
"enum": [
"fast",
"final",
"kazoo",
"custom",
"none"
]
}
},
"$docs": {
"title": "Addon Manifest Schema",
"description": "Schema for an addon manifest in New Horizons"
}
}