Class TwoDA
2da file
Constructors
Name | Description |
this
(filepath)
|
Read a 2da file
|
this
(rawData, name)
|
Parse raw data
|
Fields
Name | Type | Description |
fileName
|
string | Optional 2DA file name set during construction
|
Properties
Name | Type | Description |
columns [get]
|
ulong | Number of named columns in the 2da (i.e. without the index column)
|
fileType [get, set]
|
string | File type (should always be "2DA")
Max width: 4 chars
|
fileVersion [get, set]
|
string | File version (should always be "V2.0")
Max width: 4 chars
|
rows [get]
|
ulong | Number of rows in the 2da
|
rows [set]
|
ulong | Resize the 2da table
|
Methods
Name | Description |
columnIndex
(colName)
|
Get the index of a column by its name, for faster access
|
extractRowData
(line)
|
Parse a 2DA row
|
get
(colIndex, line)
|
Get a value in the 2da, converted to T.
|
get
(colName, line, defaultValue)
|
Get a value in the 2da, converted to T.
|
get
(colName, line)
|
ditto
|
opBinaryRight
(colName)
|
Check if a column exists in the 2da, and returns a pointer to its index
|
opIndex
(column, row)
|
Get a specific cell value
|
opIndex
(i)
|
|
opIndexAssign
(value, i)
|
|
recover
(filepath)
|
Recover a damaged 2DA file
|
serialize
()
|
Outputs 2da text content
|