Tables and the Table Def Format
If any Game-global "Tables" are to be included in an HCGE game, a "Table Def" with the name "tables.def" must be included in that game's "Game Folder".
"Zone"-specific tables that are loaded and unloaded with each "Zone" are also possibly by placing a Table Def with the name "tables.def" in the desired "Zone Folder".
"Tables" are user-created lists of pre-calculated values that are generally used to avoid the slowdown of repeatedly performing
complex math operations, or to provide lists of values that may be used for any other purpose. They can be accessed through the use of the Table-reading Script Commands,
which allow the use of variables to select the Table and Index to read.
There are two basic types of Table Data that can be loaded:
Binary Table Data
Table Data may be loaded from "binary files", files into which machine-readable number values have been directly output by custom
table generation program, or entered manually through a program such as a Hex Editor.
The format is very simple, in that values are stored one right after the other, with no header, footer, or other information.
A setting in the Table Def specifies whether to load the values as BYTEs (8-bit), WORDs (16-bit, two-byte), or DWORDs (32-bit, 4-byte), and whether to interpret them as big-endian or little-endian, and signed or unsigned.
HCGE Table File
Table data may also be loaded from a more human-readable, text-based HCGE Table File.
The following is a detailed description of each of the entries in a
Table Def file. For a more practical view, see the example below
- Number of Tables
This value specifies the number of Tables that should be loaded for this game
Example Table Def File
The following is an example setup for a Table Def File to better demonstrate how to
put the above information into practice. Use the same format and fill in the appropriate
values given the information contained throughout the various documents to create Table Defs for an HCGE Game.
; Example Table Def File ;
Number of Tables: 9
Table 0 Name: tables\table0.def
Table 1 Name: tables\table1.tbl
Table 2 Name: tables\table2.tbl
Table 3 Name: tables\table3.tbl
Table 4 Name: tables\table4.tbl
Table 5 Name: tables\table5.tbl
Table 6 Name: tables\table6.tbl
Table 7 Name: tables\table7.tbl
Table 8 Name: tables\table8.tbl