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...)
 
 
(18 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
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.
 
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.  
+
The definition file must have the file extension ".def". By convention, the file is always named "definition.def" so that it can always be readily identified.
  
{{important}}This section utilizes critical notational conventions that can be found in [[Conventions Used in Reference Section|this section]].
+
This section outlines the structure and mechanics for writing a definition file.
  
==Topics==
+
{{important}}This section utilizes [[Kit Reference#conventions|critical notational conventions]] that should be reviewed.
  
The following topics are explained in the sections linked below.
+
==Structural Composition==
*{{fl|XML Character Encoding Set}}
+
 
 +
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.
 +
 
 +
:{| 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 given and with the names specified.
 +
 
 +
:{| class="infotable"
 +
|class="leftnormal"|{{flalt|Game Element (Data)|game}}
 +
|A single "game" element must appear as defined by the given link. This element contains basic game system information.
 +
|-
 +
|{{flalt|Author Element (Data)|author}}
 +
|An optional "author" element may appear as defined by the given link. This element contains information about the author of the data files.
 +
|-
 +
|{{flalt|Release Element (Data)|release}}
 +
|A single "release" element must appear as defined by the given link. This element provides details about the current release of the data files.
 +
|-
 +
|{{flalt|Structure Element (Data)|structure}}
 +
|A single "structure" element must appear as defined by the given link. This element specifies structural details about the game system and its behavior.
 +
|-
 +
|{{flalt|Behavior Element (Data)|behavior}}
 +
|A single "behavior" element must appear as defined by the given link. This element details behavioral aspects for the game system and data files.
 +
|-
 +
|{{flalt|ScriptMacro Element (Data)|scriptmacro}}
 +
|Zero or more "scriptmacro" elements may appear as defined by the given link. This element defines macros for use within scripts.
 +
|-
 +
|{{flalt|Advancement Element (Data)|advancement}}
 +
|An optional "advancement" element may appear as defined by the given link. This element contains details regarding the advancement works within the data files.
 +
|-
 +
|{{flalt|Phase Element (Data)|phase}}
 +
|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.
 +
|-
 +
|}

Latest revision as of 19:00, 8 December 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.

The definition file must have the file extension ".def". By convention, the file is always named "definition.def" so that it can always be readily identified.

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

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

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 given and with the names specified.

game A single "game" element must appear as defined by the given link. This element contains basic game system information.
author An optional "author" element may appear as defined by the given link. This element contains information about the author of the data files.
release A single "release" element must appear as defined by the given link. This element provides details about the current release of the data files.
structure A single "structure" element must appear as defined by the given link. This element specifies structural details about the game system and its behavior.
behavior A single "behavior" element must appear as defined by the given link. This element details behavioral aspects for the game system and data files.
scriptmacro Zero or more "scriptmacro" elements may appear as defined by the given link. This element defines macros for use within scripts.
advancement An optional "advancement" element may appear as defined by the given link. This element contains details regarding the advancement works within the data files.
phase 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.