Data File Reference: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
New page: {{context|Kit Reference}} ==Overview== The Each game system has a single definition file that describes the fundamental, non-changing characteristics of the game. HL uses the definition...
 
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
==Overview==
==Overview==


The  
The data file is where you'll be defining all of the top-level elements that the user will directly control. This includes visual elements like panels, layouts, templates, and portals. It also includes game system elements like things.
Each game system has a single definition file that describes the fundamental, non-changing characteristics of the game. HL uses the definition file to configure itself for each game system, reading in the definition file before any other files. All of the contents of the other data files are given meaningful interpretation by the contents of the definition file.
 
All data files have the ".dat" file extension and are loaded after all of the structural files have defined the framework for the game system.


This section outlines the structure and mechanics for writing a definition file.
This section outlines the structure and mechanics for writing a definition file.


{{important}}This section utilizes critical notational conventions that can be found in [[Conventions Used in Reference Section|over here]].
{{important}}This section utilizes [[Kit Reference#conventions|critical notational conventions]] that should be reviewed.


{{important}}Just because you '''can''' put numerous different elements in the same file does not mean you '''should''' do so. Keeping your data files small and focused will also keep them much more manageable, so break up all the information across files where appropriate. See the Skeleton data files for examples of this.
{{important}}Just because you '''can''' put numerous different elements in the same file does not mean you '''should''' do so. Keeping your data files small and focused will also keep them much more manageable, so break up all the information across files where appropriate. See the Skeleton data files for examples of this.
Line 14: Line 15:
==Structural Composition==
==Structural Composition==


The overall file structure is that of a standard XML file. The file must start with an XML version element in the form: "<?xml version="1.0"?>". Following this, the top-level XML element must be a "document" and it must have a "signature" attribute containing the explicit value "Hero Lab Definition".  
The overall file structure is that of a standard XML file. The file must start with an XML version element in the form: "<?xml version="1.0"?>". Following this, the top-level XML element must be a "document" and it must have a "signature" attribute containing the explicit value "Hero Lab Data".  


The following table defines the attributes for a "document" element.
The following table defines the attributes for a "document" element.
Line 20: Line 21:
:{| class="infotable"
:{| class="infotable"
|class="leftnormal"|signature
|class="leftnormal"|signature
|Text – Must be the value "Hero Lab Definition".
|Text – Must be the value "Hero Lab Data".
|-
|-
|}
|}


Within the document element, every definition file possesses the following child elements, appearing in the sequence given and with the names specified.
Within the document element, every data file possesses the following child elements, appearing in the sequence given and with the names specified.


:{| class="infotable"
:{| class="infotable"
|class="leftnormal"|{{flalt|Game Element (Data)|game}}
|class="leftnormal"|{{flalt|LoadOnce Element (Data)|loadonce}}
|A single "game" element must appear as defined by the given link. This element contains basic game system information.
|A single "loadonce" element may appear as defined by the given link. This element allows you to conditionally exclude files from being loaded if a similar file has already been loaded.
|-
|-
|{{flalt|Author Element (Data)|author}}
|{{flalt|FileInfo Element (Data)|fileinfo}}
|An optional "author" element may appear as defined by the given link. This element contains information about the author of the data files.
|A single "fileinfo" element may appear as defined by the given link. This element specifies information about the data file and its author.
|-
|-
|{{flalt|Release Element (Data)|release}}
|{{flalt|FileConstants Element (Data)|fileconstants}}
|A single "release" element must appear as defined by the given link. This element provides details about the current release of the data files.
|A single "fileconstants" element may appear as defined by the given link. This element specifies constant information that affects the whole data file.
|-
|-
|{{flalt|Structure Element (Data)|structure}}
|{{flalt|Procedure Element (Data)|procedure}}
|A single "structure" element must appear as defined by the given link. This element specifies structural details about the game system and its behavior.
|Zero or more "procedure" elements may appear as defined by the given link. This element specifies a collection of procedures that may be called by scripts throughout the data files.
|-
|-
|{{flalt|Behavior Element (Data)|behavior}}
|{{flalt|Action Element (Data)|action}}
|A single "behavior" element must appear as defined by the given link. This element details behavioral aspects for the game system and data files.
|Zero or more "action" elements may appear as defined by the given link. This element specifies a collection of actions that may be invoked throughout the data files.
|-
|-
|{{flalt|Advancement Element (Data)|advancement}}
|{{flalt|Thing Element (Data)|thing}}
|An optional "advancement" element may appear as defined by the given link. This element contains details regarding the advancement works within the data files.
|Zero or more "thing" elements may appear as defined by the given link. This element specifies various thing objects for use within the game system.
|-
|-
|{{flalt|EnMasse Element (Data)|enmasse}}
|{{flalt|Portal Element (Data)|portal}}
|Zero or more "enmasse" elements may appear as defined by the given link. This element specifies categories of things to automatically add to every actor.
|Zero or more "portal" elements may appear as defined by the given link. This element specifies an assortment of portals for use within layouts.
|-
|-
|{{flalt|Bootstrap Element (Data)|bootstrap}}
|{{flalt|Template Element (Data)|template}}
|Zero or more "bootstrap" elements may appear as defined by the given link. This element specifies specific things to automatically add to every actor.
|Zero or more "template" elements may appear as defined by the given link. This element specifies an assortment of templates for use within layouts.
|-
|{{flalt|AutoAdd Element (Data)|autoadd}}
|Zero or more "autoadd" elements may appear as defined by the given link. This element identifies choices that are pre-selected for every actor.
|-
|-
|{{flalt|UsagePool Element (Data)|autoadd}}
|{{flalt|Layout Element (Data)|layout}}
|Zero or more "usagepool" elements may appear as defined by the given link. This element specifies usage pools for use by the game system.
|Zero or more "layout" elements may appear as defined by the given link. This element specifies an assortment of layouts for use within panels, forms, and sheets.
|-
|-
|{{flalt|Reference Element (Data)|reference}}
|{{flalt|Panel Element (Data)|panel}}
|Zero or more "reference" elements may appear as defined by the given link. This element details references used throughout the data files.
|Zero or more "panel" elements may appear as defined by the given link. This element specifies a variety of panels that will be presented to the user as part of the game system.
|-
|-
|{{flalt|Group Element (Data)|group}}
|{{flalt|Form Element (Data)|form}}
|Zero or more "group" elements may appear as defined by the given link. This element defines a collection of tag groups and their tags.
|Zero or more "form" elements may appear as defined by the given link. This element specifies a variety of forms that will be presented to the user as part of the game system.
|-
|-
|{{flalt|Source Element (Data)|source}}
|{{flalt|Sheet Element (Data)|sheet}}
|Zero or more "source" elements may appear as defined by the given link. This element specifies sources that can be configured by the user for each actor.
|Zero or more "sheet" elements may appear as defined by the given link. This element specifies a variety of sheets that will be used for printouts within dossiers.
|-
|-
|{{flalt|Phase Element (Data)|phase}}
|{{flalt|TableDef Element (Data)|tabledef}}
|Zero or more "phase" elements may appear as defined by the given link. This element dictates the set of evaluation phases that will exist for the game system.
|Zero or more "tabledef" elements may appear as defined by the given link. This element specifies a variety of tables that will be used throughout the data files.
|-
|-
|{{flalt|Resource Element (Data)|resource}}
|{{flalt|Dossier Element (Data)|dossier}}
|Zero or more "resource" elements may appear as defined by the given link. This element defines resources like fonts and bitmaps used by styles for visual display.
|Zero or more "dossier" elements may appear as defined by the given link. This element specifies a collection of dossiers that the user can select for character output.
|-
|-
|{{flalt|Style Element (Data)|style}}
|{{flalt|Hidden Element (Data)|hidden}}
|Zero or more "style" elements may appear as defined by the given link. This element specifies an assortment of visual styles that can be used by portals.
|Zero or more "hidden" elements may appear as defined by the given link. This element identifies things that HL should remove from use within the game system.
|-
|-
|{{flalt|Portal Element (Data)|portal}}
|{{flalt|Preclude Element (Data)|preclude}}
|Zero or more "portal" elements may appear as defined by the given link. This element specifies an assortment of portals for use within layouts.
|Zero or more "preclude" elements may appear as defined by the given link. This element identifies things that HL should preclude from use if certain sources are specified.
|-
|-
|{{flalt|Template Element (Data)|template}}
|{{flalt|Input Thing Group Element (Data)|inputthinggroup}}
|Zero or more "template" elements may appear as defined by the given link. This element specifies an assortment of templates for use within layouts.
|Zero or more "inputthinggroup" elements may appear as defined by the given link. This element identifies groups of input things that are shown in the editor.
|-
|-
|{{flalt|Component Element (Data)|component}}
|{{flalt|Edit Thing Element (Data)|editthing}}
|Zero or more "component" elements may appear as defined by the given link. This element specifies a variety of components that can be used by component sets.
|Zero or more "editthing" elements may appear as defined by the given link. This element specifies a variety of elements that enable use of the integrated Editor for creation of things.
|-
|-
|{{flalt|Component Set Element (Data)|compset}}
|{{flalt|Loadmods Element (Data)|loadmods}}
|Zero or more "compset" elements may appear as defined by the given link. This element defines various component sets that can be used to define things.
|An optional "loadmods" element may appear as defined by the given link. This element specifies ways to adjust old saved portfolios to new versions of the data files.
|-
|-
|{{flalt|Entity Element (Data)|entity}}
|{{flalt|FAQ Element (Data)|faq}}
|Zero or more "entity" elements may appear as defined by the given link. This element defines entities that can be used within the game system.
|Zero or more "faq" elements may appear as defined by the given link. This element specifies various FAQ entries that will be included within the FAQ page for the game system.
|-
|-
|{{flalt|Sort Set Element (Data)|sortset}}
|{{flalt|ExtThing Element (Data)|extthing}}
|Zero or more "sortset" elements may appear as defined by the given link. This element defines various sort sets that can be used by the game system.
|Zero or more "extthing" elements may appear as defined by the given link. This element specifies additional tags which may be added to the specified things.
|-
|-
|}
|}
==DTD==
To edit data files in your XML editor, you can use the [[Data File DTD|Data File DTD here]].

Latest revision as of 20:47, 10 November 2017

Context: HL Kit &#133; Kit Reference 

Overview

The data file is where you'll be defining all of the top-level elements that the user will directly control. This includes visual elements like panels, layouts, templates, and portals. It also includes game system elements like things.

All data files have the ".dat" file extension and are loaded after all of the structural files have defined the framework for the game system.

This section outlines the structure and mechanics for writing a definition file.

IMPORTANT! This section utilizes critical notational conventions that should be reviewed.

IMPORTANT! Just because you can put numerous different elements in the same file does not mean you should do so. Keeping your data files small and focused will also keep them much more manageable, so break up all the information across files where appropriate. See the Skeleton data files for examples of this.

Structural Composition

The overall file structure is that of a standard XML file. The file must start with an XML version element in the form: "<?xml version="1.0"?>". Following this, the top-level XML element must be a "document" and it must have a "signature" attribute containing the explicit value "Hero Lab Data".

The following table defines the attributes for a "document" element.

signature Text – Must be the value "Hero Lab Data".

Within the document element, every data file possesses the following child elements, appearing in the sequence given and with the names specified.

loadonce A single "loadonce" element may appear as defined by the given link. This element allows you to conditionally exclude files from being loaded if a similar file has already been loaded.
fileinfo A single "fileinfo" element may appear as defined by the given link. This element specifies information about the data file and its author.
fileconstants A single "fileconstants" element may appear as defined by the given link. This element specifies constant information that affects the whole data file.
procedure Zero or more "procedure" elements may appear as defined by the given link. This element specifies a collection of procedures that may be called by scripts throughout the data files.
action Zero or more "action" elements may appear as defined by the given link. This element specifies a collection of actions that may be invoked throughout the data files.
thing Zero or more "thing" elements may appear as defined by the given link. This element specifies various thing objects for use within the game system.
portal Zero or more "portal" elements may appear as defined by the given link. This element specifies an assortment of portals for use within layouts.
template Zero or more "template" elements may appear as defined by the given link. This element specifies an assortment of templates for use within layouts.
layout Zero or more "layout" elements may appear as defined by the given link. This element specifies an assortment of layouts for use within panels, forms, and sheets.
panel Zero or more "panel" elements may appear as defined by the given link. This element specifies a variety of panels that will be presented to the user as part of the game system.
form Zero or more "form" elements may appear as defined by the given link. This element specifies a variety of forms that will be presented to the user as part of the game system.
sheet Zero or more "sheet" elements may appear as defined by the given link. This element specifies a variety of sheets that will be used for printouts within dossiers.
tabledef Zero or more "tabledef" elements may appear as defined by the given link. This element specifies a variety of tables that will be used throughout the data files.
dossier Zero or more "dossier" elements may appear as defined by the given link. This element specifies a collection of dossiers that the user can select for character output.
hidden Zero or more "hidden" elements may appear as defined by the given link. This element identifies things that HL should remove from use within the game system.
preclude Zero or more "preclude" elements may appear as defined by the given link. This element identifies things that HL should preclude from use if certain sources are specified.
inputthinggroup Zero or more "inputthinggroup" elements may appear as defined by the given link. This element identifies groups of input things that are shown in the editor.
editthing Zero or more "editthing" elements may appear as defined by the given link. This element specifies a variety of elements that enable use of the integrated Editor for creation of things.
loadmods An optional "loadmods" element may appear as defined by the given link. This element specifies ways to adjust old saved portfolios to new versions of the data files.
faq Zero or more "faq" elements may appear as defined by the given link. This element specifies various FAQ entries that will be included within the FAQ page for the game system.
extthing Zero or more "extthing" elements may appear as defined by the given link. This element specifies additional tags which may be added to the specified things.

DTD

To edit data files in your XML editor, you can use the Data File DTD here.