Armor

Part of openmw.types

Usage:

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

Type types

types.Armor

#Armor functions

Type Armor

Armor.TYPE

#ArmorTYPE

Armor.baseType

#Item

Armor.createRecordDraft(armor)

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

Armor.objectIsInstance(object)

Whether the object is an Armor.

Armor.record(objectOrRecordId)

Returns the read-only #ArmorRecord of an Armor

Armor.records

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

Type ArmorRecord

ArmorRecord.baseArmor

The base armor rating of this armor

ArmorRecord.enchant

The enchantment ID of this armor (can be empty)

ArmorRecord.enchantCapacity
ArmorRecord.health
ArmorRecord.icon

VFS path to the icon

ArmorRecord.id

Record id

ArmorRecord.model

VFS path to the model

ArmorRecord.mwscript

MWScript on this armor (can be empty)

ArmorRecord.name

Human-readable name

ArmorRecord.type

See Armor.TYPE

ArmorRecord.value
ArmorRecord.weight

Type ArmorTYPE

ArmorTYPE.Boots
ArmorTYPE.Cuirass
ArmorTYPE.Greaves
ArmorTYPE.Helmet
ArmorTYPE.LBracer
ArmorTYPE.LGauntlet
ArmorTYPE.LPauldron
ArmorTYPE.RBracer
ArmorTYPE.RGauntlet
ArmorTYPE.RPauldron
ArmorTYPE.Shield

Type types

Field(s)

#Armor types.Armor

#Armor functions

Type Armor

Extends #Item

Field(s)

#ArmorTYPE Armor.TYPE

#ArmorTYPE

#Item Armor.baseType

#Item

Armor.createRecordDraft(armor)

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

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

Parameter

  • #ArmorRecord armor : A Lua table with the fields of a ArmorRecord.

Return value

#ArmorRecord: A strongly typed Armor record.

Armor.objectIsInstance(object)

Whether the object is an Armor.

Parameter

Return value

#boolean:

Armor.record(objectOrRecordId)

Returns the read-only #ArmorRecord of an Armor

Parameter

  • #any objectOrRecordId :

Return value

#ArmorRecord:

#list<#ArmorRecord> Armor.records

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

Type ArmorRecord

Field(s)

#number ArmorRecord.baseArmor

The base armor rating of this armor

#string ArmorRecord.enchant

The enchantment ID of this armor (can be empty)

#number ArmorRecord.enchantCapacity
#number ArmorRecord.health
#string ArmorRecord.icon

VFS path to the icon

#string ArmorRecord.id

Record id

#string ArmorRecord.model

VFS path to the model

#string ArmorRecord.mwscript

MWScript on this armor (can be empty)

#string ArmorRecord.name

Human-readable name

#number ArmorRecord.type

See Armor.TYPE

#number ArmorRecord.value
#number ArmorRecord.weight

Type ArmorTYPE

Armor.TYPE

Field(s)

#number ArmorTYPE.Boots
#number ArmorTYPE.Cuirass
#number ArmorTYPE.Greaves
#number ArmorTYPE.Helmet
#number ArmorTYPE.LBracer
#number ArmorTYPE.LGauntlet
#number ArmorTYPE.LPauldron
#number ArmorTYPE.RBracer
#number ArmorTYPE.RGauntlet
#number ArmorTYPE.RPauldron
#number ArmorTYPE.Shield

Type Item