Namespace Core.Loaders
Classes
- BurstCountryLoader
Country loader using hybrid JSON5 + Burst architecture Phase 1: Load JSON5 files to structs (main thread) Phase 2: Process structs with burst jobs (multi-threaded)
- BurstProvinceHistoryLoader
Province history loader using hybrid JSON5 + Burst architecture Phase 1: Load JSON5 files to structs (main thread) Phase 2: Process structs with burst jobs (multi-threaded)
- CSVParser
High-performance CSV parser for Paradox files. Handles semicolon-delimited format with header detection.
- CSVTokenizer
High-performance CSV tokenizer for Paradox format (semicolon-delimited). Supports UTF-8 encoding and quoted fields.
- CountryTagLoader
Loads country tags using ManifestLoader (Pattern 2) Parses common/country_tags/00_countries.txt to get tag → file mapping Example: SWE = "countries/Sweden.txt" Following paradox-data-patterns-guide.md specifications
- DefinitionLoader
Loads province definitions from definition.csv This ensures ALL provinces (including uncolonized ones without JSON5 files) are registered
- Json5CountryConverter
Converts JSON5 country files to burst-compatible structs Phase 1 of the hybrid JSON5 + Burst architecture for countries
- Json5Loader
Simple and reliable JSON5 loader to replace the broken ParadoxParser Handles JSON5 files converted from Paradox format with proper structure
- Json5ProvinceConverter
Converts JSON5 province files to burst-compatible structs Phase 1 of the hybrid JSON5 + Burst architecture
- LoaderContext
Context provided to loaders during data loading. Contains registries and configuration needed for loading.
- LoaderMetadataAttribute
Attribute to define loader metadata for auto-registration. Apply to ILoaderFactory implementations for automatic discovery.
- LoaderRegistry
Registry for data loaders with auto-discovery. Discovers loaders via reflection and executes them in priority order.
Usage:
- Create registry instance
- Call DiscoverLoaders() with assemblies to scan
- Call ExecuteAll() to run loaders in priority order
- LoaderRegistry.LoaderRegistration
Registration entry for a loader.
- ManifestLoader<T>
Generic manifest loader implementing Pattern 2: Manifest/Reference Loads index files that point to actual data files Examples: country_tags → country files, bookmarks → bookmark definitions Following paradox-data-patterns-guide.md specifications
- ScenarioLoader
Loads and applies scenario data for initial game state Handles start dates like 1444, 1836, or custom scenarios Applies province ownership, country treasuries, armies, etc.
- ScenarioLoader.ScenarioData
Complete scenario data
- TerrainLoader
Loads terrain type definitions from terrain.json5. This is the single source of truth for terrain definitions. TerrainColorMapper (Map layer) should use the same file.
Terrain IDs are assigned sequentially based on order in the file, ensuring consistency between Core and Map layers.
Structs
- CSVParser.CSVParseResult
CSV parsing result
- CSVParser.CSVRow
A single CSV row
- CSVTokenizer.CSVToken
A single CSV token
- CSVTokenizer.CSVTokenizeResult
CSV tokenization result
- CountryTagLoadResult
Result of country tag loading operation
- ManifestLoadResult
Result of manifest loading operation
- ScenarioLoader.CountrySetup
Initial setup for a country
- ScenarioLoader.DiplomaticRelation
Diplomatic relation between countries
- ScenarioLoader.LoadingStatistics
Loading statistics
- ScenarioLoader.ProvinceSetup
Initial setup for a province (ENGINE LAYER - minimal fields only) Game-specific fields like Development should be handled by game layer loaders
- ScenarioLoader.ScenarioLoadResult
Result of scenario loading operation
Interfaces
- ILoaderFactory
Interface for data loader factories. Implement this and add [LoaderMetadata] for auto-discovery.
Enums
- CSVTokenizer.CSVTokenType
CSV token types