roleplay-data 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "item.schema.json",
4
+ "title": "Catalogue d'items",
5
+ "description": "Source de vérité des items du jeu. Les items sont identifiés par un id canonique snake_case, nommés par objet localisé, et peuvent être étendus via customProperties (point d'extension libre par projet).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["items"],
9
+ "properties": {
10
+ "items": {
11
+ "type": "array",
12
+ "items": { "$ref": "#/definitions/item" }
13
+ }
14
+ },
15
+ "definitions": {
16
+ "localized": {
17
+ "type": "object",
18
+ "required": ["fr", "en"],
19
+ "properties": {
20
+ "fr": { "type": "string", "minLength": 1 },
21
+ "en": { "type": "string", "minLength": 1 }
22
+ },
23
+ "additionalProperties": { "type": "string", "minLength": 1 }
24
+ },
25
+ "item": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["id", "name", "description", "image", "weight"],
29
+ "properties": {
30
+ "id": {
31
+ "type": "string",
32
+ "pattern": "^[a-z0-9_-]+$",
33
+ "description": "Identifiant canonique (ex: weapon_pistol). Ne change jamais entre deux versions."
34
+ },
35
+ "name": {
36
+ "$ref": "#/definitions/localized",
37
+ "description": "Nom de l'item dans chaque locale."
38
+ },
39
+ "description": {
40
+ "$ref": "#/definitions/localized",
41
+ "description": "Description de l'item dans chaque locale."
42
+ },
43
+ "image": {
44
+ "type": "string",
45
+ "description": "Nom du fichier dans le pack d'images par défaut (themes/gta-artwork)."
46
+ },
47
+ "emoji": {
48
+ "type": "string",
49
+ "description": "Emoji associé (affichage Discord/UI)."
50
+ },
51
+ "weight": {
52
+ "type": "number",
53
+ "minimum": 0,
54
+ "description": "Poids en grammes."
55
+ },
56
+ "food": {
57
+ "type": "number",
58
+ "minimum": -100,
59
+ "maximum": 100,
60
+ "default": 0,
61
+ "description": "Valeur de nourriture apportée."
62
+ },
63
+ "thirst": {
64
+ "type": "number",
65
+ "minimum": -100,
66
+ "maximum": 100,
67
+ "default": 0,
68
+ "description": "Valeur de soif apportée."
69
+ },
70
+ "drug": {
71
+ "anyOf": [{ "type": "null" }, { "$ref": "#/definitions/drug" }],
72
+ "default": null,
73
+ "description": "Propriétés de drogue si l'item en est une."
74
+ },
75
+ "stackable": {
76
+ "type": "boolean",
77
+ "default": true,
78
+ "description": "L'item peut-il être empilé dans l'inventaire ?"
79
+ },
80
+ "usable": {
81
+ "type": "boolean",
82
+ "default": false,
83
+ "description": "L'item est-il utilisable (interaction) ?"
84
+ },
85
+ "tags": {
86
+ "type": "array",
87
+ "items": { "type": "string" },
88
+ "default": [],
89
+ "description": "Tags utiles (weapon, bag, document…)."
90
+ },
91
+ "metadata": {
92
+ "type": "object",
93
+ "default": {},
94
+ "additionalProperties": true,
95
+ "description": "Identité réelle de l'objet (ex: model IRL d'une arme). Utilisé pour les renommages par thème (ex: monde GTA).",
96
+ "properties": {
97
+ "irl": {
98
+ "type": "object",
99
+ "additionalProperties": true,
100
+ "description": "Informations du monde réel (modèle, calibre, fabricant…)."
101
+ },
102
+ "source": {
103
+ "type": "string",
104
+ "description": "Provenance de l'item (jeu, média, création)."
105
+ }
106
+ }
107
+ },
108
+ "customProperties": {
109
+ "type": "object",
110
+ "additionalProperties": true,
111
+ "default": {},
112
+ "description": "Point d'extension libre : chaque projet peut ajouter ses propres champs ici sans toucher au catalogue."
113
+ }
114
+ }
115
+ },
116
+ "drug": {
117
+ "type": "object",
118
+ "required": ["type", "duration"],
119
+ "additionalProperties": true,
120
+ "properties": {
121
+ "type": {
122
+ "type": "string",
123
+ "description": "Type de drogue (cocaine, crack, mdma, caffeine…)."
124
+ },
125
+ "duration": {
126
+ "type": "number",
127
+ "minimum": 0,
128
+ "description": "Durée d'effet en secondes (unités de gameplay définies par le projet consommateur)."
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "theme-registry.schema.json",
4
+ "title": "Registre des thèmes",
5
+ "description": "Liste déclarative des thèmes disponibles (packs d'images + renommages). Les consommateurs (bot, sites, docs) lisent ce fichier pour générer les menus de configuration — fini les listes en dur.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["themes"],
9
+ "properties": {
10
+ "themes": {
11
+ "type": "object",
12
+ "additionalProperties": { "$ref": "#/definitions/themeEntry" }
13
+ }
14
+ },
15
+ "definitions": {
16
+ "localized": {
17
+ "type": "object",
18
+ "required": ["fr", "en"],
19
+ "properties": {
20
+ "fr": { "type": "string", "minLength": 1 },
21
+ "en": { "type": "string", "minLength": 1 }
22
+ },
23
+ "additionalProperties": { "type": "string", "minLength": 1 }
24
+ },
25
+ "themeEntry": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["label", "scope"],
29
+ "properties": {
30
+ "label": { "$ref": "#/definitions/localized" },
31
+ "description": { "$ref": "#/definitions/localized" },
32
+ "scope": {
33
+ "type": "array",
34
+ "items": { "enum": ["items", "vehicles"] },
35
+ "description": "Domaines couverts par ce thème."
36
+ },
37
+ "image": {
38
+ "type": "string",
39
+ "description": "Aperçu / vignette du thème dans assets/themes/."
40
+ },
41
+ "license": {
42
+ "type": "string",
43
+ "description": "Licence / mention des assets du thème."
44
+ },
45
+ "attribution": {
46
+ "type": "string",
47
+ "description": "Auteur·rice·s ou source des visuels."
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "theme.schema.json",
4
+ "title": "Thème (overrides + items exclusifs)",
5
+ "description": "Description d'un thème : renommages (name/description), remplacements d'images/emoji/valeurs, et items exclusifs au thème. Un thème ne touche jamais au catalogue canonique : il s'y greffe.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["overrides"],
9
+ "properties": {
10
+ "overrides": {
11
+ "type": "array",
12
+ "description": "Ajustements appliqués sur des items existants du catalogue (seuls les champs présents remplacent).",
13
+ "items": { "$ref": "#/definitions/entry" }
14
+ },
15
+ "exclusiveItems": {
16
+ "type": "array",
17
+ "description": "Items qui n'existent QUE dans ce thème (ex: AKS-74U en DayZ).",
18
+ "items": { "$ref": "#/definitions/exclusive" }
19
+ },
20
+ "virtualIds": {
21
+ "type": "array",
22
+ "description": "Ids d'items gérés par le code consommateur (non présents dans le catalogue) auxquels ce thème applique des overrides — ex: money_clean (argent propre, créé en runtime).",
23
+ "items": { "type": "string", "pattern": "^[a-z0-9_-]+$" }
24
+ }
25
+ },
26
+ "definitions": {
27
+ "localized": {
28
+ "type": "object",
29
+ "required": ["fr", "en"],
30
+ "properties": {
31
+ "fr": { "type": "string", "minLength": 1 },
32
+ "en": { "type": "string", "minLength": 1 }
33
+ },
34
+ "additionalProperties": { "type": "string", "minLength": 1 }
35
+ },
36
+ "entry": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["id"],
40
+ "properties": {
41
+ "id": {
42
+ "type": "string",
43
+ "pattern": "^[a-z0-9_-]+$",
44
+ "description": "Id de l'item du catalogue concerné (ou id virtuel, ex: money_clean)."
45
+ },
46
+ "name": { "$ref": "#/definitions/localized" },
47
+ "description": { "$ref": "#/definitions/localized" },
48
+ "image": { "type": "string" },
49
+ "emoji": { "type": "string" },
50
+ "weight": { "type": "number", "minimum": 0 },
51
+ "food": { "type": "number", "minimum": -100, "maximum": 100 },
52
+ "thirst": { "type": "number", "minimum": -100, "maximum": 100 },
53
+ "drug": { "anyOf": [{ "type": "null" }, { "type": "object", "additionalProperties": true }] },
54
+ "stackable": { "type": "boolean" },
55
+ "usable": { "type": "boolean" },
56
+ "tags": { "type": "array", "items": { "type": "string" } },
57
+ "metadata": { "type": "object", "additionalProperties": true },
58
+ "customProperties": { "type": "object", "additionalProperties": true }
59
+ }
60
+ },
61
+ "exclusive": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["id", "name", "image", "weight"],
65
+ "properties": {
66
+ "id": { "type": "string", "pattern": "^[a-z0-9_-]+$" },
67
+ "name": { "$ref": "#/definitions/localized" },
68
+ "description": { "$ref": "#/definitions/localized" },
69
+ "image": { "type": "string" },
70
+ "emoji": { "type": "string" },
71
+ "weight": { "type": "number", "minimum": 0 },
72
+ "food": { "type": "number", "minimum": -100, "maximum": 100 },
73
+ "thirst": { "type": "number", "minimum": -100, "maximum": 100 },
74
+ "drug": { "anyOf": [{ "type": "null" }, { "type": "object", "additionalProperties": true }] },
75
+ "stackable": { "type": "boolean" },
76
+ "usable": { "type": "boolean" },
77
+ "tags": { "type": "array", "items": { "type": "string" } },
78
+ "metadata": { "type": "object", "additionalProperties": true },
79
+ "customProperties": { "type": "object", "additionalProperties": true }
80
+ }
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "vehicle.schema.json",
4
+ "title": "Catalogue de véhicules",
5
+ "description": "Catalogue canonique des modèles de véhicules. Un véhicule du jeu référence ce catalogue par id (modèle), puis est instancié par serveur avec plaque/couleur/état (données runtime non couvertes ici).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["vehicles"],
9
+ "properties": {
10
+ "vehicles": {
11
+ "type": "array",
12
+ "items": { "$ref": "#/definitions/vehicle" }
13
+ }
14
+ },
15
+ "definitions": {
16
+ "localized": {
17
+ "type": "object",
18
+ "required": ["fr", "en"],
19
+ "properties": {
20
+ "fr": { "type": "string", "minLength": 1 },
21
+ "en": { "type": "string", "minLength": 1 }
22
+ },
23
+ "additionalProperties": { "type": "string", "minLength": 1 }
24
+ },
25
+ "vehicle": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["id", "brand", "model", "category", "image"],
29
+ "properties": {
30
+ "id": {
31
+ "type": "string",
32
+ "pattern": "^[a-z0-9_-]+$",
33
+ "description": "Identifiant canonique du modèle (ex: sultan)."
34
+ },
35
+ "brand": {
36
+ "$ref": "#/definitions/localized",
37
+ "description": "Marque du véhicule (localisée)."
38
+ },
39
+ "model": {
40
+ "$ref": "#/definitions/localized",
41
+ "description": "Modèle du véhicule (localisé)."
42
+ },
43
+ "category": {
44
+ "type": "string",
45
+ "enum": ["car", "bike", "truck", "special"],
46
+ "description": "Catégorie de gameplay."
47
+ },
48
+ "image": {
49
+ "type": "string",
50
+ "description": "Chemin de l'image dans assets/vehicles/ (à contribuer)."
51
+ },
52
+ "seats": {
53
+ "type": "integer",
54
+ "minimum": 1,
55
+ "default": 2,
56
+ "description": "Nombre de places."
57
+ },
58
+ "massKg": {
59
+ "type": "number",
60
+ "minimum": 0,
61
+ "description": "Masse du véhicule en kg."
62
+ },
63
+ "fuelCapacity": {
64
+ "type": "number",
65
+ "minimum": 0,
66
+ "description": "Capacité du réservoir (unité projet)."
67
+ },
68
+ "maxSpeed": {
69
+ "type": "number",
70
+ "minimum": 0,
71
+ "description": "Vitesse maximale (unité projet)."
72
+ },
73
+ "cargo": {
74
+ "type": "object",
75
+ "default": {},
76
+ "additionalProperties": false,
77
+ "properties": {
78
+ "maxSlots": {
79
+ "type": "integer",
80
+ "minimum": 0,
81
+ "description": "Nombre max de slots de coffre."
82
+ },
83
+ "maxWeightKg": {
84
+ "type": "number",
85
+ "minimum": 0,
86
+ "description": "Poids maximal transportable en kg."
87
+ }
88
+ }
89
+ },
90
+ "metadata": {
91
+ "type": "object",
92
+ "default": {},
93
+ "additionalProperties": true,
94
+ "description": "Identité réelle du véhicule (ex: modèle IRL).",
95
+ "properties": {
96
+ "irl": {
97
+ "type": "object",
98
+ "additionalProperties": true,
99
+ "description": "Informations du monde réel."
100
+ },
101
+ "source": {
102
+ "type": "string",
103
+ "description": "Provenance du modèle (jeu, média, création)."
104
+ }
105
+ }
106
+ },
107
+ "customProperties": {
108
+ "type": "object",
109
+ "additionalProperties": true,
110
+ "default": {},
111
+ "description": "Point d'extension libre par projet."
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,273 @@
1
+ {
2
+ "$schema": "../catalog/schemas/vehicle.schema.json",
3
+ "$comment": "Catalogue de démarrage : modèles d'exemple illustrant le schéma. Les images (assets/vehicles/*.png) sont à contribuer — voir README. Le registre est extensible librement.",
4
+ "vehicles": [
5
+ {
6
+ "id": "sultan",
7
+ "brand": {
8
+ "fr": "Karin",
9
+ "en": "Karin"
10
+ },
11
+ "model": {
12
+ "fr": "Sultan",
13
+ "en": "Sultan"
14
+ },
15
+ "category": "car",
16
+ "image": "vehicles/sultan.png",
17
+ "seats": 4,
18
+ "fuelCapacity": 60,
19
+ "maxSpeed": 175,
20
+ "cargo": {
21
+ "maxSlots": 6,
22
+ "maxWeightKg": 60
23
+ },
24
+ "metadata": {
25
+ "irl": {
26
+ "model": "Subaru Impreza WRX",
27
+ "bodyStyle": "Berline sport"
28
+ }
29
+ },
30
+ "massKg": 1480
31
+ },
32
+ {
33
+ "id": "banshee",
34
+ "brand": {
35
+ "fr": "Bravado",
36
+ "en": "Bravado"
37
+ },
38
+ "model": {
39
+ "fr": "Banshee",
40
+ "en": "Banshee"
41
+ },
42
+ "category": "car",
43
+ "image": "vehicles/banshee.png",
44
+ "seats": 2,
45
+ "fuelCapacity": 55,
46
+ "maxSpeed": 210,
47
+ "cargo": {
48
+ "maxSlots": 2,
49
+ "maxWeightKg": 20
50
+ },
51
+ "metadata": {
52
+ "irl": {
53
+ "model": "Dodge Viper GTS",
54
+ "bodyStyle": "Supercar"
55
+ }
56
+ },
57
+ "massKg": 1290
58
+ },
59
+ {
60
+ "id": "comet",
61
+ "brand": {
62
+ "fr": "Pfister",
63
+ "en": "Pfister"
64
+ },
65
+ "model": {
66
+ "fr": "Comet",
67
+ "en": "Comet"
68
+ },
69
+ "category": "car",
70
+ "image": "vehicles/comet.png",
71
+ "seats": 2,
72
+ "fuelCapacity": 60,
73
+ "maxSpeed": 200,
74
+ "cargo": {
75
+ "maxSlots": 2,
76
+ "maxWeightKg": 15
77
+ },
78
+ "metadata": {
79
+ "irl": {
80
+ "model": "Porsche 911",
81
+ "bodyStyle": "Coupé sport"
82
+ }
83
+ },
84
+ "massKg": 1440
85
+ },
86
+ {
87
+ "id": "tailgater",
88
+ "brand": {
89
+ "fr": "Obey",
90
+ "en": "Obey"
91
+ },
92
+ "model": {
93
+ "fr": "Tailgater",
94
+ "en": "Tailgater"
95
+ },
96
+ "category": "car",
97
+ "image": "vehicles/tailgater.png",
98
+ "seats": 5,
99
+ "fuelCapacity": 65,
100
+ "maxSpeed": 165,
101
+ "cargo": {
102
+ "maxSlots": 8,
103
+ "maxWeightKg": 80
104
+ },
105
+ "metadata": {
106
+ "irl": {
107
+ "model": "Audi A6 / S6",
108
+ "bodyStyle": "Berline"
109
+ }
110
+ },
111
+ "massKg": 1620
112
+ },
113
+ {
114
+ "id": "dominator",
115
+ "brand": {
116
+ "fr": "Vapid",
117
+ "en": "Vapid"
118
+ },
119
+ "model": {
120
+ "fr": "Dominator",
121
+ "en": "Dominator"
122
+ },
123
+ "category": "car",
124
+ "image": "vehicles/dominator.png",
125
+ "seats": 2,
126
+ "fuelCapacity": 70,
127
+ "maxSpeed": 195,
128
+ "cargo": {
129
+ "maxSlots": 2,
130
+ "maxWeightKg": 25
131
+ },
132
+ "metadata": {
133
+ "irl": {
134
+ "model": "Ford Mustang GT",
135
+ "bodyStyle": "Muscle car"
136
+ }
137
+ },
138
+ "massKg": 1680
139
+ },
140
+ {
141
+ "id": "bagger",
142
+ "brand": {
143
+ "fr": "Western",
144
+ "en": "Western"
145
+ },
146
+ "model": {
147
+ "fr": "Bagger",
148
+ "en": "Bagger"
149
+ },
150
+ "category": "bike",
151
+ "image": "vehicles/bagger.png",
152
+ "seats": 2,
153
+ "fuelCapacity": 18,
154
+ "maxSpeed": 155,
155
+ "cargo": {
156
+ "maxSlots": 1,
157
+ "maxWeightKg": 10
158
+ },
159
+ "metadata": {
160
+ "irl": {
161
+ "model": "Harley-Davidson Touring",
162
+ "bodyStyle": "Cruiser"
163
+ }
164
+ },
165
+ "massKg": 340
166
+ },
167
+ {
168
+ "id": "packer",
169
+ "brand": {
170
+ "fr": "MTL",
171
+ "en": "MTL"
172
+ },
173
+ "model": {
174
+ "fr": "Packer",
175
+ "en": "Packer"
176
+ },
177
+ "category": "truck",
178
+ "image": "vehicles/packer.png",
179
+ "seats": 2,
180
+ "fuelCapacity": 150,
181
+ "maxSpeed": 120,
182
+ "cargo": {
183
+ "maxSlots": 30,
184
+ "maxWeightKg": 500
185
+ },
186
+ "metadata": {
187
+ "irl": {
188
+ "model": "Mack Granite",
189
+ "bodyStyle": "Poids lourd"
190
+ }
191
+ },
192
+ "massKg": 7800
193
+ },
194
+ {
195
+ "id": "garbage_truck",
196
+ "brand": {
197
+ "fr": "Brute",
198
+ "en": "Brute"
199
+ },
200
+ "model": {
201
+ "fr": "Camion poubelle",
202
+ "en": "Trashmaster"
203
+ },
204
+ "category": "truck",
205
+ "image": "vehicles/garbage_truck.png",
206
+ "seats": 2,
207
+ "fuelCapacity": 130,
208
+ "maxSpeed": 95,
209
+ "cargo": {
210
+ "maxSlots": 20,
211
+ "maxWeightKg": 400
212
+ },
213
+ "metadata": {
214
+ "irl": {
215
+ "model": "Camion benne municipal",
216
+ "bodyStyle": "Utilitaire"
217
+ }
218
+ },
219
+ "massKg": 6500
220
+ },
221
+ {
222
+ "id": "ambulance",
223
+ "brand": {
224
+ "fr": "Brute",
225
+ "en": "Brute"
226
+ },
227
+ "model": {
228
+ "fr": "Ambulance",
229
+ "en": "Ambulance"
230
+ },
231
+ "category": "special",
232
+ "image": "vehicles/ambulance.png",
233
+ "seats": 4,
234
+ "fuelCapacity": 90,
235
+ "maxSpeed": 130,
236
+ "cargo": {
237
+ "maxSlots": 12,
238
+ "maxWeightKg": 150
239
+ },
240
+ "metadata": {
241
+ "source": "Véhicule d'urgence (fleet)"
242
+ },
243
+ "massKg": 3500
244
+ },
245
+ {
246
+ "id": "police_cruiser",
247
+ "brand": {
248
+ "fr": "Vapid",
249
+ "en": "Vapid"
250
+ },
251
+ "model": {
252
+ "fr": "Interceptor",
253
+ "en": "Interceptor"
254
+ },
255
+ "category": "special",
256
+ "image": "vehicles/police_cruiser.png",
257
+ "seats": 4,
258
+ "fuelCapacity": 75,
259
+ "maxSpeed": 190,
260
+ "cargo": {
261
+ "maxSlots": 4,
262
+ "maxWeightKg": 40
263
+ },
264
+ "metadata": {
265
+ "irl": {
266
+ "model": "Ford Crown Victoria",
267
+ "bodyStyle": "Berline police"
268
+ }
269
+ },
270
+ "massKg": 1800
271
+ }
272
+ ]
273
+ }