Miscellaneous

Part of openmw.types

Usage:

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

Type types

types.Miscellaneous

Functions for #Miscellaneous objects

Type Miscellaneous

Miscellaneous.baseType

#Item

Miscellaneous.createRecordDraft(miscellaneous)

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

Miscellaneous.getSoul(object)

Returns the read-only soul of a miscellaneous item

Miscellaneous.objectIsInstance(object)

Whether the object is a Miscellaneous.

Miscellaneous.record(objectOrRecordId)

Returns the read-only #MiscellaneousRecord of a miscellaneous item

Miscellaneous.records

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

Miscellaneous.setSoul(object, soulId)

Sets the soul of a miscellaneous item, intended for soul gem objects; Must be used in a global script.

Type MiscellaneousRecord

MiscellaneousRecord.icon

VFS path to the icon

MiscellaneousRecord.id

The record ID of the miscellaneous item

MiscellaneousRecord.isKey
MiscellaneousRecord.model

VFS path to the model

MiscellaneousRecord.mwscript

MWScript on this miscellaneous item (can be empty)

MiscellaneousRecord.name

The name of the miscellaneous item

MiscellaneousRecord.value
MiscellaneousRecord.weight

Type types

Field(s)

#Miscellaneous types.Miscellaneous

Functions for #Miscellaneous objects

Type Item

Type Miscellaneous

Extends #Item

Field(s)

#Item Miscellaneous.baseType

#Item

Miscellaneous.createRecordDraft(miscellaneous)

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

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

Parameter

Return value

#MiscellaneousRecord: A strongly typed Miscellaneous record.

Miscellaneous.getSoul(object)

Returns the read-only soul of a miscellaneous item

Parameter

Return value

#string:

Miscellaneous.objectIsInstance(object)

Whether the object is a Miscellaneous.

Parameter

Return value

#boolean:

Miscellaneous.record(objectOrRecordId)

Returns the read-only #MiscellaneousRecord of a miscellaneous item

Parameter

  • #any objectOrRecordId :

Return value

#MiscellaneousRecord:

#list<#MiscellaneousRecord> Miscellaneous.records

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

Miscellaneous.setSoul(object, soulId)

Sets the soul of a miscellaneous item, intended for soul gem objects; Must be used in a global script.

Parameters

Type MiscellaneousRecord

Field(s)

#string MiscellaneousRecord.icon

VFS path to the icon

#string MiscellaneousRecord.id

The record ID of the miscellaneous item

#boolean MiscellaneousRecord.isKey
#string MiscellaneousRecord.model

VFS path to the model

#string MiscellaneousRecord.mwscript

MWScript on this miscellaneous item (can be empty)

#string MiscellaneousRecord.name

The name of the miscellaneous item

#number MiscellaneousRecord.value
#number MiscellaneousRecord.weight