Difference between revisions of "Property Element"

373 bytes added ,  13:16, 21 December 2023
no edit summary
imported>JRoush
Tag: Manual revert
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Overview ==
Property Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema, always found as children of [[Object Element]]s.  They define the properties of their parent element - position on the screen, color, texture, etc.  In this sense they are similar to traditional xml [http://www.w3schools.com/xml/xml_attributes.asp attributes].
Property Elements are a subgroup of the elements in the [[:Category: Oblivion XML|Oblivion XML]] schema, always found as children of [[Object Element]]s.  They define the properties of their parent element - position on the screen, color, texture, etc.  In this sense they are similar to traditional xml [http://www.w3schools.com/xml/xml_attributes.asp attributes].


Line 5: Line 7:
There are two basic data types for properties - numeric and string.  A number of Oblivion-specific XML entities are defined for commonly used constants of both types.  Particularly useful are the numeric entities "&true;" (numeric value 2) and "&false;" (1), used to with boolean properties like Visible or Targetable.
There are two basic data types for properties - numeric and string.  A number of Oblivion-specific XML entities are defined for commonly used constants of both types.  Particularly useful are the numeric entities "&true;" (numeric value 2) and "&false;" (1), used to with boolean properties like Visible or Targetable.


Property elements may contain literal values.  However, the real power of Oblivion's XML is that properties can instead have "formulas" expressed using [[Operator Element]]s.  The game evaluates a formula every frame to obtain the ''value'' of the property for that frame - see the operator element page for details.
Property elements may contain literal values.  However, the real power of Oblivion's XML is that properties can instead have "formulas" expressed using [[Operator Element]]s.  


If an object element contains more than one property of the same type, the last one defined will take precedence.  If it contains no property elements for an applicable property, the default value is used (usually zero or the empty string).
If an object element contains more than one property of the same type, the last one defined will take precedence.  If it contains no property elements for an applicable property, the default value is used (usually zero or the empty string).
A property (and its operators) is only updated when one of the source properties changes. Either by the engine itself or through scripting. When the property has been updated and the value is different from last time it will continue to update any properties that use it (can be called "derived properties"). This may then repeat itself for each subsequent derived property. A Golden Rule is that nothing gets updated as long as nothing is changed, in that sense there are no 'frames' for the UI.


== General ==
== General ==
Anonymous user