WienerWiener
  • Introduction
  • Comparison
  • Pricing
  • FAQ
  • Use Cases
  • License
  • Unity Asset vs Standalone
  • Obfuscation & Tamper Detection
  • Mismatch Detection & Debug
  • Localization
  • Versioning
  • Google Sheets Input
  • Excel
  • YAML
  • Settings
  • Data Format
  • Convert
  • ValueOnly Format
  • Startup
  • Samples
  • Converter
  • YAML Editor
  • Setting Editor
  • 日本語
  • English
  • Introduction
  • Comparison
  • Pricing
  • FAQ
  • Use Cases
  • License
  • Unity Asset vs Standalone
  • Obfuscation & Tamper Detection
  • Mismatch Detection & Debug
  • Localization
  • Versioning
  • Google Sheets Input
  • Excel
  • YAML
  • Settings
  • Data Format
  • Convert
  • ValueOnly Format
  • Startup
  • Samples
  • Converter
  • YAML Editor
  • Setting Editor
  • 日本語
  • English
  • YAML

    • Overview
    • Definition List
    • Header Definition
    • Fields Definition
    • MultiYamlAction Definition
    • ValidateKeyExistsYamlConditions
    • ValidateKeyExistsYaml
    • ValidateUnique
    • EnumConstJoin

Header Definition

Overview

Details of the header hash in YAML.

Example

header:
  input_path:
  - path: Unit/Unit.xlsx
  sheet: Unit
  row: 5
  base_type: Normal
  source_type: Normal
  container_type: WienerDictionary
  output_path: Unit
  name: Unit

Details

input_path

  input_path:
  - path: Unit/Unit.xlsx
  • Definition: Conditional (required except for multi_yaml_action)

Specify a list of table inputs. Even when there is only one input, always write it as a list.

Supported input sources:

  • .xlsx / .xlsm: local Excel input. The path is relative to input_search_path.
  • https://docs.google.com/spreadsheets/d/{spreadsheetId}/...: Google Sheets input.

