# w3xdata

> Exact data from Warcraft III maps

Latest version **3.1.1** (published 2026-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install w3xdata
pnpm add w3xdata
yarn add w3xdata
bun add w3xdata
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.1.1 |
| Published | 2026-05-31 |
| First published | 2020-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | verit |
| Maintainers | voces |

## Links

- npm: https://www.npmjs.com/package/w3xdata
- Repository: https://github.com/voces/w3xdata
- Homepage: https://github.com/voces/w3xdata#readme
- Issues: https://github.com/voces/w3xdata/issues
- npm.io page: https://npm.io/package/w3xdata

## Dependencies (2)

- [wc3data](https://npm.io/package/wc3data.md) ^3.0.0
- [mdx-m3-viewer-th](https://npm.io/package/mdx-m3-viewer-th.md) ^5.13.4

## Recent versions

- 3.1.1 (latest) — 2026-05-31
- 3.1.0 — 2026-05-29
- 3.0.0 — 2026-05-29
- 2.3.0 — 2026-05-26
- 2.2.2 — 2022-09-11
- 2.2.1 — 2022-09-11
- 2.2.0 — 2020-12-27
- 2.1.4 — 2020-12-26
- 2.1.3 — 2020-03-03
- 2.1.2 — 2020-02-14
- 2.1.1 — 2020-02-13
- 2.1.0 — 2020-02-13
- 2.0.0 — 2020-02-13
- 1.0.0 — 2020-02-12

## README

# w3xdata

`w3xdata` allows for extracting Warcraft 3 map data in a typed, semi-structured
way.

## Examples

```typescript
import {
  mapItemSpecs,
  mapStrings,
  mapUnitSpecs,
  replaceStrings,
} from "w3xdata";
import { promises as fs } from "fs";

Promise.all([
  fs.readFile("map/war3map.w3u"),
  fs.readFile("map/war3map.w3t"),
  fs.readFile("map/war3map.wts"),
]).then(([w3u, w3t, wts]) => {
  const strings = mapStrings(wts);
  const units = replaceStrings(mapUnitSpecs(w3u), strings);
  const items = replaceStrings(mapItemSpecs(w3t), strings);

  console.log(units.hfoo.text?.Name); // "Footman"
  console.log(units.h001.text?.Name); // "Custom Footman"
  console.log(items.ratf.text?.Name); // "Claws of Attack +15"
});
```

### Reforged skin files

Reforged maps split cosmetic overrides (names, tooltips, icons) into
`war3mapSkin.w3u` / `war3mapSkin.w3t`. Pass them as the optional second arg
and the modifications are applied on top of the main file:

```typescript
const units = mapUnitSpecs(w3u, w3uSkin);
const items = mapItemSpecs(w3t, w3tSkin);
```

---
_Source: https://npm.io/package/w3xdata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
