Note: Always place CSV data for databases outside the project directory.
Godot’s system automatically loads CSV files inside the project as translation data, which can prevent proper import.
Target Databases
- User Database
- Type Preset Database
CSV Data Format for the User Database
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 |
First Row of the CSV Data
The first row of the CSV file must contain the header information.
Each header should follow the format below:
record_name
- This is the fixed name used as the record name header.
numeric//column_name
- Indicates a numeric data column.
column_name
should be a custom column name using only alphanumeric characters.
string//column_name
- Indicates a string data column.
column_name
should be a custom column name using only alphanumeric characters.
image//column_name
- Indicates a column for image path data.
column_name
should be a custom column name using only alphanumeric characters.
typepreset/attribute_type/column_name
- Indicates a reference to a type preset.
attribute_type
can be one of the two fixed names or a custom user-defined name:
- For attribute type preset:
attribute_type
- For equipment type preset:
equipment_type
- For user-defined types: specify a name using only alphanumeric characters
column_name
should be a custom column name using only alphanumeric characters.
vector2//column_name
- Indicates a Vector2 type data column.
column_name
should be a custom column name using only alphanumeric characters.
From the Second Row Onward
From the second row onward, each row represents actual data.
Make sure the values align with the header definitions.
Header |
Data Format |
record_name |
Any record name using only alphanumeric characters |
numeric |
Numeric values only (-2147483648 to 2147483647 ) |
string |
Any string |
image |
A string starting with res:// |
typepreset |
A string registered in the type preset database ※1 |
vector2 |
Numbers joined by _ (e.g., for x=128, y=256 use 128_256 ) |
※1
If the value does not exist in the type preset database,
a new entry will be added to the relevant type preset database.
CSV Data Format for Type Preset Database
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 |
Any custom header name (alphanumeric only) |
|
Data |
Sequential number starting from 1 |
type_name |