Source Element (Data)
Context: HL Kit … Kit Reference … Structural File Reference
The "source" Element
Authors can use the sources mechanism as the mean for defining configuration settings that the user can toggle on and off via the "Configure Hero" form. When a given source is enabled by the user, a corresponding tag is automatically added to the actor, which can then be tested within the data files. Each individual source can be defined via the "source" element. The complete list of attributes for this element is below.
id Id – Specifies the unique id to utilize for this source. name Text – Name to be displayed to the user for this source. Maximum length is 50 characters. abbrev (Optional) Text – Shortened name to be displayed within the summary of enabled sources. If empty, the name is used as the abbreviation. Maximum length is 50 characters. Default: Empty. description (Optional) Text – Description of the source and what behavior(s) it governs within the data files. Default: Empty. parent (Optional) Id – Specifies the unique id of a different source that is treated as the parent of this source. All sources are displayed in a hierarchy within the "Configure Hero" form. If empty, this source is presented to the user as a top-level selection. Default: Empty. sortorder (Optional) Integer – Assigns an explicit sort order to this source, enabling the display sequence of sources to be controlled by the author. All sources are sequenced in increasing sort order. All sources with the same sort order are sorted alphabetically based on the name. Default: "99999999". selectable (Optional) Boolean – Indicates whether the source is selectable by the user. This option allows sources that are solely used to visually group sources in a hierarchy to be made non-selectable. Default: "yes". NOTE! By convention, sources should never be used as both as parent within the hierarchy and to control behavior within the data files. This means that any source with children should be non-selectable and not control any behaviors.
Text – Text –
{ "reportable", e_xml_set, l_yes_no[0], NULL, SIZE_YES_NO, l_yes_no }, { "reportname", e_xml_implied, "", NULL, 0, NULL }, { "default", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no }
Example
The following example demonstrates what a "reference" element might look like. All default values are assumed for optional attributes.
<reference id="BulletPrf" contents="Bullet-Proof Armor"/>