Difference between revisions of "Bootstrap Element (Data)"

From HLKitWiki
Jump to: navigation, search
Line 18: Line 18:
  
 
:{| class="infotable"
 
:{| class="infotable"
|class="leftnormal"|[[AutoTag Element (Data)|autotag]]
+
|class="leftnormal"|[[#match|match]]
|A single "autotag" element may appear as defined by the given link. This element specifies a tag that is automatically assigned to each added thing.
+
|An optional "match" element may appear as defined by the given link. This element defines the [[Match Tag Expression]]. If omitted, all things are assumed to match.
 +
{{important}}This element is only applicable when the bootstrap is defined within a component. In all other cases, this element may not be specified.
 +
|-
 +
|[[#container|container]]
 +
|A single "container" element must appear as defined by the given link. This element defines the [[Container Tag Expression]].
 +
{{important}}This element is not applicable when the bootstrap is defined within an entity.
 +
|-
 +
|[[AutoTag Element (Data)|autotag]]
 +
|Zero or more "autotag" elements may appear as defined by the given link. This element specifies tags that are automatically assigned to the added thing.
 
|-
 
|-
 
|}
 
|}
  
 +
==The "match" Element{{anchor|match}}==
  
-Condition tests are not allowed for bootstraps on entities and rulesets
+
The "match" element defines the [[Match Script|Match script]] that determines whether a particular thing receives the specified bootstrap. The tag expression is applied against each thing derived from the component, and the bootstrap is only assigned to things that satisfy the tag expression. The complete list of attributes for this element is below.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|PCDATA
 +
|TagExpr – Specifies the code comprising the Match tag expression.
 +
|-
 +
|}
 +
 
 +
==The "container" Element{{anchor|container}}==
 +
 
 +
The "container" element defines the [[Container Script|Container script]] that determines whether the bootstrap is made available within the container. The tag expression is applied against the container of the prospective bootstrapped pick. If the container does not satisfy the tag expression, the bootstrapped pick is treated as non-live. The complete list of attributes for this element is below.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|PCDATA
 +
|TagExpr – Specifies the code comprising the Container tag expression.
 +
|-
 +
|}
  
 
==Example==
 
==Example==
  
The following example demonstrates what a "autotag" element might look like. All default values are assumed for optional attributes.
+
The following example demonstrates what a "bootstrap" element might look like. All default values are assumed for optional attributes.
  
 
<pre>
 
<pre>
<autotag group="TheGroup" tag="TheTag"/>
+
<bootstrap thing="AttrIncr">
 +
  <autotag group="TheGroup" tag="TheTag"/>
 +
  <container phase="Setup" priority="500">
 +
    val:Level.? >= 4
 +
    </container>
 +
  </bootstrap>
 
</pre>
 
</pre>

Revision as of 05:09, 24 November 2008

Context: HL KitKit Reference  … Multiple Sources

The "bootstrap" Element

In a variety of situations, you will be able to specify individual things that should be automatically added to a container as picks. This process is called bootstrapping and has a diverse set of special rules that must be observed. Each bootstrapped thing is specified through the use of a "bootstrap" element. The complete list of attributes for this element is below.

thing Id – Specifies the unique id of the thing that is to be automatically added to the container.
index (Optional) Integer – Specifies a unique index value for this bootstrap entry. Only global bootstraps that add things to all actors require this attribute and it can be omitted in all other situations. Default: "0".

WARNING! The index is used to uniquely identify this specific bootstrap within saved portfolios. Consequently, it must never be changed or re-used within differnt versions of the data files. If you eliminate a bootstrap entry, simply leave that index value unused, replacing the old "bootstrap" element with a comment explaining why the hole in numbering is left.

The "bootstrap" element also possesses child elements that pertain to the automatically added things. 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.

match An optional "match" element may appear as defined by the given link. This element defines the Match Tag Expression. If omitted, all things are assumed to match.

IMPORTANT! This element is only applicable when the bootstrap is defined within a component. In all other cases, this element may not be specified.

container A single "container" element must appear as defined by the given link. This element defines the Container Tag Expression.

IMPORTANT! This element is not applicable when the bootstrap is defined within an entity.

autotag Zero or more "autotag" elements may appear as defined by the given link. This element specifies tags that are automatically assigned to the added thing.

The "match" Element

The "match" element defines the Match script that determines whether a particular thing receives the specified bootstrap. The tag expression is applied against each thing derived from the component, and the bootstrap is only assigned to things that satisfy the tag expression. The complete list of attributes for this element is below.

PCDATA TagExpr – Specifies the code comprising the Match tag expression.

The "container" Element

The "container" element defines the Container script that determines whether the bootstrap is made available within the container. The tag expression is applied against the container of the prospective bootstrapped pick. If the container does not satisfy the tag expression, the bootstrapped pick is treated as non-live. The complete list of attributes for this element is below.

PCDATA TagExpr – Specifies the code comprising the Container tag expression.

Example

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

<bootstrap thing="AttrIncr">
  <autotag group="TheGroup" tag="TheTag"/>
  <container phase="Setup" priority="500">
    val:Level.? >= 4
    </container>
  </bootstrap>