Structural File Reference: Difference between revisions
No edit summary |
|||
(8 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
==Overview== | ==Overview== | ||
Structural files are where you'll be defining all of the pieces that provide the underlying framework for the game system. They are loaded immediately after the definition file. | |||
The ".1st" files are loaded | The Kit supports four different structural file types that share the identical contents. They possess the file extensions ".1st", "core", ".str", and ".aug". These files are always loaded in that same order. | ||
This section outlines the structure and mechanics for writing a structural file. | |||
{{important}}This section utilizes [[Kit Reference#conventions|critical notational conventions]] that should be reviewed. | |||
{{important}}This section utilizes | |||
{{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 17: | 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 | 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 Structure". | ||
The following table defines the attributes for a "document" element. | The following table defines the attributes for a "document" element. | ||
Line 23: | Line 21: | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|signature | |class="leftnormal"|signature | ||
|Text – Must be the value "Hero Lab | |Text – Must be the value "Hero Lab Structure". | ||
|- | |- | ||
|} | |} | ||
Within the document element, every | Within the document element, every structural file possesses the following child elements, appearing in the sequence given and with the names specified. | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|{{flalt| | |class="leftnormal"|{{flalt|LoadOnce Element (Data)|loadonce}} | ||
|A single " | |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|EnMasse Element (Data)|enmasse}} | |{{flalt|EnMasse Element (Data)|enmasse}} | ||
Line 57: | Line 40: | ||
|Zero or more "autoadd" elements may appear as defined by the given link. This element identifies choices that are pre-selected for every actor. | |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)| | |{{flalt|UsagePool Element (Data)|usagepool}} | ||
|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 "usagepool" elements may appear as defined by the given link. This element specifies usage pools for use by the game system. | ||
|- | |- | ||
Line 68: | Line 51: | ||
|{{flalt|Source Element (Data)|source}} | |{{flalt|Source Element (Data)|source}} | ||
|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 "source" elements may appear as defined by the given link. This element specifies sources that can be configured by the user for each actor. | ||
|- | |- | ||
|{{flalt|Resource Element (Data)|resource}} | |{{flalt|Resource Element (Data)|resource}} | ||
Line 77: | Line 57: | ||
|{{flalt|Style Element (Data)|style}} | |{{flalt|Style Element (Data)|style}} | ||
|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 "style" elements may appear as defined by the given link. This element specifies an assortment of visual styles that can be used by portals. | ||
|- | |- | ||
|{{flalt|Component Element (Data)|component}} | |{{flalt|Component Element (Data)|component}} |
Latest revision as of 06:15, 8 December 2014
Context: HL Kit … Kit Reference
Overview
Structural files are where you'll be defining all of the pieces that provide the underlying framework for the game system. They are loaded immediately after the definition file.
The Kit supports four different structural file types that share the identical contents. They possess the file extensions ".1st", "core", ".str", and ".aug". These files are always loaded in that same order.
This section outlines the structure and mechanics for writing a structural 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 Structure".
The following table defines the attributes for a "document" element.
signature Text – Must be the value "Hero Lab Structure".
Within the document element, every structural 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. enmasse 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. bootstrap Zero or more "bootstrap" elements may appear as defined by the given link. This element specifies specific things to automatically add to every actor. 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. usagepool Zero or more "usagepool" elements may appear as defined by the given link. This element specifies usage pools for use by the game system. reference Zero or more "reference" elements may appear as defined by the given link. This element details references used throughout the data files. group Zero or more "group" elements may appear as defined by the given link. This element defines a collection of tag groups and their tags. source 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. resource 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. style 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. component 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. compset 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. entity 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. sortset 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.