Thanks in advance.
Modifié par NorthWolf, 28 décembre 2010 - 09:32 .
Modifié par NorthWolf, 28 décembre 2010 - 09:32 .
Lines 4 to infinity - row data
All lines after and including line 4 are data rows.
Each column in a row is separated from the other columns by one or more space characters. When
viewing the contents of a 2da using a fixed-width font, the columns in each row do not have to visually
line up with the columns in the other rows, but for ease of reading, it is best to line them up anyway.
The very first column in a row is the row's index. The first data row (line 4) has an index of 0, the
second data row (line 5) has an index of 1, and so on.
Every row must contain the exact same number of columns are there are column names given in line 3,
plus one (since the index column has no name).
If the data for a column is a string that contains spaces, then the data for that column should begin with
a quotation mark and end with a quotation mark. Otherwise, the text after the space will be considered
to belong to the next column. Because of how quotation marks are handled, a string entry in a 2da can
never contain actually quotation marks itself.
4. Maintenance
After a 2da file has been created and support for it has been added to the game and/or tools, it will often
be necessary to make changes to the 2da. The following rules govern how to safely make changes.
Columns
Applications may reference a column by position (column 0, column 1, etc.) or by name. To avoid
breaking code that depends on column position, the following rules apply:
BioWare Corp.
http://www.bioware.com
· Always add new columns after the very last column.
· Never insert a new column inbetween two existing ones or as the first one.
· Never delete a column from a 2da.
· Never rename a column.
· When adding a column, make sure that all rows include entries for the new column.
Rows
Many game object properties are integer values that serve as indices into particular 2da files.
Consequently, care must be taken when changing 2da row data to ensure that a minimum amount of
existing data is affected by the change.
Always add rows to the very end of the file.
Never insert a row inbetween two other existing rows.
Never delete a row. If it is necessary to remove the data in a row, fill the row with **** entries instead.
Try to ensure that no existing data, in a 2da or otherwise, references the starred-out row.
Modifié par Lightfoot8, 28 décembre 2010 - 09:58 .
Programmer label.
Depending on the row within itemprops.2da, there may be
multiple additional columns after the Label column, with
no heading. This is a violation of the 2da formatting
convention where all rows have the same number of
columns and all columns have a header.
However, this violation of the rules does not matter,
because in this case, the Label column is known to always
be the last column, with no meaningful columns after it.
This is the only 2da where, if you wish to add columns,
you should insert them, not append them to the end. The
insertion should be immediately before the Label column.