G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
DataTable Namespace Reference

Functions

DataTable
const UScriptStruct GetDataTableRowStruct (const UDataTable Table)
 Get the row struct used by the given Data Table, if any.
void EvaluateCurveTableRow (UCurveTable CurveTable, FName RowName, float32 InXY, EEvaluateCurveTableResult &OutResult, float32 &OutXY, FString ContextString)
bool DoesDataTableRowExist (const UDataTable Table, FName RowName)
 Returns whether or not Table contains a row named RowName.
void GetDataTableColumnNames (const UDataTable Table, TArray< FName > &OutColumnNames)
 Get the name of each column in this Data Table. Note: These are always the raw property names (See: GetDataTableColumnAsString) rather than the friendly export name that would be used in a CSV/JSON export (See: GetDataTableColumnNameFromExportName).
void GetDataTableColumnExportNames (const UDataTable Table, TArray< FString > &OutExportColumnNames)
 Get the friendly export name of each column in this Data Table. See: GetDataTableColumnNameFromExportName.
TArray< FString > GetDataTableColumnAsString (const UDataTable DataTable, FName PropertyName)
 Export from the DataTable all the row for one column. Export it as string. The row name is not included. See: GetDataTableColumnNames. See: GetDataTableColumnNameFromExportName.
void GetDataTableRowNames (const UDataTable Table, TArray< FName > &OutRowNames)
bool GetDataTableColumnNameFromExportName (const UDataTable Table, FString ColumnExportName, FName &OutColumnName)
 Get the raw property name of a data table column from its friendly export name.
Editor Scripting | DataTable
bool FillDataTableFromCSVFile (UDataTable DataTable, FString CSVFilePath, UScriptStruct ImportRowStruct=nullptr)
 Empty and fill a Data Table from CSV file.
bool ExportDataTableToJSONFile (const UDataTable DataTable, FString JSONFilePath)
 Export a Data Table to JSON file.
bool ExportDataTableToCSVString (const UDataTable DataTable, FString &OutCSVString)
 Export a Data Table to CSV string.
bool FillDataTableFromJSONString (UDataTable DataTable, FString JSONString, UScriptStruct ImportRowStruct=nullptr)
 Empty and fill a Data Table from JSON string.
bool ExportDataTableToJSONString (const UDataTable DataTable, FString &OutJSONString)
 Export a Data Table to JSON string.
bool ExportDataTableToCSVFile (const UDataTable DataTable, FString CSVFilePath)
 Export a Data Table to CSV file.
bool FillDataTableFromCSVString (UDataTable DataTable, FString CSVString, UScriptStruct ImportRowStruct=nullptr)
 Empty and fill a Data Table from CSV string.
bool FillDataTableFromJSONFile (UDataTable DataTable, FString JSONFilePath, UScriptStruct ImportRowStruct=nullptr)
 Empty and fill a Data Table from JSON file.

Function Documentation

◆ DoesDataTableRowExist()

bool DoesDataTableRowExist ( const UDataTable Table,
FName RowName )

Returns whether or not Table contains a row named RowName.

◆ EvaluateCurveTableRow()

void EvaluateCurveTableRow ( UCurveTable CurveTable,
FName RowName,
float32 InXY,
EEvaluateCurveTableResult & OutResult,
float32 & OutXY,
FString ContextString )

◆ ExportDataTableToCSVFile()

bool ExportDataTableToCSVFile ( const UDataTable DataTable,
FString CSVFilePath )

Export a Data Table to CSV file.

Parameters
CSVFilePathThe file path of the CSV file to write (output file is UTF-8).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ ExportDataTableToCSVString()

bool ExportDataTableToCSVString ( const UDataTable DataTable,
FString & OutCSVString )

Export a Data Table to CSV string.

Parameters
OutCSVStringOutput representing the contents of a CSV file.
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ ExportDataTableToJSONFile()

bool ExportDataTableToJSONFile ( const UDataTable DataTable,
FString JSONFilePath )

Export a Data Table to JSON file.

Parameters
JSONFilePathThe file path of the JSON file to write (output file is UTF-8).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ ExportDataTableToJSONString()

bool ExportDataTableToJSONString ( const UDataTable DataTable,
FString & OutJSONString )

Export a Data Table to JSON string.

Parameters
OutJSONStringOutput representing the contents of a JSON file.
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ FillDataTableFromCSVFile()

bool FillDataTableFromCSVFile ( UDataTable DataTable,
FString CSVFilePath,
UScriptStruct ImportRowStruct = nullptr )

Empty and fill a Data Table from CSV file.

Parameters
CSVFilePathThe file path of the CSV file.
ImportRowStructOptional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ FillDataTableFromCSVString()

bool FillDataTableFromCSVString ( UDataTable DataTable,
FString CSVString,
UScriptStruct ImportRowStruct = nullptr )

Empty and fill a Data Table from CSV string.

Parameters
CSVStringThe Data that representing the contents of a CSV file.
ImportRowStructOptional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ FillDataTableFromJSONFile()

bool FillDataTableFromJSONFile ( UDataTable DataTable,
FString JSONFilePath,
UScriptStruct ImportRowStruct = nullptr )

Empty and fill a Data Table from JSON file.

Parameters
JSONFilePathThe file path of the JSON file.
ImportRowStructOptional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ FillDataTableFromJSONString()

bool FillDataTableFromJSONString ( UDataTable DataTable,
FString JSONString,
UScriptStruct ImportRowStruct = nullptr )

Empty and fill a Data Table from JSON string.

Parameters
JSONStringThe Data that representing the contents of a JSON file.
ImportRowStructOptional row struct to apply on import. If set will also force the import to run automated (no questions or dialogs).
Returns
True if the operation succeeds, check the log for errors if it didn't succeed.

◆ GetDataTableColumnAsString()

TArray< FString > GetDataTableColumnAsString ( const UDataTable DataTable,
FName PropertyName )

Export from the DataTable all the row for one column. Export it as string. The row name is not included. See: GetDataTableColumnNames. See: GetDataTableColumnNameFromExportName.

◆ GetDataTableColumnExportNames()

void GetDataTableColumnExportNames ( const UDataTable Table,
TArray< FString > & OutExportColumnNames )

Get the friendly export name of each column in this Data Table. See: GetDataTableColumnNameFromExportName.

◆ GetDataTableColumnNameFromExportName()

bool GetDataTableColumnNameFromExportName ( const UDataTable Table,
FString ColumnExportName,
FName & OutColumnName )

Get the raw property name of a data table column from its friendly export name.

Returns
True if a column was found for the friendly name, false otherwise.

◆ GetDataTableColumnNames()

void GetDataTableColumnNames ( const UDataTable Table,
TArray< FName > & OutColumnNames )

Get the name of each column in this Data Table. Note: These are always the raw property names (See: GetDataTableColumnAsString) rather than the friendly export name that would be used in a CSV/JSON export (See: GetDataTableColumnNameFromExportName).

◆ GetDataTableRowNames()

void GetDataTableRowNames ( const UDataTable Table,
TArray< FName > & OutRowNames )

◆ GetDataTableRowStruct()

const UScriptStruct GetDataTableRowStruct ( const UDataTable Table)

Get the row struct used by the given Data Table, if any.