nw_o2_coninclude

Handles the random treasure distribution for treasure from creatures and containers.

Constants

NameValueBrief Description
HIGH_MOD_GOLD3.0Amount of gold by value.
HIGH_PROB_AMMO3Frequency of item type appearing by treasure type.
HIGH_PROB_ANIMAL0Frequency of item type appearing by treasure type.
HIGH_PROB_ARCANE3Frequency of item type appearing by treasure type.
HIGH_PROB_BOOK1Frequency of item type appearing by treasure type.
HIGH_PROB_DIVINE3Frequency of item type appearing by treasure type.
HIGH_PROB_GEM15Frequency of item type appearing by treasure type.
HIGH_PROB_GOLD15Frequency of item type appearing by treasure type.
HIGH_PROB_JEWEL15Frequency of item type appearing by treasure type.
HIGH_PROB_JUNK1Frequency of item type appearing by treasure type.
HIGH_PROB_KIT5Frequency of item type appearing by treasure type.
HIGH_PROB_POTION9Frequency of item type appearing by treasure type.
HIGH_PROB_TABLE230Frequency of item type appearing by treasure type.
JUMP_LEVEL2Used in a specific item function in the case where a generic item is called for within that function it will create a generic item by adding JUMP_LEVEL to the character's hit die for the purposes of the treasure evaluation.
LOW_MOD_GOLD0.5Amount of gold by value.
LOW_PROB_AMMO10Frequency of item type appearing by treasure type.
LOW_PROB_ANIMAL0Frequency of item type appearing by treasure type.
LOW_PROB_ARCANE3Frequency of item type appearing by treasure type.
LOW_PROB_BOOK1Frequency of item type appearing by treasure type.
LOW_PROB_DIVINE3Frequency of item type appearing by treasure type.
LOW_PROB_GEM9Frequency of item type appearing by treasure type.
LOW_PROB_GOLD43Frequency of item type appearing by treasure type.
LOW_PROB_JEWEL4Frequency of item type appearing by treasure type.
LOW_PROB_JUNK2Frequency of item type appearing by treasure type.
LOW_PROB_KIT5Frequency of item type appearing by treasure type.
LOW_PROB_POTION17Frequency of item type appearing by treasure type.
LOW_PROB_TABLE23Frequency of item type appearing by treasure type.
MEDIUM_MOD_GOLD1.0Amount of gold by value.
MEDIUM_PROB_AMMO5Frequency of item type appearing by treasure type.
MEDIUM_PROB_ANIMAL0Frequency of item type appearing by treasure type.
MEDIUM_PROB_ARCANE3Frequency of item type appearing by treasure type.
MEDIUM_PROB_BOOK1Frequency of item type appearing by treasure type.
MEDIUM_PROB_DIVINE3Frequency of item type appearing by treasure type.
MEDIUM_PROB_GEM15Frequency of item type appearing by treasure type.
MEDIUM_PROB_GOLD38Frequency of item type appearing by treasure type.
MEDIUM_PROB_JEWEL6Frequency of item type appearing by treasure type.
MEDIUM_PROB_JUNK1Frequency of item type appearing by treasure type.
MEDIUM_PROB_KIT5Frequency of item type appearing by treasure type.
MEDIUM_PROB_POTION20Frequency of item type appearing by treasure type.
MEDIUM_PROB_TABLE23Frequency of item type appearing by treasure type.
NUMBER_BOOK_ONE75Number of items appearing.
NUMBER_BOOK_THREE5Number of items appearing.
NUMBER_BOOK_TWO20Number of items appearing.
NUMBER_BOSS_ONE100Number of items appearing.
NUMBER_BOSS_THREE0Number of items appearing.
NUMBER_BOSS_TWO0Number of items appearing.
NUMBER_HIGH_ONE40Number of items appearing.
NUMBER_HIGH_THREE20Number of items appearing.
NUMBER_HIGH_TWO40Number of items appearing.
NUMBER_LOW_ONE100Number of items appearing.
NUMBER_LOW_THREE0Number of items appearing.
NUMBER_LOW_TWO0Number of items appearing.
NUMBER_MED_ONE60Number of items appearing.
NUMBER_MED_THREE10Number of items appearing.
NUMBER_MED_TWO30Number of items appearing.
RANGE_1_MAX5
RANGE_1_MIN0
RANGE_2_MAX8
RANGE_2_MIN6
RANGE_3_MAX10
RANGE_3_MIN9
RANGE_4_MAX13
RANGE_4_MIN11
RANGE_5_MAX16
RANGE_5_MIN14
RANGE_6_MAX100
RANGE_6_MIN17
TREASURE_BOOK5Readability constant.
TREASURE_BOSS4Readability constant.
TREASURE_HIGH3Readability constant.
TREASURE_LOW1Readability constant.
TREASURE_MEDIUM2Readability constant.

Functions

NameBrief Description
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
CreateBookCreates a random book as part of the treasure distribution system
CreateDivineScrollCreates a divine scroll as part of the treasure
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.
CreateHealingKitSpawns in a Healing Kit as part of the random treasure distribution.
CreateJewelCreates a Jewel in the container as part of the NWN treasure distribution system
CreateJunkCreates random items for the container treasure.
CreateKitSpawns in a Kit as part of the random treasure distribution.
CreateLockPickSpawns in a Lock Pick as part of the random treasure distribution.
CreatePotionCreates a random potion in a container as part of the treasure system.
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.
CreateTable2ItemRandomly creates an item on an object.
CreateTrapKitSpawns in a Trap Kit as part of the random treasure distribution.
dbCreateItemOnObjectThis function creates the item for the NWN Treasure Distribution System.
dbSpeakInternal function. This function is commented out. It contains a single SpeakString call.
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
GetLastOpenerGets the creature that last opened or destroyed the container calling this script.
GetNumberOfItemsDetermines the number of items to create as treasure.
GetRangeDetermines whether the HD falls in a range category.
nDetermineClassToUseDetermines which of a PCs three classes to use in the random treasure system.
ShoutDisturbedTurns NPCs of the container's faction hostile towards the PC that destroyed or opened the container.
TrimLevelReturns the valid upper limit for any arcane spell scroll.

See Also

includes:  x0_i0_treasure | x2_inc_treasure

 author: Charles Feduke, editor: Mistress, contributor: Kookoo