Difference between revisions of "Definition File Reference"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference}} ==Overview== Each game system has a single definition file that describes the fundamental, non-changing characteristics of the game. HL uses the definition file...)
 
Line 7: Line 7:
 
This documentation outlines all the structure and mechanics for writing a definition file. Examples are provided in some cases.  
 
This documentation outlines all the structure and mechanics for writing a definition file. Examples are provided in some cases.  
  
{{important}}This section utilizes critical notational conventions that can be found in [[Conventions Used in Reference Section|this section]].
+
{{important}}This section utilizes critical notational conventions that can be found in [[Conventions Used in Reference Section|over here]].
  
==Topics==
+
==Structural Composition==
  
The following topics are explained in the sections linked below.
+
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".
*{{fl|XML Character Encoding Set}}
+
 
 +
The following table defines the attributes for a "document" element.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|signature
 +
|Text – Must be the value "Hero Lab Definition".
 +
|-
 +
|}
 +
 
 +
Within the document element, every definition file possesses the following child elements, appearing in the sequence and with the names specified.
 +
 
 +
                                { &l_game, e_xml_single },
 +
                                { &l_author, e_xml_optional },
 +
                                { &l_release, e_xml_single },
 +
                                { &l_structure, e_xml_single },
 +
                                { &l_behavior, e_xml_single },
 +
                                { &l_advancement, e_xml_optional },
 +
                                { &l_optional, e_xml_zero_plus },
 +
                                { &l_tools, e_xml_optional },
 +
                                { &l_external, e_xml_optional },
 +
                                { &l_enmasse, e_xml_zero_plus },
 +
                                { &l_bootstrap, e_xml_zero_plus },
 +
                                { &l_autoadd, e_xml_zero_plus },
 +
                                { &l_usagepool, e_xml_zero_plus },
 +
                                { &l_reference, e_xml_zero_plus },
 +
                                { &l_macro, e_xml_zero_plus },
 +
                                { &l_group, e_xml_zero_plus },
 +
                                { &l_ruleset, e_xml_zero_plus },
 +
                                { &l_context, e_xml_zero_plus },
 +
                                { &l_source, e_xml_zero_plus },
 +
                                { &l_exclusion, e_xml_zero_plus },
 +
                                { &l_phase, e_xml_one_plus },
 +
                                { &l_resource, e_xml_zero_plus },
 +
                                { &l_style, e_xml_zero_plus },
 +
                                { &l_portal, e_xml_zero_plus },
 +
                                { &l_template, e_xml_zero_plus },
 +
                                { &l_component, e_xml_zero_plus },
 +
                                { &l_compset, e_xml_zero_plus },
 +
                                { &l_entity, e_xml_zero_plus },
 +
                                { &l_string, e_xml_zero_plus },
 +
                                { &l_sortset, e_xml_zero_plus },
 +
                                { &l_view, e_xml_zero_plus },
 +
                                { &l_filter, e_xml_zero_plus },
 +
//                                { &l_partner, e_xml_optional },
 +
                                { &l_system_resource, e_xml_zero_plus }
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|{{flalt|Game Element (Data)|game}}
 +
|A single "game" element must appear as defined by the linked section. This element contains basic game system information.
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}

Revision as of 06:45, 22 November 2008

Context: HL KitKit Reference 

Overview

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.

This documentation outlines all the structure and mechanics for writing a definition file. Examples are provided in some cases.

IMPORTANT! This section utilizes critical notational conventions that can be found in over here.

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 following table defines the attributes for a "document" element.

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

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

                               { &l_game, e_xml_single },
                               { &l_author, e_xml_optional },
                               { &l_release, e_xml_single },
                               { &l_structure, e_xml_single },
                               { &l_behavior, e_xml_single },
                               { &l_advancement, e_xml_optional },
                               { &l_optional, e_xml_zero_plus },
                               { &l_tools, e_xml_optional },
                               { &l_external, e_xml_optional },
                               { &l_enmasse, e_xml_zero_plus },
                               { &l_bootstrap, e_xml_zero_plus },
                               { &l_autoadd, e_xml_zero_plus },
                               { &l_usagepool, e_xml_zero_plus },
                               { &l_reference, e_xml_zero_plus },
                               { &l_macro, e_xml_zero_plus },
                               { &l_group, e_xml_zero_plus },
                               { &l_ruleset, e_xml_zero_plus },
                               { &l_context, e_xml_zero_plus },
                               { &l_source, e_xml_zero_plus },
                               { &l_exclusion, e_xml_zero_plus },
                               { &l_phase, e_xml_one_plus },
                               { &l_resource, e_xml_zero_plus },
                               { &l_style, e_xml_zero_plus },
                               { &l_portal, e_xml_zero_plus },
                               { &l_template, e_xml_zero_plus },
                               { &l_component, e_xml_zero_plus },
                               { &l_compset, e_xml_zero_plus },
                               { &l_entity, e_xml_zero_plus },
                               { &l_string, e_xml_zero_plus },
                               { &l_sortset, e_xml_zero_plus },
                               { &l_view, e_xml_zero_plus },
                               { &l_filter, e_xml_zero_plus },

// { &l_partner, e_xml_optional },

                               { &l_system_resource, e_xml_zero_plus }
game A single "game" element must appear as defined by the linked section. This element contains basic game system information.