x2_inc_treasure

XP2 Disposeable Treasure System.

NOTE: This file includes x2_inc_itemprop.

Constants

NameValueBrief Description
X2_DTS_2DA_AMMOdes_treas_ammo2da for ammo class treasure
X2_DTS_2DA_CONFdes_conf_treas2da with configuration
X2_DTS_2DA_DISPdes_treas_disp2da for disposeable class treasure
X2_DTS_2DA_ENHANCEMENTSdes_treas_enh
X2_DTS_2DA_GOLDdes_treas_gold2da for gold n gems
X2_DTS_2DA_ITEMdes_treas_items2da for specific items
X2_DTS_BASECHANCE_TREAS50Basic chance for treasure
X2_DTS_CLASS_HIGH2Treasure Class High
X2_DTS_CLASS_LOW0Treasure Class Low
X2_DTS_CLASS_MEDIUM1Treasure Clas Medium
X2_DTS_MAXITEMS2
X2_DTS_STACKVAR50Stack variation is 50-100 percent of the number listed in the 2da
X2_DTS_TYPE_AMMO2
X2_DTS_TYPE_DISP1
X2_DTS_TYPE_GOLD4Actually gold and gems
X2_DTS_TYPE_ITEM8Character specific item

Functions

NameBrief Description
DTSCreateItemOnObjectInternal function. Wrapper for CreateItemOnObject which can handle stack numbers.
DTSDebugInternal function. Writes information to the log file.
DTSDetermineFeatToUseInternal function. Returns the FEAT_* of the feat to use for treasure generation.
DTSGenerateCharSpecificTreasureGenerates one random, character specific item on container. The treasure is optimized to suit a character's needs.
DTSGenerateTreasureItemsInternal function.
DTSGenerateTreasureOnContainerGenerate random, disposeable treasure on the container.
DTSGet2DAColNameByClassInternal function. Maps the X2_DTS_CLASS_* value given to row name in the 2da.
DTSGet2DANameByTypeInternal function. Maps the X2_DTS_TYPE_* value given to a 2da name.
DTSGet2DAStringOrDefaultInternal function. Get a 2da String or the supplied default if string is empty.
DTSGetBaseChanceInternal function.
DTSGetFeatSpecificItemResRefInternal function.
DTSGetHighestClassInternal function. Returns the highest class of a specified creature.
DTSGetMaxItemsInternal function. Returns the maximum number of items to generate according to the configuration.
DTSGetNoOfRowsInTreasureTableInternal function. Returns the number of entries available for random treasure of a given type and class.
DTSGetNumberofPartyMembersInternal function. Returns how many PCs are in the target object's group. Counts PCs ONLY.
DTSGetRandomItemResRefInternal function. Returns a single random item resref from the approriate 2da.
DTSGetStackVariationInternal function. Returns the stack variation to use when generation stacked items.
DTSGrantCharSpecificWeaponEnhancementEnchantes the specified weapon with a scaled enhancement bonus.
DTSInitializeInitializes the treasure system by loading x2_conf_tras.2da.
DTSSetAreaTreasureProbabilitySets the area wide chance for treasure generation.

See Also

constants:  FEAT_*
includes:  nw_o2_coninclude | x0_i0_treasure

  author: Mistress