Nw o2 coninclude

From NWN Lexicon
Jump to: navigation, search



nw_o2_coninclude

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

Constants

Name Value Brief Description
HIGH_MOD_GOLD 3.0 Amount of gold by value.
HIGH_PROB_AMMO 3 Frequency of item type appearing by treasure type.
HIGH_PROB_ANIMAL 0 Frequency of item type appearing by treasure type.
HIGH_PROB_ARCANE 3 Frequency of item type appearing by treasure type.
HIGH_PROB_BOOK 1 Frequency of item type appearing by treasure type.
HIGH_PROB_DIVINE 3 Frequency of item type appearing by treasure type.
HIGH_PROB_GEM 15 Frequency of item type appearing by treasure type.
HIGH_PROB_GOLD 15 Frequency of item type appearing by treasure type.
HIGH_PROB_JEWEL 15 Frequency of item type appearing by treasure type.
HIGH_PROB_JUNK 1 Frequency of item type appearing by treasure type.
HIGH_PROB_KIT 5 Frequency of item type appearing by treasure type.
HIGH_PROB_POTION 9 Frequency of item type appearing by treasure type.
HIGH_PROB_TABLE2 30 Frequency of item type appearing by treasure type.
JUMP_LEVEL 2 Used 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_GOLD 0.5 Amount of gold by value.
LOW_PROB_AMMO 10 Frequency of item type appearing by treasure type.
LOW_PROB_ANIMAL 0 Frequency of item type appearing by treasure type.
LOW_PROB_ARCANE 3 Frequency of item type appearing by treasure type.
LOW_PROB_BOOK 1 Frequency of item type appearing by treasure type.
LOW_PROB_DIVINE 3 Frequency of item type appearing by treasure type.
LOW_PROB_GEM 9 Frequency of item type appearing by treasure type.
LOW_PROB_GOLD 43 Frequency of item type appearing by treasure type.
LOW_PROB_JEWEL 4 Frequency of item type appearing by treasure type.
LOW_PROB_JUNK 2 Frequency of item type appearing by treasure type.
LOW_PROB_KIT 5 Frequency of item type appearing by treasure type.
LOW_PROB_POTION 17 Frequency of item type appearing by treasure type.
LOW_PROB_TABLE2 3 Frequency of item type appearing by treasure type.
MEDIUM_MOD_GOLD 1.0 Amount of gold by value.
MEDIUM_PROB_AMMO 5 Frequency of item type appearing by treasure type.
MEDIUM_PROB_ANIMAL 0 Frequency of item type appearing by treasure type.
MEDIUM_PROB_ARCANE 3 Frequency of item type appearing by treasure type.
MEDIUM_PROB_BOOK 1 Frequency of item type appearing by treasure type.
MEDIUM_PROB_DIVINE 3 Frequency of item type appearing by treasure type.
MEDIUM_PROB_GEM 15 Frequency of item type appearing by treasure type.
MEDIUM_PROB_GOLD 38 Frequency of item type appearing by treasure type.
MEDIUM_PROB_JEWEL 6 Frequency of item type appearing by treasure type.
MEDIUM_PROB_JUNK 1 Frequency of item type appearing by treasure type.
MEDIUM_PROB_KIT 5 Frequency of item type appearing by treasure type.
MEDIUM_PROB_POTION 20 Frequency of item type appearing by treasure type.
MEDIUM_PROB_TABLE2 3 Frequency of item type appearing by treasure type.
NUMBER_BOOK_ONE 75 Number of items appearing.
NUMBER_BOOK_THREE 5 Number of items appearing.
NUMBER_BOOK_TWO 20 Number of items appearing.
NUMBER_BOSS_ONE 100 Number of items appearing.
NUMBER_BOSS_THREE 0 Number of items appearing.
NUMBER_BOSS_TWO 0 Number of items appearing.
NUMBER_HIGH_ONE 40 Number of items appearing.
NUMBER_HIGH_THREE 20 Number of items appearing.
NUMBER_HIGH_TWO 40 Number of items appearing.
NUMBER_LOW_ONE 100 Number of items appearing.
NUMBER_LOW_THREE 0 Number of items appearing.
NUMBER_LOW_TWO 0 Number of items appearing.
NUMBER_MED_ONE 60 Number of items appearing.
NUMBER_MED_THREE 10 Number of items appearing.
NUMBER_MED_TWO 30 Number of items appearing.
RANGE_1_MAX 5
RANGE_1_MIN 0
RANGE_2_MAX 8
RANGE_2_MIN 6
RANGE_3_MAX 10
RANGE_3_MIN 9
RANGE_4_MAX 13
RANGE_4_MIN 11
RANGE_5_MAX 16
RANGE_5_MIN 14
RANGE_6_MAX 100
RANGE_6_MIN 17
TREASURE_BOOK 5 Readability constant.
TREASURE_BOSS 4 Readability constant.
TREASURE_HIGH 3 Readability constant.
TREASURE_LOW 1 Readability constant.
TREASURE_MEDIUM 2 Readability constant.


