War3Net.Build.Core
6.0.1
dotnet add package War3Net.Build.Core --version 6.0.1
NuGet\Install-Package War3Net.Build.Core -Version 6.0.1
<PackageReference Include="War3Net.Build.Core" Version="6.0.1" />
<PackageVersion Include="War3Net.Build.Core" Version="6.0.1" />
<PackageReference Include="War3Net.Build.Core" />
paket add War3Net.Build.Core --version 6.0.1
#r "nuget: War3Net.Build.Core, 6.0.1"
#:package War3Net.Build.Core@6.0.1
#addin nuget:?package=War3Net.Build.Core&version=6.0.1
#tool nuget:?package=War3Net.Build.Core&version=6.0.1
War3Net.Build.Core
About
War3Net.Build.Core is a .NET library for parsing and serializing Warcraft III map and campaign files. It provides complete support for reading, modifying, and writing all war3map and war3campaign archive formats. It is part of the War3Net modding library.
Key features
- Parse and serialize all war3map file formats (environment, units, doodads, triggers, object data, etc.)
- Parse and serialize war3campaign files
- Support for binary, JSON, and text serialization formats
MapandCampaignclasses for working with complete archivesMapBuilderfor creating and modifying map archives- Selective loading with
MapFilesandCampaignFilesflags for optimal performance - Support for both classic Warcraft III and Reforged format versions
How to Use
Open and read a map
using War3Net.Build;
// Open a map file
var map = Map.Open("path/to/map.w3x");
// Access map metadata
string mapName = map.Info?.MapName;
int playerCount = map.Info?.Players.Count ?? 0;
// Access placed units
var units = map.Units?.Units;
foreach (var unit in units ?? [])
{
Console.WriteLine($"Unit {unit.TypeId} at ({unit.Position.X}, {unit.Position.Y})");
}
Load only specific map components
using War3Net.Build;
// Load only the components you need for better performance
var map = Map.Open("path/to/map.w3x", MapFiles.Info | MapFiles.Units | MapFiles.Doodads);
Modify and save a map
using War3Net.Build;
// Open an existing map
var map = Map.Open("path/to/map.w3x");
// Modify map properties
if (map.Info is not null)
{
map.Info.MapName = "My Modified Map";
map.Info.MapDescription = "A map modified with War3Net";
}
// Save the modified map
var builder = new MapBuilder(map);
builder.Build("path/to/output.w3x");
Read individual map files using extension methods
using System.IO;
using War3Net.Build.Extensions;
// Read a specific map file directly
using var stream = File.OpenRead("war3map.w3e");
using var reader = new BinaryReader(stream);
var environment = reader.ReadMapEnvironment();
Console.WriteLine($"Map size: {environment.Width}x{environment.Height}");
Work with campaign files
using War3Net.Build;
// Open a campaign file
var campaign = Campaign.Open("path/to/campaign.w3n", CampaignFiles.All);
// Access campaign metadata
string campaignName = campaign.Info?.CampaignName;
var maps = campaign.Info?.MapButtons;
Main Types
The main types provided by this library are:
War3Net.Build.Map- Represents a complete Warcraft III map with all its data filesWar3Net.Build.Campaign- Represents a complete Warcraft III campaignWar3Net.Build.MapBuilder- Fluent builder for creating and modifying map archivesWar3Net.Build.MapFiles- Flags enum for selective map component loadingWar3Net.Build.CampaignFiles- Flags enum for selective campaign component loadingWar3Net.Build.Info.MapInfo- Map metadata including name, author, players, and forcesWar3Net.Build.Info.CampaignInfo- Campaign metadataWar3Net.Build.Environment.MapEnvironment- Terrain data including tiles, cliffs, and waterWar3Net.Build.Widget.MapUnits- Placed units in the mapWar3Net.Build.Widget.MapDoodads- Placed doodads (decorative objects) in the mapWar3Net.Build.Script.MapTriggers- GUI trigger definitionsWar3Net.Build.Object.UnitObjectData- Custom unit modificationsWar3Net.Build.Object.AbilityObjectData- Custom ability modifications
Related Packages
- War3Net.Build - Generate JASS map scripts and compile maps
- War3Net.CodeAnalysis.Jass - Parse and render JASS source files
- War3Net.IO.Mpq - Read and write MPQ archives
- War3Net.IO.Slk - Parse SLK (data table) files
Feedback and contributing
War3Net.Build.Core is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Disclaimer
This README was generated with the assistance of AI and may contain inaccuracies. Please verify the information and consult the source code for authoritative details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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 was computed. 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. |
-
net5.0
- War3Net.CodeAnalysis.Jass (>= 6.0.1)
- War3Net.IO.Mpq (>= 6.0.1)
- War3Net.IO.Slk (>= 6.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on War3Net.Build.Core:
| Package | Downloads |
|---|---|
|
War3Net.Build
Generate map scripts and MPQ archives from C#/vJass source code. |
|
|
War3Net.CodeAnalysis.Decompilers
Regenerate war3map files from a Warcraft III map script. |
|
|
War3Api.Object
An API for Warcraft III's object editor data. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.1 | 112 | 2/1/2026 |
| 6.0.0 | 146 | 1/25/2026 |
| 5.8.2 | 655 | 9/27/2025 |
| 5.8.1 | 215 | 9/12/2025 |
| 5.8.0 | 216 | 9/6/2025 |
| 5.7.1 | 6,592 | 1/19/2023 |
| 5.7.0 | 703 | 1/8/2023 |
| 5.6.1 | 723 | 1/7/2023 |
| 5.6.0 | 908 | 12/20/2022 |
| 5.5.7 | 1,846 | 12/14/2022 |
| 5.5.6 | 801 | 11/30/2022 |
| 5.5.5 | 799 | 11/13/2022 |
| 5.5.4 | 544 | 10/29/2022 |
| 5.5.3 | 906 | 10/29/2022 |
| 5.5.2 | 891 | 10/25/2022 |
| 5.5.1 | 1,218 | 8/23/2022 |
| 5.5.0 | 1,141 | 8/20/2022 |
| 5.4.5 | 1,216 | 5/27/2022 |
| 5.4.4 | 656 | 5/23/2022 |
| 5.4.3 | 1,415 | 4/25/2022 |
| 5.4.2 | 949 | 4/24/2022 |
| 5.4.1 | 1,408 | 2/13/2022 |
| 5.4.0 | 1,112 | 2/13/2022 |
| 5.3.2 | 689 | 1/16/2022 |
| 5.3.1 | 671 | 1/16/2022 |
| 5.3.0 | 873 | 1/16/2022 |
| 5.2.2 | 2,327 | 2/16/2021 |
| 5.2.1 | 634 | 2/16/2021 |
| 5.2.0 | 777 | 2/14/2021 |
| 5.1.0 | 752 | 12/25/2020 |
| 5.0.0 | 666 | 12/14/2020 |
| 1.7.2 | 737 | 11/12/2020 |
| 1.7.1 | 661 | 11/12/2020 |
| 1.7.0 | 895 | 11/12/2020 |
| 1.6.0 | 820 | 11/11/2020 |
| 1.5.3 | 693 | 10/29/2020 |
| 1.5.2 | 689 | 10/29/2020 |
| 1.5.1 | 693 | 10/28/2020 |
| 1.5.0 | 866 | 10/27/2020 |
| 1.4.0 | 1,008 | 9/14/2020 |
| 1.3.7 | 1,431 | 8/22/2020 |
| 1.3.6 | 966 | 8/9/2020 |