Interface QuickKeys
Usage
require('openmw.interfaces').QuickKeys
Type QuickKeys
| QuickKeys.activate(index) |
Activates the quick key at the index. |
| QuickKeys.get(index) |
Fetches the quick key assignment at the index. |
| QuickKeys.setHandToHand(index) |
Sets the quick key at index to HandToHand, deleting whatever quick key was previous assigned |
| QuickKeys.setItem(index, any) |
Sets the quick key at index to the given item, deleting whatever quick key was previous assigned. |
| QuickKeys.setMagicItem(index, any) |
Sets the quick key at index to the given enchanted item, deleting whatever quick key was previous assigned |
| QuickKeys.setSpell(index, recordId) |
Sets the quick key at index to the given spell, deleting whatever quick key was previous assigned |
| QuickKeys.unset(index) |
Unsets the quick key at index 0, leaving it unassigned Note: This does NOT automatically reset index 10 to handToHand |
| QuickKeys.version |
Interface version |
Type QuickKey
| QuickKey.item |
(Optional) The item instance that was assigned to quick keys. If not present, or that item is not in inventory anymore, the first suitable item with the same recordId in the inventory will be used instead. |
| QuickKey.recordId |
(Required for Inventory, MagicItem, and Spell) The recordId of the item or spell. |
| QuickKey.type |
Enum |
Type QuickKeyType
| QuickKeyType.HandToHand |
Unequip weapon and enter hand-to-hand combat stance. |
| QuickKeyType.Inventory |
inventory item that will be used as if dragged onto the character paperdoll. |
| QuickKeyType.MagicItem |
enchanted inventory item that will set as selected spell (and equipped if necessary). |
| QuickKeyType.Spell |
spell that will be set as selected spell. |
Type UI
| UI.MODE |
All available QuickKeys types. |
Type QuickKeys
Field(s)
- QuickKeys.activate(index)
-
Activates the quick key at the index.
Does nothing if that index is unassigend.
Parameter
-
#number index:
-
- QuickKeys.get(index)
-
Fetches the quick key assignment at the index.
Parameter
-
#number index:
Return value
#QuickKey: A table with quick key information, or nil if the quick key is unassigned or index was out of range.
-
- QuickKeys.setHandToHand(index)
-
Sets the quick key at index to HandToHand, deleting whatever quick key was previous assigned
Parameter
-
#number index:
-
- QuickKeys.setItem(index, any)
-
Sets the quick key at index to the given item, deleting whatever quick key was previous assigned.
Note that any inventory item can be assigned, but assigning an item that has no use (clutter) will make the quick key do nothing.
Parameters
-
#number index: -
any: itemOrId either an instance of an item or a #string record id of an item.
-
- QuickKeys.setMagicItem(index, any)
-
Sets the quick key at index to the given enchanted item, deleting whatever quick key was previous assigned
Parameters
-
#number index: -
any: itemOrId either an instance of an enchanted item or a #string record id of an enchanted item.
-
- QuickKeys.setSpell(index, recordId)
-
Sets the quick key at index to the given spell, deleting whatever quick key was previous assigned
Parameters
-
#number index: -
#string recordId: The record ID of the spell
-
- QuickKeys.unset(index)
-
Unsets the quick key at index 0, leaving it unassigned Note: This does NOT automatically reset index 10 to handToHand
Parameter
-
#number index:
-
- #number QuickKeys.version
-
Interface version
Type QuickKey
Table describing a quick key assignment
Field(s)
- openmw.core#GameObject QuickKey.item
-
(Optional) The item instance that was assigned to quick keys. If not present, or that item is not in inventory anymore, the first suitable item with the same recordId in the inventory will be used instead.
- #string QuickKey.recordId
-
(Required for Inventory, MagicItem, and Spell) The recordId of the item or spell.
Type QuickKeyType
Table of quick key types
Field(s)
- #string QuickKeyType.HandToHand
-
Unequip weapon and enter hand-to-hand combat stance.
- #string QuickKeyType.Inventory
-
inventory item that will be used as if dragged onto the character paperdoll.
- #string QuickKeyType.MagicItem
-
enchanted inventory item that will set as selected spell (and equipped if necessary).
- #string QuickKeyType.Spell
-
spell that will be set as selected spell.
Type UI
Field(s)
- #table UI.MODE
-
All available QuickKeys types.