XP2 Disposeable Treasure System.
| 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. |