{
    "id": "http://www.ubisoft.com/ugc/acd/v1/npcs/npcs#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "JSON Schema for Assassin's Creed Dynasty UGC",
    "type": "object",
    "properties": {
        "Schema": {
            "type": "string",
            "enum": [
                "http://www.ubisoft.com/ugc/acd/v1/npcs/npcs#"
            ]
        },
        "Uniques": {
            "type": "array",
            "minItems": 1,
            "items": {
                "oneOf": [
                    {
                        "$ref": "#/definitions/Unique"
                    },
                    {
                        "$ref": "#/definitions/UniqueByID"
                    }
                ]
            }
        },
        "Generics": {
            "type": "array",
            "minItems": 1,
            "items": {
                "$ref": "#/definitions/Generic"
            }
        }
    },
    "additionalProperties": false,
    "definitions": {
        "UniqueByID": {
            "type": "object",
            "properties": {
                "ID": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#ObjectId"
                },
                "BirthLocation": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/npcs/birthlocations#BirthLocations"
                }
            },
            "required": [
                "ID"
            ],
            "additionalProperties": false
        },
        "Unique": {
            "type": "object",
            "properties": {
                "ID": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "Name": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "VisualTag": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#UInt32"
                },
                "AITag": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#UInt32"
                },
                "WeaponTags": {
                    "type":"array",
                    "items": {
                        "type":"array",
                        "items": {
                            "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#UInt32"
                        }
                    }
                },
                "Rank": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#ObjectId"
                },
                "Faction": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#ObjectId"
                },
                "SpawnSeed": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#UInt32"
                },
                "Gender": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "AgeGroup": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "WealthClass": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "Nationality": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "Archetype": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "SpawnState": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "Invulnerable": {
                    "type": "boolean"
                },
                "IsCarryable": {
                    "type": "boolean"
                },
                "KillConfirmable": {
                    "type": "boolean"
                },
                "CanBeDefeated": {
                    "type": "boolean"
                },
                "IsDeimos": {
                    "type": "boolean"
                },
                "EliteType": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "BirthLocation": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/npcs/birthlocations#BirthLocations"
                },
                "Inventory": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/InventoryItem"
                    }
                },
                "Schedule": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#ObjectId"
                }
            },
            "required": [
                "ID",
                "Name",
                "VisualTag",
                "AITag",
                "Rank",
                "Faction",
                "Schedule"
            ],
            "additionalProperties": false
        },
        "InventoryItem": {
            "type": "object",
            "properties": {
                "Item": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#RequiredString"
                },
                "Count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 32
                }
            },
            "required": [
                "Item"
            ],
            "additionalProperties": false
        },
        "Generic": {
            "type": "object",
            "properties": {
                "ID": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#ObjectId"
                },
                "Position": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/Vector3"
                },
                "Orientation": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/Quaternion"
                },
                "Count": {
                    "type": "integer",
                    "minimum": 1
                },
                "Spawn Radius": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMinimum": true
                }
            },
            "required": [
                "ID",
                "Position",
                "Spawn Radius"
            ],
            "additionalProperties": false
        }
    }
}