2DA (or "2-Dimensional Array") files contain a two-dimensional array of data. It used to represent many forms of tabular data, for instance the 2nd edition D&D rules. Other data, including the experience cap, is stored this format of file, as well.
2DA files are text files. If the first two bytes are 0xff, the file is encrypted. Otherwise, the entire file is plaintext. All fields in the file are whitespace separated. As a result, the fields cannot contain spaces. The first row has the signature, "2DA V1.0", which may be preceded by whitespace. The second row has the "default value". The next row has column-headings. Following rows consist of first a row heading, then the row data. There cannot be more row data in any row than there are column headings, but if there are fewer, the values which are not filled in are assumed to have the default value from the second line of the file. A sample file appears below.
2DA V1.0
1234
NAME VALUE WEIGHT
A alpha
B
C beta 2345 123
In the above example, row A has the values { alpha, 1234, 1234 }. Row B has the values { 1234, 1234, 1234 }. Row C has the values
{ beta, 2345, 123 }. The only important thing to remember is that alignment counts for nothing. The only thing that counts for anything is the
ordinal index of the field within the line.
Note that some of these files are encrypted, as are some of the IDS files. (The encryption appears to only occur in BG, and not in PS: Torment. Anyway, to read about the technical details of the encryption, go to the encryption page.)
[ back to index ]