Skip to content

tes3itemData⚓︎

A set of variables that differentiates one item from another. The game adds itemData to items on equipping with the exception of thrown weapons and ammo. Items in the in-game world which aren't in inventories won't have item data if not necessary i.e., the item is fully repaired.

For more info see the description of tes3itemStack.

Properties⚓︎

charge⚓︎

The charge of the item. Provides incorrect values on misc items, which instead have a soul actor.

Returns:

  • result (number)

condition⚓︎

The condition/health of the item. Provides incorrect values on light items, which instead have a timeLeft property.

Returns:

  • result (number)

context⚓︎

Returns an ease of use script context for variable access.

Returns:


count⚓︎

The total number of identical items represented by this data. Reserved for use by in-world references. It should always be 1 for items in inventories. Inventories utilize the stack count in tes3itemStack object.

Returns:

  • result (number)

data⚓︎

A generic lua table that data can be written to, and synced to/from the save. All information stored must be valid for serialization to json. For data that doesn't persist, use tempData.

There is a guide available here on using this table.

Returns:

  • result (table)

owner⚓︎

The owner of the associated item. An item can have an owner or it can be faction-owned.

Returns:


requirement⚓︎

A requirement, typically associated with ownership and when the player may freely interact with an object. The type depends on the owner. Faction owners provide a required rank as a number, while NPCs provide a global variable to check.

Returns:


script⚓︎

Read-only. The script associated with the scriptVariables.

Returns:


scriptVariables⚓︎

Access to the structure where individual mwscript data is stored.

Returns:

  • result (tes3scriptVariables)

soul⚓︎

Only available on misc items. The actor that is stored inside the soul gem.

Returns:


tempData⚓︎

A generic lua table that data can be written to, but is not synced to/from a save.

There is a guide available here on using this table.

Returns:

  • result (table)

timeLeft⚓︎

The time remaining on a light. Provides incorrect values on non-light items, which instead have a condition property.

Returns:

  • result (number)