Fields Definition
Overview
Details of the fields hash in YAML.
Example
fields:
- key: Id
name: id
type: Int
- key: Name
name: name
type: String
- key: Hp
name: hp
type: Int
- key: Attack
name: attack
type: Int
- key: Defense
name: defense
type: Int
- key: Magic
name: magic
type: Int
- key: GrowthPatternId
name: growth_pattern_id
type: Int
validate:
key_exist:
yaml: unit/UnitGrowth.yaml
key: GrowthPatternId
ignores:
- value: 0
Details
key
- key: Id
- Definition: Required
Specify the key name.
Used as the variable name after output.
When referencing between YAML files, use this key name.
name
- key: Id
name: id
- Definition: Required
Specify the Excel column name.
type
- key: Id
name: id
type: Int
- Definition: Required
Specify from the following.
| Type | Description |
|---|---|
| Bool | Boolean (1/true/yes → true, 0/false/no → false) |
| Byte | 8-bit unsigned integer |
| Short | 16-bit signed integer |
| UShort | 16-bit unsigned integer |
| Int | 32-bit signed integer |
| UInt | 32-bit unsigned integer |
| Long | 64-bit signed integer |
| ULong | 64-bit unsigned integer |
| Float | 32-bit floating-point |
| Double | 64-bit floating-point |
| String | String |
| Enum | Enum (enum tag required) |
| DateTime | Date/time |
| Foreignkey | Foreign-key reference type (relation tag required) |
enum
- key: To
name: to
type: Enum
enum: GenderType
- Definition: Conditional (required when type is Enum)
Specify the enum name. Specify header.name of the YAML whose header.source_type is Enum.
enum_value
- key: To
name: to
type: Enum
enum: GenderType
enum_value: Value
- Definition: Optional
Specify the key for the value assigned to the enum. If not specified, values start from 0.
enum_comment
- key: To
name: to
type: Enum
enum: GenderType
enum_value: Value
enum_comment: From
- Definition: Optional
Specify the key for the comment assigned to the enum.
default
- key: Id
name: id
type: Int
default: 0
- Definition: Optional
Default value to use when the cell is empty.
string_format
- key: AttackRate
name: attack_rate
type: Float
string_format: "F2"
- Definition: Optional
Use this when you want to specify a numeric format for PHP output values or for constant values in C# / UE5 ConstSource output.
The format is specified using a C# numeric format string.
In the example above, the float is output up to the second decimal place.
comment
- key: Id
name: id
type: Int
comment: "Unique ID"
- Definition: Optional
Specify a comment that will be output into source code such as C#.
manual_comment
- key: Id
name: id
type: Int
manual_comment: "Unique ID"
- Definition: Optional
Specify a comment that will be shown in manual output.
encryption
- key: Hp
name: hp
type: Int
encryption: True
- Definition: Optional
- Default: False
Obfuscation for memory-tampering protection.
Set this to True to enable obfuscation.
Supported types are:
- Byte
- Short
- UShort
- Int
- UInt
- Long
- ULong
- Float
- Double
- String
obsolete
- key: Magic
name: magic
type: Int
obsolete: True
- Definition: Optional
- Default: False
Marks the generated C# / UE5 accessor as obsolete.
localize
- key: Name
name: name
type: String
localize: True
- Definition: Optional
- Default: False
Specify whether this is a localized string.
If set to True, the field is managed in the translation CSV specified by localization.input.path in Settings.
Can only be applied to String type fields.
Requires localization.id_key to be defined in the header.
manual_only
- key: InternalNote
name: internal_note
type: String
manual_only: True
- Definition: Optional
- Default: False
Set to True when you want to output only the manual and not the data.
relation
- key: GrowthPatternId
name: growth_pattern_id
type: Foreignkey
relation:
yaml: unit/UnitGrowth.yaml
from: GrowthPatternId
to: GrowthPatternId
- Definition: Conditional (required when type is Foreignkey)
Data reference feature (equivalent to Excel VLOOKUP).
| Tag | Required | Description |
|---|---|---|
| yaml | ○ | Specify the referenced YAML |
| from | ○ | Specify the lookup key in the referenced YAML |
| to | ○ | Specify the destination key for conversion |
validate
- key: GrowthPatternId
name: growth_pattern_id
type: Int
validate:
Validation feature
unique
- key: Id
name: id
type: Int
validate:
unique:
enable: true
ignores:
- value: 0
- value: 999
Duplicate check
| Tag | Required | Description |
|---|---|---|
| enable | ○ | Enabled when true |
| ignores | Ignore list | |
| ignores[].value | Value to ignore (required under ignores) |
key_exist
- key: GrowthPatternId
name: growth_pattern_id
type: Int
validate:
key_exist:
yaml: unit/UnitGrowth.yaml
key: GrowthPatternId
ignores:
- value: 0
Data existence check against a single YAML file.
Raise an error if it does not match any item defined in the specified YAML.
| Tag | Required | Description |
|---|---|---|
| yaml | ○ | Specify the referenced YAML |
| key | ○ | Specify the key within the YAML |
| ignores | Specify this to ignore specific values |
key_exists_yaml
- key: GrowthPatternId
name: growth_pattern_id
type: Int
validate:
key_exists_yaml:
yaml: validate/validate_unit_growth.yaml
Check whether the value of the target key exists in any of the specified YAML files. Raise an error if it is duplicated.
| Tag | Required | Description |
|---|---|---|
| yaml | ○ | Specify the path to the Multi YAML definition file |
key_exists_yaml_conditions
- key: GrowthPatternId
name: growth_pattern_id
type: Int
validate:
key_exists_yaml_conditions:
yaml: validate/validate_unit_growth_by_type.yaml
conditions_param_key: UnitType
Data existence check across multiple YAML files with parameter conditions.
Raise an error if it does not match any item defined in the YAML corresponding to the specified parameter.
| Tag | Required | Description |
|---|---|---|
| yaml | ○ | Specify the referenced YAML |
| conditions_param_key | ○ | Key of the target parameter |
enum_exists
- key: Element
name: element
type: Enum
enum: ElementType
validate:
enum_exists:
yaml: enum/element_type.yaml
key: Element
unique: true
Checks that every item of the specified enum is defined in the data, and raises an error if any are missing. Values that do not exist in the enum also raise an error.
| Tag | Required | Description |
|---|---|---|
| yaml | ○ | Specify the referenced YAML |
| key | ○ | Specify the key within the YAML |
| unique | If true, raise an error when the key value is duplicated (default is true) |
range
validate:
range:
min: 0
max: 99999
Raise an error if the value is out of range.
| Tag | Required | Description |
|---|---|---|
| min | Minimum value | |
| max | Maximum value | |
| extra_conditions | Additional conditions | |
| extra_conditions[].key | Key used for the condition check | |
| extra_conditions[].value | Value to compare against | |
| extra_conditions[].equals | Apply when equal if true, or when not equal if false |
string_length
validate:
string_length:
line_length: 30
line_value: 1
Raise an error if the string length exceeds the specified value.
| Tag | Required | Description |
|---|---|---|
| line_length | ○ | Maximum number of characters per line |
| line_value | ○ | Maximum number of lines |