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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="War3Net.Build.Core" Version="6.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="War3Net.Build.Core" Version="6.0.1" />
                    
Directory.Packages.props
<PackageReference Include="War3Net.Build.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add War3Net.Build.Core --version 6.0.1
                    
#r "nuget: War3Net.Build.Core, 6.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package War3Net.Build.Core@6.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=War3Net.Build.Core&version=6.0.1
                    
Install as a Cake Addin
#tool nuget:?package=War3Net.Build.Core&version=6.0.1
                    
Install as a Cake Tool

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
  • Map and Campaign classes for working with complete archives
  • MapBuilder for creating and modifying map archives
  • Selective loading with MapFiles and CampaignFiles flags 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 files
  • War3Net.Build.Campaign - Represents a complete Warcraft III campaign
  • War3Net.Build.MapBuilder - Fluent builder for creating and modifying map archives
  • War3Net.Build.MapFiles - Flags enum for selective map component loading
  • War3Net.Build.CampaignFiles - Flags enum for selective campaign component loading
  • War3Net.Build.Info.MapInfo - Map metadata including name, author, players, and forces
  • War3Net.Build.Info.CampaignInfo - Campaign metadata
  • War3Net.Build.Environment.MapEnvironment - Terrain data including tiles, cliffs, and water
  • War3Net.Build.Widget.MapUnits - Placed units in the map
  • War3Net.Build.Widget.MapDoodads - Placed doodads (decorative objects) in the map
  • War3Net.Build.Script.MapTriggers - GUI trigger definitions
  • War3Net.Build.Object.UnitObjectData - Custom unit modifications
  • War3Net.Build.Object.AbilityObjectData - Custom ability modifications

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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