Treasure system

From Dragon Age Toolset Wiki
Jump to: navigation, search

The Treasure System only works on creatures and placeable containers (not bags). Creatures will fire the Treasure System when they die, and placeables will fire it when they spawn.

There are 2 specific pieces of information that the Treasure System uses to determine what treasure an object drops. The first piece of information is the combat Rank of the object. Placeables are never involved in combat, but will have to have something entered in the field for the system to work. A Lieutenant-ranked chest will drop treasure equivalent to a Lieutenant-ranked creature. Rank determines the quantity and quality of the treasure dropped. The second piece of information is the Treasure Category of the object. This determines what set of treasure tables the system will look at for this object.

If either the Rank or Treasure Category is set to Invalid (value 0), the Treasure System will not drop anything. Items placed manually on the object will appear normally.

If there doesn't seem to be a treasure table that applies to a specific object, contact the designer in charge of the system to get a new table added.


There are a number of override variables on objects that will change the way the Treasure System functions. For each of these variables, a value less than 0 turns off that part of the system, a value of 0 ignores the override, and a value greater than 0 uses that value instead of the one on the creature. Each variable has a short explanation of what overriding does.

Variable name Type Default Description
TS_OVERRIDE_CATEGORY int 0 A value here directly relates to ID values in the TS_Category 2DA.
TS_OVERRIDE_EQUIPMENT float 0 A value here determines the chance of any particular piece of equipped items dropping. Set this to a negative number to prevent the treasure system from using the default value from the auto scaling table.
TS_OVERRIDE_HIGH float 0 high chance
TS_OVERRIDE_ITEM float 0 item chance
TS_OVERRIDE_MONEY int 0 A value here overrides the TS_MoneyValue value in the autoscale 2DA.
TS_OVERRIDE_RANK int 0 A value here directly relates to ID values in the autoscale 2DA.
TS_OVERRIDE_REACTIVE float 0 Reactive chance, only present in the creature variable table[Undocumented]
TS_OVERRIDE_SCALING int 0 A value here has no additional effect. This is currently only useful to turn off scaling.
TS_OVERRIDE_STEALING int 0 A value here directly relates to ID values in the TS_Stealing 2DA.
TS_TREASURE_GENERATED int 0 A value of -1 here ensures that there is never any treasure, period.


Stealing from a creature functions the same as a normal treasure drop, except the loot is only ever a single Minor Item. No Money or Major Items will be dropped.

The TS_OVERRIDE_STEALING variable allows special functionality to be added when a creature is stolen from. A value placed in the override is actually an ID lookup in the TS_Stealing 2DA. When that creature is stolen from (and a creature can normally only be successfully stolen from once), it gets the item resource referenced by that ID and adds it to the treasure gained from stealing.

Stealing from creatures is mostly handled by systems, so there are only a couple places a designer can interact with it. First it will be useful to describe exactly what happens when the Stealing skill is used.

When a character tries to use Stealing on another creature, it checks a variety of factors on the character and the target to determine success. If the target has already been stolen from, the character neither succeeds nor fails. If the character fails, the EVENT_TYPE_STEALING_FAILURE event is fired on the current area. If the character succeeds, the EVENT_TYPE_STEALING_SUCCESS event is fired on the current area and the FLAG_STOLEN_FROM variable on the target is set to TRUE. Additionally, a successful use of the Stealing skill causes the Treasure System to generate a single Minor Item on the character using the skill. This requires the target to be properly set up for the Treasure System.

The EVENT_TYPE_STEALING_FAILURE and EVENT_TYPE_STEALING_SUCCESS events are intended for use in the Infamy system and will be used in the Stealing Reactivity pass.

The FLAG_STOLEN_FROM variable can be set on a creature manually to allow them to be immune to stealing attempts. This can be used to shield plot characters from the skill, though Stealing won't actually remove any items from their inventory. Additionally, you can set the flag to FALSE through scripting to allow the player to steal from a target more than once. Creatures with this flag set will not fire EVENT_TYPE_STEALING_FAILURE or EVENT_TYPE_STEALING_SUCCESS events, so they won't interact with the Infamy system.

Specific Items

The Treasure System has functionality added to allow you to get specific items when stealing from a character. The TS_OVERRIDE_STEALING variable on creatures allows you to set associate a creature with a specific ID value in the TS_Stealing 2DA. Each ID value references a specific item resource name. When a character with this variable set is stolen from, that specific item resource will be added to the treasure the player receives.

The target does not have to have a valid Rank or Treasure Category for this item to drop. This is so you can drop only the specific item and nothing else.

TS_System.xls and related 2das

See TS_System.xls

Language: English  • русский