Book

Part of openmw.types

Usage:

local Book = require('openmw.types').Book

Type types

types.Book

#Book functions

Type Book

Book.SKILL

DEPRECATED, use openmw.core#SKILL

Book.baseType

#Item

Book.createRecordDraft(book)

Creates a #BookRecord without adding it to the world database.

Book.objectIsInstance(object)

Whether the object is a Book.

Book.record(objectOrRecordId)

Returns the read-only #BookRecord of a book

Book.records

A read-only list of all #BookRecords in the world database.

Type BookRecord

BookRecord.enchant

The enchantment ID of this book (can be empty)

BookRecord.enchantCapacity
BookRecord.icon

VFS path to the icon

BookRecord.id

The record ID of the book

BookRecord.isScroll
BookRecord.model

VFS path to the model

BookRecord.mwscript

MWScript on this book (can be empty)

BookRecord.name

Name of the book

BookRecord.skill

The skill that this book teaches. See openmw.core#SKILL

BookRecord.text

The text content of the book

BookRecord.value
BookRecord.weight

Type BookSKILL

BookSKILL.acrobatics

"acrobatics"

BookSKILL.alchemy

"alchemy"

BookSKILL.alteration

"alteration"

BookSKILL.armorer

"armorer"

BookSKILL.athletics

"athletics"

BookSKILL.axe

"axe"

BookSKILL.block

"block"

BookSKILL.bluntWeapon

"bluntweapon"

BookSKILL.conjuration

"conjuration"

BookSKILL.destruction

"destruction"

BookSKILL.enchant

"enchant"

BookSKILL.handToHand

"handtohand"

BookSKILL.heavyArmor

"heavyarmor"

BookSKILL.illusion

"illusion"

BookSKILL.lightArmor

"lightarmor"

BookSKILL.longBlade

"longblade"

BookSKILL.marksman

"marksman"

BookSKILL.mediumArmor

"mediumarmor"

BookSKILL.mercantile

"mercantile"

BookSKILL.mysticism

"mysticism"

BookSKILL.restoration

"restoration"

BookSKILL.security

"security"

BookSKILL.shortBlade

"shortblade"

BookSKILL.sneak

"sneak"

BookSKILL.spear

"spear"

BookSKILL.speechcraft

"speechcraft"

BookSKILL.unarmored

"unarmored"

Type types

Field(s)

#Book types.Book

#Book functions

Type Book

Extends #Item

Field(s)

#BookSKILL Book.SKILL

DEPRECATED, use openmw.core#SKILL

#Item Book.baseType

#Item

Book.createRecordDraft(book)

Creates a #BookRecord without adding it to the world database.

Use openmw_world#world.createRecord to add the record to the world.

Parameter

  • #BookRecord book : A Lua table with the fields of a BookRecord.

Return value

#BookRecord: A strongly typed Book record.

Book.objectIsInstance(object)

Whether the object is a Book.

Parameter

Return value

#boolean:

Book.record(objectOrRecordId)

Returns the read-only #BookRecord of a book

Parameter

  • #any objectOrRecordId :

Return value

#BookRecord:

#list<#BookRecord> Book.records

A read-only list of all #BookRecords in the world database.

Type BookRecord

Field(s)

#string BookRecord.enchant

The enchantment ID of this book (can be empty)

#number BookRecord.enchantCapacity
#string BookRecord.icon

VFS path to the icon

#string BookRecord.id

The record ID of the book

#boolean BookRecord.isScroll
#string BookRecord.model

VFS path to the model

#string BookRecord.mwscript

MWScript on this book (can be empty)

#string BookRecord.name

Name of the book

#string BookRecord.skill

The skill that this book teaches. See openmw.core#SKILL

#string BookRecord.text

The text content of the book

#number BookRecord.value
#number BookRecord.weight

Type BookSKILL

Book.SKILL

Field(s)

#string BookSKILL.acrobatics

"acrobatics"

#string BookSKILL.alchemy

"alchemy"

#string BookSKILL.alteration

"alteration"

#string BookSKILL.armorer

"armorer"

#string BookSKILL.athletics

"athletics"

#string BookSKILL.axe

"axe"

#string BookSKILL.block

"block"

#string BookSKILL.bluntWeapon

"bluntweapon"

#string BookSKILL.conjuration

"conjuration"

#string BookSKILL.destruction

"destruction"

#string BookSKILL.enchant

"enchant"

#string BookSKILL.handToHand

"handtohand"

#string BookSKILL.heavyArmor

"heavyarmor"

#string BookSKILL.illusion

"illusion"

#string BookSKILL.lightArmor

"lightarmor"

#string BookSKILL.longBlade

"longblade"

#string BookSKILL.marksman

"marksman"

#string BookSKILL.mediumArmor

"mediumarmor"

#string BookSKILL.mercantile

"mercantile"

#string BookSKILL.mysticism

"mysticism"

#string BookSKILL.restoration

"restoration"

#string BookSKILL.security

"security"

#string BookSKILL.shortBlade

"shortblade"

#string BookSKILL.sneak

"sneak"

#string BookSKILL.spear

"spear"

#string BookSKILL.speechcraft

"speechcraft"

#string BookSKILL.unarmored

"unarmored"

Type Item