Skip to content

Client Sync

Transforms server-side XML datasheets into client DataCenter format with XSD validation and attribute filtering.

version: 1
paths:
server: "D:/server/Datasheet"
client: "D:/client/DataCenter_Final"
schemas: "D:/client/DataCenter_Final"
defaults:
id_attribute: "id"
encoding: "utf-8"
indent: " "
entities:
EquipmentEvolutionData:
strategy: monolithic
server_file: "EquipmentEvolutionData.xml"
client_folder: "EquipmentEvolutionData"
client_file: "EquipmentEvolutionData-00000.xml"
root_element: "EquipmentEvolutionData"
id_attribute: "targetTemplateId"
xsd_file: "EquipmentEvolutionData/EquipmentEvolutionData.xsd"
PropertyDescription
serverServer datasheet root path
clientClient DataCenter root path
schemasXSD schemas directory path
PropertyDefaultDescription
id_attribute"id"Entity identifier attribute
encoding"utf-8"Output encoding
indent" "Indentation (4 spaces)

One server file → one client file.

EquipmentEnchantData:
strategy: monolithic
server_file: "EquipmentEnchantData.xml"
client_folder: "EquipmentEnchantData"
client_file: "EquipmentEnchantData-00000.xml"
root_element: "EquipmentEnchantData"
xsd_file: "EquipmentEnchantData/EquipmentEnchantData.xsd"

Routes entities by zone attribute.

NpcData:
strategy: zone_based
server_pattern: "NpcData_*.xml"
client_folder: "NpcData"
client_pattern: "NpcData-{seq:D5}.xml"
root_element: "NpcData"
zone_attribute: "huntingZoneId"
xsd_file: "NpcData/NpcData.xsd"
zone_mapping:
1: 0
2: 1
101: 100

Distributes entities by ID ranges.

ItemData:
strategy: bucket
server_files:
- "ItemTemplate.xml"
- "ItemTemplate_Custom.xml"
source_precedence:
- "ItemTemplate_Custom.xml"
- "ItemTemplate.xml"
client_folder: "ItemData"
client_pattern: "ItemData-{seq:D5}.xml"
root_element: "ItemData"
xsd_file: "ItemData/ItemData.xsd"
default_bucket_seq: 2
id_buckets:
- seq: 0
min: 1
max: 99999
- seq: 1
min: 100000
max: 199999

When default_bucket_seq is set, IDs that don’t match any explicit bucket range are routed to that sequence number instead of producing an error. Multiple bucket entries can share the same seq to map non-contiguous ID ranges to the same output file.

Multiple sources merge by template or zone keys.

UserSkillData:
strategy: merged
sources:
- server_pattern: "UserSkillData_*.xml"
key_type: template
client_folder: "SkillData"
client_pattern: "SkillData-{seq:D5}.xml"
root_element: "SkillData"
xsd_file: "SkillData/SkillData.xsd"
template_mapping:
101: [0, 1]
102: [2, 3, 4]

Direct 1:1 filename mapping.

StrSheet_Item:
strategy: source_mapped
server_files:
- "StrSheet_Item.xml"
- "StrSheet_Item_Custom.xml"
client_folder: "StrSheet_Item"
root_element: "StrSheet_Item"
xsd_file: "StrSheet_Item/StrSheet_Item.xsd"
source_mapping:
"StrSheet_Item.xml": "StrSheet_Item-00000.xml"
"StrSheet_Item_Custom.xml": "StrSheet_Item-00001.xml"

Sorted by ID, one entity per file.

AchievementData:
strategy: id_sorted
server_path: "Achievements"
server_pattern: "*.xml"
client_folder: "AchievementData"
client_pattern: "AchievementData-{seq:D5}.xml"
root_element: "AchievementData"
xsd_file: "AchievementData/AchievementData.xsd"
expected_count: 500
PropertyStrategiesDescription
strategyAllSync strategy type
client_folderAllTarget folder under client path
root_elementAllXML root element name
xsd_fileAllXSD schema path
id_attributeAllID attribute (default from config)
server_fileMonolithicSingle source file
client_fileMonolithicSingle target file
server_patternZoneBased, IdSortedGlob pattern for sources
client_patternZoneBased, Bucket, Merged, IdSortedOutput pattern with {seq:D5}
zone_attributeZoneBasedZone ID attribute
zone_mappingZoneBased, MergedZone → sequence mapping
server_filesBucket, SourceMappedSource file list
source_precedenceBucketPriority for overlapping IDs
id_bucketsBucketID range definitions
default_bucket_seqBucketFallback sequence for unmatched IDs
sourcesMergedSource definitions
template_mappingMergedTemplate → sequences mapping
source_mappingSourceMappedSource → target mapping
server_pathIdSortedSource subdirectory
expected_countIdSortedMax entity count
Terminal window
# Sync all entities
dsl sync --config sync-config.yaml --all
# Sync specific entities
dsl sync -c sync-config.yaml -e ItemData -e NpcData
# Dry run
dsl sync -c sync-config.yaml -a -d
# Verbose
dsl sync -c sync-config.yaml -a -v
OptionAliasDescription
--config-cConfig file path (required)
--entities-eEntities to sync (repeatable)
--all-aSync all entities
--dry-run-dPreview without writing
--verbose-vDetailed output

The --entities option accepts entity names as defined in your configuration file’s entities: section. The entity name is the key you assign to each entity configuration.

For example, given this configuration:

entities:
ItemData:
strategy: SourceMapped
# ...
NpcData:
strategy: zone_based
# ...
EquipmentEvolutionData:
strategy: monolithic
# ...

You can sync specific entities using their configuration keys:

Terminal window
dsl sync -c sync-config.yaml -e ItemData -e EquipmentEvolutionData

Common entity names (typical configurations):

Entity NameServer SourceDescription
ItemDataItemTemplate*.xmlItem definitions
EquipmentDataEquipmentTemplate.xmlEquipment stats
EquipmentEvolutionDataEquipmentEvolutionData.xmlEvolution recipes
EquipmentEnchantDataEquipmentEnchantData.xmlEnchant data
NpcDataNpcData_*.xmlNPC definitions
SkillDataUserSkillData_*.xmlPlayer skills
StrSheet_ItemStrSheet_Item*.xmlItem localization
StrSheet_CreatureStrSheet_Creature*.xmlCreature localization
AchievementDataAchievements/*.xmlAchievements

Note: These are conventional names. You can use any key name in your configuration - the entity name is whatever you define in the entities: section.

RangeCategory
E601-E609Configuration
E610-E619Schema loading
E620-E629Key extraction
E630-E639Route resolution
E640-E649XSD validation
E650-E659Output building
E660-E669File I/O