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