Overview
CExporter analyzes the compiled FFXIVClientStructs assembly using reflection to extract:- Struct definitions with field offsets and sizes
- Enum types and values
- Virtual function tables (vtables)
- Member function signatures
- Static addresses and function pointers
- Union types and nested structs
- Inheritance relationships
ffxiv_structs.yml file that can be consumed by C/C++ code generators or documentation tools.
Installation
CExporter is built from source in the FFXIVClientStructs repository:Usage
Basic Usage
Run CExporter from the repository root orida directory:
- Locates the
idadirectory - Loads FFXIVClientStructs assembly
- Processes all types
- Reads
ida/data.ymlfor additional metadata - Writes
ida/ffxiv_structs.yml
Command Line Arguments
--quiet
Suppress progress output:
--no-write
Process types without writing output files:
Combined Arguments
Output Format
CExporter generatesffxiv_structs.yml with the following structure:
Enums
Structs
Member Functions
CExporter Attributes
Use these attributes in FFXIVClientStructs code to control export behavior:CExporterIgnore
Exclude a field, struct, or property from export:- Internal helper fields
- Managed-only properties
- Obsolete or deprecated fields
CExporterForce
Force export of a field type that would normally be ignored:- Types within Excel data ranges
- Types that are normally skipped
CExporterTypeForce
Override the exported type name for a field:typeName(string) - The type name to use in the export
- Correcting pointer types
- Using more specific type names
- Custom type mappings
CExporterExcel
Mark a field or parameter as an Excel sheet pointer:sheetName(string) - The Excel sheet name
- Game data pointers
- Sheet references
CExporterExcelBegin / CExporterExcelEnd
Define a range of fields that belong to an Excel sheet struct:CExporterUnion
Define union fields and sub-structs:union(string) - Union namestruct(string) - Sub-struct name (optional)isStruct(bool) - Whether this is a sub-struct field
CExporterBaseType
Mark a field as a base type (inheritance):base: true flag.
Processing Flow
Type Discovery
- Load assemblies - FFXIVClientStructs and dependencies
- Filter types - Extract FFXIV and Havok namespace types
- Filter structs - Get non-generic, non-fixed-buffer structs
- Initial pass - Process all root structs
Multi-Pass Processing
CExporter uses multiple passes to resolve dependencies:- Struct fields and their types
- Nested types and dependencies
- Union definitions
- Virtual function tables
Static Functions Processing
After type processing:- Find structs with static methods
- Extract
StaticAddressandMemberFunctionattributes - Process return types and parameters
- Additional dependency passes for new types
Validation
- Overlap detection - Verify no field overlaps (except unions)
- Size validation - Check fields don’t exceed struct size
- Name overlap - Compare with
data.ymldefinitions - VTable integration - Merge with manually defined virtual functions
Error Handling
CExporter validates struct integrity and reports errors:Field Overlap Error
[CExporterUnion] or correct field offsets
Union Field Not Defined
[CExporterUnion("UnionName")] to all overlapping fields
Field Exceeds Struct Size
Name Overlap with data.yml
Integration with data.yml
CExporter readsida/data.yml for additional metadata:
- VTable function names
- Member function signatures
- Additional metadata
Build Configuration
Project Settings
Dependencies
- Pastel 7.0.1 - Colorized console output
- YamlDotNet 16.3.0 - YAML serialization
- FFXIVClientStructs - The structs to export
- InteropGenerator.Runtime - Attributes and types
Troubleshooting
”GamePath not Found” Error
Problem: Can’t find ida directory. Solution: Run from repository root or insideida directory.
Missing Dependencies
Problem: Assembly load failures. Solution: Build FFXIVClientStructs first:Incomplete Output
Problem: Some structs missing from YAML. Solutions:- Check for
[CExporterIgnore]attributes - Verify structs are in FFXIV or Havok namespaces
- Look for errors in console output
- Run without
--quietto see processing details
Performance Issues
Problem: CExporter runs slowly. Expected: Processing 2000+ structs takes 10-30 seconds If slower:- Check available memory
- Verify SSD performance
- Look for I/O bottlenecks
Advanced Usage
Custom Type Processing
ExtendProcessingType to handle custom types:
Filtering Export Output
ModifyExporterStatics.GetXIVTypes() to filter specific namespaces:
See Also
- InteropGenerator - Runtime code generation
- ExcelGenerator - Excel sheet struct generation
- Struct Development - Writing struct definitions