Item Creation Function Category

Functions used to deal with item creation. The itemproperty commands are special constructors - they construct an itemproperty "object" which can then be, for instance, applied to an item using the AddItemProperty command. Much like effects need to be first constructed, then applied with ApplyEffectToObject. It will often be a good idea to remove similar itemproperties from the item first. There's a command in the "x2_inc_itemprop" include file called IPSafeAddItemProperty which will do that for you.



Functions

NameBrief Description
ActionCreateUsed to encapsulate CreateObject allowing this function to be added to the action stack.
AddItemPropertyAdd an itemproperty to an item
CICraftCheckBrewPotionChecks if the current spell was used to brew a potion and performs the brewing process.
CICraftCheckScribeScrollChecks if the current spell was used to scribe a scroll and performs the scribe process.
CICraftScribeScrollCreate and return a magic scroll for a specified spell.
CIGetCraftItemStructFrom2DARetrieves craft information for a specified item.
CIGetIsCraftFeatBaseItemReturns TRUE if the object is a craft base item.
CIGetIsSpellRestrictedFromCraftFeatDetermines if a spell is restricted for being used for crafting.
CIGetSpellWasUsedForItemCreationChecks if the caster intends to craft an item and returns TRUE if the spell is used up for crafting purposes.
CIUseCraftItemSkillDoes a craft check for a given crafting skill to craft an item.
CopyItemDuplicates an item.
CopyItemAndModifyCopies an item, making a single modification to it
CopyObjectDuplicates the object specified.
CraftBrewPotionCreate and return a magical potion for a specified spell.
CreateAmmoSpawns in a ammunition suited for that class as part of the random treasure distribution.
CreateAnimalPartCreates an animal part on the corpse of the animal
CreateArcaneScrollCreates a scroll as part of the treasure
CreateBastardSwordCreates a Bastard sword for the containers treasure
CreateBattleAxeSpawns in a magical weapon suited for that class as part of the random treasure distribution.
CreateBookCreates a random book as part of the treasure distribution system
CreateClubSpawns in a magical weapon suited for that class as part of the random treasure distribution.
CreateColmarrPotionCreates potions for Colmarr's Machine.
CreateDaggerUsed to create a magical dagger in a container as part of the treasure distribution model
CreateDartSpawns in a magical weapon suited for that class as part of the random treasure distribution.
CreateDireMaceSpawns in a Dire Mace as part of the random treasure distribution.
CreateDivineScrollCreates a divine scroll as part of the treasure
CreateDoubleAxeSpawns in a magical Double Axe as part of the random treasure distribution.
CreateForgeItemUsed to create magic items at a "forge" container.
CreateGemCreates a Gem as part of the NWN treasure distribution system
CreateGenericClassItemCreates a treasure item for wizards, sorcerers, clerics, monks, rogues and bards
CreateGenericDruidWeaponCreates an appropriate druid weapon that fits the level of the PC, and places it in/on an object.
CreateGenericExoticCreates an appropriate exotic weapon that fits the level of the PC, and places it in/on an object.
CreateGenericHeavyArmorSpawns in a Piece of Generic Heavy Armor as part of the random treasure distribution.
CreateGenericLightArmorSpawns in a piece of generic light armor as part of the random treasure distribution.
CreateGenericMartialSpawns in a generic weapon as part of the random treasure distribution.
CreateGenericMediumArmorSpawns in a piece of generic armor as part of the random treasure distribution.
CreateGenericMiscItemSpawns in a generic item as part of the random treasure distribution.
CreateGenericMonkWeaponCreates an appropriate monk weapon that fits the level of the PC, and places it in/on an object.
CreateGenericRodStaffWandSpawns in a generic Rod, Staff or Wand as part of the random treasure distribution.
CreateGenericSimpleSpawns in a Generic Simple Weapon as part of the random treasure distribution.
CreateGenericWizardWeaponCreates an appropriate wizard weapon that fits the level of the PC, and places it in/on an object.
CreateGoldSpawns in Gold as part of the random treasure distribution.
CreateGreatAxeSpawns in a Great Axe as part of the random treasure distribution.
CreateGreatSwordSpawns in a Great Sword as part of the random treasure distribution.
CreateHalberdSpawns in a Halberd as part of the random treasure distribution.
CreateHandAxeSpawns in a Hand Axe as part of the random treasure distribution.
CreateHealingKitSpawns in a Healing Kit as part of the random treasure distribution.
CreateHeavyCrossbowSpawns in a Heavy Crossbow as part of the random treasure distribution.
CreateHeavyFlailSpawns in a Heavy Flail as part of the random treasure distribution.
CreateItemOnObjectCreate a specific item in an objects inventory
CreateJewelCreates a Jewel in the container as part of the NWN treasure distribution system
CreateJunkCreates random items for the container treasure.
CreateKamaSpawns in a Kama as part of the random treasure distribution.
CreateKatanaSpawns in a Katana as part of the random treasure distribution.
CreateKitSpawns in a Kit as part of the random treasure distribution.
CreateKukriSpawns in a Kukri as part of the random treasure distribution.
CreateLightCrossbowSpawns in a Light Crossbow as part of the random treasure distribution.
CreateLightFlailSpawns in a Light Flail as part of the random treasure distribution.
CreateLightHammerSpawns in a Light Hammer as part of the random treasure distribution.
CreateLightMaceSpawns in a Light Mace as part of the random treasure distribution.
CreateLockPickSpawns in a Lock Pick as part of the random treasure distribution.
CreateLongbowSpawns in a Longbow as part of the random treasure distribution.
CreateLongSwordSpawns in a Long Sword as part of the random treasure distribution.
CreateMorningstarSpawns in a Morningstar as part of the random treasure distribution.
CreateObjectCreate an object of a specified type at a given location
CreateObjectVoidSimiliar to CreateObject() but does not return the object created.
CreatePotionCreates a random potion in a container as part of the treasure system.
CreateRapierSpawns in a Rapier as part of the random treasure distribution.
CreateScimitarSpawns in a Scimitar as part of the random treasure distribution.
CreateScytheSpawns in a Scythe as part of the random treasure distribution.
CreateShortbowSpawns in a Shortbow as part of the random treasure distribution.
CreateShortswordSpawns in a Shortsword as part of the random treasure distribution.
CreateShurikenSpawns in a Shuriken as part of the random treasure distribution.
CreateSickleSpawns in a Sickle as part of the random treasure distribution.
CreateSlingSpawns in a Sling as part of the random treasure distribution.
CreateSpearSpawns in a Spear as part of the random treasure distribution.
CreateSpecificDruidWeaponSpawns in a Specific Druid Weapon as part of the random treasure distribution.
CreateSpecificExoticSpawns in a Specific Exotic Item as part of the random treasure distribution.
CreateSpecificHeavyArmorSpawns in a Specific Heavy Armor as part of the random treasure distribution.
CreateSpecificLightArmorSpawns in a Specific Light Armor as part of the random treasure distribution.
CreateSpecificMartialSpawns in a Specific Martial Item as part of the random treasure distribution.
CreateSpecificMediumArmorSpawns in a Specific Medium Armor as part of the random treasure distribution.
CreateSpecificMiscItemSpawns in a Specific Item as part of the random treasure distribution.
CreateSpecificMonkWeaponSpawns in a Specific Monk Weapon as part of the random treasure distribution.
CreateSpecificRodStaffWandSpawns in a Rod, Staff, or Wand as part of the random treasure distribution.
CreateSpecificSimpleSpawns in a Simple Weapon as part of the random treasure distribution.
CreateSpecificWizardWeaponSpawns in a Specific Wizard Weapon as part of the random treasure distribution.
CreateStaffSpawns in a Staff as part of the random treasure distribution.
CreateTable2ItemRandomly creates an item on an object.
CreateThrowingAxeSpawns in a Throwing Axe as part of the random treasure distribution.
CreateTrapKitSpawns in a Trap Kit as part of the random treasure distribution.
CreateTwoBladedSwordSpawns in a Two Bladed Sword as part of the random treasure distribution.
CreateWarhammerSpawns in a Warhammer as part of the random treasure distribution.
dbCreateItemOnObjectThis function creates the item for the NWN Treasure Distribution System.
GenerateBookTreasureThis Function is part of the random treasure distribution.
GenerateBossTreasureGenerates boss-level treasure.
GenerateHighTreasureThis function creates High Level Treasure
GenerateLowTreasureThis script creates Low value treasure in the container
GenerateMediumTreasureSpawns in treasure as part of the random treasure distribution.
GenerateNPCTreasure Use the random treasure functions to generate appropriate treasure for the creature to drop.
GenerateTreasureThis is the Main function in the NWN Treasure Distribution System
GetBackpackMatchDetermines if the PC carries the proper items to create a new item.
GetIsItemPropertyValidChecks if an itemproperty is valid.
GetIsValidCombinationDetermines if items within a container are valid for combining into a new item.
GetMaterialComponentTagGets the tag of the material component required for crafting.
Give2Q4PlotItemGives a Luskan plot item to the PC speaker.
GiveFetchItemToPCGives the fetch item to the PC.
GivePlayerPersonalItemGives the personal item of an assassination victim to the player.
HasAnyItemOfBaseTypeCycles through the players inventory looking for any item that has a certain Base Item Type. If the Base Item Type is Armor, make sure the AC matches.
IPCreateProficiencyFeatItemOnCreatureGives a creature all available proficiency feats.
IPDyeArmorChanges the color of an armor.
IPGetDamageBonusConstantFromNumberConverts a number into a damage bonus itemproperty constant.
IPGetDamagePowerConstantFromNumberConverts a number to a damage power constant
IPGetIPConstCastSpellFromSpellIDReturns a spell's corresponding itemproperty constant.
IPGetIPWorkContainerReturns the container used for item property and appearance modifications in the module
IPGetItemHasPropertyChecks if an item has a matching itemproperty.
IPGetItemPropertyByIDReturns an itemproperty.
IPGetItemSequencerPropertyChecks the sequencer property of an item.
IPGetModifiedArmorCopies and modifies an armor and returns it as an object.
IPGetNextArmorAppearanceTypeReturns the next valid appearance type for an armor.
IPGetNumberOfAppearancesReturns the number of armor part variations for the specified part.
IPGetRandomArmorAppearanceTypeReturns a random valid armor appearance type of the appropriate part.
IPGetWeaponEnhancementBonusReturns a weapon's enhancement bonus.
IPRemoveAllItemPropertiesRemoves all itemproperties from an item.
IPRemoveMatchingItemPropertiesRemoves itemproperties of a given type, duration, and subtype from an item.
IPSafeAddItemPropertySafely add an itemproperty to an item.
IPSetWeaponEnhancementBonusSets an enhancement bonus on a weapon.
IPUpgradeWeaponEnhancementBonusUpgrades a weapon's enhancement bonus.
IPWildShapeCopyItemPropertiesCopies itemproperties from one item to another.
IsValidBaseItemChecks to see if the baseitem type matches the one in the array AND if the item is "magical"
ItemPropertyAbilityBonusSets an ability bonus itemproperty.
ItemPropertyACBonusSets an armor class bonus itemproperty.
ItemPropertyACBonusVsAlignSets an "armor class bonus against an alignment group" itemproperty.
ItemPropertyACBonusVsDmgTypeSets an "armor class bonus against damage type" itemproperty.
ItemPropertyACBonusVsRaceSets an "armor class bonus against racial type" itemproperty.
ItemPropertyACBonusVsSAlignSets an "armor class bonus against specific alignment" itemproperty.
ItemPropertyAdditionalReturns a generic additional itemproperty.
ItemPropertyArcaneSpellFailureSets an itemproperty which modifies an arcane spell failure factor.
ItemPropertyAttackBonusSets an attack bonus itemproperty.
ItemPropertyAttackBonusVsAlignSets an "attack bonus versus alignment group" itemproperty.
ItemPropertyAttackBonusVsRaceSets an "attack bonus versus race" itemproperty.
ItemPropertyAttackBonusVsSAlignSets an "attack bonus versus specific alignment" itemproperty.
ItemPropertyAttackPenaltySets an attack penalty itemproperty.
ItemPropertyBonusFeatSets a bonus feat itemproperty.
ItemPropertyBonusLevelSpellSets a "bonus spell of a specified level" itemproperty.
ItemPropertyBonusSavingThrowSets a saving throw bonus itemproperty.
ItemPropertyBonusSavingThrowVsXSets a "saving throw bonus" itemproperty.
ItemPropertyBonusSpellResistanceSets a "spell resistance bonus" itemproperty.
ItemPropertyCastSpellSets a "cast spell" itemproperty.
ItemPropertyContainerReducedWeightSets a "reduced weight container" itemproperty.
ItemPropertyDamageBonusSets a damage bonus itemproperty.
ItemPropertyDamageBonusVsAlignSets a "damage bonus versus alignment group" itemproperty.
ItemPropertyDamageBonusVsRaceSets a "damage bonus versus racial type" itemproperty.
ItemPropertyDamageBonusVsSAlignSets a "damage bonus versus specific alignment" itemproperty.
ItemPropertyDamageImmunitySets a damage immunity itemproperty.
ItemPropertyDamagePenaltySets a damage penalty itemproperty.
ItemPropertyDamageReductionSets a damage reduction itemproperty.
ItemPropertyDamageResistanceSets a damage resistance itemproperty.
ItemPropertyDamageVulnerabilitySets a damage vulnerability itemproperty.
ItemPropertyDarkvisionSets a darkvision itemproperty.
ItemPropertyDecreaseAbilitySets a decrease ability itemproperty.
ItemPropertyDecreaseACSets a "decrease armor class" itemproperty.
ItemPropertyDecreaseSkillSets a decrease skill item property.
ItemPropertyEnhancementBonusSets an enhancement bonus item property.
ItemPropertyEnhancementBonusVsAlignSets an "enhancement bonus versus alignment group" itemproperty.
ItemPropertyEnhancementBonusVsRaceSets an "enhancement bonus versus racial type" itemproperty.
ItemPropertyEnhancementBonusVsSAlignSets an "enhancement bonus versus specific alignment" itemproperty.
ItemPropertyEnhancementPenaltySets an enhancement penalty ability bonus.
ItemPropertyExtraMeleeDamageTypeSets an "extra melee damagetype" itemproperty.
ItemPropertyExtraRangeDamageTypeSets an "extra ranged damagetype" itemproperty.
ItemPropertyFreeActionSets a free action (freedom of movement) itemproperty.
ItemPropertyHasteSets a haste itemproperty.
ItemPropertyHealersKitSets a healers' kit itemproperty.
ItemPropertyHolyAvengerSets a holy avenger itemproperty.
ItemPropertyImmunityMiscSets an immunity itemproperty.
ItemPropertyImmunityToSpellLevelSets an "immunity to spell level" itemproperty.
ItemPropertyImprovedEvasionSets an improved evasion itemproperty.
ItemPropertyKeenSets a keen itemproperty.
ItemPropertyLightSets a light itemproperty.
ItemPropertyLimitUseByAlignSets an "only useable by alignment group" itemproperty.
ItemPropertyLimitUseByClassSets an "only useable by class" itemproperty.
ItemPropertyLimitUseByRaceSets an "only useable by race" itemproperty.
ItemPropertyLimitUseBySAlignSets an "only useable by specific alignment" itemproperty.
ItemPropertyMassiveCriticalSets a massive criticals itemproperty.
ItemPropertyMaterialReturns the itemproperty material.
ItemPropertyMaxRangeStrengthModSets a mighty itemproperty.
ItemPropertyMonsterDamageSets a monster damage itemproperty.
ItemPropertyNoDamageSets a no damage itemproperty.
ItemPropertyOnHitCastSpellSets an "on hit cast spell" item property.
ItemPropertyOnHitPropsSets an OnHit itemproperty.
ItemPropertyOnMonsterHitPropertiesSets an "on monster hit" itemproperty.
ItemPropertyReducedSavingThrowSets a "reduced saving throw" item property.
ItemPropertyQualityReturns the itemproperty quality.
ItemPropertyReducedSavingThrowVsXSets a "reduced saving throw" itemproperty.
ItemPropertyRegenerationSets a regeneration itemproperty.
ItemPropertySkillBonusSets a skill bonus itemproperty.
ItemPropertySpecialWalkSets a special walk itemproperty.
ItemPropertySpellImmunitySchoolSets an "immunity against spell school" itemproperty.
ItemPropertySpellImmunitySpecificSets an "immunity to specific spell" itemproperty.
ItemPropertyThievesToolsSets a thieves' tools itemproperty.
ItemPropertyTrapSets a trap itemproperty.
ItemPropertyTrueSeeingSets a true seeing itemproperty.
ItemPropertyTurnResistanceSets a turn resistance itemproperty.
ItemPropertyUnlimitedAmmoSets an unlimited ammo itemproperty.
ItemPropertyVampiricRegenerationSets a vampiric regeneration itemproperty.
ItemPropertyVisualEffectAllows a melee weapon have a certain glow.
ItemPropertyWeightIncreaseSets an increased weight itemproperty.
ItemPropertyWeightReductionSets a weight reduction itemproperty.
nDetermineClassToUseDetermines which of a PCs three classes to use in the random treasure system.
nNumberOfCombosReturns number of possible combinations
PrefersDetermines whether the adventurer prefers using a weapon type.
RemoveItemPropertyRemoves an itemproperty from an item.

See Also

Function Categories



author:NWN Lexicon Group, editor: Mistress, contributors: motu99, Kolyana, Kookoo