optolith-database-schema 0.36.1 → 0.37.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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.37.0](https://github.com/elyukai/optolith-database-schema/compare/v0.36.1...v0.37.0) (2026-03-14)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * more detailed book rules and meta data
11
+
12
+ ### Features
13
+
14
+ * more detailed book rules and meta data ([04b3a74](https://github.com/elyukai/optolith-database-schema/commit/04b3a7451e8ccc629b670da95b178f115085363b))
15
+
5
16
  ## [0.36.1](https://github.com/elyukai/optolith-database-schema/compare/v0.36.0...v0.36.1) (2026-03-13)
6
17
 
7
18
 
package/gen/types.d.ts CHANGED
@@ -237,8 +237,10 @@ export type EnumMap = {
237
237
  BlessedTraditionType: BlessedTraditionType
238
238
  BlessingDuration: BlessingDuration
239
239
  BlessingRange: BlessingRange
240
+ BookContentQuality: BookContentQuality
240
241
  BookCost: BookCost
241
242
  BookCostVariant: BookCostVariant
243
+ BookRules: BookRules
242
244
  BookType: BookType
243
245
  BurningTime: BurningTime
244
246
  CantripDuration: CantripDuration
@@ -484,6 +486,8 @@ export type TypeAliasMap = {
484
486
  BlessedTraditionPrerequisite: BlessedTraditionPrerequisite
485
487
  BlessedTraditionsSelectOptionCategory: BlessedTraditionsSelectOptionCategory
486
488
  BlessingPerformanceParameters: BlessingPerformanceParameters
489
+ BookRulesByEdition: BookRulesByEdition
490
+ BookRulesOfEdition: BookRulesOfEdition
487
491
  BySizeCategory: BySizeCategory<unknown>
488
492
  CalculationTranslation: CalculationTranslation
489
493
  CantripPerformanceParameters: CantripPerformanceParameters
@@ -703,6 +707,7 @@ export type TypeAliasMap = {
703
707
  PersonalityTraitEffect: PersonalityTraitEffect
704
708
  PersonalityTraitPrerequisite: PersonalityTraitPrerequisite
705
709
  PersonalityTraitPrerequisites: PersonalityTraitPrerequisites
710
+ PlainBookRules: PlainBookRules
706
711
  PlainCommonProfessions: PlainCommonProfessions
707
712
  PlainGeneralPrerequisites: PlainGeneralPrerequisites
708
713
  PlainPrerequisites: PlainPrerequisites<unknown>
@@ -2434,6 +2439,24 @@ export interface Locale {
2434
2439
  ".input {$count :number} {{check required every {$count}. application in the same month}}": string & { __params: { "count": number } }
2435
2440
  "see {$link}": string & { __params: { "link": StringableTranslationParameter } }
2436
2441
  "CoD": string
2442
+ "Romance Novel": string
2443
+ "Poetry": string
2444
+ "Political Pamphlet": string
2445
+ "Crime Story": string
2446
+ "Fairy Tale": string
2447
+ "Novel": string
2448
+ "Professional Publication": string
2449
+ "Magical Book": string
2450
+ "Religious Works": string
2451
+ "Content Quality": string
2452
+ "Modest": string
2453
+ "Average": string
2454
+ "Demanding": string
2455
+ "CL {$level}": string & { __params: { "level": StringableTranslationParameter } }
2456
+ "Availability": string
2457
+ "Reconstruction": string
2458
+ "References": string
2459
+ "Entertainment": string
2437
2460
  "Failed": string
2438
2461
  "Progress": string
2439
2462
  "Incubation Time": string
@@ -20016,6 +20039,11 @@ export interface Book {
20016
20039
  */
20017
20040
  structure_points?: StructurePoints
20018
20041
 
20042
+ /**
20043
+ * The quality of the book’s content.
20044
+ */
20045
+ contentQuality?: BookContentQuality
20046
+
20019
20047
  /**
20020
20048
  * References to where in which publications this entry has been defined. Entries may also be added or removed in later printings.
20021
20049
  */
@@ -20063,7 +20091,22 @@ export interface BookTranslation {
20063
20091
  /**
20064
20092
  * Special rules text.
20065
20093
  */
20066
- rules?: string
20094
+ rules?: BookRules
20095
+
20096
+ /**
20097
+ * The legality of the item, if specified.
20098
+ */
20099
+ legality?: string
20100
+
20101
+ /**
20102
+ * The availability of the item, if specified.
20103
+ */
20104
+ availability?: string
20105
+
20106
+ /**
20107
+ * Special properties or features of the item.
20108
+ */
20109
+ special?: string
20067
20110
 
20068
20111
  errata?: Errata
20069
20112
  }
@@ -20184,6 +20227,96 @@ export interface IndefiniteBookCostVariantTranslation {
20184
20227
  description: string
20185
20228
  }
20186
20229
 
20230
+ /**
20231
+ * The quality of the book’s content.
20232
+ */
20233
+ export type BookContentQuality =
20234
+ | {
20235
+ kind: "Modest"
20236
+ }
20237
+ | {
20238
+ kind: "Average"
20239
+ }
20240
+ | {
20241
+ kind: "Demanding"
20242
+ Demanding: number
20243
+ }
20244
+
20245
+ /**
20246
+ * Skills and abilities you can learn by reading the book, as well as any other rules and effects concerning the book.
20247
+ */
20248
+ export type BookRules =
20249
+ | {
20250
+ kind: "Plain"
20251
+ Plain: PlainBookRules
20252
+ }
20253
+ | {
20254
+ kind: "Entertainment"
20255
+ }
20256
+ | {
20257
+ kind: "ByEdition"
20258
+ ByEdition: BookRulesByEdition
20259
+ }
20260
+
20261
+ /**
20262
+ * The book’s rules without any special effects or conditions.
20263
+ */
20264
+ export interface PlainBookRules {
20265
+ /**
20266
+ * The (main) rules text.
20267
+ */
20268
+ text: string
20269
+
20270
+ /**
20271
+ * Rules for reconstructing certain skills or abilities from the book.
20272
+ */
20273
+ reconstruction?: string
20274
+
20275
+ /**
20276
+ * References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.
20277
+ */
20278
+ references?: string
20279
+
20280
+ /**
20281
+ * Additional rules text that comes after all other rules.
20282
+ */
20283
+ textAfter?: string
20284
+ }
20285
+
20286
+ /**
20287
+ * The book’s rules with differences between each edition and more differentiation between types of rules.
20288
+ */
20289
+ export interface BookRulesByEdition {
20290
+ editions: BookRulesOfEdition[]
20291
+
20292
+ /**
20293
+ * Rules for reconstructing certain skills or abilities from the book.
20294
+ */
20295
+ reconstruction?: string
20296
+
20297
+ /**
20298
+ * References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.
20299
+ */
20300
+ references?: string
20301
+
20302
+ /**
20303
+ * Additional rules text that comes after all other rules.
20304
+ */
20305
+ textAfter?: string
20306
+ }
20307
+
20308
+ export interface BookRulesOfEdition {
20309
+ /**
20310
+ * The edition(s) the rules apply to.
20311
+ */
20312
+ label: string
20313
+
20314
+ /**
20315
+ * The rules text.
20316
+ */
20317
+ text: string
20318
+ }
20319
+
20187
20320
  export interface CeremonialItem {
20188
20321
  /**
20189
20322
  * The cost in silverthalers.
@@ -1477,6 +1477,24 @@ export declare const Locale: DB.Entity<"Locale", {
1477
1477
  ".input {$count :number} {{check required every {$count}. application in the same month}}": null;
1478
1478
  "see {$link}": null;
1479
1479
  CoD: null;
1480
+ "Romance Novel": null;
1481
+ Poetry: null;
1482
+ "Political Pamphlet": null;
1483
+ "Crime Story": null;
1484
+ "Fairy Tale": null;
1485
+ Novel: null;
1486
+ "Professional Publication": null;
1487
+ "Magical Book": null;
1488
+ "Religious Works": null;
1489
+ "Content Quality": null;
1490
+ Modest: null;
1491
+ Average: null;
1492
+ Demanding: null;
1493
+ "CL {$level}": null;
1494
+ Availability: null;
1495
+ Reconstruction: null;
1496
+ References: null;
1497
+ Entertainment: null;
1480
1498
  Failed: null;
1481
1499
  Progress: null;
1482
1500
  "Incubation Time": null;
@@ -1518,6 +1518,25 @@ export const Locale = DB.Entity(import.meta.url, {
1518
1518
  ".input {$count :number} {{check required every {$count}. application in the same month}}": null,
1519
1519
  "see {$link}": null,
1520
1520
  "CoD": null,
1521
+ // books
1522
+ "Romance Novel": null,
1523
+ "Poetry": null,
1524
+ "Political Pamphlet": null,
1525
+ "Crime Story": null,
1526
+ "Fairy Tale": null,
1527
+ "Novel": null,
1528
+ "Professional Publication": null,
1529
+ "Magical Book": null,
1530
+ "Religious Works": null,
1531
+ "Content Quality": null,
1532
+ "Modest": null,
1533
+ "Average": null,
1534
+ "Demanding": null,
1535
+ "CL {$level}": null,
1536
+ "Availability": null,
1537
+ "Reconstruction": null,
1538
+ "References": null,
1539
+ "Entertainment": null,
1521
1540
  // sex practices
1522
1541
  "Failed": null,
1523
1542
  // diseases
@@ -88,6 +88,11 @@ export declare const Book: DB.Entity<"Book", {
88
88
  structure_points: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"StructurePoints", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"StructurePointsComponent", DB.Object<{
89
89
  points: DB.MemberDecl<DB.Integer, true>;
90
90
  }>, []>>>, []>>, false>;
91
+ contentQuality: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BookContentQuality", {
92
+ Modest: DB.EnumCase<null>;
93
+ Average: DB.EnumCase<null>;
94
+ Demanding: DB.EnumCase<DB.Integer>;
95
+ }, []>>, false>;
91
96
  src: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRefs", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"PublicationRef", DB.Object<{
92
97
  id: DB.MemberDecl<DB.ReferenceIdentifier, true>;
93
98
  occurrences: DB.MemberDecl<DB.NestedEntityMap<string, {
@@ -135,7 +140,27 @@ export declare const Book: DB.Entity<"Book", {
135
140
  language: DB.MemberDecl<DB.String, false>;
136
141
  script: DB.MemberDecl<DB.String, false>;
137
142
  note: DB.MemberDecl<DB.String, false>;
138
- rules: DB.MemberDecl<DB.String, false>;
143
+ rules: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"BookRules", {
144
+ Plain: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"PlainBookRules", DB.Object<{
145
+ text: DB.MemberDecl<DB.String, true>;
146
+ reconstruction: DB.MemberDecl<DB.String, false>;
147
+ references: DB.MemberDecl<DB.String, false>;
148
+ textAfter: DB.MemberDecl<DB.String, false>;
149
+ }>, []>>>;
150
+ Entertainment: DB.EnumCase<null>;
151
+ ByEdition: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesByEdition", DB.Object<{
152
+ editions: DB.MemberDecl<DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"BookRulesOfEdition", DB.Object<{
153
+ label: DB.MemberDecl<DB.String, true>;
154
+ text: DB.MemberDecl<DB.String, true>;
155
+ }>, []>>>, true>;
156
+ reconstruction: DB.MemberDecl<DB.String, false>;
157
+ references: DB.MemberDecl<DB.String, false>;
158
+ textAfter: DB.MemberDecl<DB.String, false>;
159
+ }>, []>>>;
160
+ }, []>>, false>;
161
+ legality: DB.MemberDecl<DB.String, false>;
162
+ availability: DB.MemberDecl<DB.String, false>;
163
+ special: DB.MemberDecl<DB.String, false>;
139
164
  errata: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"Errata", DB.Array<DB.IncludeIdentifier<[], DB.TypeAlias<"Erratum", DB.Object<{
140
165
  date: DB.MemberDecl<DB.Date, true>;
141
166
  description: DB.MemberDecl<DB.String, true>;
@@ -28,6 +28,10 @@ export const Book = DB.Entity(import.meta.url, {
28
28
  comment: "The structure points of the item. Use an array if the item consists of multiple components that have individual structure points.",
29
29
  type: DB.IncludeIdentifier(StructurePoints),
30
30
  }),
31
+ contentQuality: DB.Optional({
32
+ comment: "The quality of the book’s content.",
33
+ type: DB.IncludeIdentifier(BookContentQuality),
34
+ }),
31
35
  src,
32
36
  translations: NestedTranslationMap(DB.Required, "Book", DB.Object({
33
37
  name: DB.Required({
@@ -52,6 +56,18 @@ export const Book = DB.Entity(import.meta.url, {
52
56
  }),
53
57
  rules: DB.Optional({
54
58
  comment: "Special rules text.",
59
+ type: DB.IncludeIdentifier(BookRules),
60
+ }),
61
+ legality: DB.Optional({
62
+ comment: "The legality of the item, if specified.",
63
+ type: DB.String({ minLength: 1, markdown: "inline" }),
64
+ }),
65
+ availability: DB.Optional({
66
+ comment: "The availability of the item, if specified.",
67
+ type: DB.String({ minLength: 1, markdown: "inline" }),
68
+ }),
69
+ special: DB.Optional({
70
+ comment: "Special properties or features of the item.",
55
71
  type: DB.String({ minLength: 1, markdown: "block" }),
56
72
  }),
57
73
  errata: DB.Optional({
@@ -179,3 +195,77 @@ const IndefiniteBookCostVariant = DB.TypeAlias(import.meta.url, {
179
195
  })),
180
196
  }),
181
197
  });
198
+ const BookContentQuality = DB.Enum(import.meta.url, {
199
+ name: "BookContentQuality",
200
+ comment: "The quality of the book’s content.",
201
+ values: () => ({
202
+ Modest: DB.EnumCase({ type: null }),
203
+ Average: DB.EnumCase({ type: null }),
204
+ Demanding: DB.EnumCase({ type: DB.Integer({ minimum: 1, maximum: 3 }) }),
205
+ }),
206
+ });
207
+ const BookRules = DB.Enum(import.meta.url, {
208
+ name: "BookRules",
209
+ comment: "Skills and abilities you can learn by reading the book, as well as any other rules and effects concerning the book.",
210
+ values: () => ({
211
+ Plain: DB.EnumCase({ type: DB.IncludeIdentifier(PlainBookRules) }),
212
+ Entertainment: DB.EnumCase({ type: null }),
213
+ ByEdition: DB.EnumCase({ type: DB.IncludeIdentifier(BookRulesByEdition) }),
214
+ }),
215
+ });
216
+ const PlainBookRules = DB.TypeAlias(import.meta.url, {
217
+ name: "PlainBookRules",
218
+ comment: "The book’s rules without any special effects or conditions.",
219
+ type: () => DB.Object({
220
+ text: DB.Required({
221
+ comment: "The (main) rules text.",
222
+ type: DB.String({ minLength: 1, markdown: "block" }),
223
+ }),
224
+ reconstruction: DB.Optional({
225
+ comment: "Rules for reconstructing certain skills or abilities from the book.",
226
+ type: DB.String({ minLength: 1, markdown: "block" }),
227
+ }),
228
+ references: DB.Optional({
229
+ comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
230
+ type: DB.String({ minLength: 1, markdown: "block" }),
231
+ }),
232
+ textAfter: DB.Optional({
233
+ comment: "Additional rules text that comes after all other rules.",
234
+ type: DB.String({ minLength: 1, markdown: "block" }),
235
+ }),
236
+ }),
237
+ });
238
+ const BookRulesByEdition = DB.TypeAlias(import.meta.url, {
239
+ name: "BookRulesByEdition",
240
+ comment: "The book’s rules with differences between each edition and more differentiation between types of rules.",
241
+ type: () => DB.Object({
242
+ editions: DB.Required({
243
+ type: DB.Array(DB.IncludeIdentifier(BookRulesOfEdition), { minItems: 1 }),
244
+ }),
245
+ reconstruction: DB.Optional({
246
+ comment: "Rules for reconstructing certain skills or abilities from the book.",
247
+ type: DB.String({ minLength: 1, markdown: "block" }),
248
+ }),
249
+ references: DB.Optional({
250
+ comment: "References to skills and abilities that, while mentioned in the book, cannot be learned from this book alone.",
251
+ type: DB.String({ minLength: 1, markdown: "block" }),
252
+ }),
253
+ textAfter: DB.Optional({
254
+ comment: "Additional rules text that comes after all other rules.",
255
+ type: DB.String({ minLength: 1, markdown: "block" }),
256
+ }),
257
+ }),
258
+ });
259
+ const BookRulesOfEdition = DB.TypeAlias(import.meta.url, {
260
+ name: "BookRulesOfEdition",
261
+ type: () => DB.Object({
262
+ label: DB.Required({
263
+ comment: "The edition(s) the rules apply to.",
264
+ type: DB.String({ minLength: 1 }),
265
+ }),
266
+ text: DB.Required({
267
+ comment: "The rules text.",
268
+ type: DB.String({ minLength: 1, markdown: "block" }),
269
+ }),
270
+ }),
271
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.36.1",
3
+ "version": "0.37.0",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",