Difference between revisions of "Dossier Element (Data)"

From HLKitWiki
Jump to: navigation, search
 
(4 intermediate revisions by one other user not shown)
Line 7: Line 7:
 
:{| class="infotable"
 
:{| class="infotable"
 
|class="leftnormal"|id
 
|class="leftnormal"|id
|Id – Specifies the unique id of the dossier. This id is used in all references to the dossier.
+
|Id – Specifies the unique id of the dossier. This id is used in all references to the dossier. When the dossier is being rendered, a global tag "dossier.<this id>" is added to the portfolio allow you to see which dossier is being rendered.
 
|-
 
|-
 
|name
 
|name
Line 54: Line 54:
 
|}
 
|}
  
===The "live" Element of "dossier_sheet"{{anchor|live_sheet}}===
+
===The "live" Element{{anchor|live_sheet}}===
  
 
The "live" element defines a [[Live Tag Expression]] for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.  
 
The "live" element defines a [[Live Tag Expression]] for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.  
Line 64: Line 64:
 
|}
 
|}
  
===The "sheetref" Element of "dossier_sheet"{{anchor|sheetref}}===
+
===The "sheetref" Element{{anchor|sheetref}}===
  
 
The "sheetref" element specifies a sheet to be output as part of the dossier. The sequence in which the sheets are specified dictates the order in which they will be processed in the output. The complete list of attributes for this element is below.  
 
The "sheetref" element specifies a sheet to be output as part of the dossier. The sequence in which the sheets are specified dictates the order in which they will be processed in the output. The complete list of attributes for this element is below.  
Line 96: Line 96:
 
|An optional "live" element may appear as defined by the given link. This element defines a [[Live Tag Expression]] that determines whether the dossier is made available for selection.
 
|An optional "live" element may appear as defined by the given link. This element defines a [[Live Tag Expression]] that determines whether the dossier is made available for selection.
 
|-
 
|-
|[[#synthesize|synthesize]]
+
|[[#synthesize_text|synthesize]]
 
|Zero or more "synthesize" elements may appear as defined by the given link. This element defines the [[Synthesize Script]] used to generate the text to be output.
 
|Zero or more "synthesize" elements may appear as defined by the given link. This element defines the [[Synthesize Script]] used to generate the text to be output.
 
|-
 
|-
 
|}
 
|}
  
===The "live" Element of "dossier_text"{{anchor|live_text}}===
+
===The "live" Element{{anchor|live_text}}===
  
 
The "live" element defines a [[Live Tag Expression]] for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.  
 
The "live" element defines a [[Live Tag Expression]] for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.  
Line 111: Line 111:
 
|}
 
|}
  
==The "synthesize" Element of "dossier_text"{{anchor|synthesize_text}}==
+
===The "synthesize" Element{{anchor|synthesize_text}}===
 +
 
 +
The "synthesize" element defines a [[Synthesize Script]] for the dossier, which properly generates the text to be output as the dossier. If multiple synthesize scripts are defined, their generated results are appended into one final text stream for output. The complete list of attributes for this element is below.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|PCDATA
 +
|Script – Specifies the code comprising the Synthesize script.
 +
|-
 +
|}
 +
 
 +
==The "dossier_export" Element{{anchor|dossier_export}}==
 +
 
 +
The "dossier_export" element defines the logic used in generating formatted data for use within other products, such as mapping tools and virtual table tops. The complete list of attributes for this element is below.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|filename
 +
|(Optional) Text – Specifies the default filename into which the generated data is output. The user is free to specify any filename he wishes, but this allows HL to automatically name the file correctly for programs with pre-defined import file mechanisms. If empty, the user is required the specify a filename. Default: Empty.
 +
|-
 +
|location
 +
|(Optional) Text – Specifies the default location (i.e. file system path) in which the generated data is output. As with the "filename" attribute above, you can automatically output the file to a pre-determined location where the target program is expecting to find the file to import. If empty, the user is required to specify the location. Default: Empty.
 +
|-
 +
|}
 +
 
 +
