<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.datoolset.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ViresDroid</id>
		<title>Dragon Age Toolset Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.datoolset.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ViresDroid"/>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/wiki/Special:Contributions/ViresDroid"/>
		<updated>2026-08-08T14:22:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=Installing_the_toolset&amp;diff=7457</id>
		<title>Installing the toolset</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=Installing_the_toolset&amp;diff=7457"/>
				<updated>2009-11-07T03:03:00Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: correcting the name of the default database server installed with the toolset&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Dragon Age Toolset installer comes with several pieces of third-party software that are needed for the toolset to function. They are:&lt;br /&gt;
&lt;br /&gt;
* DirectX 9.0c&lt;br /&gt;
* Visual C Runtime Library&lt;br /&gt;
* Microsoft SQL Server Express 2005 Edition&lt;br /&gt;
* Nvidia PhysX drivers&lt;br /&gt;
&lt;br /&gt;
These components will be installed along with the toolset by the toolset's installer.&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
&lt;br /&gt;
The first screen you'll get to after starting the installer and passing the title page is the install location selector. The toolset can only install the program into a specific subdirectory of the Dragon Age game directory, so you won't be able to alter the installation path; it's for informational purposes.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' MSSQL Express 2005 is bundled with this toolset and is required for it to function. Unfortunately, MSSQL Express 2005's installer has a limitation that prevents it from installing to a directory path that's longer than 58 characters.&amp;lt;sup&amp;gt;[http://support.microsoft.com/kb/935371]&amp;lt;/sup&amp;gt; If you've installed Dragon Age to a directory with a longer path than this you will need to uninstall Dragon Age: Origins and reinstall it in a directory with a shorter path length.&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
The next screen after location has been selected is where you can choose which components to install. There are only two selectable components here; Core Resources (the toolset itself) and Microsoft SQL Server Express. To run the toolkit you'll obviously need to install the Core Resources option. SQL Server is presented as a separate option so that if you already have a database server installed on your system you can use that instead of installing a whole new one.&lt;br /&gt;
&lt;br /&gt;
If you don't have an SQL server installed, or if you don't know whether you have one installed, it's safe to go with the default and install SQL Server Express. SQLServer's installer will check the existing components and, finding that all required components are already in place, won't do anything after you click &amp;quot;finish.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Manual database selection ==&lt;br /&gt;
&lt;br /&gt;
If you choose not to install SQL Server Express, the installer will ask for a database server and database name to install the toolset's resource database to instead. The default server is &amp;lt;code&amp;gt;.\BWDATOOLSET&amp;lt;/code&amp;gt; and the default database name is &amp;lt;code&amp;gt;bw_dragonage_content&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you have selected these options the Dragon Age toolset will begin the installation process. This can take a while. When the install process is finished you'll be given the option to read a readme.txt file.&lt;br /&gt;
&lt;br /&gt;
The toolset will create a start menu folder named &amp;quot;Dragon Age&amp;quot;. The start menu folder will include a link to start the toolset, a link to the toolset's uninstaller, and a link to the toolset's external configuration utility.&lt;br /&gt;
&lt;br /&gt;
The installer will write a log file in your My Documents folder. If installation fails this log file will be helpful for debugging purposes.&lt;br /&gt;
&lt;br /&gt;
If you are installing over a previous version of the toolset, you may need to update the format of your old database to make it compatible with the new version of the toolset. See [[database migration]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Lightmapper ===&lt;br /&gt;
&lt;br /&gt;
The [[lightmap]]per is the tool used to calculate lighting in level layouts. You only need to use it if you're going to be creating or modifying level layouts. The lightmapper included with the toolset requires Python to run but Python isn't currently bundled with the toolset, so if you don't already have it installed you'll need to do the following:&lt;br /&gt;
&lt;br /&gt;
#Install Python 2.5&lt;br /&gt;
#Install the win32all extensions for Python 2.5&lt;br /&gt;
&lt;br /&gt;
Note you can do both of these steps at once if you install [http://www.activestate.com/activepython/ Activestate Python] 2.5, which comes with the needed extensions.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
The external configuration utility is used to configure the toolset's database connection. You shouldn't need to run the configuration utility during routine usage of the toolset, and if the defaults set up by your installer work you may not need to run it at all.&lt;br /&gt;
&lt;br /&gt;
The default database string is &amp;quot;&amp;lt;code&amp;gt;Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bw_dragonage_content;Data Source=.\SQLEXPRESS&amp;lt;/code&amp;gt;&amp;quot;. For advanced configuration, click on the ellipsis button ([[Image:ellipsis.png]]) to open the data link properties window.&lt;br /&gt;
&lt;br /&gt;
Note that the configuration utility will first ask where the game build is. The game executable is not currently available for distribution but it is not necessary for the toolset to run so there's no need to be concerned about this.&lt;br /&gt;
&lt;br /&gt;
== Uninstallation ==&lt;br /&gt;
&lt;br /&gt;
An uninstaller shortcut is available from the same start menu folder as the toolset itself. It will autodetect the location you installed the toolset in, display it to you to confirm that this is correct, and then after you click &amp;quot;next&amp;quot; it will ask which components to uninstall.&lt;br /&gt;
&lt;br /&gt;
* Core Resources - uninstalled by default, this is the toolset itself.&lt;br /&gt;
* Database - Since the uninstaller can't automatically determine if you're using SQLServer Express purposes other than just the Dragon Age toolset, SQLServer is ''not'' uninstalled automatically by default. To have the uninstaller remove the database server as well, unselect this checkbox.&lt;br /&gt;
&lt;br /&gt;
The uninstaller is generated on installation and therefore isn't signed. This may cause Vista to complain under some circumstances but shouldn't affect the uninstaller's functioning. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[installation troubleshooting]] for a list of common problems that can occur during installation and how to correct or work around them.&lt;br /&gt;
&lt;br /&gt;
Note that there is currently an issue with installing the toolset for games that have been installed via Steam. See [[Installation with Steam]] for specific instructions on how to resolve this issue.&lt;br /&gt;
&lt;br /&gt;
If you experience a crash logs can be found in &amp;lt;code&amp;gt;My Documents\BioWare\Dragon Age\Toolset\logs&amp;lt;/code&amp;gt;. The log filenames will include the date on which the log file was created. Sending in a log will help greatly with bug fixing.&lt;br /&gt;
&lt;br /&gt;
== Firewall issues ==&lt;br /&gt;
&lt;br /&gt;
In its current pre-release state, the toolset requires constant internet access in order to deliver telemetry. If you use a router or firewall you will need to ensure that the toolset can connect properly with the outside world. If the internet connection is lost the toolset will pop up the authentication window again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
Documentation is currently provided via the wiki at:&lt;br /&gt;
&lt;br /&gt;
http://social.bioware.com/wiki/datoolset/&lt;br /&gt;
&lt;br /&gt;
[[Category:Toolset installation]]&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7456</id>
		<title>Talk:Demo module</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7456"/>
				<updated>2009-11-07T03:00:02Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I was able to get the demo to work, however I can't seem to find the &amp;quot;Generate FaceFX&amp;quot; menu option.  I am using the initial toolset release from today.--[[User:ViresDroid|ViresDroid]] 23:52, 6 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I've added links to screenshots of the menus to make them easier to find. The screenshots are of an older version, ignore the &amp;quot;to network&amp;quot; options (they were used internally and were removed for the end user version of the toolset). [[User:BryanDerksen|BryanDerksen]] 00:47, 7 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Just wanted to stop by here to say I'm running into the same type of issue. It's as if your screenshot is from the &amp;quot;teacher's edition&amp;quot; of the toolset. Just to confirm, the version I downloaded and installed from Bioware today is v1.0.982.0. [[User:Falgoryn|Falgoryn]] 02:43, 7 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I included a screenshot of what the toolset looks like for me (missing the Generate FaceFX option): [[Media:no_generate_facefx.png|see here]] --[[User:ViresDroid|ViresDroid]] 03:00, 7 November 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7455</id>
		<title>Talk:Demo module</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7455"/>
				<updated>2009-11-07T02:59:54Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I was able to get the demo to work, however I can't seem to find the &amp;quot;Generate FaceFX&amp;quot; menu option.  I am using the initial toolset release from today.--[[User:ViresDroid|ViresDroid]] 23:52, 6 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I've added links to screenshots of the menus to make them easier to find. The screenshots are of an older version, ignore the &amp;quot;to network&amp;quot; options (they were used internally and were removed for the end user version of the toolset). [[User:BryanDerksen|BryanDerksen]] 00:47, 7 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Just wanted to stop by here to say I'm running into the same type of issue. It's as if your screenshot is from the &amp;quot;teacher's edition&amp;quot; of the toolset. Just to confirm, the version I downloaded and installed from Bioware today is v1.0.982.0. [[User:Falgoryn|Falgoryn]] 02:43, 7 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I included a screenshot of what the toolset looks like for me (missing the Generate FaceFX option): [[Media:no_generate_facefx.png|see here]]&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=File:No_generate_facefx.png&amp;diff=7454</id>
		<title>File:No generate facefx.png</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=File:No_generate_facefx.png&amp;diff=7454"/>
				<updated>2009-11-07T02:57:31Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: Just a screenshot of the editor displaying the missing Generate FaceFX menu option, which should be below Generate VO.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a screenshot of the editor displaying the missing Generate FaceFX menu option, which should be below Generate VO.&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7442</id>
		<title>Talk:Demo module</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=Talk:Demo_module&amp;diff=7442"/>
				<updated>2009-11-06T23:52:36Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: Created page with 'I was able to get the demo to work, however I can't seem to find the &amp;quot;Generate FaceFX&amp;quot; menu option.  I am using the initial toolset release from today.--~~~~'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I was able to get the demo to work, however I can't seem to find the &amp;quot;Generate FaceFX&amp;quot; menu option.  I am using the initial toolset release from today.--[[User:ViresDroid|ViresDroid]] 23:52, 6 November 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	<entry>
		<id>https://www.datoolset.net/mw/index.php?title=GFF&amp;diff=7138</id>
		<title>GFF</title>
		<link rel="alternate" type="text/html" href="https://www.datoolset.net/mw/index.php?title=GFF&amp;diff=7138"/>
				<updated>2009-10-26T17:38:53Z</updated>
		
		<summary type="html">&lt;p&gt;ViresDroid: changed the space inside of the &amp;quot;PC  &amp;quot; platform quotes to nbsp; so it displays as two spaces instead of one (wikimedia collapes multiple spaces to one)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Binary Generic File Format (GFF) is intended to be used for almost every file type in a game so it must support as many data types as are needed.&lt;br /&gt;
&lt;br /&gt;
== General overview ==&lt;br /&gt;
&lt;br /&gt;
In a GFF, data is grouped into structs, with the file level being the top level struct. Each struct can have any number of fields of any type including structs and variable size lists of any type.&lt;br /&gt;
&lt;br /&gt;
== Differences between GFF V4.0 and GFF V3.2 ==&lt;br /&gt;
&lt;br /&gt;
For those familiar with GFF V3.2, here is a short list of differences between V3.2 and the new version&lt;br /&gt;
&lt;br /&gt;
* 4-byte numerical labels instead of 16 byte strings for faster access&lt;br /&gt;
* Supports lists of any type for convenience (instead of only structs)&lt;br /&gt;
* All struct data is stored in the data block (rather than fields) to allow for faster loads. Fields provide a mapping of where the data is stored.&lt;br /&gt;
* Supports references to mimic pointers to allow complex data structures&lt;br /&gt;
* A few fields were added to the Header&lt;br /&gt;
** File Version records the version of the file type using the GFF&lt;br /&gt;
** Target Platform records the intended platform for the resource&lt;br /&gt;
* In general, the format has been simplified and unnecessary sections were removed (label array, field indices array and list indices array)&lt;br /&gt;
&lt;br /&gt;
Overall, the new format should result in smaller files with faster access times.&lt;br /&gt;
&lt;br /&gt;
== File Format Conceptual Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Field Data Types ===&lt;br /&gt;
There will be a starting list of supported types and new types can be added as needed. The file format can support as many as 65,535 different basic types.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Type || Type ID&lt;br /&gt;
|-&lt;br /&gt;
| UINT8 || 0 &lt;br /&gt;
|-&lt;br /&gt;
| INT8  || 1 &lt;br /&gt;
|-&lt;br /&gt;
| UINT16 || 2 &lt;br /&gt;
|-&lt;br /&gt;
| INT16  ||  3 &lt;br /&gt;
|-&lt;br /&gt;
| UINT32 ||  4 &lt;br /&gt;
|-&lt;br /&gt;
| INT32 || 5 &lt;br /&gt;
|-&lt;br /&gt;
| UINT64 || 6 &lt;br /&gt;
|-&lt;br /&gt;
| INT64  || 7 &lt;br /&gt;
|-&lt;br /&gt;
| FLOAT32 || 8 &lt;br /&gt;
|-&lt;br /&gt;
| FLOAT64 || 9 &lt;br /&gt;
|-&lt;br /&gt;
| Vector3f || 10 &lt;br /&gt;
|-&lt;br /&gt;
| Vector4f || 12 &lt;br /&gt;
|-&lt;br /&gt;
| Quaternionf || 13 &lt;br /&gt;
|-&lt;br /&gt;
| ECString || 14 &lt;br /&gt;
|-&lt;br /&gt;
| Color4f  || 15 &lt;br /&gt;
|-&lt;br /&gt;
| Matrix4x4f || 16 &lt;br /&gt;
|-&lt;br /&gt;
| TlkString  || 17 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- see GFFReader.h for details --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Strings are stored as list of WCHARs.&lt;br /&gt;
&lt;br /&gt;
There's also a &amp;quot;Generic&amp;quot; type that's only usable in references, with type ID 0x0000FFFF&lt;br /&gt;
&lt;br /&gt;
=== Field Labels ===&lt;br /&gt;
&lt;br /&gt;
The Binary GFF uses 4-byte IDs to label each field. Within each struct, each field must have a unique ID. These IDs could be string hashes or numerical IDs. The only requirement is that the reader and writer of these files agree on the IDs.&lt;br /&gt;
&lt;br /&gt;
== File Format Physical Layout ==&lt;br /&gt;
=== Platform dependence ===&lt;br /&gt;
&lt;br /&gt;
The endianness of the data is that of the target platform. For example, data files for intel processors should be little endian whereas data for power pcs should be big endian.&lt;br /&gt;
&lt;br /&gt;
There may be other differences in the files generated for different platforms in order to achieve proper alignment or the desired in memory layout of the data.&lt;br /&gt;
&lt;br /&gt;
=== Overall File Layout ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;25%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Header&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct Array&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Field Array&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Raw Data Block&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Header ====&lt;br /&gt;
The header is located at the start of the file and contains the following values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;90%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Value&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Description&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;GFFMagicNumber&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;All GFF files will start with the hexadecimal value 0x47464620, which is the ASCII value for “GFF “.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;GFFVersion&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4 bytes representing the version of the underlying GFF format. This should be “V4.0” or 0x56342E30 for all files using this format.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TargetPlatform&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte field indicating the intended target platform for this file.&lt;br /&gt;
*“PS3 “ or 0x50533320 for the Playstation 3&lt;br /&gt;
*“X360” or 0x58333630 for the XBOX 360&lt;br /&gt;
*“PC&amp;amp;nbsp;&amp;amp;nbsp;“ or 0x50432020 for the PC&lt;br /&gt;
There will most likely be more specialized targets for the PC in the future.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FileType&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte field used to identify this file type. By convention it should be the three letter file extension followed by a space.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FileVersion&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte version of the FileType. By convention it should be “Vx.x” or “xx.x” where X is a digit.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;StructCount&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte unsigned number of elements in the Struct Array.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Data Offset&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte unsigned offset from the beginning of the file to the Raw Data Block.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first five fields are always in big endian and never byteswapped. This keeps those fields human readable on any machine.&lt;br /&gt;
&lt;br /&gt;
==== Struct Array ====&lt;br /&gt;
&lt;br /&gt;
A struct is a grouping of data. A struct definition describes which data is in a struct. Many instances of a struct type may occur in a single file but there will only be one definition for each struct type. &lt;br /&gt;
&lt;br /&gt;
The Struct Array starts immediately after the header. The first element in the Struct Array is the Top-Level Struct for the GFF file and it describes what the file looks like at the top level. Since the Top-Level Struct is always present, every GFF file contains at least one element in the struct array.&lt;br /&gt;
&lt;br /&gt;
The Struct Array looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;35%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 0 (Top-Level Struct)*&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 2&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;...&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct N-1**&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;Struct 0 is always present&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;N = Header.StructCount&lt;br /&gt;
&lt;br /&gt;
The GFF Struct contains the values listed in the table below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;35%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Value&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Description&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;StructType&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte programmer defined ID&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FieldCount&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte number of fields in the struct&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FieldOffset&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte unsigned offset from the beginning of the file to the first field in the struct&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;StructSize&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte unsigned size of the chunk of data representing the struct&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the fields for a struct are contiguous so knowing the address of the first one and the number of fields is enough information to access any element in the struct.&lt;br /&gt;
&lt;br /&gt;
==== Field Array ====&lt;br /&gt;
&lt;br /&gt;
The Field Array starts immediately after the Struct Array. Each field entry describes a piece of data contained in a struct. Each struct’s fields must be contiguous in the array and appear in increasing order of their labels. The fields for the Top Level Struct appear first in the array.&lt;br /&gt;
&lt;br /&gt;
The Field Array looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;35%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 0 field 0&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 0 field 1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 0 …&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct 0 field Struct.FieldCount &amp;amp;mdash;  1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct x field 0&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct x field 1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct x …&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct x field Struct.FieldCount &amp;amp;mdash;  1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;…&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each field looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;75%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Value&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Description&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Label&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte label used to look up the field&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FieldType&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte describing the type of the field (see below for explanation)&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Index&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;4-byte unsigned offset to the location of the data&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The label is just a 4-byte value used to find the correct field. They could be string hashes or some other numerical ID.&lt;br /&gt;
&lt;br /&gt;
The index field stores the location of the data as an offset from the beginning of the struct in the data block. This can result in padding within the structs which can be garbage data for all we care (although by convention we usually start with 0xFF).  In particular this happens when trying to maintain alignment for data types such as 16 byte alignment for vectors, etc.&lt;br /&gt;
&lt;br /&gt;
The type is broken up into two 2-byte values that describe the type of the field. &lt;br /&gt;
&lt;br /&gt;
The type looks like this:&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;50%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Value&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Description&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Flags&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;2-bytes of bit flags&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TypeID&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;A 2-byte unsigned number indicating the type &amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following flags are currently defined starting from the most significant bits. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;90%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Bit&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt; &amp;lt;STRONG&amp;gt;Flag Description&amp;lt;/STRONG&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;1&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;List Flag. If this flag is set then this type is a list of the described type.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;2&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Struct flag. If this flag is set then this type is a struct.&lt;br /&gt;
If the struct flag is not set then the BaseType indicates the type of the field by the integer id of that type. If the struct flag is set then the BaseType indicates the index of this struct’s description in the Struct Array.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;3&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Reference flag&lt;br /&gt;
If the reference flag is set then the data stored in the data block is actually an offset from the beginning of the data block to the location of the actual data. References can be used to mimic pointers in a GFF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Raw Data Block ====&lt;br /&gt;
&lt;br /&gt;
The data block is where the actual data is stored. The data for the top level struct is stored at the beginning of the block. All other data will be fields in the struct or accessed by reference.&lt;br /&gt;
&lt;br /&gt;
=== Lists ===&lt;br /&gt;
&lt;br /&gt;
The address pointed to by a list is actually a reference to another location in the file which stores the list. The first thing in the list is a 4-byte unsigned length of the list followed by the elements.&lt;br /&gt;
&lt;br /&gt;
This is what the list looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE cellSpacing=2 cellPadding=2 width=&amp;quot;20%&amp;quot; border=1&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Length&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Element 0&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Element 1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;...&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Element Length - 1&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt; &lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Empty lists can just store a null reference to prevent creating another block. &lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
A reference is a 4-byte unsigned offset from the beginning of the data block to the location of the data.&lt;br /&gt;
&lt;br /&gt;
Null references are stored as 0xFFFFFFFF. &lt;br /&gt;
&lt;br /&gt;
== Improvements and optimizations ==&lt;br /&gt;
&lt;br /&gt;
=== Field look-up ===&lt;br /&gt;
&lt;br /&gt;
Field look-up is faster in this version of the GFF because it requires an integer comparison instead of a string comparison. Additionally, storing fields in order allows efficient search for the specific field. Finally, knowing what the data structure should look like allows the program to make a good guess as to where the data should be. If the guess is wrong (because the file is an older version) then the program only has to start searching at the initial guess, which is still a faster search than without a good guess.&lt;br /&gt;
&lt;br /&gt;
=== Binding tables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to build a binding table for a type of file that will be read in often. The binding table will allow data to be loaded from the GFF without parsing through the file each time.&lt;br /&gt;
&lt;br /&gt;
=== Direct loads to memory ===&lt;br /&gt;
&lt;br /&gt;
Using this format it is possible to optimize specific file types by writing the GFF in exactly the way it will be written in memory. After verifying that the file type is up to date, the game can read the data block into memory and cast the pointer it directly to the in C data type. This optimization would not result in any loss of generality since the GFF will still be accessible in the usual way.&lt;br /&gt;
&lt;br /&gt;
[[Category:File types]]&lt;/div&gt;</summary>
		<author><name>ViresDroid</name></author>	</entry>

	</feed>