Skip to content

Drake53/War3Net

Repository files navigation

War3Net Modding Library

The complete .NET toolkit for Warcraft III modding

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub license Latest release


War3Net Banner

What is War3Net?VisionComponentsPackagesCommand-Line ToolVS Code ExtensionBuilt with War3NetRoadmapContributingLicense


What is War3Net?

Your one-stop .NET toolkit for all things Warcraft III. From low-level file formats like MPQ and BLP to high-level map building in C# and working with JASS scripts—War3Net has you covered.

Stop reinventing the wheel. Start building.

Vision & Principles

War3Net aims to be the definitive .NET foundation for Warcraft III tooling—built on three core principles:

  • Completeness — Every file format. Every game version. RoC through Reforged.
  • Correctness — Byte-for-byte accuracy with Blizzard's implementations. No guesswork.
  • Compatibility — .NET 6+ for broad OS support, including Windows 7/8.

Components

Three major components are included in War3Net:

  • NuGet packages — A collection of NuGet packages, each covering a Warcraft III file format or a related concern (MPQ, BLP, JASS, map building, and more). These are the foundation everything else is built on.
  • Command-line toolw3n, a single CLI that exposes the modules' functionality for scripting, CI, or terminal use.
  • VS Code extension — War3Net Toolkit, which brings those same file formats into the editor, built on top of the CLI.

Command-Line Tool

Coming soon™

VS Code Extension

Coming soon™

Packages

Main packages:

Package Description Downloads
War3Net.Build Build complete Warcraft III maps programmatically, including script generation and asset packaging. War3Net.Build downloads
War3Net.CodeAnalysis.Jass Work with JASS code: parse existing scripts, transpile to C#/Lua, or generate new code. War3Net.CodeAnalysis.Jass downloads

Full list of current and planned packages:

Package Summary NuGet
War3Net.Build Generate map scripts and MPQ archives from C#/vJass source code. VBuild
War3Net.Build.Core Parsers and serializers for war3map files. VBuildCore
War3Net.CodeAnalysis Helper methods for Pidgin parsers. VCode
War3Net.CodeAnalysis.Decompilers Regenerate war3map files from a Warcraft III map script. VCodeDecomp
War3Net.CodeAnalysis.Jass Parse and render JASS source files. VCodeJass
War3Net.CodeAnalysis.Transpilers Transpile JASS to C# or Lua. VCodeTrans
War3Net.Common Shared utilities for War3Net packages. VCommon
War3Net.Documents.Sylk Read and write SYLK files. Coming soon™
War3Net.Drawing.Blp Read and write BLP texture files. VBlp
War3Net.Drawing.Jpeg Read and write JPEG files. Coming soon™
War3Net.Drawing.Tga Read and write TGA files. Coming soon™
War3Net.IO.Casc Read CASC archives. Coming soon™
War3Net.IO.Compression Compression algorithms for MPQ archives. VCompress
War3Net.IO.Mpq Read and write MPQ archives. VMpq
War3Net.IO.Slk Read and write SLK data files. VSlk
War3Net.Modeling Read and write .mdl and .mdx files. Coming soon™
War3Net.Modeling.Mdx Read and write .mdx files. Coming soon™
War3Net.Rendering Render Warcraft III models using Veldrid. Coming soon™
War3Net.Replay Parse replay (.w3g) files. Coming soon™
War3Net.Runtime Execute JASS and Lua map scripts using NLua. Coming soon™
War3Net.Runtime.Api.Blizzard Blizzard.j API implemented in C#. Coming soon™
War3Net.Runtime.Api.Common API for War3Net.Runtime.Core, similar to War3Api.Common. Coming soon™
War3Net.Runtime.Core C# implementation of Warcraft III's backend code. Coming soon™

Some of the above packages are based on code from other repositories:

Built with War3Net

Disclaimer: Projects listed here are independent and not affiliated with, endorsed by, or maintained by the creator of War3Net. Use them at your own discretion.

Project Description
Maya WarTex Autodesk Maya plug-in for BLP texture loading via War3Net.Drawing.Blp.

Using War3Net in your project? Open a PR to add it here!

Roadmap

Three major initiatives are in progress:

War3Net CLI — Exposing War3Net's functionality to users outside of the .NET ecosystem.

  • w3n CLI exposing commands for MPQ, BLP, MDX, JASS, and more
  • End goals: Full War3Net functionality covered by the CLI • VSCode extension

JASS Language Suite — Bringing modern IDE tooling to JASS.

  • Fault-tolerant parsing, semantic analysis, LSP support, and a debugger
  • End goals: Intelligent script adaptation across game versions • Integration in the CLI and extension

Warcraft III Runtime — Run maps without the game.

  • Native JASS VM, C# natives, headless rendering
  • End goals: Automated C# map testing • Full game emulation

Current Status

Several file format libraries are being created or reworked, building the foundation for the goals set above:

  • War3Net.Drawing.Jpeg - BLP image files contain JPEG data using a non-standard BGRA channel layout. The BLP library currently relies on separate cross-platform and windows-specific implementations to handle this. The dual-implementation was made to preserve performance on windows, because the cross-platform implementation performs significantly worse. The goal is to create a single, custom, cross-platform solution that has roughly the same performance as the windows-specific implementation, allowing the BLP library to be simplified: no -windows specific target (which bleeds through to all other projects that depend on it), no platform-specific code paths, and no dependency on an external submodule.
  • War3Net.Modeling.Mdx - just like JPEG, War3Net currently relies on an external submodule to handle .mdx model files. The goal is to write a custom parser that supports the latest Reforged model file format versions, and use modern .NET language features to increase the performance.
  • War3Net.Documents.Sylk - the current SLK library only supports a limited subset of the file format's features, which causes parsing to fail if a .slk file uses any features not supported by the library. A complete rewrite will be done, focusing on an intuitive API and better performance. The package ID will also be changed to be consistent with other packages and to remove it from the IO sub-namespace, which is a bad fit for this library.
  • War3Net.CodeAnalysis.Jass - the v6 release already reworked this library to make it more similar to C#'s Roslyn. Next up is reworking the parser using a custom implementation that no longer relies on the Pidgin parser combinator library. This external library requires .NET 7+ in its latest version, making it a bad fit for War3Net's compatibility principle. Benchmarks have also shown that the new implementation performs better than the old parser combinator-based implementation.
  • War3Net.IO.Casc - one of this library's biggest gaps to date is finally being closed. While a competing library exists in the .NET ecosystem, its author has still not responded to a question from 2021 asking about a license. So while the competing library is open source, the lack of a license effectively makes it "all rights reserved", and thus unusable. A custom CASC implementation will be created from scratch.

All of the above systems are already mostly in place, thanks to AI coding assistants significantly speeding up development and lowering the barrier to writing libraries that require a lot of boilerplate and/or research to implement. However, code quality and maintainability are valued more than quickly pushing out slop code. As a result, the bottleneck has shifted from writing code to reviewing code, so it may still take some time before these new libraries and changes are made available. Thank you for your patience.

Contributing

Please open an issue before creating a pull request.

Pull requests should be small and atomic to make them easier to review. Avoid doing multiple things in a single pull request like fixing bugs, adding new features, and refactoring code.

License

War3Net is licensed under the MIT license. Projects from NuGet packages and submodules may have a different license.

About

The complete .NET toolkit for Warcraft III modding.

Topics

Resources

License

Stars

156 stars

Watchers

11 watching

Forks

Contributors

Languages