SC2MapLib
A SC2 Map XML Loading library and Schema writing project.
This project's goal is to provide a simple interface for interacting with the Data Component of Starcraft 2 maps. The Project is done in C#, but is intended to be Cross Platform.
The project is based around Microsoft's XSD tool and it's ability to generate classes based off of XML schemas. Using it, this library can be quickly updated based on any addition Blizzard makes to the data sets.
Example Schema:
<?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="../EditorBase/EditorProperties.xsd" /> <xs:complexType name ="CItem"> <xs:complexContent> <xs:extension base="EditorBase"> <xs:sequence> <xs:element name ="Face" type="attributeString" /> <xs:element name ="Flags" type ="Flag" minOccurs="0" maxOccurs="unbounded" /> <xs:element name ="Class" type="attributeString" /> <xs:element name ="Container" type="attributeString" /> <xs:element name ="Level" type="attributeUInt" /> <xs:element name ="Requirements" type="attributeString" /> <xs:element name ="CarryBehaviorArray" type="attributeString" minOccurs="0" maxOccurs="unbounded" /> <xs:element name ="CarryWeaponArray" type="WeaponData" minOccurs="0" maxOccurs="unbounded" /> <xs:element name ="EquipBehaviorArray" type="attributeString" minOccurs="0" maxOccurs="unbounded" /> <xs:element name ="EquipWeaponArray" type="WeaponData" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name ="CItemEffectTarget" > <xs:complexContent> <xs:extension base="CItem"> <xs:sequence> <xs:element name ="Effect" type="attributeString" nillable="true" /> <xs:element name ="EffectCost" type="CostData" nillable="true"/> <xs:element name ="EffectFlags" type="Flag" nillable="true" /> <xs:element name ="RefundFraction" type ="CostData" nillable="true" /> <xs:element name ="TargetFilters" type ="attributeString" nillable="true" /> <xs:element name ="Range" type="attributeFloat" nillable="true"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name ="CItemEffectInstant" > <xs:complexContent> <xs:extension base="CItemEffectTarget"> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema>
Comments