Anvil
Anvil.API.NwBaseItem Class Reference

A base item type definition. More...

Public Member Functions

bool IsPartUsingEnvMap (int partIndex)
 Gets if the specified part is using environment mapping. More...
 

Static Public Member Functions

static ? NwBaseItem FromItemId (int itemId)
 Resolves a NwBaseItem from a base item id. More...
 
static ? NwBaseItem FromItemType (BaseItemType itemType)
 Resolves a NwBaseItem from a BaseItemType. More...
 
static implicit operator NwBaseItem? (BaseItemType itemType)
 

Properties

ACBonus ACBonusType [get]
 The type of armor class bonus granted, if this item grants one. More...
 
BaseItemAmmunitionType AmmunitionType [get]
 If this item is a ranged weapon, gets the ammunition type used. More...
 
byte AnimSlashL [get]
 Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a slash from the left during an attack. More...
 
byte AnimSlashR [get]
 Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a slash from the right during an attack. More...
 
byte AnimSlashS [get]
 Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a straight slash (from the center) during an attack. More...
 
byte ArcaneSpellFailure [get]
 Gets the percentage this item adds to the chance for arcane spell failure. Not used for armor which uses armor.2da. More...
 
sbyte ArmorCheckPenalty [get]
 Gets the armor check penalty inherent to this item. Not used for armor which uses armor.2da More...
 
byte BaseAC [get]
 Gets the armor class value of this shield (before enchantments). Not used for armor. More...
 
float BaseCost [get]
 Gets the base value (in gold pieces) of an unenchanted item of this type. More...
 
StrRef BaseItemStatsText [get]
 Gets the string containing basic statistics of this item. This is displayed under the description when an item is examined in the game. More...
 
bool CanRotateIcon [get]
 Gets if the inventory icon for this item may be rotated 90 degrees clockwise, such as when placed on a player's quickbar. More...
 
BaseItemCategory Category [get]
 
float CostMultiplier [get]
 Gets the cost multiplier of the item.
Used in the cost calculation of magical items, see itemprops.2da, itempropdef.2da, iprp_costtable.2da and iprp_paramtable.2da. More...
 
byte CritMultiplier [get]
 The critical multiplier for this weapon (item). More...
 
byte CritThreat [get]
 Gets the chance (out of 20) that this weapon (item) will threaten a critical hit. For example, "2" would mean two chances out of 20, for a threat range of 19-20. More...
 
string? DefaultIcon [get]
 Gets the ResRef of the default icon that is used when the item's icon doesn't exist. More...
 
string? DefaultModel [get]
 Gets the default model used when the item is lying on the ground. More...
 
StrRef Description [get]
 Gets the default description for this item type. This is also used in game for items that lack specific descriptions. More...
 
byte DieToRoll [get]
 Gets the number of sides of the dice rolled for this weapon's (item's) damage. More...
 
NwFeatEpicDevastatingCriticalFeat [get]
 Gets the character feat that allows devastating criticals to be performed with this item. More...
 
NwFeatEpicOverwhelmingCriticalFeat [get]
 Gets the character feat that allows overwhelming criticals to be performed with this item. More...
 
NwFeatEpicWeaponFocusFeat [get]
 Gets the character feat that provides epic weapon focus for this item. More...
 
NwFeatEpicWeaponSpecializationFeat [get]
 Gets the character feat that provides epic weapon specialization for this item. More...
 
EquipmentSlots EquipmentSlots [get]
 Gets the inventory slots that this item may be equipped in. More...
 
uint Id [get]
 Gets the id of this base item. More...
 
byte ILRStackSize [get]
 Gets the stack size used when calculating this item's value in regards to item level restrictions. More...
 
NwFeatImprovedCriticalFeat [get]
 Gets the character feat that allows improved criticals to be performed with this item. More...
 
Vector2Int InventorySlotSize [get]
 Gets the size/number of inventory slots that this base item occupies. More...
 
