X2 inc treasure

From NWN Lexicon
Jump to navigationJump to search



x2_inc_treasure

XP2 Disposeable Treasure System.

NOTE: This file includes x2_inc_itemprop .

Constants

Name Value Brief Description
X2_DTS_2DA_AMMO des_treas_ammo 2da for ammo class treasure
X2_DTS_2DA_CONF des_conf_treas 2da with configuration
X2_DTS_2DA_DISP des_treas_disp 2da for disposeable class treasure
X2_DTS_2DA_ENHANCEMENTS des_treas_enh
X2_DTS_2DA_GOLD des_treas_gold 2da for gold n gems
X2_DTS_2DA_ITEM des_treas_items 2da for specific items
X2_DTS_BASECHANCE_TREAS 50 Basic chance for treasure
X2_DTS_CLASS_HIGH 2 Treasure Class High
X2_DTS_CLASS_LOW 0 Treasure Class Low
X2_DTS_CLASS_MEDIUM 1 Treasure Clas Medium
X2_DTS_MAXITEMS 2
X2_DTS_STACKVAR 50 Stack variation is 50-100 percent of the number listed in the 2da
X2_DTS_TYPE_AMMO 2
X2_DTS_TYPE_DISP 1
X2_DTS_TYPE_GOLD 4 Actually gold and gems
X2_DTS_TYPE_ITEM 8 Character specific item


Functions

Name Brief Description
DTSCreateItemOnObject Internal function. Wrapper for CreateItemOnObject which can handle stack numbers.
DTSDebug Internal function. Writes information to the log file.
DTSDetermineFeatToUse Internal function. Returns the FEAT_* of the feat to use for treasure generation.
DTSGenerateCharSpecificTreasure Generates one random, character specific item on container. The treasure is optimized to suit a character's needs.
DTSGenerateTreasureItems Internal function.
DTSGenerateTreasureOnContainer Generate random, disposeable treasure on the container.
DTSGet2DAColNameByClass Internal function. Maps the X2_DTS_CLASS_* value given to row name in the 2da.
DTSGet2DANameByType Internal function. Maps the X2_DTS_TYPE_* value given to a 2da name.
DTSGet2DAStringOrDefault Internal function. Get a 2da String or the supplied default if string is empty.
DTSGetBaseChance Internal function.
DTSGetFeatSpecificItemResRef Internal function.
DTSGetHighestClass Internal function. Returns the highest class of a specified creature.
DTSGetMaxItems Internal function. Returns the maximum number of items to generate according to the configuration.
DTSGetNoOfRowsInTreasureTable Internal function. Returns the number of entries available for random treasure of a given type and class.
DTSGetNumberofPartyMembers Internal function. Returns how many PCs are in the target object's group. Counts PCs ONLY.
DTSGetRandomItemResRef Internal function. Returns a single random item resref from the approriate 2da.
DTSGetStackVariation Internal function. Returns the stack variation to use when generation stacked items.
DTSGrantCharSpecificWeaponEnhancement Enchantes the specified weapon with a scaled enhancement bonus.
DTSInitialize Initializes the treasure system by loading x2_conf_tras.2da.
DTSSetAreaTreasureProbability Sets the area wide chance for treasure generation.


See Also

constants: 

FEAT_*

includes: 

x0_i0_treasure


  author: Mistress