OutputLabel Element (Data)
The "output_label" Element
The role of the "output_label" element is identical to the "label" element, except that it is designed for use exclusively within character sheet output. Any data that you want to display within a sheet (i.e. most everything within a sheet) will require the use of an "output_label" element. The complete list of attributes for this element is below.
IMPORTANT! Only one mechanism for specifying the label contents may be employed within a given output label portal. That means you may use either the "text" attribute, the "field" attribute, the "labeltext" script OR the "dossier" attribute to define the contents. Use of multiple mechanisms will result in a compilation error.
text (Optional) Text – Specifies a string of literal text to be displayed within the label. Default: Empty. field (Optional) Id – Specifies the unique id of the field whose value is to be displayed within the label. The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, a field-based label is not allowed. Default: Empty. ismultiline (Optional) Boolean – Indicates whether the label text is to be treated as multi-line or merely a single line of output. Default: "no". dossier (Optional) Id – If specified, must be the unique id of a text dossier that supports the "print" style. The text for that dossier is generated and used as the text for the label. Default: Empty. dossierspecial (Optional) Integer – This value is passed into the dossier script as the "@special" special symbol. This allows you to customize the statblock based on where it's called from. Default: "0".
The "output_label" element also possesses child elements that define additional behaviors of the portal. 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.
labeltext An optional "labeltext" element may appear as defined by the given link. This element defines a Label Script that is used for synthesizing the text to be output.
The "labeltext" Element
The "labeltext" element defines a Label Script for the portal. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Label script.
The following example demonstrates what an output label portal might look like. All default values are assumed for optional attributes.
<portal id="name" style="outNameLg"> <output_label field="name"/> </portal> <portal id="oHeroName" style="outHeroNam"> <output_label> <labeltext> @text = hero.actorname var result as number result = compare(@text, "") if (result = 0) then @text = "- Unnamed Hero -" endif </labeltext> </output_label> </portal>