1GFF2XML(1)                BSD General Commands Manual               GFF2XML(1)
2

NAME

4     gff2xml — BioWare GFF to XML converter
5

SYNOPSIS

7     gff2xml [options] input_file [output_file]
8

DESCRIPTION

10     gff2xml converts BioWare's GFF files (versions V3.2/V3.3 and V4.0/V4.1)
11     into human-readable XML.  GFF are hierarchical data files, similar to XML
12     in concept, but stored in binary.  As such, these files are used as a
13     basis for many of the file formats found in the BioWare games.  For exam‐
14     ple, an UTC file is a GFF holding a template for a creature, while a GUI
15     file is a GFF describing an in-game menu.
16
17     Both version 3 of the format (V3.2/V3.3) and version 4 (V4.0/V4.1) are
18     supported.  While they are similar, the 4th version carries several
19     changes to make the files more efficient to read in-game.  This includes
20     replacing the string field names (which map to XML tags) with numerical
21     identifiers, resulting in converted XML files that are stripped of their
22     meaning.  To compensate, this tool adds readable aliases to many of these
23     numerical identifiers, giving them back their meaning.  Unfortunately,
24     not all of them are known.  Most notably, the identifiers introduced in
25     Sonic Chronicles: The Dark Brotherhood and Dragon Age 2 are still miss‐
26     ing.
27
28     The changes in the minor versions (V3.2 vs. V3.3 and V4.0 vs.  V4.1) are
29     less significant.  V3.3 simply changes which languages are supported, and
30     V4.1 adds a common string table at the start of the file.  Both of these
31     additions are handled transparently.
32
33     LocStrings found in GFF V3.2 and V3.3 contain localized string data,
34     which, depending on the game and the language, can be encoded in various
35     ways.  There is no way to autodetect the specific encoding.  gff2xml
36     employs a simple heuristic to combat this, but it may fail for certain
37     strings and files.  However, there are options to explicitly specify the
38     game this GFF file is from.  gff2xml will then use the correct game-spe‐
39     cific encoding tables.
40
41     Unfortunately, even these tables might not be completely correct in all
42     cases.  Neverwinter Nights, for example, treated many strings as being
43     encoded in the native encoding used for the language of the game instal‐
44     lation.  This lead to many people putting non-English strings into fields
45     tagged as language ID 0, nominally reserved for English.  To read these
46     files correctly, gff2xml provides an --encoding parameter to override the
47     encoding used for a specific language ID.
48

OPTIONS

50     -h
51     --help
52           Show a help text and exit.
53     --version
54           Show version information and exit.
55     --cp1252
56           Read GFF4 strings as Windows CP-1252.  Usually, strings in version
57           4 of the GFF format are encoded in little-endian UTF-16.  But some
58           files store them as Windows CP-1252 instead.  Since there's no
59           clean way to autodetect the different encoding, this switch manu‐
60           ally selects Windows CP-1252.  This option only concerns strings
61           embedded in GFF4 files, not GFF3 LocStrings.
62     --nwnpremium
63           The GFF files found in the encrypted HAK files of Neverwinter
64           Nights premium modules are deliberately broken.  This options tells
65           gff2xml to work around the brokenness.
66     --nwn
67           Read LocStrings in an encoding appropriate for Neverwinter Nights.
68     --nwn2
69           Read LocStrings in an encoding appropriate for Neverwinter Nights
70           2.
71     --kotor
72           Read LocStrings in an encoding appropriate for Knights of the Old
73           Republic.
74     --kotor2
75           Read LocStrings in an encoding appropriate for Knights of the Old
76           Republic II.
77     --jade
78           Read LocStrings in an encoding appropriate for Jade Empire.
79     --witcher
80           Read LocStrings in an encoding appropriate for The Witcher.
81     --dragonage
82           Read LocStrings in an encoding appropriate for Dragon Age: Origins.
83     --dragonage2
84           Read LocStrings in an encoding appropriate for Dragon Age II.
85     --encoding str
86           Override an encoding.  The string has to be of the form n=encoding,
87           for example 0=cp-1252 to override the encoding of the (ungendered)
88           language ID 0 to be Windows codepage 1252.  To override several
89           encodings, specify the --encoding parameter multiple times.
90     input_file
91           The GFF file to convert.
92     [output_file]
93           The XML file will be written there.  If no output file is speci‐
94           fied, the XML data is written to stdout.  The encoding of the XML
95           stream is always UTF-8.
96

EXAMPLES

98     Convert the GFF file1.utc into an XML file:
99
100           $ gff2xml file1.utc file2.xml
101
102     Convert the GFF file1.utc into an XML file on stdout:
103
104           $ gff2xml file1.utc
105
106     Convert the GFF file1.utc, which uses Windows CP-1252 strings:
107
108           $ gff2xml --cp1252 file1.utc file2.xml
109
110     Convert the GFF file1.utc, which encodes language ID 0 in LocStrings as
111     Windows CP-1250:
112           $ gff2xml --encoding 0=cp1250 file1.utc file2.xml
113

SEE ALSO

115     convert2da(1), fixpremiumgff(1), tlk2xml(1), ssf2xml(1)
116
117     More information about the xoreos project can be found on its website:
118     https://xoreos.org/.
119

AUTHORS

121     This program is part of the xoreos-tools package, which in turn is part
122     of the xoreos project, and was written by the xoreos team.  Please see
123     the AUTHORS file for details.
124
125BSD                            September 1, 2016                           BSD
Impressum