Difference between revisions of "Treasure system"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(categories)
(a little updating and formatting)
Line 11: Line 11:
 
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.
 
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.
  
*TS_OVERRIDE_CATEGORY - A value here directly relates to ID values in the TS_Category 2DA.
+
{{variable table start}}
*TS_OVERRIDE_RANK - A value here directly relates to ID values in the autoscale 2DA.
+
{{variable table row|TS_OVERRIDE_CATEGORY |int|0| A value here directly relates to ID values in the TS_Category 2DA.}}
*TS_OVERRIDE_MONEY - A value here overrides the TS_MoneyValue value in the autoscale 2DA.
+
{{variable table row|TS_OVERRIDE_EQUIPMENT |float|0| A value here determines exactly how many pieces of Equipment will drop.}}
*TS_OVERRIDE_MINOR_ITEM - A value here overrides the TS_MinorItemNum value in the autoscale 2DA.
+
{{variable table row|TS_OVERRIDE_HIGH|float|0|{{undocumented}} }}
*TS_OVERRIDE_MAJOR_ITEM - A value here determines exactly how many Major Items will drop.
+
{{variable table row|TS_OVERRIDE_ITEM|float|0|{{undocumented}} }}
*TS_OVERRIDE_EQUIPMENT - A value here determines exactly how many pieces of Equipment will drop.
+
{{variable table row|TS_OVERRIDE_MONEY |int|0| A value here overrides the TS_MoneyValue value in the autoscale 2DA.}}
*TS_OVERRIDE_SCALING - A value here has no additional effect. This is currently only useful to turn off scaling.
+
{{variable table row|TS_OVERRIDE_RANK |int|0| A value here directly relates to ID values in the autoscale 2DA.}}
*TS_OVERRIDE_STEALING - A value here directly relates to ID values in the TS_Stealing 2DA.
+
{{variable table row|TS_OVERRIDE_REACTIVE|float|0|Only present in the creature variable table{{undocumented}} }}
 +
{{variable table row|TS_OVERRIDE_SCALING |int|0| A value here has no additional effect. This is currently only useful to turn off scaling.}}
 +
{{variable table row|TS_OVERRIDE_STEALING |int|0| A value here directly relates to ID values in the TS_Stealing 2DA.}}
 +
{{variable table end}}
  
 
== Stealing ==
 
== Stealing ==
Line 28: Line 31:
 
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.
 
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.
+
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 [[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.
+
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 ===
 
=== Specific Items ===
Line 42: Line 45:
 
== TS_System.xls and related 2das ==
 
== TS_System.xls and related 2das ==
  
TS_System contains three worksheets:
+
See [[TS_System.xls]]
 
+
*TS_Category
+
**ID
+
**Label -
+
**Prefix - this string determines which of the treasure tables this treasure type refers to. Treasure tables are defined in 2DAs with the prefix string at the front of their names.
+
*TS_Material
+
**ID
+
**Label -
+
**Material1 to Material15 -
+
*TS_Stealing
+
**ID
+
**Label -
+
**Resource -
+
 
+
Each entry in TS_Category has an associated xls file with worksheets for each rank of monster or placeable in that category. For example, for the prefix TS_Darkspawn there are worksheets named:
+
*TS_DarkspawnCreCritter
+
*TS_DarkspawnCreNormal
+
*TS_DarkspawnCreLieutenant
+
*TS_DarkspawnCreBoss
+
*TS_DarkspawnCreEliteBoss
+
*TS_DarkspawnPlcCritter
+
*TS_DarkspawnPlcNormal
+
*TS_DarkspawnPlcLieutenant
+
*TS_DarkspawnPlcBoss
+
*TS_DarkspawnPlcEliteBoss
+
 
+
Each worksheet has the folowing columns:
+
*ID
+
*Label - a human-readable comment field describing what this entry is
+
*Resource - the item resource for this treasure
+
*Stacksize - how many of the item you'll find.
+
  
 
[[Category:Creatures]]
 
[[Category:Creatures]]
 
[[Category:Placeables]]
 
[[Category:Placeables]]

Revision as of 00:37, 25 July 2009

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.

Overrides

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 exactly how many pieces of Equipment will drop.
TS_OVERRIDE_HIGH float 0 [Undocumented]
TS_OVERRIDE_ITEM float 0 [Undocumented]
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 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.

Stealing

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