The "dossier_export" element also possesses child elements that describe its contents. 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.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|[[#synthesize_export|synthesize]]
 +
|Zero or more "synthesize" elements may appear as defined by the given link. This element defines the [[Synthesize Script]] used to generate the text to be output.
 +
|-
 +
|}
 +
 
 +
===The "synthesize" Element{{anchor|synthesize_export}}===
  
 
The "synthesize" element defines a [[Synthesize Script]] for the dossier, which properly generates the text to be output as the dossier. If multiple synthesize scripts are defined, their generated results are appended into one final text stream for output. The complete list of attributes for this element is below.  
 
The "synthesize" element defines a [[Synthesize Script]] for the dossier, which properly generates the text to be output as the dossier. If multiple synthesize scripts are defined, their generated results are appended into one final text stream for output. The complete list of attributes for this element is below.  
Line 131: Line 162:
 
     <sheetref sheet="standard2"/>
 
     <sheetref sheet="standard2"/>
 
     </dossier_sheet>
 
     </dossier_sheet>
 +
  </dossier>
 +
 +
<dossier id="statblock" name="Character Statblock">
 +
  <dossier_text styles="plain+html+bbcode" grouping="statblock">
 +
    <synthesize>
 +
      ~script code goes here
 +
      </synthesize>
 +
    </dossier_text>
 
   </dossier>
 
   </dossier>
 
</pre>
 
</pre>
 +
 +
When the "standard" dossier is being rendered, the global tag "dossier.standard" is added to the portfolio. When the "statblock" dossier is being synthesized, the global tag "dossier.statblock" is added to the portfolio.

Latest revision as of 09:20, 13 May 2009

Context: HL KitKit Reference … Data File Reference 

The "dossier" Element

Dossiers represent a logical set of output for a portfolio, such as a character sheet, statblock, or even export data for use with another product. Each dossier is specified through the use of a "dossier" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the dossier. This id is used in all references to the dossier. When the dossier is being rendered, a global tag "dossier.<this id>" is added to the portfolio allow you to see which dossier is being rendered.
name Text – Public name associated with the dossier. Maximum length of 100 characters.

The "dossier" element also possesses child elements that define various facets of the dossier. 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.

IMPORTANT! Exactly one of these child elements may be specified for each dossier. If multiple are given, a compiler error will be reported. The chosen child element dictates the type of dossier that is being defined and its characteristics.

dossier_sheet An optional "dossier_sheet" element may appear as defined by the given link. This element defines the structure of a printed dossier, such as a character sheet.
dossier_text An optional "dossier_text" element may appear as defined by the given link. This element specifies text-based output, such as a statblock.
dossier_export An optional "dossier_export" element may appear as defined by the given link. This element defines output that is tailored for use within another product, such as d20Pro.

The "dossier_sheet" Element

The "dossier_sheet" element defines the structure of a printed dossier, containing a collection of sheets. The complete list of attributes for this element is below.

grouping Text – Specifies the name of the group into which this dossier should be placed for display. The groupings are used to logically organize multiple dossiers for presentation to the user, with the various groupings being sorted alphabetically.
default (Optional) Boolean – Indicates whether this dossier should be the default dossier that is pre-selected for the user when first outputting a printed dossier. Default: "no".

The "dossier_sheet" element also possesses child elements that describe its contents. 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.

live An optional "live" element may appear as defined by the given link. This element defines a Live Tag Expression that determines whether the dossier is made available for selection.
sheetref Zero or more "sheetref" elements may appear as defined by the given link. This element identifies a sheet to be included in the dossier output.

The "live" Element

The "live" element defines a Live Tag Expression for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.

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

The "sheetref" Element

The "sheetref" element specifies a sheet to be output as part of the dossier. The sequence in which the sheets are specified dictates the order in which they will be processed in the output. The complete list of attributes for this element is below.

sheet Id – Specifies the unique id of the sheet to be included in the dossier output.

The "dossier_text" Element

The "dossier_text" element defines the logic used in outputting a text-based dossier, such as a statblock. The complete list of attributes for this element is below.

grouping Text – Specifies the name of the group into which this dossier should be placed for display. The groupings are used to logically organize multiple dossiers for presentation to the user, with the various groupings being sorted alphabetically.
styles (Optional) Text – Specifies the output styles that are supported for this dossier. The various output styles you can specify are "plain", "html", and "bbcode". You can combine multiple styles by placing a '+' between them (e.g. "plain+bbcode"). If empty, the "plain" style is assumed. Default: Empty.
default (Optional) Boolean – Indicates whether this dossier should be the default dossier that is pre-selected for the user when first outputting a text dossier. Default: "no".

The "dossier_text" element also possesses child elements that describe its contents. 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.

live An optional "live" element may appear as defined by the given link. This element defines a Live Tag Expression that determines whether the dossier is made available for selection.
synthesize Zero or more "synthesize" elements may appear as defined by the given link. This element defines the Synthesize Script used to generate the text to be output.

The "live" Element

The "live" element defines a Live Tag Expression for the dossier, which determines whether the dossier is shown to the user as a selection. The tag expression is compared against the tags assigned to the current actor. If the tag expression is satisfied, the dossier can be output, else it is hidden. This is ideal for situations like spellbooks that should only be shown for spellcasters. The complete list of attributes for this element is below.

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

The "synthesize" Element

The "synthesize" element defines a Synthesize Script for the dossier, which properly generates the text to be output as the dossier. If multiple synthesize scripts are defined, their generated results are appended into one final text stream for output. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Synthesize script.

The "dossier_export" Element

The "dossier_export" element defines the logic used in generating formatted data for use within other products, such as mapping tools and virtual table tops. The complete list of attributes for this element is below.

filename (Optional) Text – Specifies the default filename into which the generated data is output. The user is free to specify any filename he wishes, but this allows HL to automatically name the file correctly for programs with pre-defined import file mechanisms. If empty, the user is required the specify a filename. Default: Empty.
location (Optional) Text – Specifies the default location (i.e. file system path) in which the generated data is output. As with the "filename" attribute above, you can automatically output the file to a pre-determined location where the target program is expecting to find the file to import. If empty, the user is required to specify the location. Default: Empty.

The "dossier_export" element also possesses child elements that describe its contents. 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.

synthesize Zero or more "synthesize" elements may appear as defined by the given link. This element defines the Synthesize Script used to generate the text to be output.

The "synthesize" Element

The "synthesize" element defines a Synthesize Script for the dossier, which properly generates the text to be output as the dossier. If multiple synthesize scripts are defined, their generated results are appended into one final text stream for output. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Synthesize script.

Example

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

<dossier id="standard" name="Standard Character Sheet">
  <dossier_sheet grouping="AtTop" default="yes">
    <sheetref sheet="standard1"/>
    <sheetref sheet="standard2"/>
    </dossier_sheet>
  </dossier>

<dossier id="statblock" name="Character Statblock">
  <dossier_text styles="plain+html+bbcode" grouping="statblock">
    <synthesize>
      ~script code goes here
      </synthesize>
    </dossier_text>
  </dossier>

When the "standard" dossier is being rendered, the global tag "dossier.standard" is added to the portfolio. When the "statblock" dossier is being synthesized, the global tag "dossier.statblock" is added to the portfolio.