byte InvSoundTypeIndex [get]
 Gets the index in inventorysnds.2da indicating the sound used when this item is placed (or moved) in a character's inventory. More...
 
bool IsContainer [get]
 Gets if this item is considered a container, and can contain other items, like a bag. More...
 
bool IsGenderSpecific [get]
 Gets if the item changes appearance based on the gender of the possessor. More...
 
bool IsMonkWeapon [get]
 Gets if this base item is a monk weapon. More...
 
bool IsRangedWeapon [get]
 Gets if this base item is a ranged weapon. More...
 
bool IsStackable [get]
 Gets if this item type can be stacked. More...
 
string? ItemClass [get]
 Gets the ResRef of the item's model, or the base part of the resref.
This property is dependent on ModelType. See https://nwn.wiki/display/NWN1/baseitems.2da for more info. More...
 
byte ItemPropertiesMax [get]
 Gets the maximum number of "cast spell" properties items of this type can be given when designed in the Toolset. More...
 
byte ItemPropertiesMin [get]
 Gets the minimum number of "cast spell" properties items of this type must be given when designed in the Toolset. More...
 
byte ItemPropertyColumnId [get]
 
BaseItemType ItemType [get]
 Gets the associated BaseItemType for this base item. More...
 
int MaxStackSize [get]
 Gets the maximum stack size for this base item. More...
 
float ModelRangeMax [get]
 Gets the maximum allowed number of models of this type. More...
 
float ModelRangeMin [get]
 Gets the minimum number of models of this type. More...
 
BaseItemModelType ModelType [get]
 Gets a value indicating how much the look of this item can be customized. More...
 
StrRef Name [get]
 Gets the base name of this item. Used for unidentified items. More...
 
byte NumDamageDice [get]
 Gets the number of dice rolled for this weapon's (item's) damage. More...
 
float PreferredAttackDistance [get, set]
 Gets or sets the preferred attack distance for this base item. More...
 
IEnumerable< NwFeatPrerequisiteFeats [get]
 Gets a list of feats that grants proficiency with this item. A character must be proficient with an item in order to equip or use it. More...
 
BaseItemQBBehaviour QBBehaviour [get]
 Gets the behaviour when this property appears on the player's quick bar. More...
 
BaseItemRotation RotateOnGround [get]
 Gets the rotation of the item model when laid on the ground. More...
 
byte StartingCharges [get]
 Gets the starting number of charges this item has by default. More...
 
StoreCategory StoreCategory [get]
 Gets where this item can be found in a store. More...
 
byte StoreSortOrder [get]
 Gets a number indicating the order in which this item will be listed in a store. More...
 
CreatureSize WeaponFinesseMinimumCreatureSize [get]
 Gets the minimum creature size required for this weapon (item) to be considered a finesse weapon, for the Feat.WeaponFinesse feat. More...
 
NwFeatWeaponFocusFeat [get]
 Gets the character feat that provides weapon focus for this item. More...
 
byte WeaponMaterialTypeIndex [get]
 Gets an index into weaponsounds.2da indicating what sounds this weapon (item) makes when it hits an opponent. More...
 
NwFeatWeaponOfChoiceFeat [get]
 Gets the character feat that identifies this item as a weapon of choice. More...
 
BaseItemWeaponSize WeaponSize [get]
 Gets the WeaponSize of this base item if the item is a weapon. More...
 
NwFeatWeaponSpecializationFeat [get]
 Gets the character feat that provides weapon specialization for this item. More...
 
IEnumerable< DamageType > WeaponType [get]
 Gets the type/s of damage inflicted by this weapon (item). More...
 
BaseItemWeaponWieldType WeaponWieldType [get]
 Gets the animation set is used when this item is wielded (equipped) in one of the weapon slots.
May also affect which slots it can work in (eg; double sided weapons take both slots, and small creatures wielding larger weapons do so two handed). More...
 
