Component Set Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
New page: {{context|Kit Reference|Structural File Reference}} ==The "compset" Element== Every "thing" you'll define throughout the data files will be based on a specific [[Advanced Components and ...
 
Line 5: Line 5:
Every "thing" you'll define throughout the data files will be based on a specific [[Advanced Components and Component Sets|component set (or compset)]]. Each component set is defined through the use of a "compset" element. The complete list of attributes for this element is below.
Every "thing" you'll define throughout the data files will be based on a specific [[Advanced Components and Component Sets|component set (or compset)]]. Each component set is defined through the use of a "compset" element. The complete list of attributes for this element is below.


{ "id", e_xml_required, NULL, NULL, 0, NULL },
{ "usernamable", e_xml_set, l_maybe[0], NULL, SIZE_MAYBE, l_maybe },
{ "stackable", e_xml_set, l_yes_no[1], NULL, SIZE_YES_NO, l_yes_no },
{ "forceunique", e_xml_set, l_maybe[0], NULL, SIZE_MAYBE, l_maybe }
:{| class="infotable"
:{| class="infotable"
|class="leftnormal"|id
|class="leftnormal"|id

Revision as of 00:57, 1 December 2008

Context: HL Kit … Kit Reference … Structural File Reference 

The "compset" Element

Every "thing" you'll define throughout the data files will be based on a specific component set (or compset). Each component set is defined through the use of a "compset" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the compset. This id is used in all references to the compset.
usernamable (Optional) Set – Designates whether the user is allowed to rename picks that are based on this compset. Must be one of these values:

yes – The user is always allowed to rename picks derived from this compset.
no – The user is never allowed to rename picks derived from this compset.
default – Whether the user can rename picks derived from this compset is dictated by the components upon which the compset is based. If any component allows renaming, so does the compset.
Default: "default".

stackable (Optional) Boolean – Indicates whether picks derived from this compset enable stacking behavior. Default: "no".
forceunique (Optional) Set – Specifies whether all things derived from this compset must be designated as unique or non-unique. Must be one of these values:

yes – All things derived from this compset must be designated as unique.
no – No things derived from this compset may be designated as unique.
default – Author is free to designate a mixture of unique and non-unique things based on this compset.
Default: "default". NOTE! If uniqueness is forced either direction, the compiler will report an error for any thing that is designated incorrectly.

The "compset" element also possesses child elements that pertain to the handling of its components. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

compref One or more "compref" elements must appear as defined by the given link. This element specifies the individual components that comprise the compset.
distinct Zero or more "distinct" elements may appear as defined by the given link. This element identifies additional criteria for determining whether two things can be stacked.

The "compref" Element

The "compref" element identifies each of the components that the compset will be built upon. The complete list of attributes for this element is below.

component Id – Specifies the unique id of the component to be included in the compset.

The "distinct" Element

The "distinct" element identifies specially treated fields within the compset (i.e. its components). These fields are used to uniquely identify picks and potentially preclude whether those picks can be stacked with other picks. If two picks have the same values for the specified fields, their stackable behavior is dictated by the normal rules for stackability. However, if any "distinct" field differs, the two picks are considered to be not stackable. The complete list of attributes for this element is below.

NOTE! If no "distinct" fields are specified, normal stacking rules apply. If one or more "distinct" fields are given, all components within the compset must be stackable. Array-based and matrix-based fields cannot be designated as "distinct".

field Id – Specifies the unique id of the field to be verified as distinct before stacking is allowed.

Example

The following example demonstrates what an "compset" element might look like. All default values are assumed for optional attributes.

<compset id="Melee" stackable="yes">
  <compref component="WeaponBase"/>
  <compref component="WeapMelee"/>
  <compref component="Equippable"/>
  <compref component="Gear"/>
  </compset>