Heroes.XmlData
1.0.2
dotnet add package Heroes.XmlData --version 1.0.2
NuGet\Install-Package Heroes.XmlData -Version 1.0.2
<PackageReference Include="Heroes.XmlData" Version="1.0.2" />
<PackageVersion Include="Heroes.XmlData" Version="1.0.2" />
<PackageReference Include="Heroes.XmlData" />
paket add Heroes.XmlData --version 1.0.2
#r "nuget: Heroes.XmlData, 1.0.2"
#:package Heroes.XmlData@1.0.2
#addin nuget:?package=Heroes.XmlData&version=1.0.2
#tool nuget:?package=Heroes.XmlData&version=1.0.2
Heroes Xml Data
Heroes Xml Data is a .NET library that parses the Heroes of the Storm CASC storage files through the use of CascLib and provides an API to access the files and data.
Usage
Loading Storage
Heroes of the Storm data can be loaded from three sources: a local Heroes of the Storm installation, online, or already extracted data files.
To extract the data files, use a tool such as Heroes Data Parser, CASCExplorer, or CascView.
Example of loading from local installation:
// get the casc configuration, specifying the local storage
CASCConfig cascConfig = HeroesXmlLoader.GetCASCConfig("Path\to\Heroes of the Storm");
// load from the local installation
HeroesXmlLoader heroesXmlLoader = HeroesXmlLoader.LoadWithCASC(cascConfig, new HttpClient());
Example of loading from online:
HttpClient httpClient = new();
// get the casc configuration, specifying online storage
CASCConfig cascConfig = HeroesXmlLoader.GetOnlineCASCConfig(httpClient, isPtr: false);
// load from online
HeroesXmlLoader heroesXmlLoader = HeroesXmlLoader.LoadWithCASC(cascConfig, httpClient);
Example of loading from extracted data files:
// specify the mods root directory
// if on linux or macos, ensure all directories and files are in lowercase characters
HeroesXmlLoader heroesXmlLoader = HeroesXmlLoader.LoadWithFile("Path\to\mods");
There is also an optional ProgressReporter that may be passed in to the LoadWithCASC and LoadWithFile methods:
// optional progress reporting
Progress<ProgressInfo> progress = new(p =>
{
Console.WriteLine($"Progress: {p.Percentage}% - {p.Message}");
});
ProgressReporter progressReporter = new(progress);
// HeroesXmlLoader.LoadWithCASC(cascConfig, httpClient, progressReporter: progressReporter);
// HeroesXmlLoader.LoadWithFile("Path\to\mods, progressReporter: progressReporter);
HeroesXmlLoader
After loading the storage, the HeroesXmlLoader instance also provides an API to access file-related methods and properties, such as FileExists and GetFile.
string filePath = @"mods\heromods\alarak.stormmod\base.stormdata\gamedata.xml";
bool exists = heroesXmlLoader.FileExists(filePath);
Stream fileStream = heroesXmlLoader.GetFile(filePath);
If the file is an MPQ file, the second argument can be provided to look up an entry:
string filePath = @"mods\core.stormmod\base.stormdata\depotcache\7b\7a\7b7a83395746a818eb7f842a7ff0a27699c93b5a9d170d1c0993a3cc0058e1d0.s2ma";
string mpqEntry = @"enus.stormdata\localizeddata\gamestrings.txt";
bool exists2 = heroesXmlLoader.FileExists(filePath, mpqEntry);
Stream mpqFileStream = heroesXmlLoader.GetFile(filePath, mpqEntry);
Loading StormMods
Use the HeroesXmlLoader instance to load the stormmods. LoadMapMod and LoadGameStrings may be called as many times as needed to switch between different maps and locales.
// loads the base stormmods
heroesXmlLoader.LoadStormMods();
// optionally load a map mod
heroesXmlLoader.LoadMapMod("Warhead Junction");
// optionally load a locale, defaults to enUS
heroesXmlLoader.LoadGameStrings(StormLocale.ENUS);
HeroesData
Get the HeroesData from the HeroesXmlLoader instance. This can be used to obtain data directly from the xml data, gamestrings, layout files, etc.
Visit the wiki for examples.
Developing
To build the code, it is recommended to use the latest version of Visual Studio 2026 or Visual Studio Code.
Another option is to use the dotnet CLI tools from the latest .NET SDK.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Heroes.LocaleText (>= 1.0.1)
- Heroes.MpqTool (>= 1.3.2)
- MimeKitLite (>= 4.17.0)
- TestableIO.System.IO.Abstractions.Wrappers (>= 22.1.1)
- U8XmlParser (>= 1.6.1)
-
net9.0
- Heroes.LocaleText (>= 1.0.1)
- Heroes.MpqTool (>= 1.3.2)
- MimeKitLite (>= 4.17.0)
- TestableIO.System.IO.Abstractions.Wrappers (>= 22.1.1)
- U8XmlParser (>= 1.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.0.2 | 285 | 7/4/2026 | |
| 1.0.1 | 135 | 7/3/2026 | |
| 1.0.0 | 198 | 7/2/2026 | |
| 1.0.0-alpha.5 | 203 | 6/1/2026 | |
| 1.0.0-alpha.4 | 108 | 5/30/2026 | |
| 1.0.0-alpha.3 | 341 | 4/19/2026 | |
| 1.0.0-alpha.2 | 205 | 8/5/2024 | |
| 1.0.0-alpha.1 | 167 | 8/1/2024 |