decimal Weight [get]
 Gets the base weight of this item in pounds. More...
 

Detailed Description

A base item type definition.

Member Function Documentation

◆ FromItemId()

static ? NwBaseItem Anvil.API.NwBaseItem.FromItemId ( int  itemId)
inlinestatic

Resolves a NwBaseItem from a base item id.

Parameters
itemIdThe item id to resolve.
Returns
The associated NwBaseItem instance. Null if the base item id is invalid.

◆ FromItemType()

static ? NwBaseItem Anvil.API.NwBaseItem.FromItemType ( BaseItemType  itemType)
inlinestatic

Resolves a NwBaseItem from a BaseItemType.

Parameters
itemTypeThe item type to resolve.
Returns
The associated NwBaseItem instance. Null if the base item type is invalid.

◆ IsPartUsingEnvMap()

bool Anvil.API.NwBaseItem.IsPartUsingEnvMap ( int  partIndex)
inline

Gets if the specified part is using environment mapping.

Parameters
partIndexThe part index to query, 0, 1 or 2)
Returns
True if the specified part uses environment mapping, false if it does not and uses transparency instead.

Property Documentation

◆ ACBonusType

ACBonus Anvil.API.NwBaseItem.ACBonusType
get

The type of armor class bonus granted, if this item grants one.

◆ AmmunitionType

BaseItemAmmunitionType Anvil.API.NwBaseItem.AmmunitionType
get

If this item is a ranged weapon, gets the ammunition type used.

◆ AnimSlashL

byte Anvil.API.NwBaseItem.AnimSlashL
get

Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a slash from the left during an attack.

◆ AnimSlashR

byte Anvil.API.NwBaseItem.AnimSlashR
get

Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a slash from the right during an attack.

◆ AnimSlashS

byte Anvil.API.NwBaseItem.AnimSlashS
get

Gets the chance (expressed as a percentage) that a character wielding this weapon (item) will be animated as making a straight slash (from the center) during an attack.

◆ ArcaneSpellFailure

byte Anvil.API.NwBaseItem.ArcaneSpellFailure
get

Gets the percentage this item adds to the chance for arcane spell failure. Not used for armor which uses armor.2da.

◆ ArmorCheckPenalty

sbyte Anvil.API.NwBaseItem.ArmorCheckPenalty
get

Gets the armor check penalty inherent to this item. Not used for armor which uses armor.2da

◆ BaseAC

byte Anvil.API.NwBaseItem.BaseAC
get

Gets the armor class value of this shield (before enchantments). Not used for armor.

◆ BaseCost

float Anvil.API.NwBaseItem.BaseCost
get

Gets the base value (in gold pieces) of an unenchanted item of this type.

◆ BaseItemStatsText

StrRef Anvil.API.NwBaseItem.BaseItemStatsText
get

Gets the string containing basic statistics of this item. This is displayed under the description when an item is examined in the game.

◆ CanRotateIcon

bool Anvil.API.NwBaseItem.CanRotateIcon
get

Gets if the inventory icon for this item may be rotated 90 degrees clockwise, such as when placed on a player's quickbar.

◆ CostMultiplier

float Anvil.API.NwBaseItem.CostMultiplier
get

Gets the cost multiplier of the item.
Used in the cost calculation of magical items, see itemprops.2da, itempropdef.2da, iprp_costtable.2da and iprp_paramtable.2da.

◆ CritMultiplier

byte Anvil.API.NwBaseItem.CritMultiplier
get

The critical multiplier for this weapon (item).

◆ CritThreat

byte Anvil.API.NwBaseItem.CritThreat
get

Gets the chance (out of 20) that this weapon (item) will threaten a critical hit. For example, "2" would mean two chances out of 20, for a threat range of 19-20.

◆ DefaultIcon

string? Anvil.API.NwBaseItem.DefaultIcon
get

