Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeClient APIGenerated

BookOptions

Defined in: client/api.d.ts:3375

What Book.open shows and how it looks.

optional images?: BookPageImage[]

Defined in: client/api.d.ts:3409

Pictures for the skill-book and map layouts. Inline pictures go in the page text as <img> instead.


optional legibility?: number

Defined in: client/api.d.ts:3399

How much of the text can be read, 0 to 1; values outside are clamped. Defaults to 1, fully legible. Below 1 the movie swaps letters for look-alike glyphs, the same effect a vanilla book shows a player with low reading skill. It works in tenths: each step brings roughly another tenth of the character classes back, so 0.31 and 0.39 look the same. The substitution is deterministic – the same text at the same level always reads the same way – and markup is never touched.


pages: string[]

Defined in: client/api.d.ts:3379

One string per page, written in the book movie’s own markup: <title>, <subtitle>, <heading>, <paragraph>, <br/>, <accent>, <inc>X</inc> for a decorated initial, <poem>, <lpoem>, <note>, <p align>, <font size>, <i> and <img src='...' width='W' height='H' align='center'/>. A page break follows every page but the last; <newpage/> inside a page breaks it further. The player’s own reading skill never scrambles it; legibility decides that.


optional style?: "book" | "plainBook" | "letter"

Defined in: client/api.d.ts:3384

The object in the player’s hands: a red-covered book (the default), a plain-covered one, or a folded letter.


optional texture?: string

Defined in: client/api.d.ts:3404

A picture Book.image returned, replacing the carrier’s own diffuse texture: the paper and the cover together, which the model maps from one atlas. Paint it over the vanilla atlas to keep the UV layout – Objects/manmade/task_specific_props/read_and_write/books/book_alchemy_diff.dds for the two book styles, .../scrolls/scroll_diff.dds for letter. The material’s diffuse colour multiplies it: book darkens it to about 78% and letter to about 72%, while plainBook shows it as painted. It applies to this book’s own copy of the material only, and goes with the book.


optional type?: number

Defined in: client/api.d.ts:3389

The layout the movie uses, by document_class id: 1 book (the default), 2 recipe, 3 skill book, 4 map, 5 letter (the default for letter), 6 plan.


optional visual?: number

Defined in: client/api.d.ts:3394

How ornate the pages are, 1 plain to 7 embellished. Defaults to 1.