Files | |
| file | nwnx_item.nss |
Functions | |
| void | NWNX_Item_SetWeight (object oItem, int weight) |
| Set an item's weight. More... | |
| void | NWNX_Item_SetBaseGoldPieceValue (object oItem, int gold) |
| Set an item's base value in gold pieces. More... | |
| void | NWNX_Item_SetAddGoldPieceValue (object oItem, int gold) |
| Set an item's additional value in gold pieces. More... | |
| int | NWNX_Item_GetBaseGoldPieceValue (object oItem) |
| Get an item's base value in gold pieces. More... | |
| int | NWNX_Item_GetAddGoldPieceValue (object oItem) |
| Get an item's additional value in gold pieces. More... | |
| void | NWNX_Item_SetBaseItemType (object oItem, int nBaseItem) |
| Set an item's base item type. More... | |
| void | NWNX_Item_SetItemAppearance (object oItem, int nType, int nIndex, int nValue, int bUpdateCreatureAppearance=FALSE) |
| Make a single change to the appearance of an item. More... | |
| string | NWNX_Item_GetEntireItemAppearance (object oItem) |
| Return a string containing the entire appearance for an item. More... | |
| void | NWNX_Item_RestoreItemAppearance (object oItem, string sApp) |
| Restores an item's appearance using the value retrieved through NWNX_Item_GetEntireItemAppearance(). More... | |
| int | NWNX_Item_GetBaseArmorClass (object oItem) |
| Get an item's base armor class. More... | |
| int | NWNX_Item_GetMinEquipLevel (object oItem) |
| Get an item's minimum level required to equip. More... | |
| int | NWNX_Item_MoveTo (object oItem, object oTarget, int bHideAllFeedback=FALSE) |
| Move oItem to oTarget. More... | |
| void | NWNX_Item_SetMinEquipLevelModifier (object oItem, int nModifier, int bPersist=TRUE) |
| Set a modifier to the Minimum Level to Equip (Item Level Restriction). More... | |
| int | NWNX_Item_GetMinEquipLevelModifier (object oItem) |
| Gets the applied modifier to the Minimum Level to Equip (Item Level Restriction). More... | |
| void | NWNX_Item_SetMinEquipLevelOverride (object oItem, int nOverride, int bPersist=TRUE) |
| Set an override to the Minimum Level to Equip (Item Level Restriction). More... | |
| int | NWNX_Item_GetMinEquipLevelOverride (object oItem) |
| Gets the applied override to the Minimum Level to Equip (Item Level Restriction). More... | |
| void NWNX_Item_SetWeight | ( | object | oItem, |
| int | weight | ||
| ) |
Set an item's weight.
| oItem | The item object. |
| weight | The weight, note this is in tenths of pounds. |
Definition at line 134 of file nwnx_item.nss.
| void NWNX_Item_SetBaseGoldPieceValue | ( | object | oItem, |
| int | gold | ||
| ) |
Set an item's base value in gold pieces.
| oItem | The item object. |
| gold | The base gold value. |
Definition at line 141 of file nwnx_item.nss.
| void NWNX_Item_SetAddGoldPieceValue | ( | object | oItem, |
| int | gold | ||
| ) |
Set an item's additional value in gold pieces.
| oItem | The item object. |
| gold | The additional gold value. |
Definition at line 148 of file nwnx_item.nss.
| int NWNX_Item_GetBaseGoldPieceValue | ( | object | oItem | ) |
Get an item's base value in gold pieces.
| oItem | The item object. |
Definition at line 155 of file nwnx_item.nss.
| int NWNX_Item_GetAddGoldPieceValue | ( | object | oItem | ) |
Get an item's additional value in gold pieces.
| oItem | The item object. |
Definition at line 162 of file nwnx_item.nss.
| void NWNX_Item_SetBaseItemType | ( | object | oItem, |
| int | nBaseItem | ||
| ) |
Set an item's base item type.
| oItem | The item object. |
| nBaseItem | The new base item. |
Definition at line 169 of file nwnx_item.nss.
| void NWNX_Item_SetItemAppearance | ( | object | oItem, |
| int | nType, | ||
| int | nIndex, | ||
| int | nValue, | ||
| int | bUpdateCreatureAppearance = FALSE |
||
| ) |
Make a single change to the appearance of an item.
Helmet models and simple items ignore nIndex.
[0] Where ITEM_APPR_TYPE_ARMOR_COLOR is specified, if per-part coloring is desired, the following equation can be used for nIndex to achieve that:
ITEM_APPR_ARMOR_NUM_COLORS + (ITEM_APPR_ARMOR_MODEL_ * ITEM_APPR_ARMOR_NUM_COLORS) + ITEM_APPR_ARMOR_COLOR_
For example, to change the CLOTH1 channel of the torso, nIndex would be:
6 + (7 * 6) + 2 = 50
[1] When specifying per-part coloring, the value 255 corresponds with the logical function 'clear colour override', which clears the per-part override for that part.
| oItem | The item |
| nType | The type |
| nIndex | The index |
| nValue | The value |
| bUpdateCreatureAppearance | If TRUE, also update the appearance of oItem's possessor. Only works for armor/helmets/cloaks. Will remove the item from the quickbar as side effect. |
Definition at line 176 of file nwnx_item.nss.
| string NWNX_Item_GetEntireItemAppearance | ( | object | oItem | ) |
Return a string containing the entire appearance for an item.
| oItem | The item object. |
Definition at line 186 of file nwnx_item.nss.
| void NWNX_Item_RestoreItemAppearance | ( | object | oItem, |
| string | sApp | ||
| ) |
Restores an item's appearance using the value retrieved through NWNX_Item_GetEntireItemAppearance().
| oItem | The item object. |
| sApp | A string representing the item's appearance. |
Definition at line 193 of file nwnx_item.nss.
| int NWNX_Item_GetBaseArmorClass | ( | object | oItem | ) |
Get an item's base armor class.
| oItem | The item object. |
Definition at line 200 of file nwnx_item.nss.
| int NWNX_Item_GetMinEquipLevel | ( | object | oItem | ) |
Get an item's minimum level required to equip.
| oItem | The item object. |
Definition at line 207 of file nwnx_item.nss.
| int NWNX_Item_MoveTo | ( | object | oItem, |
| object | oTarget, | ||
| int | bHideAllFeedback = FALSE |
||
| ) |
Move oItem to oTarget.
| oItem | The item object. |
| oTarget | The target bag/creature/placeable or store object to move oItem to. |
| bHideAllFeedback | Hides all feedback messages generated by losing/acquiring items |
Definition at line 214 of file nwnx_item.nss.
| void NWNX_Item_SetMinEquipLevelModifier | ( | object | oItem, |
| int | nModifier, | ||
| int | bPersist = TRUE |
||
| ) |
Set a modifier to the Minimum Level to Equip (Item Level Restriction).
| oItem | The item object. |
| nModifier | the modifier to apply (After any Override) |
| bPersist | Whether the modifier should persist to gff field. Strongly Recommended to be TRUE (See warning) |
Definition at line 223 of file nwnx_item.nss.
| int NWNX_Item_GetMinEquipLevelModifier | ( | object | oItem | ) |
Gets the applied modifier to the Minimum Level to Equip (Item Level Restriction).
| oItem | The item object. |
Definition at line 231 of file nwnx_item.nss.
| void NWNX_Item_SetMinEquipLevelOverride | ( | object | oItem, |
| int | nOverride, | ||
| int | bPersist = TRUE |
||
| ) |
Set an override to the Minimum Level to Equip (Item Level Restriction).
| oItem | The item object. |
| nOverride | the nOverride to apply (Before any Modifier) |
| bPersist | Whether the modifier should persist to gff field. Strongly Recommended to be TRUE (See warning) |
Definition at line 238 of file nwnx_item.nss.
| int NWNX_Item_GetMinEquipLevelOverride | ( | object | oItem | ) |
Gets the applied override to the Minimum Level to Equip (Item Level Restriction).
| oItem | The item object. |
Definition at line 247 of file nwnx_item.nss.