From 64a654740e3ea61f4d90452b1e1608d83ab8beee Mon Sep 17 00:00:00 2001 From: Watchman3001 <87601407+Watchman3001@users.noreply.github.com> Date: Sun, 31 Mar 2024 05:02:09 +0300 Subject: [PATCH] Initial commit --- .gitattributes | 2 + .github/contract-schema.json | 1074 +++++++++++++++++++++++++ .github/entity-patch-schema.json | 1263 ++++++++++++++++++++++++++++++ .github/entity-schema.json | 486 ++++++++++++ .github/json-patch-schema.json | 40 + .github/manifest-schema.json | 523 +++++++++++++ .github/repository-schema.json | 562 +++++++++++++ .github/tag-changelog-config.js | 15 + .github/unlockables-schema.json | 86 ++ .github/validate-mod-folder.js | 142 ++++ .github/validate.js | 10 + .github/workflows/release.yml | 205 +++++ .github/workflows/validate.yml | 21 + .gitignore | 2 + .husky/pre-commit | 4 + .prettierrc | 10 + COPYING | 674 ++++++++++++++++ COPYING.LESSER | 165 ++++ README.md | 102 +++ manifest.json | 9 + package.json | 24 + project.json | 4 + 22 files changed, 5423 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/contract-schema.json create mode 100644 .github/entity-patch-schema.json create mode 100644 .github/entity-schema.json create mode 100644 .github/json-patch-schema.json create mode 100644 .github/manifest-schema.json create mode 100644 .github/repository-schema.json create mode 100644 .github/tag-changelog-config.js create mode 100644 .github/unlockables-schema.json create mode 100644 .github/validate-mod-folder.js create mode 100644 .github/validate.js create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/validate.yml create mode 100644 .gitignore create mode 100644 .husky/pre-commit create mode 100644 .prettierrc create mode 100644 COPYING create mode 100644 COPYING.LESSER create mode 100644 README.md create mode 100644 manifest.json create mode 100644 package.json create mode 100644 project.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.github/contract-schema.json b/.github/contract-schema.json new file mode 100644 index 0000000..d1e2522 --- /dev/null +++ b/.github/contract-schema.json @@ -0,0 +1,1074 @@ +{ + "credit": "Auto-generated from Peacock types; everything made nullable", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "GameChanger": { + "properties": { + "Description": { + "type": "string", + "nullable": true + }, + "Icon": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "nullable": true + }, + "IsHidden": { + "type": "boolean", + "nullable": true + }, + "IsPrestigeObjective": { + "type": "boolean", + "nullable": true + }, + "LongDescription": { + "type": "string", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + }, + "Objectives": { + "items": { + "$ref": "#/definitions/MissionManifestObjective" + }, + "type": "array", + "nullable": true + }, + "ObjectivesCategory": { + "type": "string", + "nullable": true + }, + "Resource": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "TileImage": { + "type": "string", + "nullable": true + } + }, + "required": ["Description", "Id", "Name"], + "type": "object", + "nullable": true + }, + "GroupObjectiveDisplayOrderItem": { + "properties": { + "Id": { + "type": "string", + "nullable": true + }, + "IsNew": { + "type": "boolean", + "nullable": true + } + }, + "required": ["Id"], + "type": "object", + "nullable": true + }, + "HUDTemplate": { + "description": "Data structure for an objective's HUD template.", + "properties": { + "display": { + "anyOf": [ + { + "properties": { + "$loc": { + "properties": { + "data": { + "type": "string", + "nullable": true + }, + "key": { + "type": "string", + "nullable": true + } + }, + "required": ["data", "key"], + "type": "object", + "nullable": true + } + }, + "required": ["$loc"], + "type": "object", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "iconType": { + "type": "number", + "nullable": true + } + }, + "required": ["display"], + "type": "object", + "nullable": true + }, + "MissionManifestMetadata": { + "properties": { + "AllowNonTargetKills": { + "type": "boolean", + "nullable": true + }, + "BriefingVideo": { + "anyOf": [ + { + "items": { + "properties": { + "Mode": { + "type": "string", + "nullable": true + }, + "VideoId": { + "type": "string", + "nullable": true + } + }, + "required": ["Mode", "VideoId"], + "type": "object", + "nullable": true + }, + "type": "array", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "CharacterLoadoutData": {}, + "CharacterSetup": { + "items": { + "properties": { + "Characters": { + "items": [ + { + "properties": { + "Id": { + "type": "string", + "nullable": true + }, + "MandatoryLoadout": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + } + }, + "required": ["Id", "Name"], + "type": "object", + "nullable": true + } + ], + "type": "array", + "nullable": true + }, + "Mode": { + "type": "string", + "nullable": true + } + }, + "required": ["Characters", "Mode"], + "type": "object", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "CodeName_Hint": { + "type": "string", + "nullable": true + }, + "CpdId": { + "type": "string", + "nullable": true + }, + "CreationTimestamp": { + "type": "string", + "nullable": true + }, + "CreatorUserId": { + "type": "string", + "nullable": true + }, + "DebriefingVideo": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + }, + "Difficulty": { + "type": "string", + "nullable": true + }, + "Drops": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "EndConditions": { + "properties": { + "PointLimit": { + "type": "number", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "Enginemodes": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "Entitlements": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "GameVersion": { + "type": "string", + "nullable": true + }, + "Gamemodes": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "GroupDefinition": { + "description": "Data for a group contract.", + "properties": { + "Order": { + "description": "The contracts in this group, ordered by their position in the group.", + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "Type": { + "$ref": "#/definitions/MissionType", + "description": "The contract group type." + } + }, + "required": ["Order", "Type"], + "type": "object", + "nullable": true + }, + "GroupObjectiveDisplayOrder": { + "items": { + "$ref": "#/definitions/GroupObjectiveDisplayOrderItem" + }, + "type": "array", + "nullable": true + }, + "GroupTitle": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "nullable": true + }, + "InGroup": { + "type": "string", + "nullable": true + }, + "IsEvergreenSafehouse": { + "type": "boolean", + "nullable": true + }, + "IsFeatured": { + "type": "boolean", + "nullable": true + }, + "IsPublished": { + "type": "boolean", + "nullable": true + }, + "IsVersus": { + "type": "boolean", + "nullable": true + }, + "LastUpdate": { + "type": "string", + "nullable": true + }, + "Location": { + "type": "string", + "nullable": true + }, + "NonTargetKillPenaltyEnabled": { + "type": "boolean", + "nullable": true + }, + "NoticedTargetStreakPenaltyMax": { + "type": "number", + "nullable": true + }, + "Opportunities": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "PublicId": { + "type": "string", + "nullable": true + }, + "Release": { + "anyOf": [ + { + "additionalProperties": true, + "properties": {}, + "type": "object", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "RequiredUnlockable": { + "type": "string", + "nullable": true + }, + "ScenePath": { + "type": "string", + "nullable": true + }, + "ServerVersion": { + "type": "string", + "nullable": true + }, + "SpawnSelectionType": { + "type": "string", + "nullable": true + }, + "Subtype": { + "type": "string", + "nullable": true + }, + "TargetExpiration": { + "type": "number", + "nullable": true + }, + "TargetExpirationReduced": { + "type": "number", + "nullable": true + }, + "TargetLifeTime": { + "type": "number", + "nullable": true + }, + "TileImage": { + "anyOf": [ + { + "items": { + "properties": { + "Image": { + "type": "string", + "nullable": true + }, + "Mode": { + "type": "string", + "nullable": true + } + }, + "required": ["Image", "Mode"], + "type": "object", + "nullable": true + }, + "type": "array", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "Title": { + "type": "string", + "nullable": true + }, + "Type": { + "$ref": "#/definitions/MissionType" + }, + "UseContractProgressionData": { + "type": "boolean", + "nullable": true + }, + "UserData": { + "description": "Useless property." + } + }, + "required": ["Id", "Location", "ScenePath", "Title", "Type"], + "type": "object", + "nullable": true + }, + "MissionManifestObjective": { + "properties": { + "Activation": { + "properties": { + "$eq": { + "items": { + "type": ["string", "boolean"] + }, + "type": "array", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "AllowEtRestartOnSuccess": { + "description": "Allow Elusive Target Arcade contracts to be restarted if this objective is already successfully completed.", + "type": "boolean", + "nullable": true + }, + "BriefingName": { + "type": "string", + "nullable": true + }, + "BriefingText": { + "anyOf": [ + { + "properties": { + "$loc": { + "properties": { + "data": { + "anyOf": [ + { + "items": { + "type": "number", + "nullable": true + }, + "type": "array", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "key": { + "type": "string", + "nullable": true + } + }, + "required": ["data", "key"], + "type": "object", + "nullable": true + } + }, + "required": ["$loc"], + "type": "object", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "Category": { + "type": "string", + "nullable": true + }, + "CombinedDisplayInHud": { + "type": "boolean", + "nullable": true + }, + "Definition": { + "properties": { + "Constants": { + "$ref": "#/definitions/Record" + }, + "Context": { + "$ref": "#/definitions/Record" + }, + "ContextListeners": { + "$ref": "#/definitions/Record>" + }, + "Scope": { + "type": "string", + "nullable": true + }, + "States": { + "$ref": "#/definitions/Record" + }, + "display": { + "properties": { + "iconType": { + "type": "number", + "nullable": true + } + }, + "type": "object", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "DisplayAsKillObjective": { + "type": "boolean", + "nullable": true + }, + "ExcludeFromScoring": { + "type": "boolean", + "nullable": true + }, + "FailedEvent": { + "properties": { + "EventName": { + "type": "string", + "nullable": true + }, + "EventValues": { + "properties": { + "RepositoryId": { + "description": "A repository ID (really just a UUID v4).", + "type": "string", + "nullable": true + } + }, + "type": "object", + "nullable": true + } + }, + "required": ["EventName"], + "type": "object", + "nullable": true + }, + "ForceShowOnLoadingScreen": { + "type": "boolean", + "nullable": true + }, + "GameChangerName": { + "type": "string", + "nullable": true + }, + "HUDTemplate": { + "$ref": "#/definitions/HUDTemplate" + }, + "Id": { + "type": "string", + "nullable": true + }, + "IgnoreIfInactive": { + "type": "boolean", + "nullable": true + }, + "Image": { + "type": "string", + "nullable": true + }, + "IsHidden": { + "type": "boolean", + "nullable": true + }, + "IsPrestigeObjective": { + "type": "boolean", + "nullable": true + }, + "LongBriefingText": { + "anyOf": [ + { + "properties": { + "$loc": { + "properties": { + "data": { + "anyOf": [ + { + "items": { + "type": "number", + "nullable": true + }, + "type": "array", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "key": { + "type": "string", + "nullable": true + } + }, + "required": ["data", "key"], + "type": "object", + "nullable": true + } + }, + "required": ["$loc"], + "type": "object", + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ] + }, + "ObjectiveType": { + "type": "string", + "nullable": true + }, + "OnActive": { + "properties": { + "IfCompleted": { + "properties": { + "State": { + "type": "string", + "nullable": true + }, + "Visible": { + "type": "boolean", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "IfFailed": { + "properties": { + "State": { + "type": "string", + "nullable": true + }, + "Visible": { + "type": "boolean", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "IfInProgress": { + "properties": { + "State": { + "type": "string", + "nullable": true + }, + "Visible": { + "type": "boolean", + "nullable": true + } + }, + "type": "object", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "OnInactive": { + "properties": { + "IfCompleted": { + "properties": { + "State": { + "type": "string", + "nullable": true + } + }, + "type": "object", + "nullable": true + } + }, + "type": "object", + "nullable": true + }, + "Primary": { + "type": "boolean", + "nullable": true + }, + "Scope": { + "type": "string", + "nullable": true + }, + "ShowInHud": { + "type": "boolean", + "nullable": true + }, + "SuccessEvent": { + "properties": { + "EventName": { + "type": "string", + "nullable": true + }, + "EventValues": { + "properties": { + "RepositoryId": { + "description": "A repository ID (really just a UUID v4).", + "type": "string", + "nullable": true + } + }, + "required": ["RepositoryId"], + "type": "object", + "nullable": true + } + }, + "required": ["EventName", "EventValues"], + "type": "object", + "nullable": true + }, + "TargetConditions": { + "items": { + "$ref": "#/definitions/TargetCondition" + }, + "type": "array", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + }, + "_comment": { + "type": "string", + "nullable": true + } + }, + "required": ["Id"], + "type": "object", + "nullable": true + }, + "MissionType": { + "description": "Possible mission `Metadata.Type` values.", + "type": "string", + "nullable": true + }, + "Record>": { + "type": "object", + "nullable": true + }, + "Record": { + "type": "object", + "nullable": true + }, + "Record": { + "type": "object", + "nullable": true + }, + "TargetCondition": { + "properties": { + "HardCondition": { + "type": "boolean", + "nullable": true + }, + "KillMethod": { + "type": "string", + "nullable": true + }, + "ObjectiveId": { + "type": "string", + "nullable": true + }, + "RepositoryId": { + "description": "A repository ID (really just a UUID v4).", + "type": "string", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + } + }, + "required": ["Type"], + "type": "object", + "nullable": true + }, + "VRQualityDefinition": { + "description": "Data structure for a contract's `Data.VR` bricks property.", + "properties": { + "Bricks": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "Quality": { + "type": "string", + "nullable": true + } + }, + "required": ["Bricks", "Quality"], + "type": "object", + "nullable": true + } + }, + "description": "A contract JSON is what defines how a specific contract plays.", + "properties": { + "Data": { + "properties": { + "Bricks": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "DevOnlyBricks": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "EnableExits": {}, + "EnableSaving": { + "type": "boolean", + "nullable": true + }, + "EngineModesBricks": { + "items": {}, + "type": "array", + "nullable": true + }, + "Entrances": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "GameChangerReferences": { + "items": { + "$ref": "#/definitions/GameChanger" + }, + "type": "array", + "nullable": true + }, + "GameChangers": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "GameDifficulties": { + "items": { + "properties": { + "Bricks": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "Difficulty": { + "type": "string", + "nullable": true + } + }, + "required": ["Bricks", "Difficulty"], + "type": "object", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "GameModesBricks": { + "items": {}, + "type": "array", + "nullable": true + }, + "MandatoryLoadout": { + "items": {}, + "type": "array", + "nullable": true + }, + "Objectives": { + "items": { + "$ref": "#/definitions/MissionManifestObjective" + }, + "type": "array", + "nullable": true + }, + "RecommendedLoadout": { + "items": {}, + "type": "array", + "nullable": true + }, + "Stashpoints": { + "items": { + "type": "string", + "nullable": true + }, + "type": "array", + "nullable": true + }, + "VR": { + "items": { + "$ref": "#/definitions/VRQualityDefinition" + }, + "type": "array", + "nullable": true + } + }, + "required": ["Bricks"], + "type": "object", + "nullable": true + }, + "Metadata": { + "$ref": "#/definitions/MissionManifestMetadata" + }, + "Peacock": { + "properties": { + "noAgencyPickupsActive": { + "type": "boolean" + }, + "noCarriedWeapon": { + "type": "boolean" + }, + "noGear": { + "type": "boolean" + } + }, + "type": "object" + }, + "UserData": { + "anyOf": [ + { + "items": {}, + "type": "array", + "nullable": true + }, + { + "$ref": "#/definitions/Record" + }, + { + "type": "null" + } + ] + }, + "SMF": { + "properties": { + "destinations": { + "anyOf": [ + { + "type": "object", + "properties": { + "addToDestinations": { + "type": "boolean", + "description": "Whether to add the contract to Destinations." + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "addToDestinations": { + "type": "boolean", + "const": true, + "description": "Whether to add the contract to Destinations." + }, + "narrativeContext": { + "type": "string", + "description": "The narrative context of the contract. In the base game, this is either Mission or Campaign." + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "addToDestinations": { + "type": "boolean", + "const": true, + "description": "Whether to add the contract to Destinations." + }, + "narrativeContext": { + "type": "string", + "description": "The narrative context of the contract. In the base game, this is either Mission or Campaign." + }, + "placeBefore": { + "type": "string", + "description": "The UUID of the contract this one should be placed before." + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "addToDestinations": { + "type": "boolean", + "const": true, + "description": "Whether to add the contract to Destinations." + }, + "narrativeContext": { + "type": "string", + "description": "The narrative context of the contract. In the base game, this is either Mission or Campaign." + }, + "placeAfter": { + "type": "string", + "description": "The UUID of the contract this one should be placed after." + } + }, + "additionalProperties": false + } + ], + "description": "How the contract should behave in relation to the Destinations page." + } + }, + "description": "Simple Mod Framework-specific contract metadata.", + "type": "object" + } + }, + "required": ["Data", "Metadata"], + "type": "object", + "nullable": true +} diff --git a/.github/entity-patch-schema.json b/.github/entity-patch-schema.json new file mode 100644 index 0000000..60d497a --- /dev/null +++ b/.github/entity-patch-schema.json @@ -0,0 +1,1263 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "tempHash": { + "type": "string" + }, + "tbluHash": { + "type": "string" + }, + "patch": { + "type": "array", + "items": { + "$ref": "#/definitions/PatchOperation" + } + }, + "patchVersion": { + "type": "number", + "const": 6 + } + }, + "required": ["tempHash", "tbluHash", "patch", "patchVersion"], + "definitions": { + "PatchOperation": { + "anyOf": [ + { + "properties": { + "SetRootEntity": { + "type": "string" + } + }, + "required": ["SetRootEntity"], + "type": "object" + }, + { + "properties": { + "SetSubType": { + "$ref": "#/definitions/SubType" + } + }, + "required": ["SetSubType"], + "type": "object" + }, + { + "properties": { + "AddEntity": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/SubEntity" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddEntity"], + "type": "object" + }, + { + "properties": { + "RemoveEntityByID": { + "type": "string" + } + }, + "required": ["RemoveEntityByID"], + "type": "object" + }, + { + "properties": { + "SubEntityOperation": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/SubEntityOperation" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["SubEntityOperation"], + "type": "object" + }, + { + "properties": { + "AddPropertyOverride": { + "$ref": "#/definitions/PropertyOverride" + } + }, + "required": ["AddPropertyOverride"], + "type": "object" + }, + { + "properties": { + "RemovePropertyOverride": { + "$ref": "#/definitions/PropertyOverride" + } + }, + "required": ["RemovePropertyOverride"], + "type": "object" + }, + { + "properties": { + "AddPropertyOverrideConnection": { + "$ref": "#/definitions/PropertyOverrideConnection" + } + }, + "required": ["AddPropertyOverrideConnection"], + "type": "object" + }, + { + "properties": { + "RemovePropertyOverrideConnection": { + "$ref": "#/definitions/PropertyOverrideConnection" + } + }, + "required": ["RemovePropertyOverrideConnection"], + "type": "object" + }, + { + "properties": { + "AddOverrideDelete": { + "$ref": "#/definitions/Ref" + } + }, + "required": ["AddOverrideDelete"], + "type": "object" + }, + { + "properties": { + "RemoveOverrideDelete": { + "$ref": "#/definitions/Ref" + } + }, + "required": ["RemoveOverrideDelete"], + "type": "object" + }, + { + "properties": { + "AddPinConnectionOverride": { + "$ref": "#/definitions/PinConnectionOverride" + } + }, + "required": ["AddPinConnectionOverride"], + "type": "object" + }, + { + "properties": { + "RemovePinConnectionOverride": { + "$ref": "#/definitions/PinConnectionOverride" + } + }, + "required": ["RemovePinConnectionOverride"], + "type": "object" + }, + { + "properties": { + "AddPinConnectionOverrideDelete": { + "$ref": "#/definitions/PinConnectionOverrideDelete" + } + }, + "required": ["AddPinConnectionOverrideDelete"], + "type": "object" + }, + { + "properties": { + "RemovePinConnectionOverrideDelete": { + "$ref": "#/definitions/PinConnectionOverrideDelete" + } + }, + "required": ["RemovePinConnectionOverrideDelete"], + "type": "object" + }, + { + "properties": { + "AddExternalScene": { + "type": "string" + } + }, + "required": ["AddExternalScene"], + "type": "object" + }, + { + "properties": { + "RemoveExternalScene": { + "type": "string" + } + }, + "required": ["RemoveExternalScene"], + "type": "object" + }, + { + "properties": { + "AddExtraFactoryDependency": { + "$ref": "#/definitions/Dependency" + } + }, + "required": ["AddExtraFactoryDependency"], + "type": "object" + }, + { + "properties": { + "RemoveExtraFactoryDependency": { + "$ref": "#/definitions/Dependency" + } + }, + "required": ["RemoveExtraFactoryDependency"], + "type": "object" + }, + { + "properties": { + "AddExtraBlueprintDependency": { + "$ref": "#/definitions/Dependency" + } + }, + "required": ["AddExtraBlueprintDependency"], + "type": "object" + }, + { + "properties": { + "RemoveExtraBlueprintDependency": { + "$ref": "#/definitions/Dependency" + } + }, + "required": ["RemoveExtraBlueprintDependency"], + "type": "object" + }, + { + "properties": { + "AddComment": { + "$ref": "#/definitions/CommentEntity" + } + }, + "required": ["AddComment"], + "type": "object" + }, + { + "properties": { + "RemoveComment": { + "$ref": "#/definitions/CommentEntity" + } + }, + "required": ["RemoveComment"], + "type": "object" + } + ] + }, + "ArrayPatchOperation": { + "anyOf": [ + { + "properties": { + "RemoveItemByValue": {} + }, + "required": ["RemoveItemByValue"], + "type": "object" + }, + { + "properties": { + "AddItemAfter": { + "items": [{}, {}], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddItemAfter"], + "type": "object" + }, + { + "properties": { + "AddItemBefore": { + "items": [{}, {}], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddItemBefore"], + "type": "object" + }, + { + "properties": { + "AddItem": {} + }, + "required": ["AddItem"], + "type": "object" + } + ] + }, + "CommentEntity": { + "properties": { + "name": { + "type": "string" + }, + "parent": { + "$ref": "#/definitions/Ref" + }, + "text": { + "type": "string" + } + }, + "required": ["name", "parent", "text"], + "type": "object" + }, + "Dependency": { + "anyOf": [ + { + "$ref": "#/definitions/DependencyWithFlag" + }, + { + "type": "string" + } + ] + }, + "DependencyWithFlag": { + "properties": { + "flag": { + "type": "string" + }, + "resource": { + "type": "string" + } + }, + "required": ["flag", "resource"], + "type": "object" + }, + "ExposedEntity": { + "properties": { + "isArray": { + "type": "boolean" + }, + "refersTo": { + "items": { + "$ref": "#/definitions/Ref" + }, + "type": "array" + } + }, + "required": ["isArray", "refersTo"], + "type": "object" + }, + "FullRef": { + "properties": { + "exposedEntity": { + "type": "string" + }, + "externalScene": { + "type": "string" + }, + "ref": { + "type": "string" + } + }, + "required": ["externalScene", "ref"], + "type": "object" + }, + "OverriddenProperty": { + "properties": { + "type": { + "type": "string" + }, + "value": {} + }, + "required": ["type", "value"], + "type": "object" + }, + "PinConnectionOverride": { + "properties": { + "fromEntity": { + "$ref": "#/definitions/Ref" + }, + "fromPin": { + "type": "string" + }, + "toEntity": { + "$ref": "#/definitions/Ref" + }, + "toPin": { + "type": "string" + }, + "value": {} + }, + "required": ["fromEntity", "fromPin", "toEntity", "toPin"], + "type": "object" + }, + "PinConnectionOverrideDelete": { + "properties": { + "fromEntity": { + "$ref": "#/definitions/Ref" + }, + "fromPin": { + "type": "string" + }, + "toEntity": { + "$ref": "#/definitions/Ref" + }, + "toPin": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/SimpleProperty" + } + }, + "required": ["fromEntity", "fromPin", "toEntity", "toPin"], + "type": "object" + }, + "Property": { + "properties": { + "postInit": { + "type": "boolean" + }, + "type": { + "type": "string" + }, + "value": {} + }, + "required": ["type", "value"], + "type": "object" + }, + "PropertyAlias": { + "properties": { + "originalEntity": { + "$ref": "#/definitions/Ref" + }, + "originalProperty": { + "type": "string" + } + }, + "required": ["originalEntity", "originalProperty"], + "type": "object" + }, + "PropertyOverride": { + "properties": { + "entities": { + "items": { + "$ref": "#/definitions/Ref" + }, + "type": "array" + }, + "properties": { + "$ref": "#/definitions/Record" + } + }, + "required": ["entities", "properties"], + "type": "object" + }, + "PropertyOverrideConnection": { + "properties": { + "entity": { + "$ref": "#/definitions/Ref" + }, + "propertyName": { + "type": "string" + }, + "propertyOverride": { + "$ref": "#/definitions/OverriddenProperty" + } + }, + "required": ["entity", "propertyName", "propertyOverride"], + "type": "object" + }, + "Record": { + "type": "object" + }, + "Record": { + "type": "object" + }, + "Record": { + "type": "object" + }, + "Record": { + "type": "object" + }, + "Record>": { + "type": "object" + }, + "Record>": { + "type": "object" + }, + "Record": { + "type": "object" + }, + "Record": { + "type": "object" + }, + "Ref": { + "anyOf": [ + { + "$ref": "#/definitions/FullRef" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "RefMaybeConstantValue": { + "anyOf": [ + { + "$ref": "#/definitions/FullRef" + }, + { + "$ref": "#/definitions/RefWithConstantValue" + }, + { + "type": "string" + } + ] + }, + "RefWithConstantValue": { + "properties": { + "ref": { + "$ref": "#/definitions/Ref" + }, + "value": { + "$ref": "#/definitions/SimpleProperty" + } + }, + "required": ["ref", "value"], + "type": "object" + }, + "SimpleProperty": { + "properties": { + "type": { + "type": "string" + }, + "value": {} + }, + "required": ["type", "value"], + "type": "object" + }, + "SubEntity": { + "properties": { + "blueprint": { + "type": "string" + }, + "editorOnly": { + "type": "boolean" + }, + "events": { + "$ref": "#/definitions/Record>" + }, + "exposedEntities": { + "$ref": "#/definitions/Record" + }, + "exposedInterfaces": { + "$ref": "#/definitions/Record" + }, + "factory": { + "type": "string" + }, + "factoryFlag": { + "type": "string" + }, + "inputCopying": { + "$ref": "#/definitions/Record>" + }, + "name": { + "type": "string" + }, + "outputCopying": { + "$ref": "#/definitions/Record>" + }, + "parent": { + "$ref": "#/definitions/Ref" + }, + "platformSpecificProperties": { + "$ref": "#/definitions/Record>" + }, + "properties": { + "$ref": "#/definitions/Record" + }, + "propertyAliases": { + "$ref": "#/definitions/Record" + }, + "subsets": { + "$ref": "#/definitions/Record" + } + }, + "required": ["blueprint", "factory", "name", "parent"], + "type": "object" + }, + "SubEntityOperation": { + "anyOf": [ + { + "properties": { + "SetParent": { + "$ref": "#/definitions/Ref" + } + }, + "required": ["SetParent"], + "type": "object" + }, + { + "properties": { + "SetName": { + "type": "string" + } + }, + "required": ["SetName"], + "type": "object" + }, + { + "properties": { + "SetFactory": { + "type": "string" + } + }, + "required": ["SetFactory"], + "type": "object" + }, + { + "properties": { + "SetFactoryFlag": { + "type": "string" + } + }, + "required": ["SetFactoryFlag"], + "type": "object" + }, + { + "properties": { + "SetBlueprint": { + "type": "string" + } + }, + "required": ["SetBlueprint"], + "type": "object" + }, + { + "properties": { + "SetEditorOnly": { + "type": "boolean" + } + }, + "required": ["SetEditorOnly"], + "type": "object" + }, + { + "properties": { + "AddProperty": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/Property" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddProperty"], + "type": "object" + }, + { + "properties": { + "SetPropertyType": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["SetPropertyType"], + "type": "object" + }, + { + "properties": { + "SetPropertyValue": { + "properties": { + "property_name": { + "type": "string" + }, + "value": {} + }, + "required": ["property_name", "value"], + "type": "object" + } + }, + "required": ["SetPropertyValue"], + "type": "object" + }, + { + "properties": { + "PatchArrayPropertyValue": { + "items": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/definitions/ArrayPatchOperation" + }, + "type": "array" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["PatchArrayPropertyValue"], + "type": "object" + }, + { + "properties": { + "SetPropertyPostInit": { + "items": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["SetPropertyPostInit"], + "type": "object" + }, + { + "properties": { + "RemovePropertyByName": { + "type": "string" + } + }, + "required": ["RemovePropertyByName"], + "type": "object" + }, + { + "properties": { + "AddPlatformSpecificProperty": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/Property" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["AddPlatformSpecificProperty"], + "type": "object" + }, + { + "properties": { + "SetPlatformSpecificPropertyType": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["SetPlatformSpecificPropertyType"], + "type": "object" + }, + { + "properties": { + "SetPlatformSpecificPropertyValue": { + "properties": { + "platform": { + "type": "string" + }, + "property_name": { + "type": "string" + }, + "value": {} + }, + "required": ["platform", "property_name", "value"], + "type": "object" + } + }, + "required": ["SetPlatformSpecificPropertyValue"], + "type": "object" + }, + { + "properties": { + "PatchPlatformSpecificArrayPropertyValue": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "items": { + "$ref": "#/definitions/ArrayPatchOperation" + }, + "type": "array" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["PatchPlatformSpecificArrayPropertyValue"], + "type": "object" + }, + { + "properties": { + "SetPlatformSpecificPropertyPostInit": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["SetPlatformSpecificPropertyPostInit"], + "type": "object" + }, + { + "properties": { + "RemovePlatformSpecificPropertyByName": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemovePlatformSpecificPropertyByName"], + "type": "object" + }, + { + "properties": { + "RemovePlatformSpecificPropertiesForPlatform": { + "type": "string" + } + }, + "required": ["RemovePlatformSpecificPropertiesForPlatform"], + "type": "object" + }, + { + "properties": { + "AddEventConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["AddEventConnection"], + "type": "object" + }, + { + "properties": { + "RemoveEventConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["RemoveEventConnection"], + "type": "object" + }, + { + "properties": { + "RemoveAllEventConnectionsForTrigger": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemoveAllEventConnectionsForTrigger"], + "type": "object" + }, + { + "properties": { + "RemoveAllEventConnectionsForEvent": { + "type": "string" + } + }, + "required": ["RemoveAllEventConnectionsForEvent"], + "type": "object" + }, + { + "properties": { + "AddInputCopyConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["AddInputCopyConnection"], + "type": "object" + }, + { + "properties": { + "RemoveInputCopyConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["RemoveInputCopyConnection"], + "type": "object" + }, + { + "properties": { + "RemoveAllInputCopyConnectionsForTrigger": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemoveAllInputCopyConnectionsForTrigger"], + "type": "object" + }, + { + "properties": { + "RemoveAllInputCopyConnectionsForInput": { + "type": "string" + } + }, + "required": ["RemoveAllInputCopyConnectionsForInput"], + "type": "object" + }, + { + "properties": { + "AddOutputCopyConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["AddOutputCopyConnection"], + "type": "object" + }, + { + "properties": { + "RemoveOutputCopyConnection": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + }, + { + "$ref": "#/definitions/RefMaybeConstantValue" + } + ], + "maxItems": 3, + "minItems": 3, + "type": "array" + } + }, + "required": ["RemoveOutputCopyConnection"], + "type": "object" + }, + { + "properties": { + "RemoveAllOutputCopyConnectionsForPropagate": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemoveAllOutputCopyConnectionsForPropagate"], + "type": "object" + }, + { + "properties": { + "RemoveAllOutputCopyConnectionsForOutput": { + "type": "string" + } + }, + "required": ["RemoveAllOutputCopyConnectionsForOutput"], + "type": "object" + }, + { + "properties": { + "AddPropertyAliasConnection": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/PropertyAlias" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddPropertyAliasConnection"], + "type": "object" + }, + { + "properties": { + "RemovePropertyAlias": { + "type": "string" + } + }, + "required": ["RemovePropertyAlias"], + "type": "object" + }, + { + "properties": { + "RemoveConnectionForPropertyAlias": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/PropertyAlias" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemoveConnectionForPropertyAlias"], + "type": "object" + }, + { + "properties": { + "SetExposedEntity": { + "items": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExposedEntity" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["SetExposedEntity"], + "type": "object" + }, + { + "properties": { + "RemoveExposedEntity": { + "type": "string" + } + }, + "required": ["RemoveExposedEntity"], + "type": "object" + }, + { + "properties": { + "SetExposedInterface": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["SetExposedInterface"], + "type": "object" + }, + { + "properties": { + "RemoveExposedInterface": { + "type": "string" + } + }, + "required": ["RemoveExposedInterface"], + "type": "object" + }, + { + "properties": { + "AddSubset": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["AddSubset"], + "type": "object" + }, + { + "properties": { + "RemoveSubset": { + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": ["RemoveSubset"], + "type": "object" + }, + { + "properties": { + "RemoveAllSubsetsFor": { + "type": "string" + } + }, + "required": ["RemoveAllSubsetsFor"], + "type": "object" + } + ] + }, + "SubType": { + "enum": ["brick", "scene", "template"], + "type": "string" + } + } +} diff --git a/.github/entity-schema.json b/.github/entity-schema.json new file mode 100644 index 0000000..fdefd50 --- /dev/null +++ b/.github/entity-schema.json @@ -0,0 +1,486 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/Entity", + "definitions": { + "Entity": { + "type": "object", + "properties": { + "tempHash": { + "type": "string", + "description": "The hash of the TEMP file of this entity." + }, + "tbluHash": { + "type": "string", + "description": "The hash of the TBLU file of this entity." + }, + "rootEntity": { + "type": "string", + "description": "The root sub-entity of this entity." + }, + "entities": { + "type": "object", + "description": "The sub-entities of this entity.", + "additionalProperties": { + "$ref": "#/definitions/SubEntity" + } + }, + "propertyOverrides": { + "type": "array", + "description": "Properties on other entities (local or external) to override when this entity is loaded.", + "markdownDescription": "Properties on other entities (local or external) to override when this entity is loaded.\n\nOverriding a local entity would be a rather pointless maneuver given that you could just actually change it in the entity instead of using an override.", + "items": { + "$ref": "#/definitions/PropertyOverride" + } + }, + "overrideDeletes": { + "type": "array", + "description": "Entities (external or local) to delete (including their organisational children) when this entity is loaded.", + "markdownDescription": "Entities (external or local) to delete (including their organisational children) when this entity is loaded.\n\nDeleting a local entity would be a rather pointless maneuver given that you could just actually remove it from this entity instead of using an override.", + "items": { + "$ref": "#/definitions/Ref" + } + }, + "pinConnectionOverrides": { + "type": "array", + "description": "Pin (event) connections (between entities, external or local) to add when this entity is loaded.", + "items": { + "$ref": "#/definitions/PinConnectionOverride" + } + }, + "pinConnectionOverrideDeletes": { + "type": "array", + "items": { + "$ref": "#/definitions/PinConnectionOverrideDelete" + } + }, + "externalScenes": { + "type": "array", + "description": "The external scenes that this entity references.", + "items": { + "type": "string" + } + }, + "subType": { + "$ref": "#/definitions/SubType" + }, + "quickEntityVersion": { + "type": "number", + "description": "The QuickEntity format version of this entity.", + "const": 3.1 + }, + "extraFactoryDependencies": { + "type": "array", + "description": "Extra resource dependencies that should be added to the entity's factory when converted to the game's format.", + "items": { + "$ref": "#/definitions/Dependency" + } + }, + "extraBlueprintDependencies": { + "type": "array", + "description": "Extra resource dependencies that should be added to the entity's blueprint when converted to the game's format.", + "items": { + "$ref": "#/definitions/Dependency" + } + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/definitions/CommentEntity" + } + } + }, + "required": [ + "tempHash", + "tbluHash", + "rootEntity", + "entities", + "propertyOverrides", + "overrideDeletes", + "pinConnectionOverrides", + "pinConnectionOverrideDeletes", + "externalScenes", + "subType", + "quickEntityVersion", + "extraFactoryDependencies", + "extraBlueprintDependencies", + "comments" + ] + }, + "SubEntity": { + "type": "object", + "properties": { + "parent": { + "$ref": "#/definitions/Ref", + "description": "The \"logical\" parent of the entity.", + "markdownDescription": "The \"logical\" or \"organisational\" parent of the entity, used for tree organisation in graphical editors.\n\nHas no effect on the entity in game." + }, + "name": { + "type": "string", + "description": "The name of the entity." + }, + "factory": { + "type": "string", + "description": "The factory of the entity." + }, + "factoryFlag": { + "type": "string", + "description": "The factory's flag.", + "markdownDescription": "The factory's flag.\n\nYou can leave this out if it's 1F.", + "default": "1F" + }, + "blueprint": { + "type": "string", + "description": "The blueprint of the entity." + }, + "editorOnly": { + "type": "boolean", + "description": "Whether the entity is only loaded in IO's editor.", + "markdownDescription": "Whether the entity is only loaded in IO's editor.\n\nSetting this to true will remove the entity from the game as well as all of its organisational (but not coordinate) children.", + "default": false + }, + "properties": { + "type": "object", + "description": "Properties of the entity.", + "additionalProperties": { + "$ref": "#/definitions/Property" + } + }, + "platformSpecificProperties": { + "type": "object", + "description": "Properties to apply conditionally to the entity based on platform.", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Property" + } + } + }, + "events": { + "type": "object", + "description": "Inputs on entities to trigger when events occur.", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/RefMaybeConstantValue" + } + } + } + }, + "inputCopying": { + "type": "object", + "description": "Inputs on entities to trigger when this entity is given inputs.", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/RefMaybeConstantValue" + } + } + } + }, + "outputCopying": { + "type": "object", + "description": "Events to propagate on other entities.", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/RefMaybeConstantValue" + } + } + } + }, + "propertyAliases": { + "type": "object", + "description": "Properties on other entities that can be accessed from this entity.", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/PropertyAlias" + } + } + }, + "exposedEntities": { + "type": "object", + "description": "Entities that can be accessed from this entity.", + "additionalProperties": { + "$ref": "#/definitions/ExposedEntity" + } + }, + "exposedInterfaces": { + "type": "object", + "description": "Interfaces implemented by other entities that can be accessed from this entity.", + "additionalProperties": { + "type": "string" + } + }, + "subsets": { + "type": "object", + "description": "The subsets that this entity belongs to.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": ["parent", "name", "factory", "blueprint"], + "default": { + "parent": "fffffffffffffffe", + "name": "New Entity", + "factory": "[modules:/zentity.class].pc_entitytype", + "blueprint": "[modules:/zentity.class].pc_entityblueprint" + } + }, + "Ref": { + "anyOf": [ + { + "$ref": "#/definitions/FullRef" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "" + }, + "FullRef": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "externalScene": { + "type": ["string", "null"] + }, + "exposedEntity": { + "type": "string" + } + }, + "required": ["ref", "externalScene"], + "default": { + "ref": "", + "externalScene": null + } + }, + "Property": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": {}, + "postInit": { + "type": "boolean", + "default": false + } + }, + "required": ["type", "value"], + "default": { + "type": "", + "value": "" + } + }, + "RefMaybeConstantValue": { + "anyOf": [ + { + "$ref": "#/definitions/RefWithConstantValue" + }, + { + "$ref": "#/definitions/Ref" + } + ] + }, + "RefWithConstantValue": { + "type": "object", + "properties": { + "ref": { + "$ref": "#/definitions/Ref" + }, + "value": { + "$ref": "#/definitions/SimpleProperty" + } + }, + "required": ["ref", "value"] + }, + "SimpleProperty": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": {} + }, + "required": ["type", "value"] + }, + "PropertyAlias": { + "type": "object", + "properties": { + "originalProperty": { + "type": "string" + }, + "originalEntity": { + "$ref": "#/definitions/Ref" + } + }, + "required": ["originalProperty", "originalEntity"], + "default": { + "originalProperty": "", + "originalEntity": "" + } + }, + "ExposedEntity": { + "type": "object", + "properties": { + "isArray": { + "type": "boolean" + }, + "refersTo": { + "type": "array", + "items": { + "$ref": "#/definitions/Ref" + } + } + }, + "required": ["isArray", "refersTo"], + "default": { + "isArray": false, + "refersTo": [] + } + }, + "PropertyOverride": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Ref" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/OverriddenProperty" + } + } + }, + "required": ["entities", "properties"], + "default": { + "entities": [], + "properties": {} + } + }, + "OverriddenProperty": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": {} + }, + "required": ["type", "value"] + }, + "PinConnectionOverride": { + "type": "object", + "properties": { + "fromEntity": { + "$ref": "#/definitions/Ref", + "description": "The entity that will trigger the input on the other entity.", + "markdownDescription": "The entity that will trigger the input on the other entity.\n\nIf this references a local entity, you can simply use an event on the entity itself." + }, + "fromPin": { + "type": "string", + "description": "The name of the event on the fromEntity that will trigger the input on the toEntity." + }, + "toEntity": { + "$ref": "#/definitions/Ref", + "description": "The entity whose input will be triggered." + }, + "toPin": { + "type": "string", + "description": "The name of the input on the toEntity that will be triggered by the event on the fromEntity." + }, + "value": {} + }, + "required": ["fromEntity", "fromPin", "toEntity", "toPin"] + }, + "PinConnectionOverrideDelete": { + "type": "object", + "properties": { + "fromEntity": { + "$ref": "#/definitions/Ref", + "description": "The entity that triggers the input on the other entity." + }, + "fromPin": { + "type": "string", + "description": "The name of the event on the fromEntity that will no longer trigger the input on the toEntity." + }, + "toEntity": { + "$ref": "#/definitions/Ref", + "description": "The entity whose input is triggered." + }, + "toPin": { + "type": "string", + "description": "The name of the input on the toEntity that will no longer be triggered by the event on the fromEntity." + }, + "value": { + "$ref": "#/definitions/SimpleProperty" + } + }, + "required": ["fromEntity", "fromPin", "toEntity", "toPin"] + }, + "SubType": { + "type": "string", + "description": "The type of this entity.", + "enum": ["brick", "scene", "template"] + }, + "Dependency": { + "anyOf": [ + { + "$ref": "#/definitions/DependencyWithFlag" + }, + { + "type": "string" + } + ] + }, + "DependencyWithFlag": { + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "flag": { + "type": "string" + } + }, + "required": ["resource", "flag"], + "default": { + "resource": "", + "flag": "1F" + } + }, + "CommentEntity": { + "type": "object", + "properties": { + "parent": { + "$ref": "#/definitions/Ref" + }, + "name": { + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": ["parent", "name", "text"] + } + } +} diff --git a/.github/json-patch-schema.json b/.github/json-patch-schema.json new file mode 100644 index 0000000..e648a0c --- /dev/null +++ b/.github/json-patch-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "file": { "type": "string" }, + "type": { "type": "string" }, + "patch": { + "type": "array", + "items": { + "oneOf": [ + { + "additionalProperties": false, + "required": ["value", "op", "path"], + "properties": { + "path": { "type": "string" }, + "op": { "description": "The operation to perform.", "type": "string", "enum": ["add", "replace", "test"] }, + "value": { "description": "The value to add, replace or test." } + } + }, + { + "additionalProperties": false, + "required": ["op", "path"], + "properties": { "path": { "type": "string" }, "op": { "description": "The operation to perform.", "type": "string", "enum": ["remove"] } } + }, + { + "additionalProperties": false, + "required": ["from", "op", "path"], + "properties": { + "path": { "type": "string" }, + "op": { "description": "The operation to perform.", "type": "string", "enum": ["move", "copy"] }, + "from": { "type": "string", "description": "A JSON Pointer path pointing to the location to move/copy from." } + } + } + ] + } + } + }, + "additionalProperties": false, + "required": ["file", "patch"] +} diff --git a/.github/manifest-schema.json b/.github/manifest-schema.json new file mode 100644 index 0000000..087a55c --- /dev/null +++ b/.github/manifest-schema.json @@ -0,0 +1,523 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["id", "name", "description", "authors", "version", "frameworkVersion"], + "allOf": [ + { + "properties": { + "authors": { + "description": "A list of the mod's authors.", + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "description": { + "description": "A description of the mod.", + "minLength": 1, + "type": "string" + }, + "frameworkVersion": { + "description": "The version of the framework this mod has been tested against/designed for.", + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + }, + "id": { + "description": "An ID for the mod. Should follow capitalised reverse URI style (AuthorName.ModName). Don't include special characters; numbers and underscores are OK, though words should be separated by CamelCase.", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]+$" + }, + "name": { + "description": "The name of the mod.", + "minLength": 1, + "type": "string" + }, + "options": { + "description": "Settings for the mod that can be enabled and disabled in the Mod Manager. Also, conditional options allow for certain elements of the mod to be automatically enabled/disabled based on, for example, other mods being installed.", + "items": { + "anyOf": [ + { + "allOf": [ + { + "properties": { + "enabledByDefault": { + "description": "Whether the option should be preselected upon installing the mod. Preselected options should deliver the \"advertised experience\". Mods with many settings should have the user select their own settings, or provide a conservative default.", + "type": "boolean" + }, + "image": { + "description": "A thumbnail image for the option. Will appear when the user hovers over the option in the Mod Manager.", + "type": "string", + "minLength": 1 + }, + "name": { + "description": "The name of the option. Should not be duplicated. Will appear in the Mod Manager.", + "type": "string", + "minLength": 1 + }, + "tooltip": { + "description": "A tooltip for the option. Will appear when the user hovers over the option in the Mod Manager.", + "type": "string", + "minLength": 1 + }, + "type": { + "description": "The type of the option. Checkbox options appear as checkboxes in the Mod Manager.", + "enum": ["checkbox"], + "type": "string" + } + }, + "required": ["type", "name"], + "type": "object" + }, + { + "$ref": "#/definitions/ManifestOptionData" + } + ] + }, + { + "allOf": [ + { + "properties": { + "enabledByDefault": { + "description": "Whether the option should be preselected upon installing the mod. Preselected options should deliver the \"advertised experience\". Mods with many settings should have the user select their own settings, or provide a conservative default.", + "type": "boolean" + }, + "group": { + "description": "The name of the group the option is part of. Will appear in the Mod Manager. Should not include a colon.", + "type": "string", + "minLength": 1 + }, + "image": { + "description": "A thumbnail image for the option. Will appear when the user hovers over the option in the Mod Manager.", + "type": "string", + "minLength": 1 + }, + "name": { + "description": "The name of the option. Will appear in the Mod Manager. Select option names should not include a colon.", + "type": "string", + "minLength": 1 + }, + "tooltip": { + "description": "A tooltip for the option. Will appear when the user hovers over the option in the Mod Manager.", + "type": "string", + "minLength": 1 + }, + "type": { + "description": "The type of the option. Select options appear as radio buttons in the Mod Manager under a heading (the group name).", + "enum": ["select"], + "type": "string" + } + }, + "required": ["type", "name", "group"], + "type": "object" + }, + { + "$ref": "#/definitions/ManifestOptionData" + } + ] + }, + { + "allOf": [ + { + "properties": { + "condition": { + "description": "A condition which will enable the option when met. Passed the framework config under the `config` global object. Refer to the Filtrex documentation at https://github.com/m93a/filtrex#expressions for syntax.", + "type": "string", + "minLength": 1 + }, + "name": { + "description": "The name of the option. Should not be duplicated. Purely for internal reference; conditional options are not shown to the user.", + "type": "string", + "minLength": 1 + }, + "type": { + "description": "The type of the option. Conditional options are enabled whenever a condition is met and disabled otherwise. They do not appear in the Mod Manager.", + "enum": ["conditional"], + "type": "string" + } + }, + "required": ["type", "name", "condition"], + "type": "object" + }, + { + "$ref": "#/definitions/ManifestOptionData" + } + ] + } + ] + }, + "type": "array" + }, + "updateCheck": { + "description": "A link to an update JSON (must be HTTPS). Information on this can be found in the Mod Updates documentation page.", + "minLength": 1, + "type": "string" + }, + "version": { + "description": "The mod's version, using semantic versioning (X.Y.Z) - this means that new features increment the second number, fixes increment the third number and only huge changes that could break compatibility should increment the first number.", + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + }, + "type": "object" + }, + { + "$ref": "#/definitions/ManifestOptionData" + } + ], + "definitions": { + "ManifestOptionData": { + "properties": { + "blobsFolder": false, + "contentFolder": false, + "runtimePackages": false, + "blobsFolders": { + "description": "Folders with blobs that will be crawled and automatically deployed.", + "items": { + "type": "string", + "minLength": 1 + }, + "type": "array" + }, + "contentFolders": { + "description": "Folders with content files that will be crawled and automatically deployed.", + "items": { + "type": "string", + "minLength": 1 + }, + "type": "array" + }, + "dependencies": { + "description": "RuntimeIDs that will be ported to chunk0 or to a provided chunk.", + "items": { + "anyOf": [ + { + "properties": { + "portFromChunk1": { + "type": "boolean" + }, + "runtimeID": { + "type": "string", + "minLength": 1 + }, + "toChunk": { + "type": "number" + } + }, + "type": "object" + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "type": "array" + }, + "incompatibilities": { + "description": "Mod IDs (possibly accompanied by version ranges) that this mod will not function with.\nClients with these mods enabled will be prevented from using this mod.", + "items": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "loadAfter": { + "description": "Mod IDs (possibly accompanied by version ranges) this mod should load after.\nUsed in automatic sorting by the Mod Manager GUI.", + "items": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "loadBefore": { + "description": "Mod IDs (possibly accompanied by version ranges) this mod should load before.\nUsed in automatic sorting by the Mod Manager GUI.", + "items": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "localisation": { + "$ref": "#/definitions/{english:{[k:string]:string;};french:{[k:string]:string;};italian:{[k:string]:string;};german:{[k:string]:string;};spanish:{[k:string]:string;};russian:{[k:string]:string;};chineseSimplified:{[k:string]:string;};chineseTraditional:{[k:string]:string;};japanese:{[k:string]:string;};}", + "description": "Localisation for each supported language." + }, + "localisationOverrides": { + "additionalProperties": { + "$ref": "#/definitions/{english:{[k:string]:string;};french:{[k:string]:string;};italian:{[k:string]:string;};german:{[k:string]:string;};spanish:{[k:string]:string;};russian:{[k:string]:string;};chineseSimplified:{[k:string]:string;};chineseTraditional:{[k:string]:string;};japanese:{[k:string]:string;};}_1" + }, + "description": "Overridden localisation from the game files.", + "type": "object" + }, + "localisedLines": { + "additionalProperties": { + "type": "string" + }, + "description": "LINE files to create from localisation IDs.", + "type": "object" + }, + "packagedefinition": { + "description": "Partitions and paths to add to packagedefinition.\nCustom chunks (partitions) are supported but discouraged; their support is very minimal and will cause compatibility problems", + "items": { + "anyOf": [ + { + "properties": { + "name": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "partitionType": { + "type": "string" + }, + "type": { + "enum": ["partition"], + "type": "string" + } + }, + "type": "object" + }, + { + "properties": { + "partition": { + "description": "The partition to add the entity/scene under.", + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "enum": ["entity"], + "type": "string" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "requirements": { + "description": "Mod IDs (possibly accompanied by version ranges) that this mod depends on to function.\nClients without these mods enabled will be prevented from using this mod.", + "items": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "scripts": { + "description": "Paths to TypeScript files that can alter deployment of the mod.\nThe first item is considered to be the entry point; it must export the necessary functions.\nAny additional files are transpiled but not used directly; they can be imported from the entry point.", + "items": { + "type": "string" + }, + "type": "array" + }, + "supportedPlatforms": { + "description": "Platforms that this mod supports.\nAll other platforms will be prevented from using this mod.\nUse this when a mod uses features that only some platforms support, such as Ghost Mode and Steam.", + "items": { + "$ref": "#/definitions/Platform" + }, + "type": "array" + }, + "thumbs": { + "description": "Commands to add to thumbs.dat after [Hitman5].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Platform": { + "enum": ["epic", "microsoft", "steam"], + "type": "string" + }, + "{english:{[k:string]:string;};french:{[k:string]:string;};italian:{[k:string]:string;};german:{[k:string]:string;};spanish:{[k:string]:string;};russian:{[k:string]:string;};chineseSimplified:{[k:string]:string;};chineseTraditional:{[k:string]:string;};japanese:{[k:string]:string;};}": { + "properties": { + "chineseSimplified": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "chineseTraditional": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "english": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "french": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "german": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "italian": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "japanese": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "russian": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "spanish": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, + "{english:{[k:string]:string;};french:{[k:string]:string;};italian:{[k:string]:string;};german:{[k:string]:string;};spanish:{[k:string]:string;};russian:{[k:string]:string;};chineseSimplified:{[k:string]:string;};chineseTraditional:{[k:string]:string;};japanese:{[k:string]:string;};}_1": { + "properties": { + "chineseSimplified": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "chineseTraditional": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "english": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "french": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "german": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "italian": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "japanese": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "russian": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "spanish": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + } + } +} diff --git a/.github/repository-schema.json b/.github/repository-schema.json new file mode 100644 index 0000000..b35ea64 --- /dev/null +++ b/.github/repository-schema.json @@ -0,0 +1,562 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "patternProperties": { "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$": { "$ref": "#/definitions/RepositoryItem" } }, + "additionalProperties": false, + "definitions": { + "RepositoryItem": { + "type": "object", + "properties": { + "ID_": { "type": "string" }, + "Image": { "type": "string" }, + "Name": { "type": "string" }, + "Outfit": { "type": "string" }, + "OutfitVariationIndex": { "type": "number" }, + "CharacterSetIndex": { "type": "number" }, + "Description": { "type": "string" }, + "Description_LOC": { "type": "string" }, + "Tile": { "type": "string" }, + "Name_LOC": { "type": "string" }, + "PersistentBoolId": { "type": "string" }, + "SetPointShootingAllowed": { "type": "boolean" }, + "SetPointShootingCoolDownTime": { "type": "number" }, + "SetPointShootingMaxTags": { "type": "number" }, + "SetPointShootingTagTime": { "type": "number" }, + "ModifierType": { "type": "string" }, + "CommonName": { "type": "string" }, + "HeroDisguiseAvailable": { "type": "boolean" }, + "IsHitmanSuit": { "type": "boolean" }, + "Category": { "type": "string" }, + "ImageTransparent": { "type": "string" }, + "TokenID": { "type": "string" }, + "ActionRewardType": { "type": "string" }, + "CarryAnimSetType": { "type": "string" }, + "CheatSpawnGroup_Keys": { "type": "boolean" }, + "EnablePickUpOnRelease": { "type": "boolean" }, + "EquipAbility": { "type": "string" }, + "HolsterAbility": { "type": "string" }, + "HudIcon": { "type": "string" }, + "InventoryCategoryIcon": { "type": "string" }, + "InventoryCategoryName": { "type": "string" }, + "IsCheckedWhenFrisked": { "type": "boolean" }, + "ItemHandsIdle": { "type": "string" }, + "ItemHandsUse": { "type": "string" }, + "ItemType": { "type": "string" }, + "MugshotTransformation": { "type": "string" }, + "OnlineTraits": { "type": "array", "items": { "type": "string" } }, + "Runtime": { "type": "string" }, + "Title": { "type": "string" }, + "AdditionalKeywords": { "type": "array", "items": { "type": "string" } }, + "AIPerceptibleOnRelease": { "type": "boolean" }, + "AppliedModifiers": { "type": "array", "items": { "type": "string" } }, + "CanBeDropped": { "type": "boolean" }, + "CanPistolWhip": { "type": "boolean" }, + "CheatGroup": { "type": "string" }, + "CheatSpawnGroup_Everything": { "type": "boolean" }, + "CheatSpawnGroup_Standard": { "type": "boolean" }, + "CheatSpawnGroup_Tools": { "type": "boolean" }, + "DetectShots": { "type": "boolean" }, + "DisplayItemCategoryOnlineTraitsIndex": { "type": "number" }, + "ForbidCloseCombat": { "type": "boolean" }, + "GripAnimType": { "type": "string" }, + "HarmlessImpact": { "type": "boolean" }, + "HitmanCanConceal": { "type": "boolean" }, + "InteractionTimeMultiplier": { "type": "number" }, + "IsCoin": { "type": "boolean" }, + "IsExplosive": { "type": "boolean" }, + "IsPerceivedAsWeapon": { "type": "boolean" }, + "ItemHandsCoverAnimLayer": { "type": "string" }, + "ItemImpactForce": { "type": "number" }, + "ItemImpactUpkick": { "type": "number" }, + "ItemSize": { "type": "string" }, + "KillItemCategoryOnlineTraitsIndex": { "type": "number" }, + "KinematicWhileCarried": { "type": "boolean" }, + "LocaKey": { "type": "string" }, + "MainAnimSetType": { "type": "string" }, + "ModifierSlot1": { "type": "array", "items": { "type": "string" } }, + "ModifierSlot2": { "type": "array", "items": { "type": "string" } }, + "ModifierSlot3": { "type": "array", "items": { "type": "string" } }, + "ModifierSlot4": { "type": "array", "items": { "type": "string" } }, + "ModifierSlot5": { "type": "array", "items": { "type": "string" } }, + "MugshotIsTransparent": { "type": "boolean" }, + "NeverInvestigateDistractions": { "type": "boolean" }, + "PlaceableType": { "type": "string" }, + "PlacementOrientToHM": { "type": "boolean" }, + "PlacementUseHitNormal": { "type": "boolean" }, + "RagdollImpactForce": { "type": "number" }, + "RagdollImpactUpkick": { "type": "number" }, + "RecognizableByCivilians": { "type": "boolean" }, + "SpawnKinematic": { "type": "boolean" }, + "Stackable": { "type": "boolean" }, + "SupportItem": { "type": "string" }, + "ThrownCollisionLoudness": { "type": "string" }, + "ThrowType": { "type": "string" }, + "ThrowVelocity": { "type": "number" }, + "UseFakePutDownPhysics": { "type": "boolean" }, + "AmmoItem": { "type": "string" }, + "CompareItem": { "type": "string" }, + "EnablePickUpOnSpawn": { "type": "boolean" }, + "EnablePickUpOnThrowRelease": { "type": "boolean" }, + "Evergreen_CapacityCost": { "type": "number" }, + "Evergreen_GiveWhenUnlocked": { "type": "boolean" }, + "Evergreen_LoseOnWounded": { "type": "boolean" }, + "Evergreen_Price": { "type": "number" }, + "Evergreen_Rarity": { "type": "number" }, + "Evergreen_UnlockChallenge": { "type": "string" }, + "Evergreen_UnlockEntitlement": { "type": "string" }, + "Evergreen_UnlockMastery": { "type": "number" }, + "ItemHUDType": { "type": "string" }, + "MeleeDamageBehavior": { "type": "string" }, + "OverrideItemThrowRotation": { "type": "boolean" }, + "PoisonType": { "type": "string" }, + "RagdollImpactForceGlobal": { "type": "number" }, + "RagdollImpactUpkickGlobal": { "type": "number" }, + "Rarity": { "type": "string" }, + "ReverseItemThrowRotationDirection": { "type": "boolean" }, + "ThrowImpactVisualRadius": { "type": "number" }, + "Contents": { "type": "array", "items": { "type": "string" } }, + "ReloadFactorMultiplier": { "type": "number" }, + "Features_": { "type": "array", "items": { "type": "string" } }, + "SetFullAutoOperation": { "type": "boolean" }, + "AudioHighPassFilter": { "type": "number" }, + "RecoilZMultiplier": { "type": "number" }, + "ShotsPerMinuteMultiplier": { "type": "number" }, + "BlindfirePrecisionModifierMultiplier": { "type": "number" }, + "OTSCamPrecisionModifierMultiplier": { "type": "number" }, + "PrecisionMaxDegreeMultiplier": { "type": "number" }, + "PrecisionMinDegreeMultiplier": { "type": "number" }, + "PrecisionNumBulletsMultiplier": { "type": "number" }, + "PrecisionRecoveryDelayMultiplier": { "type": "number" }, + "PrecisionRecoverySpeedMultiplier": { "type": "number" }, + "PrecisionShotMultiplierMultiplier": { "type": "number" }, + "PrecisionUnaimedMaxDegreeMultiplier": { "type": "number" }, + "PrecisionUnaimedMinDegreeMultiplier": { "type": "number" }, + "RecoilDelayMultiplier": { "type": "number" }, + "RecoilDelayMultiplier_VR": { "type": "number" }, + "RecoilEaseTimeMultiplier": { "type": "number" }, + "RecoilEaseTimeMultiplier_VR": { "type": "number" }, + "RecoilHorizontalRangeMultiplier": { "type": "number" }, + "RecoilHorizontalRangeMultiplier_VR": { "type": "number" }, + "RecoilMaxMultiplier": { "type": "number" }, + "RecoilMaxMultiplier_VR": { "type": "number" }, + "RecoilRecoveryFractionMultiplier": { "type": "number" }, + "RecoilRecoveryFractionMultiplier_VR": { "type": "number" }, + "RecoilRecoveryTimeMultiplier": { "type": "number" }, + "RecoilRecoveryTimeMultiplier_VR": { "type": "number" }, + "RecoilVerticalRangeMultiplier": { "type": "number" }, + "RecoilVerticalRangeMultiplier_VR": { "type": "number" }, + "RecoilXMultiplier": { "type": "number" }, + "RecoilXMultiplier_VR": { "type": "number" }, + "RecoilZMultiplier_VR": { "type": "number" }, + "ScopeModePrecisionDegreeMultiplier": { "type": "number" }, + "SneakMovingPrecisionModifierMultiplier": { "type": "number" }, + "SneakNotMovingPrecisionModifierMultiplier": { "type": "number" }, + "StandNotMovingPrecisionModifierMultiplier": { "type": "number" }, + "ZRecoilDistanceMultiplier": { "type": "number" }, + "ZRecoilDistanceMultiplier_VR": { "type": "number" }, + "ZRecoilTimeMultiplier": { "type": "number" }, + "ZRecoilTimeMultiplier_VR": { "type": "number" }, + "AddInitialMagazines": { "type": "number" }, + "AddBulletsPerMagazine": { "type": "number" }, + "AddExtraPickupMagazines": { "type": "number" }, + "InitialBulletsModifier": { "type": "number" }, + "Perks": { "type": "array", "items": { "type": "string" } }, + "AudioHeadType": { "type": "string" }, + "AudioTailType": { "type": "string" }, + "AudioWeaponFamily": { "type": "string" }, + "ModelBodyPartSelections": { "type": "array", "items": { "type": "number" } }, + "ModelMuzzleExtensionSelection": { "type": "number" }, + "ModelMuzzleExtensionSkinSelection": { "type": "number" }, + "ModelSkinSelections": { "type": "array", "items": { "type": "number" } }, + "ActorConfiguration": { "$ref": "#/definitions/ConfigurationReference" }, + "AudioFireType": { "type": "string" }, + "AudioWeaponClass": { "type": "string" }, + "PrimaryConfiguration": { "$ref": "#/definitions/ConfigurationReference" }, + "SecondaryConfiguration": { "$ref": "#/definitions/ConfigurationReference" }, + "AudioExoticType": { "type": "string" }, + "AudioImpactType": { "type": "string" }, + "AudioLowPassFilter": { "type": "number" }, + "EffectFlashSelection": { "type": "number" }, + "EffectSmokeSelection": { "type": "number" }, + "ModelScopeSelection": { "type": "number" }, + "ModelScopeSkinSelection": { "type": "number" }, + "Multiplier": { "type": "number" }, + "AdaptiveTriggerEmptyMode": { "type": "number" }, + "AllowPrecisionShot": { "type": "boolean" }, + "BlindfirePrecisionModifier": { "type": "number" }, + "BodyPartModifierArm": { "type": "number" }, + "BodyPartModifierFace": { "type": "number" }, + "BodyPartModifierHand": { "type": "number" }, + "BodyPartModifierHead": { "type": "number" }, + "BodyPartModifierLeg": { "type": "number" }, + "BodyPartModifierTorso": { "type": "number" }, + "CrosshairMaxAngleCap": { "type": "number" }, + "CrosshairModifierVisualOffset": { "type": "number" }, + "CrosshairOffset": { "type": "number" }, + "CrosshairScale": { "type": "number" }, + "CrosshairType": { "type": "string" }, + "DamageClose": { "type": "number" }, + "DamageFar": { "type": "number" }, + "DamageMedium": { "type": "number" }, + "DamageNear": { "type": "number" }, + "ExtraPickupMagazines": { "type": "number" }, + "HealthPercentToFall": { "type": "number" }, + "HitmanAutoreload": { "type": "boolean" }, + "HitsNumberToFall": { "type": "number" }, + "ImpactForce": { "type": "number" }, + "MagazineConfigs": { "type": "array", "items": { "type": "string" } }, + "MuzzleVelocity": { "type": "number" }, + "OTSCamPrecisionModifier": { "type": "number" }, + "PrecisionMinDegree": { "type": "number" }, + "PrecisionNumBullets": { "type": "number" }, + "PrecisionRecoveryDelay": { "type": "number" }, + "PrecisionRecoverySpeed": { "type": "number" }, + "PrecisionShotMultiplier": { "type": "number" }, + "PrecisionUnaimedMaxDegree": { "type": "number" }, + "PrecisionUnaimedMinDegree": { "type": "number" }, + "RagdollImpactUpKick": { "type": "number" }, + "RangeClose": { "type": "number" }, + "RangeFar": { "type": "number" }, + "RangeMedium": { "type": "number" }, + "RangeNear": { "type": "number" }, + "RecoilDelay": { "type": "number" }, + "RecoilEaseTime": { "type": "number" }, + "RecoilHorizontalRange": { "type": "number" }, + "RecoilMax": { "type": "number" }, + "RecoilRecoveryFraction": { "type": "number" }, + "RecoilVertialRange": { "type": "number" }, + "RecoilX": { "type": "number" }, + "RecoilZ": { "type": "number" }, + "ScopeZoom": { "type": "array", "items": { "type": "string" } }, + "ShotsPerMinute": { "type": "number" }, + "SneakMovingPrecisionModifier": { "type": "number" }, + "SneakNotMovingPrecisionModifier": { "type": "number" }, + "StandMovingPrecisionModifier": { "type": "number" }, + "AdaptiveTriggerEmptyEnd": { "type": "number" }, + "AdaptiveTriggerEmptyFrequency": { "type": "number" }, + "AdaptiveTriggerEmptyStart": { "type": "number" }, + "AdaptiveTriggerEmptyStrength": { "type": "number" }, + "AdaptiveTriggerEnd": { "type": "number" }, + "AdaptiveTriggerFrequency": { "type": "number" }, + "AdaptiveTriggerLeftEnd": { "type": "number" }, + "AdaptiveTriggerLeftFrequency": { "type": "number" }, + "AdaptiveTriggerLeftMode": { "type": "number" }, + "AdaptiveTriggerLeftStart": { "type": "number" }, + "AdaptiveTriggerLeftStrength": { "type": "number" }, + "AdaptiveTriggerMode": { "type": "number" }, + "AdaptiveTriggerStart": { "type": "number" }, + "AdaptiveTriggerStrength": { "type": "number" }, + "AllowAimAssist": { "type": "boolean" }, + "AllowPrecisionTimeSlowdown": { "type": "boolean" }, + "AllowScopeTimeSlowdown": { "type": "boolean" }, + "AmmoType": { "type": "string" }, + "AnalogPrecisionModeThreshold": { "type": "number" }, + "AnalogShootThreshold": { "type": "number" }, + "BobbingAngleX": { "type": "string" }, + "BobbingAngleY": { "type": "string" }, + "BobbingFrequencyX": { "type": "string" }, + "BobbingFrequencyY": { "type": "string" }, + "BulletsPerMagazine": { "type": "number" }, + "BurstAngleH": { "type": "number" }, + "BurstAngleV": { "type": "number" }, + "BurstPattern": { "type": "string" }, + "BurstRandomizationFactor": { "type": "number" }, + "CounterRotationFactor": { "type": "number" }, + "CrosshairDisplayHelpWhenNotAiming": { "type": "boolean" }, + "DeathImpactEffect": { "type": "string" }, + "DragAngles": { "type": "string" }, + "DragCorrectionFraction": { "type": "number" }, + "DragCorrectionTime": { "type": "number" }, + "FullAutoOperation": { "type": "boolean" }, + "HealthPercentTimeout": { "type": "number" }, + "HitsNumberTimeout": { "type": "number" }, + "ImpactEffect": { "type": "string" }, + "InitialMagazines": { "type": "number" }, + "MaxRange": { "type": "number" }, + "MuzzleEnergy": { "type": "number" }, + "PacifyTarget": { "type": "boolean" }, + "Piercing": { "type": "boolean" }, + "PointShootingAllowed": { "type": "boolean" }, + "PointShootingCoolDownTime": { "type": "number" }, + "PointShootingMaxTags": { "type": "number" }, + "PointShootingTagTime": { "type": "number" }, + "PrecisionMaxDegree": { "type": "number" }, + "PrecisionShotAimTime": { "type": "number" }, + "PrecisionShotBulletSpeedMultiplier": { "type": "number" }, + "PrecisionShotDuration": { "type": "number" }, + "PrecisionShotTimeMultiplier": { "type": "number" }, + "ProjectilesPerShot": { "type": "number" }, + "PulseDecayFraction": { "type": "number" }, + "PulseDecayTime": { "type": "number" }, + "PulseIncreaseOnShooting": { "type": "number" }, + "PulseRun": { "type": "number" }, + "PulseWalkInc": { "type": "number" }, + "PulseWalkPulse": { "type": "number" }, + "RagdollImpactUpKickGlobal": { "type": "number" }, + "RecoilDelay_VR": { "type": "number" }, + "RecoilEaseTime_VR": { "type": "number" }, + "RecoilHorizontalRange_VR": { "type": "number" }, + "RecoilMax_VR": { "type": "number" }, + "RecoilRecoveryFraction_VR": { "type": "number" }, + "RecoilRecoveryTime": { "type": "number" }, + "RecoilRecoveryTime_VR": { "type": "number" }, + "RecoilVertialRange_VR": { "type": "number" }, + "RecoilX_VR": { "type": "number" }, + "RecoilZ_VR": { "type": "number" }, + "ReloadFactor": { "type": "number" }, + "ScopedPrecisionShotCameraSpeedMultiplier": { "type": "number" }, + "ScopeFOV": { "type": "number" }, + "ScopeFOV_VR": { "type": "number" }, + "ScopeModePrecisionDegree": { "type": "number" }, + "SilenceRating": { "type": "string" }, + "StandNotMovingPrecisionModifier": { "type": "number" }, + "ZRecoilDistance": { "type": "number" }, + "ZRecoilDistance_VR": { "type": "number" }, + "ZRecoilTime": { "type": "number" }, + "ZRecoilTime_VR": { "type": "number" }, + "AmmoCount": { "type": "number" }, + "Parameter": { "type": "string" }, + "Toggle": { "type": "boolean" }, + "Value": { "type": "number" }, + "Count": { "type": "number" }, + "AmmoConfig": { "type": "string" }, + "MagazineSize": { "type": "number" }, + "MagazineIndex": { "type": "number" }, + "Tags": { "type": "array", "items": { "type": "string" } }, + "BobbingAngleXMultiplier": { "type": "string" }, + "BobbingAngleYMultiplier": { "type": "string" }, + "BobbingFrequencyXMultiplier": { "type": "string" }, + "BobbingFrequencyYMultiplier": { "type": "string" }, + "CounterRotationFactorMultiplier": { "type": "number" }, + "DragAnglesMultiplier": { "type": "string" }, + "DragCorrectionFractionMultiplier": { "type": "number" }, + "DragCorrectionTimeMultiplier": { "type": "number" }, + "PulseIncreaseOnShootingMultiplier": { "type": "number" }, + "AdditionalAmmo": { "type": "number" }, + "TargetMagazineTags": { "type": "array", "items": { "type": "string" } }, + "DamageFarMultiplier": { "type": "number" }, + "DamageMediumMultiplier": { "type": "number" }, + "DamageNearMultiplier": { "type": "number" }, + "DamageCloseMultiplier": { "type": "number" }, + "ImpactForceMultiplier": { "type": "number" }, + "RagdollImpactForceMultiplier": { "type": "number" }, + "RagdollImpactUpKickMultiplier": { "type": "number" }, + "SetAudioLowPassFilterIndex": { "type": "number" }, + "AddRangeMedium": { "type": "number" }, + "AddRangeClose": { "type": "number" }, + "AddRangeFar": { "type": "number" }, + "AddRangeNear": { "type": "number" }, + "BodyPartModifierArmMultiplier": { "type": "number" }, + "BodyPartModifierFaceMultiplier": { "type": "number" }, + "BodyPartModifierHandMultiplier": { "type": "number" }, + "BodyPartModifierHeadMultiplier": { "type": "number" }, + "BodyPartModifierLegMultiplier": { "type": "number" }, + "BodyPartModifierTorsoMultiplier": { "type": "number" }, + "AmmoImpactEffect": { "type": "string" }, + "AmmoInFlightEffect": { "type": "string" }, + "Behaviours": { "type": "array", "items": { "type": "string" } }, + "GravityOverride": { "type": "number" }, + "ImpactEffects": { "type": "array", "items": { "type": "string" } }, + "ScopeType": { "type": "number" }, + "UIKey": { "type": "string" }, + "DeathContext": { "type": "string" }, + "DeathType": { "type": "string" }, + "EffectsRangeMultiplier": { "type": "number" }, + "LiftMultiplier": { "type": "number" }, + "MassImpulseType": { "type": "string" }, + "PushOrigin": { "type": "number" }, + "RagdollImpulseMultiplier": { "type": "number" }, + "TargetRadii": { "type": "number" }, + "CenterStrength": { "type": "number" }, + "EffectsStrength": { "type": "number" }, + "LiftBias": { "type": "number" }, + "LiftSharpness": { "type": "number" }, + "PushBorder": { "type": "number" }, + "PushSharpness": { "type": "number" }, + "RespectsWalls": { "type": "boolean" }, + "RotateMultiplier": { "type": "number" }, + "ShockwavePropagationSpeed": { "type": "number" }, + "TargetStrength": { "type": "number" }, + "Type": { "type": "string" }, + "SetModelBodyPartSelections": { "type": "array", "items": { "type": "number" } }, + "SetModelMuzzleExtensionSelection": { "type": "number" }, + "SetModelMuzzleExtensionSkinSelection": { "type": "number" }, + "SetModelScopeSelection": { "type": "number" }, + "SetModelScopeSkinSelection": { "type": "number" }, + "SetModelSkinSelections": { "type": "array", "items": { "type": "number" } }, + "Hint_": { "type": "string" }, + "Tags_": { "type": "array", "items": { "type": "string" } }, + "SetSilenceRating": { "type": "string" }, + "SetScopeZoom": { "type": "array", "items": { "type": "string" } }, + "MuzzleVelocityMultiplier": { "type": "number" }, + "HealthPercentTimeoutMultiplier": { "type": "number" }, + "HealthPercentToFallMultiplier": { "type": "number" }, + "HitsNumberTimeoutMultiplier": { "type": "number" }, + "HitsNumberToFallMultiplier": { "type": "number" }, + "AllowsHitReaction": { "type": "boolean" }, + "PenetratesBodies": { "type": "boolean" }, + "PenetratesEnvironment": { "type": "boolean" }, + "SetAllowScopeTimeSlowdown": { "type": "boolean" }, + "ItemImpactUpkickMultiplier": { "type": "number" }, + "RagdollImpactUpkickMultiplier": { "type": "number" }, + "SetThrowType": { "type": "string" }, + "UnconsciousTimeOnThrowMultiplier": { "type": "number" }, + "SetPiercing": { "type": "boolean" }, + "SetAllowPrecisionTimeSlowdown": { "type": "boolean" }, + "PrecisionShotTimeScaleMultiplier": { "type": "number" }, + "SetAllowPrecisionShot": { "type": "boolean" }, + "BurstAngleHMultiplier": { "type": "number" }, + "BurstAngleVMultiplier": { "type": "number" }, + "BurstRandomizationFactorMultiplier": { "type": "number" }, + "Items": { "type": "array", "items": { "type": "string" } }, + "Guids": { "type": "array", "items": { "type": "string" } }, + "_popdensitycomment": { "type": "string" } + }, + "title": "Unlockable" + }, + "Configuration": { + "type": "object", + "properties": { + "ID_": { "type": "string" }, + "AdaptiveTriggerEmptyMode": { "type": "number" }, + "AllowPrecisionShot": { "type": "boolean" }, + "BlindfirePrecisionModifier": { "type": "number" }, + "BodyPartModifierFace": { "type": "number" }, + "BodyPartModifierHead": { "type": "number" }, + "BulletsPerMagazine": { "type": "number" }, + "CrosshairMaxAngleCap": { "type": "number" }, + "CrosshairOffset": { "type": "number" }, + "CrosshairScale": { "type": "number" }, + "CrosshairType": { "type": "string" }, + "DamageClose": { "type": "number" }, + "DamageFar": { "type": "number" }, + "DamageMedium": { "type": "number" }, + "DamageNear": { "type": "number" }, + "ExtraPickupMagazines": { "type": "number" }, + "HealthPercentTimeout": { "type": "number" }, + "HealthPercentToFall": { "type": "number" }, + "HitmanAutoreload": { "type": "boolean" }, + "HitsNumberTimeout": { "type": "number" }, + "ImpactForce": { "type": "number" }, + "InitialMagazines": { "type": "number" }, + "MagazineConfigs": { "type": "array", "items": { "type": "string" } }, + "MuzzleVelocity": { "type": "number" }, + "OTSCamPrecisionModifier": { "type": "number" }, + "PointShootingTagTime": { "type": "number" }, + "PrecisionMaxDegree": { "type": "number" }, + "PrecisionMinDegree": { "type": "number" }, + "PrecisionNumBullets": { "type": "number" }, + "PrecisionRecoveryDelay": { "type": "number" }, + "PrecisionRecoverySpeed": { "type": "number" }, + "PrecisionShotMultiplier": { "type": "number" }, + "PrecisionUnaimedMaxDegree": { "type": "number" }, + "PrecisionUnaimedMinDegree": { "type": "number" }, + "RagdollImpactForce": { "type": "number" }, + "RagdollImpactUpKick": { "type": "number" }, + "RangeClose": { "type": "number" }, + "RangeFar": { "type": "number" }, + "RangeMedium": { "type": "number" }, + "RangeNear": { "type": "number" }, + "RecoilDelay": { "type": "number" }, + "RecoilEaseTime": { "type": "number" }, + "RecoilHorizontalRange": { "type": "number" }, + "RecoilMax": { "type": "number" }, + "RecoilRecoveryFraction": { "type": "number" }, + "RecoilRecoveryTime": { "type": "number" }, + "RecoilVertialRange": { "type": "number" }, + "RecoilX": { "type": "number" }, + "RecoilZ": { "type": "number" }, + "ScopeZoom": { "type": "array", "items": { "type": "string" } }, + "ShotsPerMinute": { "type": "number" }, + "SneakMovingPrecisionModifier": { "type": "number" }, + "SneakNotMovingPrecisionModifier": { "type": "number" }, + "StandMovingPrecisionModifier": { "type": "number" }, + "AdaptiveTriggerEmptyEnd": { "type": "number" }, + "AdaptiveTriggerEmptyFrequency": { "type": "number" }, + "AdaptiveTriggerEmptyStart": { "type": "number" }, + "AdaptiveTriggerEmptyStrength": { "type": "number" }, + "AdaptiveTriggerEnd": { "type": "number" }, + "AdaptiveTriggerFrequency": { "type": "number" }, + "AdaptiveTriggerLeftEnd": { "type": "number" }, + "AdaptiveTriggerLeftFrequency": { "type": "number" }, + "AdaptiveTriggerLeftMode": { "type": "number" }, + "AdaptiveTriggerLeftStart": { "type": "number" }, + "AdaptiveTriggerLeftStrength": { "type": "number" }, + "AdaptiveTriggerMode": { "type": "number" }, + "AdaptiveTriggerStart": { "type": "number" }, + "AdaptiveTriggerStrength": { "type": "number" }, + "AllowAimAssist": { "type": "boolean" }, + "AllowPrecisionTimeSlowdown": { "type": "boolean" }, + "AllowScopeTimeSlowdown": { "type": "boolean" }, + "AmmoType": { "type": "string" }, + "AnalogPrecisionModeThreshold": { "type": "number" }, + "AnalogShootThreshold": { "type": "number" }, + "BobbingAngleX": { "type": "string" }, + "BobbingAngleY": { "type": "string" }, + "BobbingFrequencyX": { "type": "string" }, + "BobbingFrequencyY": { "type": "string" }, + "BodyPartModifierArm": { "type": "number" }, + "BodyPartModifierHand": { "type": "number" }, + "BodyPartModifierLeg": { "type": "number" }, + "BodyPartModifierTorso": { "type": "number" }, + "BurstAngleH": { "type": "number" }, + "BurstAngleV": { "type": "number" }, + "BurstPattern": { "type": "string" }, + "BurstRandomizationFactor": { "type": "number" }, + "CounterRotationFactor": { "type": "number" }, + "CrosshairDisplayHelpWhenNotAiming": { "type": "boolean" }, + "CrosshairModifierVisualOffset": { "type": "number" }, + "DeathImpactEffect": { "type": "string" }, + "DragAngles": { "type": "string" }, + "DragCorrectionFraction": { "type": "number" }, + "DragCorrectionTime": { "type": "number" }, + "FullAutoOperation": { "type": "boolean" }, + "HitsNumberToFall": { "type": "number" }, + "ImpactEffect": { "type": "string" }, + "MaxRange": { "type": "number" }, + "MuzzleEnergy": { "type": "number" }, + "PacifyTarget": { "type": "boolean" }, + "Perks": { "type": "array", "items": { "type": "string" } }, + "Piercing": { "type": "boolean" }, + "PointShootingAllowed": { "type": "boolean" }, + "PointShootingCoolDownTime": { "type": "number" }, + "PointShootingMaxTags": { "type": "number" }, + "PrecisionShotAimTime": { "type": "number" }, + "PrecisionShotBulletSpeedMultiplier": { "type": "number" }, + "PrecisionShotDuration": { "type": "number" }, + "PrecisionShotTimeMultiplier": { "type": "number" }, + "ProjectilesPerShot": { "type": "number" }, + "PulseDecayFraction": { "type": "number" }, + "PulseDecayTime": { "type": "number" }, + "PulseIncreaseOnShooting": { "type": "number" }, + "PulseRun": { "type": "number" }, + "PulseWalkInc": { "type": "number" }, + "PulseWalkPulse": { "type": "number" }, + "RagdollImpactForceGlobal": { "type": "number" }, + "RagdollImpactUpKickGlobal": { "type": "number" }, + "RecoilDelay_VR": { "type": "number" }, + "RecoilEaseTime_VR": { "type": "number" }, + "RecoilHorizontalRange_VR": { "type": "number" }, + "RecoilMax_VR": { "type": "number" }, + "RecoilRecoveryFraction_VR": { "type": "number" }, + "RecoilRecoveryTime_VR": { "type": "number" }, + "RecoilVertialRange_VR": { "type": "number" }, + "RecoilX_VR": { "type": "number" }, + "RecoilZ_VR": { "type": "number" }, + "ReloadFactor": { "type": "number" }, + "ScopedPrecisionShotCameraSpeedMultiplier": { "type": "number" }, + "ScopeFOV": { "type": "number" }, + "ScopeFOV_VR": { "type": "number" }, + "ScopeModePrecisionDegree": { "type": "number" }, + "SilenceRating": { "type": "string" }, + "StandNotMovingPrecisionModifier": { "type": "number" }, + "ZRecoilDistance": { "type": "number" }, + "ZRecoilDistance_VR": { "type": "number" }, + "ZRecoilTime": { "type": "number" }, + "ZRecoilTime_VR": { "type": "number" } + }, + "title": "Configuration" + }, + "ConfigurationReference": { "anyOf": [{ "$ref": "#/definitions/Configuration" }, { "type": "string" }], "title": "ConfigurationReference" } + } +} diff --git a/.github/tag-changelog-config.js b/.github/tag-changelog-config.js new file mode 100644 index 0000000..2239831 --- /dev/null +++ b/.github/tag-changelog-config.js @@ -0,0 +1,15 @@ +module.exports = { + types: [ + { types: ["feat", "feature"], label: "New Features" }, + { types: ["fix", "bugfix"], label: "Bug Fixes" }, + { types: ["improvement", "improvements", "enhancement"], label: "Improvements" }, + { types: ["perf"], label: "Performance Improvements" }, + { types: ["build", "ci"], label: "Build System" }, + { types: ["refactor"], label: "Refactors" }, + { types: ["doc", "docs"], label: "Documentation Changes" }, + { types: ["test", "tests"], label: "Tests" }, + { types: ["style"], label: "Code Style Changes" }, + { types: ["chore"], label: "Chores" }, + { types: ["other"], label: "Other Changes" } + ] +} diff --git a/.github/unlockables-schema.json b/.github/unlockables-schema.json new file mode 100644 index 0000000..42e023d --- /dev/null +++ b/.github/unlockables-schema.json @@ -0,0 +1,86 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "patternProperties": { "^.*$": { "$ref": "#/definitions/Unlockable" } }, + "definitions": { + "Unlockable": { + "type": "object", + "properties": { + "Id": { "type": "string" }, + "Guid": { "type": "string" }, + "Type": { "type": "string" }, + "Subtype": { "type": "string" }, + "ImageId": { "anyOf": [{ "type": "null" }, { "type": "string" }] }, + "RMTPrice": { "type": "integer" }, + "GamePrice": { "type": "integer" }, + "IsPurchasable": { "type": "boolean" }, + "IsPublished": { "type": "boolean" }, + "IsDroppable": { "type": "boolean" }, + "Capabilities": { "type": "array", "items": {} }, + "Qualities": { "$ref": "#/definitions/Qualities" }, + "Properties": { "$ref": "#/definitions/Properties" }, + "Rarity": { "anyOf": [{ "type": "null" }, { "type": "string" }] }, + "UnlockOrder": { "type": "integer" } + } + }, + "Properties": { + "type": "object", + "properties": { + "RewardHidden": { "type": "boolean" }, + "HowToUnlock": { "type": "string" }, + "AllowUpSync": { "type": "boolean" }, + "Background": { "type": "string" }, + "Icon": { "type": "string" }, + "LockedIcon": { "type": "string" }, + "DlcImage": { "type": "string" }, + "DlcName": { "type": "string" }, + "IsLocked": { "type": "boolean" }, + "Order": { "type": "integer" }, + "ProgressionKey": { "type": "string" }, + "Season": { "type": "integer" }, + "RequiredResources": { "type": "array", "items": { "type": "string" } }, + "Entitlements": { "type": "array", "items": { "type": "string" } }, + "ParentLocation": { "type": "string" }, + "GameChangers": { "type": "array", "items": {} }, + "CreateContractId": { "type": "string" }, + "IsFreeDLC": { "type": "boolean" }, + "HideProgression": { "type": "boolean" }, + "ExcludeParentRewards": { "type": "boolean" }, + "Quality": { "$ref": "#/definitions/Quality" }, + "v0Id": { "type": "string" }, + "UpcomingContent": { "type": "boolean" }, + "UpcomingKey": { "type": "string" }, + "LimitedLoadout": { "type": "boolean" }, + "NormalLoadoutUnlock": { "type": "string" }, + "Unlocks": { "type": "array", "items": { "type": "string" } }, + "Rarity": { "type": "string" }, + "LoadoutSlot": { "type": "string" }, + "IsConsumable": { "type": "boolean" }, + "RepositoryId": { "type": "string" }, + "OrderIndex": { "type": "integer" }, + "Name": { "type": "string" }, + "Description": { "type": "string" }, + "UnlockOrder": { "type": "integer" }, + "Location": { "type": "string" }, + "UnlockedByDefault": { "type": "boolean" }, + "Equip": { "type": "array", "items": { "type": "string" } }, + "GameAssets": { "type": "array", "items": { "type": "string" } }, + "RepositoryAssets": { "type": "array", "items": { "type": "string" } }, + "Gameplay": { "$ref": "#/definitions/Gameplay" }, + "AlwaysAdd": { "type": "boolean" }, + "BlacklistedByDefault": { "type": "boolean" }, + "IsContainer": { "type": "boolean" }, + "LoadoutSettings": { "$ref": "#/definitions/LoadoutSettings" }, + "Perks": { "type": "array", "items": { "type": "string" } } + } + }, + "Gameplay": { "type": "object", "properties": { "range": { "type": "number" }, "damage": { "type": "number" }, "clipsize": { "type": "number" }, "rateoffire": { "type": "number" } } }, + "LoadoutSettings": { + "type": "object", + "properties": { "GearSlotsEnabledCount": { "type": "integer" }, "GearSlotsAllowContainers": { "type": "boolean" }, "ConcealedWeaponSlotEnabled": { "type": "boolean" } } + }, + "Qualities": { "type": "object" }, + "Quality": { "anyOf": [{ "type": "integer" }, { "type": "string" }] } + }, + "additionalProperties": false +} diff --git a/.github/validate-mod-folder.js b/.github/validate-mod-folder.js new file mode 100644 index 0000000..817b46d --- /dev/null +++ b/.github/validate-mod-folder.js @@ -0,0 +1,142 @@ +"use strict"; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +exports.__esModule = true; +exports.validateModFolder = void 0; +var contractSchema = require("./contract-schema.json"); +var entityPatchSchema = require("./entity-patch-schema.json"); +var entitySchema = require("./entity-schema.json"); +var fs = require("fs-extra"); +var json5 = require("json5"); +var jsonPatchSchema = require("./json-patch-schema.json"); +var klawSync = require("klaw-sync"); +var manifestSchema = require("./manifest-schema.json"); +var path = require("path"); +var repositorySchema = require("./repository-schema.json"); +var unlockablesSchema = require("./unlockables-schema.json"); +var ajv_1 = require("ajv"); +var validateManifest = new ajv_1["default"]({ strict: false }).compile(manifestSchema); +var validateEntity = new ajv_1["default"]({ strict: false }).compile(entitySchema); +var validateEntityPatch = new ajv_1["default"]({ strict: false }).compile(entityPatchSchema); +var validateRepository = new ajv_1["default"]({ strict: false }).compile(repositorySchema); +var validateUnlockables = new ajv_1["default"]({ strict: false }).compile(unlockablesSchema); +var validateContract = new ajv_1["default"]({ strict: false }).compile(contractSchema); +var validateJSONPatch = new ajv_1["default"]({ strict: false }).compile(jsonPatchSchema); +function validateModFolder(modFolder) { + var _a; + var _b; + if (!fs.existsSync(path.join(modFolder, "manifest.json"))) { + return [false, "No manifest"]; + } + try { + json5.parse(fs.readFileSync(path.join(modFolder, "manifest.json"), "utf8")); + } + catch (_c) { + return [false, "Invalid manifest due to invalid JSON"]; + } + if (!validateManifest(json5.parse(fs.readFileSync(path.join(modFolder, "manifest.json"), "utf8")))) { + return [false, "Invalid manifest due to non-matching schema: ".concat(new ajv_1["default"]({ strict: false }).errorsText(validateManifest.errors))]; + } + var manifest = json5.parse(fs.readFileSync(path.join(modFolder, "manifest.json"), "utf8")); + // ------ + if (manifest.frameworkVersion.startsWith("1")) { + return [false, "Designed for earlier framework version"]; + } + // ------ + for (var _i = 0, _d = __spreadArray(__spreadArray([], (manifest.contentFolders || []), true), (manifest.options || []).flatMap(function (a) { return a.contentFolders || []; }), true); _i < _d.length; _i++) { + var contentFolder = _d[_i]; + if (!fs.existsSync(path.resolve(modFolder, contentFolder))) { + return [false, "Invalid content folder \"".concat(contentFolder, "\" due to nonexistent path")]; + } + var chunkFolders = fs.readdirSync(path.resolve(modFolder, contentFolder)); + if (chunkFolders.length === 0) { + return [false, "Empty content folder \"".concat(contentFolder, "\"")]; + } + for (var _e = 0, chunkFolders_1 = chunkFolders; _e < chunkFolders_1.length; _e++) { + var chunkFolder = chunkFolders_1[_e]; + if (!chunkFolder.match(/chunk([0-9]*)/)) { + return [false, "Invalid chunk folder \"".concat(chunkFolder, "\" in \"").concat(contentFolder, "\"")]; + } + } + } + for (var _f = 0, _g = __spreadArray(__spreadArray([], (manifest.blobsFolders || []), true), (manifest.options || []).flatMap(function (a) { return a.blobsFolders || []; }), true); _f < _g.length; _f++) { + var blobsFolder = _g[_f]; + if (!fs.existsSync(path.resolve(modFolder, blobsFolder))) { + return [false, "Invalid blobs folder \"".concat(blobsFolder, "\" due to nonexistent path")]; + } + if (fs.readdirSync(path.resolve(modFolder, blobsFolder)).length === 0) { + return [false, "Empty blobs folder \"".concat(blobsFolder, "\"")]; + } + } + var groups = {}; + for (var _h = 0, _j = manifest.options || []; _h < _j.length; _h++) { + var option = _j[_h]; + if (option.type === "select") { + (_a = groups[_b = option.group]) !== null && _a !== void 0 ? _a : (groups[_b] = [0, 0]); + groups[option.group][0] = groups[option.group][0] + 1; + if (option.enabledByDefault) { + groups[option.group][1] = groups[option.group][1] + 1; + } + } + } + for (var _k = 0, _l = Object.entries(groups); _k < _l.length; _k++) { + var _m = _l[_k], group = _m[0], _o = _m[1], members = _o[0], enabledByDefault = _o[1]; + if (members === 1) { + return [false, "Option group \"".concat(group, "\" has only one member")]; + } + if (enabledByDefault > 1) { + return [false, "Option group \"".concat(group, "\" has more than one member enabled by default")]; + } + } + for (var _p = 0, _q = klawSync(modFolder, { nodir: true }).map(function (a) { return a.path; }); _p < _q.length; _p++) { + var file = _q[_p]; + if (file.endsWith("entity.json") || + file.endsWith("entity.patch.json") || + file.endsWith("repository.json") || + file.endsWith("unlockables.json") || + file.endsWith("JSON.patch.json") || + file.endsWith("contract.json")) { + try { + var fileContents = fs.readJSONSync(file); + switch (file.split(".").slice(1).join(".")) { + case "entity.json": + if (fileContents.quickEntityVersion === 3.1 && !validateEntity(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateEntity.errors))]; + break; + case "entity.patch.json": + if (fileContents.patchVersion === 6 && !validateEntityPatch(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateEntityPatch.errors))]; + break; + case "repository.json": + if (!validateRepository(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateRepository.errors))]; + break; + case "unlockables.json": + if (!validateUnlockables(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateUnlockables.errors))]; + break; + case "contract.json": + if (!validateContract(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateContract.errors))]; + break; + case "JSON.patch.json": + if (!validateJSONPatch(fileContents)) + return [false, "Invalid file ".concat(file, " due to non-matching schema: ").concat(new ajv_1["default"]({ strict: false }).errorsText(validateJSONPatch.errors))]; + break; + } + } + catch (_r) { + return [false, "Invalid file ".concat(file, " due to invalid JSON")]; + } + } + } + return [true, ""]; +} +exports.validateModFolder = validateModFolder; diff --git a/.github/validate.js b/.github/validate.js new file mode 100644 index 0000000..c243528 --- /dev/null +++ b/.github/validate.js @@ -0,0 +1,10 @@ +const { validateModFolder } = require("./validate-mod-folder") + +/** @type any */ +const validation = validateModFolder(process.cwd()) + +if (!validation[0]) { + throw new Error(validation[1]) +} else { + console.log("Validation passed") +} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8831d9a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,205 @@ +name: Release + +permissions: + contents: write + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + if: "!startsWith(github.ref, 'refs/tags/')" + + steps: + - uses: actions/checkout@v2 + with: + ref: "main" + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: | + npm install + + - name: Create .releaserc + env: + REPO_URL: ${{ format('https://github.com/{0}.git', github.repository) }} + run: | + echo "{\"branches\":[\"main\"],\"plugins\":[[\"@semantic-release/commit-analyzer\",{\"preset\":\"conventionalcommits\",\"releaseRules\":[{\"type\":\"enhancement\",\"release\":\"minor\"}]}], \"semantic-release-export-data\"],\"repositoryUrl\":\"$REPO_URL\",\"tagFormat\":\"\${version}\"}" > .releaserc + + - name: Get first commit + id: firstCommit + run: echo "FIRST_COMMIT=$(git rev-list --date-order main | tail -1)" >> $GITHUB_OUTPUT + + - uses: mukunku/tag-exists-action@v1.2.0 + id: checkTag + with: + tag: "0.1.0" + + - name: Create tag + if: ${{ steps.checkTag.outputs.exists == 'false' }} + uses: tvdias/github-tagger@v0.0.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + tag: "0.1.0" + commit-sha: ${{ steps.firstCommit.outputs.FIRST_COMMIT }} + + - name: Get new version + id: newVersion + run: npx --yes semantic-release --branches main --dry-run + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get latest framework version + id: latestFramework + uses: pozetroninc/github-action-get-latest-release@v0.7.0 + with: + repository: atampy25/simple-mod-framework + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update manifest.json version + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: jossef/action-set-json-field@v2 + with: + file: "manifest.json" + field: "version" + value: ${{ steps.newVersion.outputs.new-release-version }} + + - name: Update manifest.json frameworkVersion + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: jossef/action-set-json-field@v2 + with: + file: "manifest.json" + field: "frameworkVersion" + value: ${{ steps.latestFramework.outputs.release }} + + - name: Update manifest.json updateCheck + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: jossef/action-set-json-field@v2 + with: + file: "manifest.json" + field: "updateCheck" + value: ${{ format('https://github.com/{0}/releases/latest/download/updates.json', github.repository) }} + + - name: Get mod ID + if: ${{ steps.newVersion.outputs.new-release-version }} + id: modID + uses: notiz-dev/github-action-json-property@release + with: + path: "manifest.json" + prop_path: "id" + + - name: Get mod name + if: ${{ steps.newVersion.outputs.new-release-version }} + id: modName + uses: notiz-dev/github-action-json-property@release + with: + path: "manifest.json" + prop_path: "name" + + - name: Get mod description + if: ${{ steps.newVersion.outputs.new-release-version }} + id: modDesc + uses: notiz-dev/github-action-json-property@release + with: + path: "manifest.json" + prop_path: "description" + + - name: Get mod authors + if: ${{ steps.newVersion.outputs.new-release-version }} + id: modAuthors + uses: notiz-dev/github-action-json-property@release + with: + path: "manifest.json" + prop_path: "authors" + + - name: Read README.md + if: ${{ steps.newVersion.outputs.new-release-version }} + id: readme + uses: juliangruber/read-file-action@v1.1.6 + with: + path: README.md + + - name: Auto-generate README + if: ${{ steps.newVersion.outputs.new-release-version && (contains(steps.readme.outputs.content, 'Simple Mod Framework mod template') || contains(steps.readme.outputs.content, 'This README was automatically generated from the mod''s manifest.')) }} + uses: DamianReeves/write-file-action@v1.2 + with: + path: README.md + contents: | + # ${{ steps.modName.outputs.prop }} + ${{ steps.modDesc.outputs.prop }} + + [Install](https://hitman-resources.netlify.app/smf-install-link/${{ format('https://github.com/{0}/releases/latest/download/mod.framework.zip', github.repository) }}) | [Download](${{ format('https://github.com/{0}/releases/latest/download/mod.framework.zip', github.repository) }}) + + --- + + `${{ steps.modID.outputs.prop }}` v${{ steps.newVersion.outputs.new-release-version }}, by ${{ join(fromJSON(steps.modAuthors.outputs.prop), ', ') }}. This README was automatically generated from the mod's manifest. + write-mode: overwrite + + - name: Format + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: actionsx/prettier@v2 + with: + args: --write . + + - name: Commit changes + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: EndBug/add-and-commit@v9.1.0 + with: + default_author: github_actions + message: "chore: mod update" + tag: ${{ steps.newVersion.outputs.new-release-version }} + + - name: Generate changelog + if: ${{ steps.newVersion.outputs.new-release-version }} + id: changelog + uses: loopwerk/tag-changelog@v1.0.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config_file: .github/tag-changelog-config.js + exclude_types: other,docs,chore,build,amend,refactor + + - name: Copy files + if: ${{ steps.newVersion.outputs.new-release-version }} + env: + TARGETDIR: ${{ steps.modID.outputs.prop }} + run: | + mkdir $TARGETDIR + for file in *;do test "$file" != "$TARGETDIR" && cp -r "$file" "$TARGETDIR/";done + rm -rf "$TARGETDIR/node_modules" + rm "$TARGETDIR/package.json" "$TARGETDIR/package-lock.json" "$TARGETDIR/README.md" + + - name: Create ZIP + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: TheDoctor0/zip-release@4fb9e4ff72847dd3d1c111cf63834e353ed7cb3d + with: + filename: mod.framework.zip + path: ${{ steps.modID.outputs.prop }} + + - name: Create updates.json + if: ${{ steps.newVersion.outputs.new-release-version }} + env: + VERSION: ${{ toJSON(steps.newVersion.outputs.new-release-version) }} + CHANGELOG: ${{ toJSON(steps.changelog.outputs.changes) }} + URL: ${{ format('https://github.com/{0}/releases/latest/download/mod.framework.zip', github.repository) }} + run: | + echo "{\"version\":$VERSION,\"changelog\":$CHANGELOG,\"url\":\"$URL\"}" > updates.json + + - name: Release + if: ${{ steps.newVersion.outputs.new-release-version }} + uses: softprops/action-gh-release@v1 + with: + name: ${{ steps.newVersion.outputs.new-release-version }} + body: "[Install](https://hitman-resources.netlify.app/smf-install-link/${{ format('https://github.com/{0}/releases/download/{1}/mod.framework.zip', github.repository, steps.newVersion.outputs.new-release-version) }}) | [Download](${{ format('https://github.com/{0}/releases/download/{1}/mod.framework.zip', github.repository, steps.newVersion.outputs.new-release-version) }})\n\n${{ steps.changelog.outputs.changes }}" + tag_name: ${{ steps.newVersion.outputs.new-release-version }} + repository: ${{ github.repository }} + files: | + mod.framework.zip + updates.json diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..c8d4b97 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,21 @@ +name: Validate + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: | + npm install + + - name: Validate mod + run: node .github/validate.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9abbd26 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.releaserc +node_modules \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..e4698af --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx.cmd lint-staged diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5014ca1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "trailingComma": "none", + "requirePragma": false, + "bracketSpacing": true, + "singleQuote": false, + "printWidth": 125, + "useTabs": true, + "tabWidth": 4, + "semi": false +} diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..e72bfdd --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/COPYING.LESSER b/COPYING.LESSER new file mode 100644 index 0000000..153d416 --- /dev/null +++ b/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ce0d18c --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# Simple Mod Framework mod template + +The preferred template for Simple Mod Framework mods. + +## Why should I use this? + +### Better changelog handling + +Changelogs in mod updates are often not particularly helpful to users. Let's look at an example: Notex's [Portable Chair mod](https://www.nexusmods.com/hitman3/mods/453). Initially, the mod was released (like all mods) at version `1.0.0`. It was then given an update to `1.1.0` with the following changes: + +![Portable Chair 1.1.0 changelog](https://hitman-resources.netlify.app/assets/portablechair-1.1.0.png) + +It was then given another update, to `1.2.0`, with the following changes: + +![Portable Chair 1.2.0 changelog](https://hitman-resources.netlify.app/assets/portablechair-1.2.0.png) + +If Portable Chair didn't use the `smf-mod` template, a user on `1.0.0` would only see that last changelog, and would be completely unaware of the changes from `1.1.0` (which are "skipped over"). Because it uses the template, the Simple Mod Framework is able to use the GitHub releases published automatically to find the older changelog and merge it with the newer one. Because of that, users of the mod are able to see all the changes which lead up to the version they're updating to, not just the ones from the last version. + +### Other features + +- Automatic versioning + - Versions of the mod are automatically zipped, releases are automatically made and the mod update JSON are automatically updated + - Conventional commits mean that you don't have to do anything; any change you make to your mod can automatically be converted into a release with the versions all handled for you + - This also means that your versions are fully compatible with Semantic Versioning, which improves the framework's ability to know how your mod has changed + - Your mod's manifest will be edited for you; you don't have to set anything up yourself +- Automatic formatting + - Prettier is run before each commit, and a pre-made configuration for it is included +- LGPLv3 license + - Mods created with this template are permissively licensed; anyone can alter your mod, but they have to give credit and provide a list of what they have changed +- Automatic updating of `frameworkVersion` + - Most mod developers don't bother updating this property; the template automatically brings it in line with the version your mod is actually being tested against +- Automatic README generation + - The template will update the README for the repository automatically with each new release + - If you want to write your own, just modify it yourself and the template won't touch it + +### The benefits of Git/GitHub + +If you're new to Git and GitHub, you might also want to know why they're recommended. To answer that, think to yourself whether you've ever accidentally modified a file irreversibly and not been able to get back the old version; alternatively, think to yourself whether you've ever wanted to keep certain sets of changes for later while working on something else, or whether you've ever wanted to have a history of your changes to see how you did something a while ago. Git does all of that. + +GitHub is a place for hosting Git repositories, which lets you more easily see branches, track issues and collaborate with other people. + +## How do I use this? + +### Requirements + +You'll need Git, obviously, and preferably also a GUI client if you aren't experienced with Git's command line interface. GitHub Desktop is recommended, but VS Code includes its own as well (though it can be unintuitive at times and functions more as a list of Git commands than as an easy-to-use interface). + +You'll also want Node.js for formatting and using other tools (QuickEntity Editor, for example, requires it for game-file extensions). You can download the latest release from [here](https://nodejs.org/en) - either LTS or Current is fine. + +### Cloning the template + +To get started, click the green "Use this template" button on GitHub and create a new repository. Give it whatever name you like and make it public or private (if you want to make it private, then make sure to change it back to public when the mod is released, else there's no point in this template). You can then clone the repository directly into your Mods folder (so the repository gets its own folder under Mods where you can work). + +Once you've done that, go to the new folder in your Mods folder and run the commands `npm install` and `npm run prepare` to set up automatic formatting. + +### Making a new mod + +First, edit `manifest.json` to use the correct mod ID and create a commit along the lines of `feat: initial mod`. From then, you can work on your mod and make whatever commits you like (per the following section). + +An important note: the version for the mod starts at `0.1.0`, which means the mod is in development - you can make as many changes as you like at `0.x.x`. When you finalise the mod for its first release, add an exclamation mark before the `:` (like `feat!: final feature`) and the version will automatically be bumped to `1.0.0`. + +Don't worry about updating your manifest's version or `updateCheck` property; the template will configure all that for you. A tip for mod releases - whenever you want to push an update to Nexus, you can just download the `mod.framework.zip` file on the GitHub release generated by the template and upload it to Nexus, which saves having to do it yourself. + +### Transferring an existing mod + +If you're looking to integrate this into an existing mod you have, copy everything from that mod over to this template, create a commit named something like `chore: transfer existing mod` and then tag that commit with the currently released version of the mod (the initial commit will still automatically be tagged 0.1.0, which is fine). For example, a mod which is currently at 1.1.0 would be copied over, a commit containing the current mod version would be created under whatever name, and that commit would be tagged `1.1.0`. + +Don't worry about updating your manifest's version or `updateCheck` property; the template will configure all that for you. + +### How to make commits + +This template will do everything for you, including versioning, generating changelogs and creating mod ZIPs; just make sure you follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0). + +As a rule of thumb, anything that doesn't drastically alter the mod or make sweeping changes that could break other mods should be either an `enhancement` (for improvements to existing parts of the mod), `feat` (for new parts of the mod) or `fix` (for bugfixes). You can specify the part of the mod you're changing in parentheses like so: `fix(localisation): typo in French text`. + +If you do drastically alter the mod or make sweeping changes that could break other mods, add an exclamation mark just before the `:`, and write `BREAKING CHANGE: This thing is now this thing, which means this.` in the "description" or "footer" of the commit. + +### How to not make a release for every change + +If you want to have multiple new features in a release, just make conventional commits in a new branch and then merge them into the main branch once you want to release. When the branch is merged, the template will detect all the new commits and adjust the changelog/version appropriately. + +### How to not use conventional commits for making lots of small changes + +If you're making a lot of trivial changes that you'd ordinarily call names like `whatever` or `fix that thing from before`, you should be working in a feature branch. In a branch you can make as many commits as you like to work on a specific feature under whatever name, and then use the GitHub "squash and merge" feature to combine them all into one `feat: name of new feature` commit. + +To combine this advice with the last, you can work like this: + +- create a `next-release` branch +- create a `new-feature-1` branch +- make whatever commits you like on `new-feature-1`: "do half the work", "whoops, fix that" +- squash and merge `new-feature-1` onto `next-release` under the commit `feat: new feature 1` +- create an `improvement-whatever` branch +- make whatever commits you like on `improvement-whatever`: "improve that part", "finish it off" +- squash and merge `improvement-whatever` onto `next-release` under the commit `enhancement: some improvement` +- standard merge `next-release` onto `main` + +The result of this would be a changelog like this: + +- New Features + - new feature 1 +- Improvements + - some improvement diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..877e79d --- /dev/null +++ b/manifest.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/atampy25/simple-mod-framework/main/Mod%20Manager/src/lib/manifest-schema.json", + "version": "0.1.0", + "id": "YourPreferredAlias.AnIDForTheMod", + "name": "Test Mod", + "description": "A truly amazing mod", + "authors": ["Your Preferred Alias"], + "frameworkVersion": "2.25.1" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a7044d7 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "smf-mod", + "version": "0.0.0", + "description": "An SMF mod.", + "license": "LGPL-3.0-only", + "private": true, + "devDependencies": { + "conventional-changelog-conventionalcommits": "^6.1.0", + "husky": "^8.0.3", + "lint-staged": "^13.2.3", + "prettier": "3.0.0", + "semantic-release-export-data": "^1.0.1", + "fs-extra": "11.2.0", + "json5": "2.2.3", + "klaw-sync": "6.0.0", + "ajv": "8.12.0" + }, + "scripts": { + "prepare": "husky install" + }, + "lint-staged": { + "**/*": "prettier --write --ignore-unknown" + } +} diff --git a/project.json b/project.json new file mode 100644 index 0000000..9b80b47 --- /dev/null +++ b/project.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/atampy25/quickentity-editor-next/main/src/lib/project-schema.json", + "customPaths": [] +}