Gets the ResRef of the default icon that is used when the item's icon doesn't exist.

◆ DefaultModel

string? Anvil.API.NwBaseItem.DefaultModel
get

Gets the default model used when the item is lying on the ground.

◆ Description

StrRef Anvil.API.NwBaseItem.Description
get

Gets the default description for this item type. This is also used in game for items that lack specific descriptions.

◆ DieToRoll

byte Anvil.API.NwBaseItem.DieToRoll
get

Gets the number of sides of the dice rolled for this weapon's (item's) damage.

◆ EpicDevastatingCriticalFeat

NwFeat? Anvil.API.NwBaseItem.EpicDevastatingCriticalFeat
get

Gets the character feat that allows devastating criticals to be performed with this item.

◆ EpicOverwhelmingCriticalFeat

NwFeat? Anvil.API.NwBaseItem.EpicOverwhelmingCriticalFeat
get

Gets the character feat that allows overwhelming criticals to be performed with this item.

◆ EpicWeaponFocusFeat

NwFeat? Anvil.API.NwBaseItem.EpicWeaponFocusFeat
get

Gets the character feat that provides epic weapon focus for this item.

◆ EpicWeaponSpecializationFeat

NwFeat? Anvil.API.NwBaseItem.EpicWeaponSpecializationFeat
get

Gets the character feat that provides epic weapon specialization for this item.

◆ EquipmentSlots

EquipmentSlots Anvil.API.NwBaseItem.EquipmentSlots
get

Gets the inventory slots that this item may be equipped in.

◆ Id

uint Anvil.API.NwBaseItem.Id
get

Gets the id of this base item.

◆ ILRStackSize

byte Anvil.API.NwBaseItem.ILRStackSize
get

Gets the stack size used when calculating this item's value in regards to item level restrictions.

◆ ImprovedCriticalFeat

NwFeat? Anvil.API.NwBaseItem.ImprovedCriticalFeat
get

Gets the character feat that allows improved criticals to be performed with this item.

◆ InventorySlotSize

Vector2Int Anvil.API.NwBaseItem.InventorySlotSize
get

Gets the size/number of inventory slots that this base item occupies.

◆ InvSoundTypeIndex

byte Anvil.API.NwBaseItem.InvSoundTypeIndex
get

Gets the index in inventorysnds.2da indicating the sound used when this item is placed (or moved) in a character's inventory.

◆ IsContainer

bool Anvil.API.NwBaseItem.IsContainer
get

Gets if this item is considered a container, and can contain other items, like a bag.

◆ IsGenderSpecific

bool Anvil.API.NwBaseItem.IsGenderSpecific
get

Gets if the item changes appearance based on the gender of the possessor.

◆ IsMonkWeapon

bool Anvil.API.NwBaseItem.IsMonkWeapon
get

Gets if this base item is a monk weapon.

◆ IsRangedWeapon

bool Anvil.API.NwBaseItem.IsRangedWeapon
get

Gets if this base item is a ranged weapon.

◆ IsStackable

bool Anvil.API.NwBaseItem.IsStackable
get

Gets if this item type can be stacked.

◆ ItemClass

string? Anvil.API.NwBaseItem.ItemClass
get

Gets the ResRef of the item's model, or the base part of the resref.
This property is dependent on ModelType. See https://nwn.wiki/display/NWN1/baseitems.2da for more info.

◆ ItemPropertiesMax

byte Anvil.API.NwBaseItem.ItemPropertiesMax
get

Gets the maximum number of "cast spell" properties items of this type can be given when designed in the Toolset.

◆ ItemPropertiesMin

byte Anvil.API.NwBaseItem.ItemPropertiesMin
get

Gets the minimum number of "cast spell" properties items of this type must be given when designed in the Toolset.

◆ ItemType

BaseItemType Anvil.API.NwBaseItem.ItemType
get

Gets the associated BaseItemType for this base item.

◆ MaxStackSize

