Component Set Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
 
Line 10: Line 10:
|-
|-
|usernamable
|usernamable
|(Optional) Set – Designates whether the user is allowed to rename picks that are based on this compset. Must be one of these values:<br>
|(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.<br>
<ul class="sets">
no – The user is never allowed to rename picks derived from this compset.<br>
<li>yes – The user is always allowed to rename picks derived from this compset.</li>
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.<br>
<li>no – The user is never allowed to rename picks derived from this compset.</li>
Default: "default".
<li>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.</li>
<li>Default: "default".</li>
</ul>
|-
|-
|stackable
|stackable
Line 20: Line 22:
|-
|-
|forceunique
|forceunique
|(Optional) Set – Specifies whether all things derived from this compset must be [[Uniqueness of Things|designated as unique or non-unique]]. Must be one of these values:<br>
|(Optional) Set – Specifies whether all things derived from this compset must be [[Uniqueness of Things|designated as unique or non-unique]]. Must be one of these values:
yes – All things derived from this compset must be designated as unique.<br>
<ul class="sets">
no – No things derived from this compset may be designated as unique.<br>
<li>yes – All things derived from this compset must be designated as unique.</li>
default – Author is free to designate a mixture of unique and non-unique things based on this compset.<br>
<li>no – No things derived from this compset may be designated as unique.</li>
Default: "default".
<li>default – Author is free to designate a mixture of unique and non-unique things based on this compset.</li>
<li>Default: "default".</li>
</ul>
{{note}}If uniqueness is forced either direction, the compiler will report an error for any thing that is designated incorrectly.
{{note}}If uniqueness is forced either direction, the compiler will report an error for any thing that is designated incorrectly.
|-
|-

Latest revision as of 09:18, 4 December 2008

Context: HL Kit &#133; Kit Reference &#133; 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>