Wildcard paths such as gacha/*.xlsm are allowed only for local Excel input. Wildcards in Google Sheets URLs are invalid.

For Google Sheets, the gid in the URL is ignored. Wiener always uses header.sheet as the sheet name.

Google Sheets input is supported by both the Standalone version and the Unity Asset version.

# local Excel
header:
  input_path:
  - path: Unit/Unit.xlsx
  sheet: Unit
  row: 5

# multiple local Excel files
header:
  input_path:
  - path: Unit/UnitCommon.xlsx
  - path: Unit/UnitRare.xlsx
  sheet: Unit
  row: 5

# local Excel wildcard
header:
  input_path:
  - path: Unit/*.xlsx
  sheet: Unit
  row: 5

# Google Sheets
header:
  input_path:
  - path: https://docs.google.com/spreadsheets/d/xxxxxxxx/edit#gid=0
  sheet: Unit
  row: 5

# mixed local Excel and Google Sheets
header:
  input_path:
  - path: Unit/*.xlsx
  - path: https://docs.google.com/spreadsheets/d/xxxxxxxx/edit#gid=0
  sheet: Unit
  row: 5

Use wildcards when multiple Excel files share the same sheet structure and can be loaded as one input group. For example, if you split unit data across multiple Excel files, setting Unit/*.xlsx lets you add more Excel files without changing the YAML.

development_input_path

  development_input_path:
  - path: Unit/Unit_Test.xlsx
  • Definition: Optional

Additional table inputs loaded only when development: true is set in the settings file.

Specify paths in the same format as input_path. When development: true, Wiener reads from both input_path and development_input_path. When development: false, development_input_path entries are ignored.

Use this to keep development-only input (e.g. test data) separate from production input without duplicating the YAML definition.

# Development mode: reads Unit.xlsx + Unit_Test.xlsx
# Production mode:  reads Unit.xlsx only
header:
  input_path:
  - path: Unit/Unit.xlsx
  development_input_path:
  - path: Unit/Unit_Test.xlsx
  sheet: Unit
  row: 5
  ...

sheet

  sheet: Unit
  • Definition: Conditional (required except for multi_yaml_action)

Specify the sheet name for the table input. This value is shared by all entries in input_path.

row

  row: 5
  • Definition: Optional
  • Default: 1

Specify the starting row for table input parsing.

For example, if you specify 5, rows 1 to 4 can be used as comment rows.

base_type

  base_type: Normal
  • Definition: Optional
  • Default: Normal

Specify the base type from the following.

ValueDescription
NormalSpecify this when outputting data, constants, or enums.
NoOutputSpecify this when you do not output data. Use this for enum-only relations, or when combining constants and enums.
MultiYamlActionSpecify this when processing across multiple YAML files. The input_path and sheet definitions are not required. (See multi_yaml_action.)
ManualOnlySpecify this when you do not output data but want to output only the manual file. You do not need to set fields.manual_only.

source_type

  source_type: Normal
  • Definition: Optional
  • Default: Normal

Specify the source type from the following.

ValueDescription
NormalSpecify this when outputting data.
EnumSpecify this when outputting enums.
ConstSpecify this when outputting constants. For C#, outputs the binary and reader source.
ConstSourceSpecify this when outputting constant sources. For C#, outputs the constant source file. For other outputs, same as Const.

container_type

  container_type: WienerDictionary
  • Definition: Optional
  • Default: List

Specify the container type from the following.

ValueTypeDescription
ListT[]Output in array format.
DictionaryDictionary<T, U>Output in dictionary format. The first key in fields becomes the dictionary key. An error occurs if the key is duplicated.
DictionaryListDictionary<T, U[]>Output in dictionary-of-arrays format. The first key in fields becomes the dictionary key.
WienerDictionaryDictionary<T, U>Output in WienerDictionary format. The first key in fields becomes the dictionary key. An error occurs if the key is duplicated.
WienerDictionaryListDictionary<T, U[]>Output in WienerDictionaryList format. The first key in fields becomes the dictionary key.

Dictionary Format Comparison

FormatPlatform implementationSearch speedMemory usage
Dictionary / DictionaryListPlatform-native dictionary
Unity: Dictionary
UE5: TMap
FastHigh
WienerDictionary / WienerDictionaryListUnity: binary search
UE5: TMap (required for Blueprint use)
Unity: O(log n)
UE5: Fast
Unity: Low (equivalent to List)
UE5: High

output_path

  output_path: Unit
  • Definition: Conditional (required when base_type is Normal)

Specify the output folder name.

name

  name: Unit
  • Definition: Conditional (required when base_type is Normal)

Specify the name. Used as the file name, class name, and variable name.

group

  group: Unit
  • Definition: Optional
  • Default: ""

Available in C# and UE5.

A format for preparing multiple datasets, but never using two or more at the same time.

Normally, all data files are merged into Unit.bytes, but if you specify group, a file for the specified value is output.

(In the example, Unit.bytes is output.)

When using group, the following conditions must be met:

  • Prepare one Excel file per dataset.
  • All Excel files above must share the same format (sheet name, columns, etc.). (Row count may differ.)
  • Put all Excel files above in the same folder, and do not include Excel files not related to group.

Example: Create multiple unit data files, group them, and read each file in C#.

Excel file placement

excel/unit/unit_rare.xlsx
excel/unit/unit_common.xlsx

unit.yaml

header:
  input_path:
  - path: unit/*.xlsx  # Same syntax as local Excel merge
  sheet: Unit
  row: 5
  output_path: Unit
  name: Unit
  group: Unit  # group definition is required
  ...

C# code to use

void Load()
{
  var wm = new WienerManager();

  // unit_rare.xlsx
  wm.LoadUnitPack("Unit.bytes", "unit_rare"); // When group is specified, a dedicated load method named "Load[GroupName]Pack" is generated
  var rareUnit = wm.Unit; // Data access

  // Switch to unit_common.xlsx
  wm.LoadUnitPack("Unit.bytes", "unit_common");
  var commonUnit = wm.Unit;
}

sort

  sort: True
  • Definition: Optional
  • Default: False

Sort by the first key in fields.

Recommended to use only when container_type is List.

encryption

  encryption: True
  • Definition: Optional
  • Default: False

Obfuscate all fields.

manual_comment

  manual_comment: "YAML comment here"
  • Definition: Optional

Write a YAML comment for manual output.

template

  template: BasicPhp.php
  • Definition: Optional
  • Default: ""

Available only in PHP.

Specify a template file when you want to output in a custom format.

validate

  validate:
    composite_unique:
      - keys:
        - key: Id
        - key: SubId
  • Definition: Optional

Validation definition. Perform validation on multiple keys within the YAML.

composite_unique

Check for duplicates of combinations of multiple keys.

In the example below, an error occurs because the Id and SubId in row 1 and row 3 are the same.

RowIdSubId
110020
210030
310020

localization

  localization:
    id_key: Id
  • Definition: Optional

Enables localization for the YAML.

id_key

  • Definition: Conditional (required when localization is specified)

Specify the key of the field that uniquely identifies each row.
The specified field automatically has duplicate checking (unique) enabled.
The field must not have manual_only: True.

For YAML files where localization is enabled, fields with localize: True become translation targets.
CSV keys are generated in the format {ClassName}.{FieldKey}.{id_key value}.

multi_yaml_action

  multi_yaml_action: 
    type: ValidateKeyExistsYaml
    ignores:
    - value: 0
  • Definition: Conditional (required when base_type is MultiYamlAction)

Specify the type from the following.

TypeDescription
ValidateKeyExistsYamlValidate that a key exists in any of the specified YAML files
ValidateKeyExistsYamlConditionsValidate key existence across multiple YAML files with parameter conditions
ValidateUniqueValidate uniqueness of keys across multiple YAML files
EnumConstJoinJoin enums and constants

Definition of processing that involves multiple YAML files. For the top-level multi_yaml_action definition, see MultiYamlAction Definition.

ignores

  • Definition: Optional

Specify a list of values to ignore during validation.

TagRequiredDescription
value○Value to ignore
Last Updated:: 6/12/26, 2:44 AM
Contributors: artisan-sawasaka
Prev
Definition List
Next
Fields Definition