Functions

Name Brief Description

CreateAmmo

Spawns in a ammunition suited for that class as part of the random treasure distribution.

CreateAnimalPart

Creates an animal part on the corpse of the animal

CreateArcaneScroll

Creates a scroll as part of the treasure

CreateBook

Creates a random book as part of the treasure distribution system

CreateDivineScroll

Creates a divine scroll as part of the treasure

CreateGem

Creates a Gem as part of the NWN treasure distribution system

CreateGenericClassItem

Creates a treasure item for wizards, sorcerers, clerics, monks, rogues and bards

CreateGenericDruidWeapon

Creates an appropriate druid weapon that fits the level of the PC, and places it in/on an object.

CreateGenericExotic

Creates an appropriate exotic weapon that fits the level of the PC, and places it in/on an object.

CreateGenericHeavyArmor

Spawns in a Piece of Generic Heavy Armor as part of the random treasure distribution.

CreateGenericLightArmor

Spawns in a piece of generic light armor as part of the random treasure distribution.

CreateGenericMartial

Spawns in a generic weapon as part of the random treasure distribution.

CreateGenericMediumArmor

Spawns in a piece of generic armor as part of the random treasure distribution.

CreateGenericMiscItem

Spawns in a generic item as part of the random treasure distribution.

CreateGenericMonkWeapon

Creates an appropriate monk weapon that fits the level of the PC, and places it in/on an object.

CreateGenericRodStaffWand

Spawns in a generic Rod, Staff or Wand as part of the random treasure distribution.

CreateGenericSimple

Spawns in a Generic Simple Weapon as part of the random treasure distribution.

CreateGenericWizardWeapon

Creates an appropriate wizard weapon that fits the level of the PC, and places it in/on an object.

CreateGold

Spawns in Gold as part of the random treasure distribution.

CreateHealingKit

Spawns in a Healing Kit as part of the random treasure distribution.

CreateJewel

Creates a Jewel in the container as part of the NWN treasure distribution system

CreateJunk

Creates random items for the container treasure.

CreateKit

Spawns in a Kit as part of the random treasure distribution.

CreateLockPick

Spawns in a Lock Pick as part of the random treasure distribution.

CreatePotion

Creates a random potion in a container as part of the treasure system.

CreateSpecificDruidWeapon

Spawns in a Specific Druid Weapon as part of the random treasure distribution.

CreateSpecificExotic

Spawns in a Specific Exotic Item as part of the random treasure distribution.

CreateSpecificHeavyArmor

Spawns in a Specific Heavy Armor as part of the random treasure distribution.

CreateSpecificLightArmor

Spawns in a Specific Light Armor as part of the random treasure distribution.

CreateSpecificMartial

Spawns in a Specific Martial Item as part of the random treasure distribution.

CreateSpecificMediumArmor

Spawns in a Specific Medium Armor as part of the random treasure distribution.

CreateSpecificMiscItem

Spawns in a Specific Item as part of the random treasure distribution.

CreateSpecificMonkWeapon

Spawns in a Specific Monk Weapon as part of the random treasure distribution.

CreateSpecificRodStaffWand

Spawns in a Rod, Staff, or Wand as part of the random treasure distribution.

CreateSpecificSimple

Spawns in a Simple Weapon as part of the random treasure distribution.

CreateSpecificWizardWeapon

Spawns in a Specific Wizard Weapon as part of the random treasure distribution.

CreateTable2Item

Randomly creates an item on an object.

CreateTrapKit

Spawns in a Trap Kit as part of the random treasure distribution.

dbCreateItemOnObject

This function creates the item for the NWN Treasure Distribution System.
dbSpeak Internal function. This function is commented out. It contains a single SpeakString call.

GenerateBookTreasure

This Function is part of the random treasure distribution.

GenerateBossTreasure

Generates boss-level treasure.

GenerateHighTreasure

This function creates High Level Treasure

GenerateLowTreasure

This script creates Low value treasure in the container

GenerateMediumTreasure

Spawns in treasure as part of the random treasure distribution.

GenerateNPCTreasure

Use the random treasure functions to generate appropriate treasure for the creature to drop.

GenerateTreasure

This is the Main function in the NWN Treasure Distribution System

GetLastOpener

Gets the creature that last opened or destroyed the container calling this script.

GetNumberOfItems

Determines the number of items to create as treasure.

GetRange

Determines whether the HD falls in a range category.

nDetermineClassToUse

Determines which of a PCs three classes to use in the random treasure system.

ShoutDisturbed

Turns NPCs of the container's faction hostile towards the PC that destroyed or opened the container.

TrimLevel

Returns the valid upper limit for any arcane spell scroll.


See Also

includes: 

x2_inc_treasure


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