CSV Data Specification for Database Import
Note: Database CSV data must always be placed outside the project directory. In the Godot system, CSV data within the directory is automatically loaded as translation data, which will prevent successful import.
Target Databases
- User Database
- Type Preset Database
User Database CSV Data Format
| Header |
record_name |
numeric//column_name |
string//column_name |
image//column_name |
typepreset/attribute_type/column_name |
vector2//column_name |
| Data |
record1 |
123 |
hogehoge |
res://xxxxx.png/ |
Fire Attribute |
100_200 |
CSV Data Row 1
The first row of the CSV data serves as the header row.
Each header must follow the format below:
record_name
- This is the header for record names and is fixed to this name.
numeric//column_name
- This header indicates numeric data.
- Specify
column_name as an arbitrary column name (alphanumeric characters only).
string//column_name
- This header indicates string data.
- Specify
column_name as an arbitrary column name (alphanumeric characters only).
image//column_name
- This header indicates image path data.
- Specify
column_name as an arbitrary column name (alphanumeric characters only).
typepreset/attribute_type/column_name
- This header indicates reference to a type preset data.
attribute_type can be one of two fixed names or a user-defined name:
- To specify an attribute type preset:
attribute_type
- To specify an equipment type preset:
equipment_type
- To define a user-defined name, use alphanumeric characters.
- Specify
column_name as an arbitrary column name (alphanumeric characters only).
vector2//column_name
- This header indicates vector2 data.
- Specify
column_name as an arbitrary column name (alphanumeric characters only).
CSV Data from Row 2 Onwards
From the second row onwards, the CSV data contains actual data rows.
Specify data according to the headers.
| Header |
Data Format |
| record_name |
Arbitrary record name (alphanumeric characters only) |
| numeric |
Numeric characters only (-2147483648 ~ 2147483647) |
| string |
Arbitrary string |
| image |
String starting with res:// |
| typepreset |
String registered in the Type Preset Database ※1 |
| vector2 |
Numbers joined by _ (e.g., if x=128,y=256, then 128_256) |
※1
If the type preset does not exist in the Type Preset Database, it will be newly added to the corresponding Type Preset Database.
Type Preset Database CSV Data Format
For Attribute Type Presets
| Header |
attribute |
|
| Data |
Sequential number starting from 1 |
type_name |
For Equipment Type Presets
| Header |
equipment |
|
| Data |
Sequential number starting from 1 |
type_name |
For Custom Type Presets
| Header |
Arbitrary header name (alphanumeric characters only) |
|
| Data |
Sequential number starting from 1 |
type_name |