Difference between revisions of "GetCreatureProperty"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (1 revision: re-import with default parameter value parameters set)
(looks okay, removing tag, formatting, adding a link)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Generated}}
 
 
{{dafunction
 
{{dafunction
 
|name=GetCreatureProperty
 
|name=GetCreatureProperty
Line 24: Line 23:
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
Get oCreature's Property value.
 
Get oCreature's Property value.
 +
 
Property types have slightly different definitions of each of the 4 value types.
 
Property types have slightly different definitions of each of the 4 value types.
A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and  
+
 
doesnt have CURRENT or MODIFIER.
+
*A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and doesn't have CURRENT or MODIFIER.
An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value  
+
*An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value is the clamped (between its min and max) sum of the BASE plues the MODIFIER.
is the clamped (between its min and max) sum of the BASE plues the MODIFIER.
+
*A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has a CURRENT value, which must be between the property min and the TOTAL value.
A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has
+
 
a CURRENT value, which must be between the property min and the TOTAL value.
+
Properties are defined in [[Properties.xls]].
Properties are defined in Properties.xls.
+
  
 
<!-- == Remarks == -->
 
<!-- == Remarks == -->
Line 39: Line 38:
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->
  
<!-- == See also == -->
+
== See also ==
 
<!-- This section contains links to articles, functions or constant groups. -->
 
<!-- This section contains links to articles, functions or constant groups. -->
 +
 +
[[PROPERTY_VALUE*]]
  
 
[[Category: Stats functions]]
 
[[Category: Stats functions]]

Revision as of 19:02, 2 March 2010

Get the specified attribute from oCreature

float GetCreatureProperty(
object oCreature,
int nProperty,
int nValueType = PROPERTY_VALUE_TOTAL
);
Parameters:
oCreature
the creature whose stat is being requested
nProperty
the property (stat) we want to know about
nValueType
the type of value of the property we want to know about (TOTAL, BASE, CURRENT, MODIFIER)
Returns:

Returns oCreature's Attribute Value

Source:

script.ldf

Description

Get oCreature's Property value.

Property types have slightly different definitions of each of the 4 value types.

  • A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and doesn't have CURRENT or MODIFIER.
  • An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value is the clamped (between its min and max) sum of the BASE plues the MODIFIER.
  • A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has a CURRENT value, which must be between the property min and the TOTAL value.

Properties are defined in Properties.xls.


See also

PROPERTY_VALUE*