@onlyworlds/sdk 1.4.1 → 2.0.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.
- package/dist/index.d.mts +394 -364
- package/dist/index.d.ts +394 -364
- package/dist/index.js +279 -172
- package/dist/index.mjs +277 -169
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -171,6 +171,112 @@ var ELEMENT_LABELS = {
|
|
|
171
171
|
function getElementLabel(elementType) {
|
|
172
172
|
return ELEMENT_LABELS[elementType];
|
|
173
173
|
}
|
|
174
|
+
var ELEMENT_SECTIONS = {
|
|
175
|
+
["ability" /* Ability */]: [
|
|
176
|
+
{ name: "Mechanics", order: 1, fields: ["activation", "duration", "potency", "range", "effects", "challenges", "talents", "requisites"] },
|
|
177
|
+
{ name: "World", order: 2, fields: ["prevalence", "tradition", "source", "locus", "instruments", "systems"] }
|
|
178
|
+
],
|
|
179
|
+
["character" /* Character */]: [
|
|
180
|
+
{ name: "Constitution", order: 1, fields: ["physicality", "mentality", "height", "weight", "species", "traits", "abilities"] },
|
|
181
|
+
{ name: "Origins", order: 2, fields: ["background", "motivations", "birth_date", "birthplace", "languages"] },
|
|
182
|
+
{ name: "World", order: 3, fields: ["reputation", "location", "objects", "institutions"] },
|
|
183
|
+
{ name: "Personality", order: 4, fields: ["charisma", "coercion", "competence", "compassion", "creativity", "courage"] },
|
|
184
|
+
{ name: "Social", order: 5, fields: ["family", "friends", "rivals"] },
|
|
185
|
+
{ name: "TTRPG", order: 6, fields: ["level", "hit_points", "STR", "DEX", "CON", "INT", "WIS", "CHA"] }
|
|
186
|
+
],
|
|
187
|
+
["collective" /* Collective */]: [
|
|
188
|
+
{ name: "Formation", order: 1, fields: ["composition", "count", "formation_date", "operator", "equipment"] },
|
|
189
|
+
{ name: "Dynamics", order: 2, fields: ["activity", "disposition", "state", "abilities", "symbolism"] },
|
|
190
|
+
{ name: "World", order: 3, fields: ["species", "characters", "creatures", "phenomena"] }
|
|
191
|
+
],
|
|
192
|
+
["construct" /* Construct */]: [
|
|
193
|
+
{ name: "Nature", order: 1, fields: ["rationale", "history", "status", "reach", "start_date", "end_date", "founder", "custodian"] },
|
|
194
|
+
{ name: "Involves", order: 2, fields: ["characters", "objects", "locations", "species", "creatures", "institutions", "traits", "collectives", "zones", "abilities", "phenomena", "languages", "families", "relations", "titles", "constructs", "events", "narratives"] }
|
|
195
|
+
],
|
|
196
|
+
["creature" /* Creature */]: [
|
|
197
|
+
{ name: "Biology", order: 1, fields: ["appearance", "weight", "height", "species"] },
|
|
198
|
+
{ name: "Behaviour", order: 2, fields: ["habits", "demeanor", "traits", "abilities", "languages"] },
|
|
199
|
+
{ name: "World", order: 3, fields: ["status", "birth_date", "location", "zone"] },
|
|
200
|
+
{ name: "TTRPG", order: 4, fields: ["challenge_rating", "hit_points", "armor_class", "speed", "actions"] }
|
|
201
|
+
],
|
|
202
|
+
["event" /* Event */]: [
|
|
203
|
+
{ name: "Nature", order: 1, fields: ["history", "challenges", "consequences", "start_date", "end_date", "triggers"] },
|
|
204
|
+
{ name: "Involves", order: 2, fields: ["characters", "objects", "locations", "species", "creatures", "institutions", "traits", "collectives", "zones", "abilities", "phenomena", "languages", "families", "relations", "titles", "constructs"] }
|
|
205
|
+
],
|
|
206
|
+
["family" /* Family */]: [
|
|
207
|
+
{ name: "Identity", order: 1, fields: ["spirit", "history", "traditions", "traits", "abilities", "languages", "ancestors"] },
|
|
208
|
+
{ name: "World", order: 2, fields: ["reputation", "estates", "governs", "heirlooms", "creatures"] }
|
|
209
|
+
],
|
|
210
|
+
["institution" /* Institution */]: [
|
|
211
|
+
{ name: "Foundation", order: 1, fields: ["doctrine", "founding_date", "parent_institution"] },
|
|
212
|
+
{ name: "Claims", order: 2, fields: ["zones", "objects", "creatures"] },
|
|
213
|
+
{ name: "World", order: 3, fields: ["status", "allies", "adversaries", "constructs"] }
|
|
214
|
+
],
|
|
215
|
+
["language" /* Language */]: [
|
|
216
|
+
{ name: "Structure", order: 1, fields: ["phonology", "grammar", "lexicon", "writing", "classification"] },
|
|
217
|
+
{ name: "World", order: 2, fields: ["status", "spread", "dialects"] }
|
|
218
|
+
],
|
|
219
|
+
["law" /* Law */]: [
|
|
220
|
+
{ name: "Code", order: 1, fields: ["declaration", "purpose", "date", "parent_law", "penalties"] },
|
|
221
|
+
{ name: "World", order: 2, fields: ["author", "locations", "zones", "prohibitions", "adjudicators", "enforcers"] }
|
|
222
|
+
],
|
|
223
|
+
["location" /* Location */]: [
|
|
224
|
+
{ name: "Setting", order: 1, fields: ["form", "function", "founding_date", "parent_location", "populations"] },
|
|
225
|
+
{ name: "Politics", order: 2, fields: ["political_climate", "primary_power", "governing_title", "secondary_powers", "zone", "rival", "partner"] },
|
|
226
|
+
{ name: "World", order: 3, fields: ["customs", "founders", "cults", "delicacies"] },
|
|
227
|
+
{ name: "Production", order: 4, fields: ["extraction_methods", "extraction_goods", "industry_methods", "industry_goods"] },
|
|
228
|
+
{ name: "Commerce", order: 5, fields: ["infrastructure", "extraction_markets", "industry_markets", "currencies"] },
|
|
229
|
+
{ name: "Construction", order: 6, fields: ["architecture", "buildings", "building_methods"] },
|
|
230
|
+
{ name: "Defense", order: 7, fields: ["defensibility", "elevation", "fighters", "defensive_objects"] }
|
|
231
|
+
],
|
|
232
|
+
["map" /* Map */]: [
|
|
233
|
+
{ name: "Details", order: 1, fields: ["background_color", "hierarchy", "width", "height", "depth", "parent_map", "location"] }
|
|
234
|
+
],
|
|
235
|
+
["marker" /* Marker */]: [
|
|
236
|
+
{ name: "Details", order: 1, fields: ["map", "zone", "x", "y", "z"] }
|
|
237
|
+
],
|
|
238
|
+
["narrative" /* Narrative */]: [
|
|
239
|
+
{ name: "Context", order: 1, fields: ["story", "consequences", "start_date", "end_date", "order", "parent_narrative", "protagonist", "antagonist", "narrator", "conservator"] },
|
|
240
|
+
{ name: "Involves", order: 2, fields: ["events", "characters", "objects", "locations", "species", "creatures", "institutions", "traits", "collectives", "zones", "abilities", "phenomena", "languages", "families", "relations", "titles", "constructs", "laws"] }
|
|
241
|
+
],
|
|
242
|
+
["object" /* Object */]: [
|
|
243
|
+
{ name: "Form", order: 1, fields: ["aesthetics", "weight", "amount", "parent_object", "materials", "technology"] },
|
|
244
|
+
{ name: "Function", order: 2, fields: ["utility", "effects", "abilities", "consumes"] },
|
|
245
|
+
{ name: "World", order: 3, fields: ["origins", "location", "language", "affinities"] }
|
|
246
|
+
],
|
|
247
|
+
["phenomenon" /* Phenomenon */]: [
|
|
248
|
+
{ name: "Mechanics", order: 1, fields: ["expression", "effects", "duration", "catalysts", "empowerments"] },
|
|
249
|
+
{ name: "World", order: 2, fields: ["mythology", "system", "triggers", "wielders", "environments"] }
|
|
250
|
+
],
|
|
251
|
+
["pin" /* Pin */]: [
|
|
252
|
+
{ name: "Details", order: 1, fields: ["map", "element_type", "element_id", "element", "x", "y", "z"] }
|
|
253
|
+
],
|
|
254
|
+
["relation" /* Relation */]: [
|
|
255
|
+
{ name: "Nature", order: 1, fields: ["background", "start_date", "end_date", "intensity", "actor", "events"] },
|
|
256
|
+
{ name: "Involves", order: 2, fields: ["characters", "objects", "locations", "species", "creatures", "institutions", "traits", "collectives", "zones", "abilities", "phenomena", "languages", "families", "relations", "titles", "constructs", "events", "narratives"] }
|
|
257
|
+
],
|
|
258
|
+
["species" /* Species */]: [
|
|
259
|
+
{ name: "Biology", order: 1, fields: ["appearance", "life_span", "weight", "nourishment", "reproduction", "adaptations"] },
|
|
260
|
+
{ name: "Psychology", order: 2, fields: ["instincts", "sociality", "temperament", "communication", "aggression", "traits"] },
|
|
261
|
+
{ name: "World", order: 3, fields: ["role", "parent_species", "locations", "zones", "affinities"] }
|
|
262
|
+
],
|
|
263
|
+
["title" /* Title */]: [
|
|
264
|
+
{ name: "Mandate", order: 1, fields: ["authority", "eligibility", "grant_date", "revoke_date", "issuer", "body", "superior_title", "holders", "symbols"] },
|
|
265
|
+
{ name: "World", order: 2, fields: ["status", "history", "characters", "institutions", "families", "zones", "locations", "objects", "constructs", "laws", "collectives", "creatures", "phenomena", "species", "languages"] }
|
|
266
|
+
],
|
|
267
|
+
["trait" /* Trait */]: [
|
|
268
|
+
{ name: "Qualitative", order: 1, fields: ["social_effects", "physical_effects", "functional_effects", "personality_effects", "behaviour_effects"] },
|
|
269
|
+
{ name: "Quantitative", order: 2, fields: ["charisma", "coercion", "competence", "compassion", "creativity", "courage"] },
|
|
270
|
+
{ name: "World", order: 3, fields: ["significance", "anti_trait", "empowered_abilities"] }
|
|
271
|
+
],
|
|
272
|
+
["zone" /* Zone */]: [
|
|
273
|
+
{ name: "Scope", order: 1, fields: ["role", "start_date", "end_date", "phenomena", "linked_zones"] },
|
|
274
|
+
{ name: "World", order: 2, fields: ["context", "populations", "titles", "principles"] }
|
|
275
|
+
]
|
|
276
|
+
};
|
|
277
|
+
function getElementSections(elementType) {
|
|
278
|
+
return ELEMENT_SECTIONS[elementType] || [];
|
|
279
|
+
}
|
|
174
280
|
var ONLYWORLDS_VERSION = "00.30.00";
|
|
175
281
|
var ELEMENT_ICONS = {
|
|
176
282
|
["ability" /* Ability */]: "auto_fix_normal",
|
|
@@ -226,93 +332,96 @@ function getElementIcon(elementType) {
|
|
|
226
332
|
function getElementUnicodeIcon(elementType) {
|
|
227
333
|
return ELEMENT_UNICODE_ICONS[elementType];
|
|
228
334
|
}
|
|
229
|
-
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
230
|
-
var getElementMaterialIcon = getElementIcon;
|
|
231
335
|
var FIELD_SCHEMA = {
|
|
232
336
|
ability: {
|
|
233
|
-
//
|
|
337
|
+
// Mechanics
|
|
234
338
|
activation: { type: "text" },
|
|
235
|
-
duration: { type: "
|
|
236
|
-
potency: { type: "
|
|
237
|
-
range: { type: "
|
|
339
|
+
duration: { type: "number" },
|
|
340
|
+
potency: { type: "number" },
|
|
341
|
+
range: { type: "number" },
|
|
342
|
+
effects: { type: "multi_link", target: "phenomenon" },
|
|
238
343
|
challenges: { type: "text" },
|
|
344
|
+
talents: { type: "multi_link", target: "trait" },
|
|
345
|
+
requisites: { type: "multi_link", target: "construct" },
|
|
346
|
+
// World
|
|
239
347
|
prevalence: { type: "text" },
|
|
240
|
-
// Link fields
|
|
241
348
|
tradition: { type: "single_link", target: "construct" },
|
|
242
349
|
source: { type: "single_link", target: "phenomenon" },
|
|
243
350
|
locus: { type: "single_link", target: "location" },
|
|
244
|
-
effects: { type: "multi_link", target: "phenomenon" },
|
|
245
|
-
talents: { type: "multi_link", target: "trait" },
|
|
246
|
-
requisites: { type: "multi_link", target: "construct" },
|
|
247
351
|
instruments: { type: "multi_link", target: "object" },
|
|
248
352
|
systems: { type: "multi_link", target: "construct" }
|
|
249
353
|
},
|
|
250
354
|
character: {
|
|
251
|
-
//
|
|
355
|
+
// Constitution
|
|
252
356
|
physicality: { type: "text" },
|
|
253
357
|
mentality: { type: "text" },
|
|
254
|
-
height: { type: "
|
|
255
|
-
weight: { type: "
|
|
256
|
-
background: { type: "text" },
|
|
257
|
-
motivations: { type: "text" },
|
|
258
|
-
birth_date: { type: "text" },
|
|
259
|
-
reputation: { type: "text" },
|
|
260
|
-
charisma: { type: "text" },
|
|
261
|
-
coercion: { type: "text" },
|
|
262
|
-
competence: { type: "text" },
|
|
263
|
-
compassion: { type: "text" },
|
|
264
|
-
creativity: { type: "text" },
|
|
265
|
-
courage: { type: "text" },
|
|
266
|
-
level: { type: "text" },
|
|
267
|
-
hit_points: { type: "text" },
|
|
268
|
-
STR: { type: "text" },
|
|
269
|
-
DEX: { type: "text" },
|
|
270
|
-
CON: { type: "text" },
|
|
271
|
-
INT: { type: "text" },
|
|
272
|
-
WIS: { type: "text" },
|
|
273
|
-
CHA: { type: "text" },
|
|
274
|
-
// Link fields
|
|
275
|
-
birthplace: { type: "single_link", target: "location" },
|
|
276
|
-
location: { type: "single_link", target: "location" },
|
|
358
|
+
height: { type: "number" },
|
|
359
|
+
weight: { type: "number" },
|
|
277
360
|
species: { type: "multi_link", target: "species" },
|
|
278
361
|
traits: { type: "multi_link", target: "trait" },
|
|
279
362
|
abilities: { type: "multi_link", target: "ability" },
|
|
363
|
+
// Origins
|
|
364
|
+
background: { type: "text" },
|
|
365
|
+
motivations: { type: "text" },
|
|
366
|
+
birth_date: { type: "number" },
|
|
367
|
+
birthplace: { type: "single_link", target: "location" },
|
|
280
368
|
languages: { type: "multi_link", target: "language" },
|
|
369
|
+
// World
|
|
370
|
+
reputation: { type: "text" },
|
|
371
|
+
location: { type: "single_link", target: "location" },
|
|
281
372
|
objects: { type: "multi_link", target: "object" },
|
|
282
373
|
institutions: { type: "multi_link", target: "institution" },
|
|
374
|
+
// Personality
|
|
375
|
+
charisma: { type: "number" },
|
|
376
|
+
coercion: { type: "number" },
|
|
377
|
+
competence: { type: "number" },
|
|
378
|
+
compassion: { type: "number" },
|
|
379
|
+
creativity: { type: "number" },
|
|
380
|
+
courage: { type: "number" },
|
|
381
|
+
// Social
|
|
283
382
|
family: { type: "multi_link", target: "family" },
|
|
284
383
|
friends: { type: "multi_link", target: "character" },
|
|
285
|
-
rivals: { type: "multi_link", target: "character" }
|
|
384
|
+
rivals: { type: "multi_link", target: "character" },
|
|
385
|
+
// TTRPG
|
|
386
|
+
level: { type: "number" },
|
|
387
|
+
hit_points: { type: "number" },
|
|
388
|
+
STR: { type: "number" },
|
|
389
|
+
DEX: { type: "number" },
|
|
390
|
+
CON: { type: "number" },
|
|
391
|
+
INT: { type: "number" },
|
|
392
|
+
WIS: { type: "number" },
|
|
393
|
+
CHA: { type: "number" }
|
|
286
394
|
},
|
|
287
395
|
collective: {
|
|
288
|
-
//
|
|
396
|
+
// Formation
|
|
289
397
|
composition: { type: "text" },
|
|
290
|
-
count: { type: "
|
|
291
|
-
formation_date: { type: "
|
|
398
|
+
count: { type: "number" },
|
|
399
|
+
formation_date: { type: "number" },
|
|
400
|
+
operator: { type: "single_link", target: "institution" },
|
|
401
|
+
equipment: { type: "multi_link", target: "construct" },
|
|
402
|
+
// Dynamics
|
|
292
403
|
activity: { type: "text" },
|
|
293
404
|
disposition: { type: "text" },
|
|
294
405
|
state: { type: "text" },
|
|
295
|
-
// Link fields
|
|
296
|
-
operator: { type: "single_link", target: "institution" },
|
|
297
|
-
equipment: { type: "multi_link", target: "construct" },
|
|
298
406
|
abilities: { type: "multi_link", target: "ability" },
|
|
299
407
|
symbolism: { type: "multi_link", target: "construct" },
|
|
408
|
+
// World
|
|
300
409
|
species: { type: "multi_link", target: "species" },
|
|
301
410
|
characters: { type: "multi_link", target: "character" },
|
|
302
411
|
creatures: { type: "multi_link", target: "creature" },
|
|
303
412
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
304
413
|
},
|
|
305
414
|
construct: {
|
|
306
|
-
//
|
|
415
|
+
// Nature
|
|
307
416
|
rationale: { type: "text" },
|
|
308
417
|
history: { type: "text" },
|
|
309
418
|
status: { type: "text" },
|
|
310
419
|
reach: { type: "text" },
|
|
311
|
-
start_date: { type: "
|
|
312
|
-
end_date: { type: "
|
|
313
|
-
// Link fields
|
|
420
|
+
start_date: { type: "number" },
|
|
421
|
+
end_date: { type: "number" },
|
|
314
422
|
founder: { type: "single_link", target: "character" },
|
|
315
423
|
custodian: { type: "single_link", target: "institution" },
|
|
424
|
+
// Involves
|
|
316
425
|
characters: { type: "multi_link", target: "character" },
|
|
317
426
|
objects: { type: "multi_link", target: "object" },
|
|
318
427
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -333,36 +442,38 @@ var FIELD_SCHEMA = {
|
|
|
333
442
|
narratives: { type: "multi_link", target: "narrative" }
|
|
334
443
|
},
|
|
335
444
|
creature: {
|
|
336
|
-
//
|
|
445
|
+
// Biology
|
|
337
446
|
appearance: { type: "text" },
|
|
338
|
-
weight: { type: "
|
|
339
|
-
height: { type: "
|
|
447
|
+
weight: { type: "number" },
|
|
448
|
+
height: { type: "number" },
|
|
449
|
+
species: { type: "multi_link", target: "species" },
|
|
450
|
+
// Behaviour
|
|
340
451
|
habits: { type: "text" },
|
|
341
452
|
demeanor: { type: "text" },
|
|
342
|
-
status: { type: "text" },
|
|
343
|
-
birth_date: { type: "text" },
|
|
344
|
-
challenge_rating: { type: "text" },
|
|
345
|
-
hit_points: { type: "text" },
|
|
346
|
-
armor_class: { type: "text" },
|
|
347
|
-
speed: { type: "text" },
|
|
348
|
-
// Link fields
|
|
349
|
-
location: { type: "single_link", target: "location" },
|
|
350
|
-
zone: { type: "single_link", target: "zone" },
|
|
351
|
-
species: { type: "multi_link", target: "species" },
|
|
352
453
|
traits: { type: "multi_link", target: "trait" },
|
|
353
454
|
abilities: { type: "multi_link", target: "ability" },
|
|
354
455
|
languages: { type: "multi_link", target: "language" },
|
|
456
|
+
// World
|
|
457
|
+
status: { type: "text" },
|
|
458
|
+
birth_date: { type: "number" },
|
|
459
|
+
location: { type: "single_link", target: "location" },
|
|
460
|
+
zone: { type: "single_link", target: "zone" },
|
|
461
|
+
// TTRPG
|
|
462
|
+
challenge_rating: { type: "number" },
|
|
463
|
+
hit_points: { type: "number" },
|
|
464
|
+
armor_class: { type: "number" },
|
|
465
|
+
speed: { type: "number" },
|
|
355
466
|
actions: { type: "multi_link", target: "ability" }
|
|
356
467
|
},
|
|
357
468
|
event: {
|
|
358
|
-
//
|
|
469
|
+
// Nature
|
|
359
470
|
history: { type: "text" },
|
|
360
471
|
challenges: { type: "text" },
|
|
361
472
|
consequences: { type: "text" },
|
|
362
|
-
start_date: { type: "
|
|
363
|
-
end_date: { type: "
|
|
364
|
-
|
|
365
|
-
|
|
473
|
+
start_date: { type: "number" },
|
|
474
|
+
end_date: { type: "number" },
|
|
475
|
+
triggers: { type: "multi_link", target: "construct" },
|
|
476
|
+
// Involves
|
|
366
477
|
characters: { type: "multi_link", target: "character" },
|
|
367
478
|
objects: { type: "multi_link", target: "object" },
|
|
368
479
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -381,56 +492,57 @@ var FIELD_SCHEMA = {
|
|
|
381
492
|
constructs: { type: "multi_link", target: "construct" }
|
|
382
493
|
},
|
|
383
494
|
family: {
|
|
384
|
-
//
|
|
495
|
+
// Identity
|
|
385
496
|
spirit: { type: "text" },
|
|
386
497
|
history: { type: "text" },
|
|
387
|
-
reputation: { type: "text" },
|
|
388
|
-
// Link fields
|
|
389
498
|
traditions: { type: "multi_link", target: "construct" },
|
|
390
499
|
traits: { type: "multi_link", target: "trait" },
|
|
391
500
|
abilities: { type: "multi_link", target: "ability" },
|
|
392
501
|
languages: { type: "multi_link", target: "language" },
|
|
393
502
|
ancestors: { type: "multi_link", target: "character" },
|
|
503
|
+
// World
|
|
504
|
+
reputation: { type: "text" },
|
|
394
505
|
estates: { type: "multi_link", target: "location" },
|
|
395
506
|
governs: { type: "multi_link", target: "institution" },
|
|
396
507
|
heirlooms: { type: "multi_link", target: "object" },
|
|
397
508
|
creatures: { type: "multi_link", target: "creature" }
|
|
398
509
|
},
|
|
399
510
|
institution: {
|
|
400
|
-
//
|
|
511
|
+
// Foundation
|
|
401
512
|
doctrine: { type: "text" },
|
|
402
|
-
founding_date: { type: "
|
|
403
|
-
status: { type: "text" },
|
|
404
|
-
// Link fields
|
|
513
|
+
founding_date: { type: "number" },
|
|
405
514
|
parent_institution: { type: "single_link", target: "institution" },
|
|
515
|
+
// Claims
|
|
406
516
|
zones: { type: "multi_link", target: "zone" },
|
|
407
517
|
objects: { type: "multi_link", target: "object" },
|
|
408
518
|
creatures: { type: "multi_link", target: "creature" },
|
|
519
|
+
// World
|
|
520
|
+
status: { type: "text" },
|
|
409
521
|
allies: { type: "multi_link", target: "institution" },
|
|
410
522
|
adversaries: { type: "multi_link", target: "institution" },
|
|
411
523
|
constructs: { type: "multi_link", target: "construct" }
|
|
412
524
|
},
|
|
413
525
|
language: {
|
|
414
|
-
//
|
|
526
|
+
// Structure
|
|
415
527
|
phonology: { type: "text" },
|
|
416
528
|
grammar: { type: "text" },
|
|
417
529
|
lexicon: { type: "text" },
|
|
418
530
|
writing: { type: "text" },
|
|
419
|
-
status: { type: "text" },
|
|
420
|
-
// Link fields
|
|
421
531
|
classification: { type: "single_link", target: "construct" },
|
|
532
|
+
// World
|
|
533
|
+
status: { type: "text" },
|
|
422
534
|
spread: { type: "multi_link", target: "location" },
|
|
423
535
|
dialects: { type: "multi_link", target: "language" }
|
|
424
536
|
},
|
|
425
537
|
law: {
|
|
426
|
-
//
|
|
538
|
+
// Code
|
|
427
539
|
declaration: { type: "text" },
|
|
428
540
|
purpose: { type: "text" },
|
|
429
|
-
date: { type: "
|
|
430
|
-
// Link fields
|
|
541
|
+
date: { type: "number" },
|
|
431
542
|
parent_law: { type: "single_link", target: "law" },
|
|
432
|
-
author: { type: "single_link", target: "institution" },
|
|
433
543
|
penalties: { type: "multi_link", target: "construct" },
|
|
544
|
+
// World
|
|
545
|
+
author: { type: "single_link", target: "institution" },
|
|
434
546
|
locations: { type: "multi_link", target: "location" },
|
|
435
547
|
zones: { type: "multi_link", target: "zone" },
|
|
436
548
|
prohibitions: { type: "multi_link", target: "construct" },
|
|
@@ -438,73 +550,76 @@ var FIELD_SCHEMA = {
|
|
|
438
550
|
enforcers: { type: "multi_link", target: "title" }
|
|
439
551
|
},
|
|
440
552
|
location: {
|
|
441
|
-
//
|
|
553
|
+
// Setting
|
|
442
554
|
form: { type: "text" },
|
|
443
555
|
function: { type: "text" },
|
|
444
|
-
founding_date: { type: "
|
|
445
|
-
political_climate: { type: "text" },
|
|
446
|
-
customs: { type: "text" },
|
|
447
|
-
infrastructure: { type: "text" },
|
|
448
|
-
architecture: { type: "text" },
|
|
449
|
-
defensibility: { type: "text" },
|
|
450
|
-
elevation: { type: "text" },
|
|
451
|
-
// Link fields
|
|
556
|
+
founding_date: { type: "number" },
|
|
452
557
|
parent_location: { type: "single_link", target: "location" },
|
|
558
|
+
populations: { type: "multi_link", target: "collective" },
|
|
559
|
+
// Politics
|
|
560
|
+
political_climate: { type: "text" },
|
|
453
561
|
primary_power: { type: "single_link", target: "institution" },
|
|
454
562
|
governing_title: { type: "single_link", target: "title" },
|
|
563
|
+
secondary_powers: { type: "multi_link", target: "institution" },
|
|
455
564
|
zone: { type: "single_link", target: "zone" },
|
|
456
565
|
rival: { type: "single_link", target: "location" },
|
|
457
566
|
partner: { type: "single_link", target: "location" },
|
|
458
|
-
|
|
459
|
-
|
|
567
|
+
// World
|
|
568
|
+
customs: { type: "text" },
|
|
460
569
|
founders: { type: "multi_link", target: "character" },
|
|
461
570
|
cults: { type: "multi_link", target: "construct" },
|
|
462
571
|
delicacies: { type: "multi_link", target: "species" },
|
|
572
|
+
// Production
|
|
463
573
|
extraction_methods: { type: "multi_link", target: "construct" },
|
|
464
574
|
extraction_goods: { type: "multi_link", target: "construct" },
|
|
465
575
|
industry_methods: { type: "multi_link", target: "construct" },
|
|
466
576
|
industry_goods: { type: "multi_link", target: "construct" },
|
|
577
|
+
// Commerce
|
|
578
|
+
infrastructure: { type: "text" },
|
|
467
579
|
extraction_markets: { type: "multi_link", target: "location" },
|
|
468
580
|
industry_markets: { type: "multi_link", target: "location" },
|
|
469
581
|
currencies: { type: "multi_link", target: "construct" },
|
|
582
|
+
// Construction
|
|
583
|
+
architecture: { type: "text" },
|
|
470
584
|
buildings: { type: "multi_link", target: "object" },
|
|
471
585
|
building_methods: { type: "multi_link", target: "construct" },
|
|
586
|
+
// Defense
|
|
587
|
+
defensibility: { type: "text" },
|
|
588
|
+
elevation: { type: "number" },
|
|
472
589
|
fighters: { type: "multi_link", target: "construct" },
|
|
473
590
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
474
591
|
},
|
|
475
592
|
map: {
|
|
476
|
-
//
|
|
593
|
+
// Details
|
|
477
594
|
background_color: { type: "text" },
|
|
478
|
-
hierarchy: { type: "
|
|
479
|
-
width: { type: "
|
|
480
|
-
height: { type: "
|
|
481
|
-
depth: { type: "
|
|
482
|
-
// Link fields
|
|
595
|
+
hierarchy: { type: "number" },
|
|
596
|
+
width: { type: "number" },
|
|
597
|
+
height: { type: "number" },
|
|
598
|
+
depth: { type: "number" },
|
|
483
599
|
parent_map: { type: "single_link", target: "map" },
|
|
484
600
|
location: { type: "single_link", target: "location" }
|
|
485
601
|
},
|
|
486
602
|
marker: {
|
|
487
|
-
//
|
|
603
|
+
// Details
|
|
604
|
+
map: { type: "single_link", target: "map" },
|
|
605
|
+
zone: { type: "single_link", target: "zone" },
|
|
488
606
|
x: { type: "integer" },
|
|
489
607
|
y: { type: "integer" },
|
|
490
|
-
z: { type: "integer" }
|
|
491
|
-
// Link fields
|
|
492
|
-
map: { type: "single_link", target: "map" },
|
|
493
|
-
zone: { type: "single_link", target: "zone" }
|
|
608
|
+
z: { type: "integer" }
|
|
494
609
|
},
|
|
495
610
|
narrative: {
|
|
496
|
-
//
|
|
611
|
+
// Context
|
|
497
612
|
story: { type: "text" },
|
|
498
613
|
consequences: { type: "text" },
|
|
499
|
-
start_date: { type: "
|
|
500
|
-
end_date: { type: "
|
|
501
|
-
order: { type: "
|
|
502
|
-
// Link fields
|
|
614
|
+
start_date: { type: "number" },
|
|
615
|
+
end_date: { type: "number" },
|
|
616
|
+
order: { type: "number" },
|
|
503
617
|
parent_narrative: { type: "single_link", target: "narrative" },
|
|
504
618
|
protagonist: { type: "single_link", target: "character" },
|
|
505
619
|
antagonist: { type: "single_link", target: "character" },
|
|
506
620
|
narrator: { type: "single_link", target: "character" },
|
|
507
621
|
conservator: { type: "single_link", target: "institution" },
|
|
622
|
+
// Involves
|
|
508
623
|
events: { type: "multi_link", target: "event" },
|
|
509
624
|
characters: { type: "multi_link", target: "character" },
|
|
510
625
|
objects: { type: "multi_link", target: "object" },
|
|
@@ -525,58 +640,58 @@ var FIELD_SCHEMA = {
|
|
|
525
640
|
laws: { type: "multi_link", target: "law" }
|
|
526
641
|
},
|
|
527
642
|
object: {
|
|
528
|
-
//
|
|
643
|
+
// Form
|
|
529
644
|
aesthetics: { type: "text" },
|
|
530
|
-
weight: { type: "
|
|
531
|
-
amount: { type: "
|
|
532
|
-
utility: { type: "text" },
|
|
533
|
-
origins: { type: "text" },
|
|
534
|
-
// Link fields
|
|
645
|
+
weight: { type: "number" },
|
|
646
|
+
amount: { type: "number" },
|
|
535
647
|
parent_object: { type: "single_link", target: "object" },
|
|
536
|
-
location: { type: "single_link", target: "location" },
|
|
537
|
-
language: { type: "single_link", target: "language" },
|
|
538
648
|
materials: { type: "multi_link", target: "construct" },
|
|
539
649
|
technology: { type: "multi_link", target: "construct" },
|
|
650
|
+
// Function
|
|
651
|
+
utility: { type: "text" },
|
|
540
652
|
effects: { type: "multi_link", target: "phenomenon" },
|
|
541
653
|
abilities: { type: "multi_link", target: "ability" },
|
|
542
654
|
consumes: { type: "multi_link", target: "construct" },
|
|
655
|
+
// World
|
|
656
|
+
origins: { type: "text" },
|
|
657
|
+
location: { type: "single_link", target: "location" },
|
|
658
|
+
language: { type: "single_link", target: "language" },
|
|
543
659
|
affinities: { type: "multi_link", target: "trait" }
|
|
544
660
|
},
|
|
545
661
|
phenomenon: {
|
|
546
|
-
//
|
|
662
|
+
// Mechanics
|
|
547
663
|
expression: { type: "text" },
|
|
548
664
|
effects: { type: "text" },
|
|
549
|
-
duration: { type: "
|
|
550
|
-
mythology: { type: "text" },
|
|
551
|
-
// Link fields
|
|
552
|
-
system: { type: "single_link", target: "phenomenon" },
|
|
665
|
+
duration: { type: "number" },
|
|
553
666
|
catalysts: { type: "multi_link", target: "object" },
|
|
554
667
|
empowerments: { type: "multi_link", target: "ability" },
|
|
668
|
+
// World
|
|
669
|
+
mythology: { type: "text" },
|
|
670
|
+
system: { type: "single_link", target: "phenomenon" },
|
|
555
671
|
triggers: { type: "multi_link", target: "construct" },
|
|
556
672
|
wielders: { type: "multi_link", target: "character" },
|
|
557
673
|
environments: { type: "multi_link", target: "location" }
|
|
558
674
|
},
|
|
559
675
|
pin: {
|
|
560
|
-
//
|
|
676
|
+
// Details
|
|
677
|
+
map: { type: "single_link", target: "map" },
|
|
561
678
|
element_type: { type: "text" },
|
|
562
679
|
// ElementType enum value
|
|
563
|
-
|
|
680
|
+
element_id: { type: "single_link", target: "any" },
|
|
681
|
+
// Can reference any element
|
|
564
682
|
x: { type: "integer" },
|
|
565
683
|
y: { type: "integer" },
|
|
566
|
-
z: { type: "integer" }
|
|
567
|
-
// Link fields
|
|
568
|
-
map: { type: "single_link", target: "map" },
|
|
569
|
-
element_id: { type: "single_link", target: "any" }
|
|
570
|
-
// Can reference any element
|
|
684
|
+
z: { type: "integer" }
|
|
571
685
|
},
|
|
572
686
|
relation: {
|
|
573
|
-
//
|
|
687
|
+
// Nature
|
|
574
688
|
background: { type: "text" },
|
|
575
|
-
start_date: { type: "
|
|
576
|
-
end_date: { type: "
|
|
577
|
-
intensity: { type: "
|
|
578
|
-
// Link fields
|
|
689
|
+
start_date: { type: "number" },
|
|
690
|
+
end_date: { type: "number" },
|
|
691
|
+
intensity: { type: "number" },
|
|
579
692
|
actor: { type: "single_link", target: "character" },
|
|
693
|
+
events: { type: "multi_link", target: "event" },
|
|
694
|
+
// Involves
|
|
580
695
|
characters: { type: "multi_link", target: "character" },
|
|
581
696
|
objects: { type: "multi_link", target: "object" },
|
|
582
697
|
locations: { type: "multi_link", target: "location" },
|
|
@@ -590,46 +705,47 @@ var FIELD_SCHEMA = {
|
|
|
590
705
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
591
706
|
languages: { type: "multi_link", target: "language" },
|
|
592
707
|
families: { type: "multi_link", target: "family" },
|
|
708
|
+
relations: { type: "multi_link", target: "relation" },
|
|
593
709
|
titles: { type: "multi_link", target: "title" },
|
|
594
710
|
constructs: { type: "multi_link", target: "construct" },
|
|
595
|
-
events: { type: "multi_link", target: "event" },
|
|
596
711
|
narratives: { type: "multi_link", target: "narrative" }
|
|
597
712
|
},
|
|
598
713
|
species: {
|
|
599
|
-
//
|
|
714
|
+
// Biology
|
|
600
715
|
appearance: { type: "text" },
|
|
601
|
-
life_span: { type: "
|
|
602
|
-
weight: { type: "
|
|
716
|
+
life_span: { type: "number" },
|
|
717
|
+
weight: { type: "number" },
|
|
718
|
+
nourishment: { type: "multi_link", target: "species" },
|
|
719
|
+
reproduction: { type: "multi_link", target: "construct" },
|
|
720
|
+
adaptations: { type: "multi_link", target: "ability" },
|
|
721
|
+
// Psychology
|
|
603
722
|
instincts: { type: "text" },
|
|
604
723
|
sociality: { type: "text" },
|
|
605
724
|
temperament: { type: "text" },
|
|
606
725
|
communication: { type: "text" },
|
|
607
|
-
aggression: { type: "
|
|
726
|
+
aggression: { type: "number" },
|
|
727
|
+
traits: { type: "multi_link", target: "trait" },
|
|
728
|
+
// World
|
|
608
729
|
role: { type: "text" },
|
|
609
|
-
// Link fields
|
|
610
730
|
parent_species: { type: "single_link", target: "species" },
|
|
611
|
-
nourishment: { type: "multi_link", target: "species" },
|
|
612
|
-
reproduction: { type: "multi_link", target: "construct" },
|
|
613
|
-
adaptations: { type: "multi_link", target: "ability" },
|
|
614
|
-
traits: { type: "multi_link", target: "trait" },
|
|
615
731
|
locations: { type: "multi_link", target: "location" },
|
|
616
732
|
zones: { type: "multi_link", target: "zone" },
|
|
617
733
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
618
734
|
},
|
|
619
735
|
title: {
|
|
620
|
-
//
|
|
736
|
+
// Mandate
|
|
621
737
|
authority: { type: "text" },
|
|
622
738
|
eligibility: { type: "text" },
|
|
623
|
-
grant_date: { type: "
|
|
624
|
-
revoke_date: { type: "
|
|
625
|
-
status: { type: "text" },
|
|
626
|
-
history: { type: "text" },
|
|
627
|
-
// Link fields
|
|
739
|
+
grant_date: { type: "number" },
|
|
740
|
+
revoke_date: { type: "number" },
|
|
628
741
|
issuer: { type: "single_link", target: "institution" },
|
|
629
742
|
body: { type: "single_link", target: "institution" },
|
|
630
743
|
superior_title: { type: "single_link", target: "title" },
|
|
631
744
|
holders: { type: "multi_link", target: "character" },
|
|
632
745
|
symbols: { type: "multi_link", target: "object" },
|
|
746
|
+
// World
|
|
747
|
+
status: { type: "text" },
|
|
748
|
+
history: { type: "text" },
|
|
633
749
|
characters: { type: "multi_link", target: "character" },
|
|
634
750
|
institutions: { type: "multi_link", target: "institution" },
|
|
635
751
|
families: { type: "multi_link", target: "family" },
|
|
@@ -645,45 +761,38 @@ var FIELD_SCHEMA = {
|
|
|
645
761
|
languages: { type: "multi_link", target: "language" }
|
|
646
762
|
},
|
|
647
763
|
trait: {
|
|
648
|
-
//
|
|
764
|
+
// Qualitative
|
|
649
765
|
social_effects: { type: "text" },
|
|
650
766
|
physical_effects: { type: "text" },
|
|
651
767
|
functional_effects: { type: "text" },
|
|
652
768
|
personality_effects: { type: "text" },
|
|
653
769
|
behaviour_effects: { type: "text" },
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
770
|
+
// Quantitative
|
|
771
|
+
charisma: { type: "number" },
|
|
772
|
+
coercion: { type: "number" },
|
|
773
|
+
competence: { type: "number" },
|
|
774
|
+
compassion: { type: "number" },
|
|
775
|
+
creativity: { type: "number" },
|
|
776
|
+
courage: { type: "number" },
|
|
777
|
+
// World
|
|
660
778
|
significance: { type: "text" },
|
|
661
|
-
// Link fields
|
|
662
779
|
anti_trait: { type: "single_link", target: "trait" },
|
|
663
780
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
664
781
|
},
|
|
665
782
|
zone: {
|
|
666
|
-
//
|
|
783
|
+
// Scope
|
|
667
784
|
role: { type: "text" },
|
|
668
|
-
start_date: { type: "
|
|
669
|
-
end_date: { type: "
|
|
670
|
-
context: { type: "text" },
|
|
671
|
-
// Link fields
|
|
785
|
+
start_date: { type: "number" },
|
|
786
|
+
end_date: { type: "number" },
|
|
672
787
|
phenomena: { type: "multi_link", target: "phenomenon" },
|
|
673
788
|
linked_zones: { type: "multi_link", target: "zone" },
|
|
789
|
+
// World
|
|
790
|
+
context: { type: "text" },
|
|
674
791
|
populations: { type: "multi_link", target: "collective" },
|
|
675
792
|
titles: { type: "multi_link", target: "title" },
|
|
676
793
|
principles: { type: "multi_link", target: "construct" }
|
|
677
794
|
}
|
|
678
795
|
};
|
|
679
|
-
var FIELD_MAPPINGS = Object.fromEntries(
|
|
680
|
-
Object.entries(FIELD_SCHEMA).map(([elementType, fields]) => [
|
|
681
|
-
elementType,
|
|
682
|
-
Object.fromEntries(
|
|
683
|
-
Object.entries(fields).filter(([_, fieldInfo]) => ["single_link", "multi_link"].includes(fieldInfo.type)).map(([fieldName, fieldInfo]) => [fieldName, fieldInfo.target])
|
|
684
|
-
)
|
|
685
|
-
])
|
|
686
|
-
);
|
|
687
796
|
function createElementId(id) {
|
|
688
797
|
return id;
|
|
689
798
|
}
|
|
@@ -696,10 +805,9 @@ function createAnyElementId(id) {
|
|
|
696
805
|
export {
|
|
697
806
|
ELEMENT_ICONS,
|
|
698
807
|
ELEMENT_LABELS,
|
|
699
|
-
|
|
808
|
+
ELEMENT_SECTIONS,
|
|
700
809
|
ELEMENT_UNICODE_ICONS,
|
|
701
810
|
ElementType,
|
|
702
|
-
FIELD_MAPPINGS,
|
|
703
811
|
FIELD_SCHEMA,
|
|
704
812
|
ONLYWORLDS_VERSION,
|
|
705
813
|
OnlyWorldsClient,
|
|
@@ -708,6 +816,6 @@ export {
|
|
|
708
816
|
createElementIds,
|
|
709
817
|
getElementIcon,
|
|
710
818
|
getElementLabel,
|
|
711
|
-
|
|
819
|
+
getElementSections,
|
|
712
820
|
getElementUnicodeIcon
|
|
713
821
|
};
|