int Anvil.API.NwBaseItem.MaxStackSize
get

Gets the maximum stack size for this base item.

◆ ModelRangeMax

float Anvil.API.NwBaseItem.ModelRangeMax
get

Gets the maximum allowed number of models of this type.

◆ ModelRangeMin

float Anvil.API.NwBaseItem.ModelRangeMin
get

Gets the minimum number of models of this type.

◆ ModelType

BaseItemModelType Anvil.API.NwBaseItem.ModelType
get

Gets a value indicating how much the look of this item can be customized.

◆ Name

StrRef Anvil.API.NwBaseItem.Name
get

Gets the base name of this item. Used for unidentified items.

◆ NumDamageDice

byte Anvil.API.NwBaseItem.NumDamageDice
get

Gets the number of dice rolled for this weapon's (item's) damage.

◆ PreferredAttackDistance

float Anvil.API.NwBaseItem.PreferredAttackDistance
getset

Gets or sets the preferred attack distance for this base item.

◆ PrerequisiteFeats

IEnumerable<NwFeat> Anvil.API.NwBaseItem.PrerequisiteFeats
get

Gets a list of feats that grants proficiency with this item. A character must be proficient with an item in order to equip or use it.

◆ QBBehaviour

BaseItemQBBehaviour Anvil.API.NwBaseItem.QBBehaviour
get

Gets the behaviour when this property appears on the player's quick bar.

◆ RotateOnGround

BaseItemRotation Anvil.API.NwBaseItem.RotateOnGround
get

Gets the rotation of the item model when laid on the ground.

◆ StartingCharges

byte Anvil.API.NwBaseItem.StartingCharges
get

Gets the starting number of charges this item has by default.

◆ StoreCategory

StoreCategory Anvil.API.NwBaseItem.StoreCategory
get

Gets where this item can be found in a store.

◆ StoreSortOrder

byte Anvil.API.NwBaseItem.StoreSortOrder
get

Gets a number indicating the order in which this item will be listed in a store.

◆ WeaponFinesseMinimumCreatureSize

CreatureSize Anvil.API.NwBaseItem.WeaponFinesseMinimumCreatureSize
get

Gets the minimum creature size required for this weapon (item) to be considered a finesse weapon, for the Feat.WeaponFinesse feat.

◆ WeaponFocusFeat

NwFeat? Anvil.API.NwBaseItem.WeaponFocusFeat
get

Gets the character feat that provides weapon focus for this item.

◆ WeaponMaterialTypeIndex

byte Anvil.API.NwBaseItem.WeaponMaterialTypeIndex
get

Gets an index into weaponsounds.2da indicating what sounds this weapon (item) makes when it hits an opponent.

◆ WeaponOfChoiceFeat

NwFeat? Anvil.API.NwBaseItem.WeaponOfChoiceFeat
get

Gets the character feat that identifies this item as a weapon of choice.

◆ WeaponSize

BaseItemWeaponSize Anvil.API.NwBaseItem.WeaponSize
get

Gets the WeaponSize of this base item if the item is a weapon.

◆ WeaponSpecializationFeat

NwFeat? Anvil.API.NwBaseItem.WeaponSpecializationFeat
get

Gets the character feat that provides weapon specialization for this item.

◆ WeaponType

IEnumerable<DamageType> Anvil.API.NwBaseItem.WeaponType
get

Gets the type/s of damage inflicted by this weapon (item).

◆ WeaponWieldType

BaseItemWeaponWieldType Anvil.API.NwBaseItem.WeaponWieldType
get

Gets the animation set is used when this item is wielded (equipped) in one of the weapon slots.
May also affect which slots it can work in (eg; double sided weapons take both slots, and small creatures wielding larger weapons do so two handed).

◆ Weight

decimal Anvil.API.NwBaseItem.Weight
get

Gets the base weight of this item in pounds.


The documentation for this class was generated from the following file: