News

Jorsys Jorvik Systems is a site dedicated to modding and reverse engineering WarCraft I, WarCraft II and StarCraft I. The goal is to provide tools, documentation and tutorials to facilitate understanding of what's going on under the hood in these classic games, as well as collections of mods to change them.
scmJS 0.19.0 released
Posted by Ojan

Version 0.19.0 of scmJS was released on 26 November 2026. scmJS is a map editor for StarCraft, Brood War and StarCraft: Remastered by jeany55. It takes inspiration from StarEdit, SCMDraft 2 and StarForge, and runs either as a desktop app for Windows, macOS and Linux, or directly in the browser at scmjs.dev/editor.

Changes in scmJS 0.19.0:

Tools ▸ Compare Maps… holds the open map against another version of it and marks on the map where the two differ. Replay analysis now writes a build order the way players do and shows when production stood idle.

Comparing maps

  • Tools ▸ Compare Maps… compares the open map with another open map, or with itself as it is now, so that everything you change from then on is shown. The dialog counts the ground, units and locations that differ, with a button for each place that goes there.
  • View ▸ Differences draws them on the map and follows your edits: changed ground in magenta, what only this map has in green, what only the other has in red, and what moved or changed in yellow. Each open map keeps its own comparison when you switch tabs.
  • Comparing changes neither map. Triggers, strings, players and settings are not compared here; scmjs map diff lists those from a terminal.

Replays

  • Aftermath 0.28.0 writes an analysed game's build order with the supply each step was begun at (9 Spawning Pool), under a card that names the opening.
  • View ▸ Replay Analysis has a Macro tab: when each production building stood idle while there was money to spend, and when workers stopped.

Plugins

  • Aftermath 0.28.0: the build order in players' notation, and the Macro tab.

For plugin authors

  • @scm-js/core exports the comparison the editor draws from: diffChanges for what differs from one map to another, changedPlaces for the differing ground joined into boxes, and unitChanges, locationChanges and anyChange.
  • The API version stays 1.

Download:

Find version 0.19.0 of scmJS here.

A flurry of tool releases
Posted by Ojan

There is so much happening in the community right now that it is hard to keep up! Despite the age of the games, tools for both StarCraft and WarCraft II are getting new releases at a rapid pace, and several of them have put out a whole string of versions since I last wrote about them. Here is a roundup of the latest releases of mpqcli, RuneFoundry, PUDForge, StarDraft 2, Chkdraft and scmJS.


mpqcli

Version 0.13.3 of mpqcli was released on 20 November 2026. mpqcli is a command-line tool by Thomas Laurenson to create, list, extract and modify MPQ archives. MPQ archives were used for many years by Blizzard games such as StarCraft I and Warcraft II, and contain the game assets that game modifications change.

There have been two releases since the last time mpqcli was in the news here: 0.13.2 and 0.13.3.

Changes in mpqcli 0.13.3:

Fixed

  • Store, list, extract and read file names with non-ASCII characters correctly on Windows 10 version 1903 and later
  • Print non-ASCII file names correctly in the Windows console
  • Exit with 130 on Windows when interrupted, as on Linux, instead of 3
  • End by SIGTERM when stopped with SIGTERM, so a shell reports 143 rather than an interrupt's 130

Changes in mpqcli 0.13.2:

Changed

  • Say on stderr when read or extract uses the default locale because the file has no copy in the one asked for

Fixed

  • Extract each name once when extracting every file, under the locale it is stored in, and name the left-out locales on stderr
  • Extract files stored only under a non-default locale when extracting every file, instead of failing
  • List every locale of a name stored under more than 32, instead of reading past a buffer
  • Show an empty time in list for a file time that cannot be converted, instead of reading past a buffer

Download:

Find version 0.13.3 of mpqcli here.


RuneFoundry

Version 0.6.5-alpha of RuneFoundry was released on 9 October 2026. RuneFoundry is a set of mod tools for Warcraft II Remastered by milestone. It has two programs: a launcher that installs and plays mods, and an editor that makes them. It can edit things like campaigns, AI scripts, sprites and unit and weapon properties.

Changes in RuneFoundry 0.6.5-alpha:

If Warcraft II or Battle.net is set to run as administrator, RuneFoundry now says so and explains how to turn it off. That setting stops a mod's rules from working.

Download:

Find version 0.6.5-alpha of RuneFoundry here.


PUDForge

Version 0.1.80 of PUDForge was released on 13 October 2026. PUDForge is a map editor for Warcraft II by milestone, which runs on Windows. The map format is the same in the original DOS versions of Warcraft II as in the Battle.net Edition and the Remastered version, so its maps work in all of them.

Changes in PUDForge 0.1.80:

New

  • Help, Report an Issue sends your text to the PUDForge issue list. The reply gives a link to the issue.
  • Each right-click menu has Report an Issue with the item that you clicked.
  • After a crash, PUDForge asks at the next start to send a crash report.

Download:

Find version 0.1.80 of PUDForge here.


StarDraft 2

Version 0.9.2 of StarDraft 2 was released on 24 November 2026. StarDraft 2 is a map editor for StarCraft: Remastered on Windows by Milestone and iDoodler. It can be used for classic maps, but its main focus is EUD maps, where it brings the editing of the map, the game data and the triggers together in one place.

There have been 22 releases since the last time StarDraft 2 was in the news here, all of which are found on the releases page. The changes in the three latest are listed below.

Changes in StarDraft 2 0.9.2:

Video: the new features of 0.9.2

New

  • File > Import from SCMSCX: search scmscx.com, then download and open a map in one step.
  • Fog of war tool (Shift+F): paint and erase the fog of one or more players.
  • Edit > Resize map (Ctrl+Shift+R): drag the map's edges on the map. The new ground is the terrain picked in the Terrain palette.
  • Map sizes of your own: type the width and the height.
  • Pathing overlay: each region has an outline, and lines show where ground units can go between regions.
  • Palettes: Ctrl+wheel makes the items bigger or smaller.
  • View > Overlays > Psi power: which Protoss buildings have power from a Pylon.
  • Stars in space: the game's moving stars over Space Platform maps.
  • Protected maps open as view only. StarDraft 2 does not save, export or copy from them.

Map

  • The arrow keys move the selected sprites and doodads.
  • Town areas show the total minerals and gas of each town.
  • Terrain select: Isometric shows the diamonds that each shape copies.

Triggers

  • New blocks from EUD Editor 3's TETools: build, morph and train units, control groups, and more.
  • Easier to read helper code: unit fields have names, not memory offsets.

CMBW mod

  • Recolor preview: see the mod's recolors on the map.
  • Recolor action: paste the line that Recolor preview copies.

Fixes

  • SC:R's newer doodads (Space Platform, Desert, Twilight) show and can be placed.
  • The end piece of a ramp is no longer marked invalid.
  • Submenus stay on the screen.
  • Briefing: Space in the text box no longer plays or pauses the preview.
  • Map data > Technologies: the Changed filter shows techs that are set for all players.
  • Unit properties: a click in the list keeps the search.
  • Korean: locations are 로케이션.

Changes in StarDraft 2 0.9.1.1:

Fixes

  • Cosmonarchy BW: maps save in the format the mod opens. Maps made with File > New could not be played in the mod.
  • Downloads for macOS and Linux are back (0.9.1 had only Windows).
  • Town areas: an area's town hall place can be over the mod's markers and over the map's own town halls.

Changes in StarDraft 2 0.9.1:

Video: the new features of 0.9.1

New

  • New language support: Portuguese (Brazil) and German.
  • Copy and paste units between maps. Doodads paste only in a map of the same tileset.
  • Tile variations: select up to 2 x 3 tiles, and the side bar shows their variations. Point to one to see it on the map, click to use it. Alt + wheel steps a tile through its variations.
  • Pie palette for Units, Doodads and Sprites: hold Space and pick from rings at the mouse. Custom terrain has rings too.
  • Edit > Arrange: align, spread, row, column, grid or circle for the selected units.
  • View > In-game view (experimental): the map at the game's screen size (Ctrl+Shift+G).
  • Plugins: Hyperion (experimental), with up to 64 players. Program options > Plugins is a choice of No plugin, Cosmonarchy BW or Hyperion.
  • Mod terrain mapper (experimental): make a mod's isometric terrain tile by tile, with match suggestions.

Map

  • Terrain: Copy as text, and Ctrl+V of custom terrain text makes it the Brush.
  • Symmetry: one button for all mirrors; up to 32 anchors and 64 brushes.
  • Units: drag while pasting to paste copies along the way.
  • Locations: right-click lists the locations under the pointer, to select one under others.
  • Town areas use the game's resource area rule, each area in its own color.
  • Zoom in to 1600%.
  • Map title colors, an owner for many units at once, and a better Custom terrain list order.

Triggers

  • New action: Shift a location in a direction.
  • A player from a variable or a value in more places. New values: Game time in seconds, The number of players, and more.
  • For each unit accepts Men, Buildings and Factories.
  • Sound files in epScript: a list of the files as you type a sound name.

CMBW mod

  • ISOM terrains is one choice of three: game terrains only, built-in mod terrains (deprecated), or a terrain rules file.
  • The Units palette shows a mod's own unit icons.

The program

  • Open the last session's tabs on start (Program options).
  • Faster start: 257 ms (was 475 ms).
  • 50 recent maps and projects.
  • Report feedback sends in the background.

Fixes

  • Installation doors and traps show and place correctly.
  • The SD selection circle is as bright as HD's.
  • Map layers stay after a save, a tab switch or a CLI save.
  • Mining Lab: maps with no start location mine again.

Download:

Find version 0.9.2 of StarDraft 2 here.


Chkdraft

Version 2.20 of Chkdraft was released on 24 November 2026. Chkdraft is an open-source map editor for StarCraft by TheNitesWhoSay.

There have been four releases since the last time Chkdraft was in the news here: 2.17, 2.18, 2.19 and 2.20. The changes are listed below.

Changes in Chkdraft 2.20:

  • Fix various issues with location 255
  • Fix a rare crash that could occur with suggestions

Changes in Chkdraft 2.19:

  • Actor & image properties auto-refresh in actor properties (toggleable via auto refresh UI checkbox)
  • Auto-update actor list in actor properties (in response to unit/sprite changes)
  • Button in actor properties to reset an actor & its images back to original state
  • Center an actor on the map when selected in actor properties

Changes in Chkdraft 2.18:

  • Add recent maps menu
  • Add ability to scroll around the map by arrow keys (and WASD if WASD is toggled on)
  • Prevent beep when changing the placement player by hotkey
  • Add a border to the tileset indexed window
  • Render null/black tiles as black when pasting
  • Name map properties menu item to match the tab name
  • Fix a bug in text trig bug where the user inputting multiple strings before a separator/delimiter caused incorrect strings to be used rather than erroring out

Changes in Chkdraft 2.17:

  • Greatly improve trigger condition/action/briefing-action suggestion behavior
  • 65% faster updates to conditions/actions/briefing-actions
  • Significantly smoother submit/cancel change behavior when looking at suggestions/options for condition/action fields
  • Allow creating new strings as well as selecting existing from string suggestions
  • Allow numeric value entry in suggestions (showing the meaning and letting it be selected)
  • Add a toolbar to suggestion showing the relevant actions/teaching the relevant hotkeys
  • Fix cut/copy/paste/delete behavior in conditions/actions so it counts as one undoable action
  • Fixes for editor-only strings, triggers extensions and trigger comments/notes fields
  • Add selection counts on the status bar
  • Only run minimap tests if StarCraft assets are available

Download:

Find version 2.20 of Chkdraft here.


scmJS

Version 0.18.0 of scmJS was released on 20 November 2026. scmJS is a map editor for StarCraft, Brood War and StarCraft: Remastered by jeany55. It takes inspiration from StarEdit, SCMDraft 2 and StarForge, and runs either as a desktop app for Windows, macOS and Linux, or directly in the browser at scmjs.dev/editor.

There have been 31 releases since the last time scmJS was in the news here, all of which are found on the releases page. The changes in the two latest are listed below.

Changes in scmJS 0.18.0:

A protected map whose archive is full of files nothing names can be saved again. An AI can now play scenarios on a map to check its triggers, and give a map a TrigScript script. scmjs mcp now serves only the map tools unless you ask for more, so read AI apps if you use the mod, replay or account tools.

Saving

  • Some protected maps could not be saved at all: every Save failed with MpqError. Protectors fill the map's archive with files that nothing in the map names, so there was no room for the files the editor writes. The game never opens such a file, so when there is no room, Save now leaves them out and the map plays the same. The Save dialog says how many it leaves out.
  • Repair 1.7.0 finds those files as a map opens and leaves them out of the next save, like its other safe repairs. Undo in Repair's list puts them back.

Using the editor online

  • A tab left open while scmjs.dev is updated keeps working. If part of the editor still cannot be downloaded, a notice says so and offers Reload, which keeps your recovery copies.

AI apps

  • scmjs mcp serves the map tools and no others. The mod, replay and scmjs.dev account tools are now sets you turn on: scmjs mcp --tools all, or --tools mods,replays,account for some of them. In Claude Desktop, tick the set in the extension's settings. 0.17.0 served every tool, so add one of these if an AI used those tools for you. When a set is off, the AI is told how to turn it on.
  • map_test plays scenarios on a map in the game and says what happened: each expectation with what the game gave, how the game ended and for whom, minerals and gas, the text shown and the triggers that fired. A scenario can be given inline, and save keeps it in the map's tests file.
  • map_script_import gives a map a TrigScript script, or changes some of its files, and compiles it at once, with errors given as file, line and column. map_script_export gives the files back, and map_script_api looks up what a script can call.
  • The Claude Desktop extension now includes TypeScript, so map_build works with nothing else installed.

Command line

  • scmjs map test --show prints what each game did. --only <name> plays one scenario, - reads scenarios from standard input and --save keeps them. scmjs mod test takes the same flags.
  • scmjs map script import, export and api do what the AI tools of the same names do.
  • A script compiles with TypeScript 6. TypeScript 7 and 5 cannot compile one, and scmjs doctor now says "too new" or "too old" for them. Install typescript@6, since typescript alone installs 7.
  • For a Homebrew install, scmjs about and scmjs doctor give the update command as brew update && brew upgrade scmjs. brew upgrade alone may not see a new release for a day.

Privacy

  • When something goes wrong, the count the editor sends now also says which part of the editor it was in, such as which dialog, and for a map file's archive, which kind of problem it was. It still never sends the error's message, the map or a file name.

Plugins

  • Repair 1.7.0: files in a map's archive that nothing names, left out of the next save.

For plugin authors

  • api.document.archive.unreachable() counts the archive's files that nothing names, and dropUnreachable({ asOpened }) leaves them out of the next save. Its result has undo() to put them back. Use asOpened only for a repair made as the map opens.
  • The API version stays 1.

Changes in scmJS 0.17.0:

Preferences has a filter box, can draw the interface larger, and resets one page at a time. The View menu remembers what was ticked, and the Heal tab shows and counts the seams it mends. Claude Desktop can now work on your maps, installed from one file with no terminal.

Preferences

  • A filter box above the page list finds a setting on any page. Type a word and every section that has it is shown under its page's name, with its own controls. On Hotkeys the box narrows the list to a command by its name or its keys: Ctrl+S finds Save.
  • View ▸ Interface draws the menus, toolbar, palettes, panels and dialogs at 115% or 130%. The map is not enlarged, and a press still lands on the tile under the pointer.
  • View ▸ Notices has Keep notices until I close them. With two or more up, a Close all sits above them.
  • Reset this page puts back only the page in front, and Reset everything… asks first. Neither changes the Privacy tick.
  • New scenario, Saving and Recovery are on a new Files page. General keeps Language, Startup, Maps and Privacy.
  • The plugins' pages are listed by the plugin's name.

View menu

  • Grid, Location Names, Animate Water, Animate Units and Remastered Graphics come back as they were left. The three ticks that set what they started with are gone from Preferences ▸ View, and a choice made there is carried over.
  • Where the system asks for reduced motion, the two animations start off until you tick them.

Terrain

  • The Heal tab says what a seam is, draws the seams on the map while it is open, and counts them, for the whole map or the area marked.
  • Every Heal stroke says what it did: the tiles it changed and the seams left, or why it changed nothing.

Several maps

  • Switching to another open map ends a unit being placed and forgets where the Blend brush started.

AI apps

  • Claude Desktop installs scmJS from one file: scmjs-mcp-windows-x64.mcpb, or scmjs-mcp-macos-arm64.mcpb / scmjs-mcp-macos-x64.mcpb on a Mac, on this release's page. It asks for your maps folder and needs no terminal or Node.js.
  • Ask the AI to sign you in to scmjs.dev: it opens the sign-in page in your browser, with no terminal.
  • scmjs mcp --folder <folder> names the folder the tools work in, for an app that starts the server somewhere else.
  • The AI tools guide starts with setting up Claude Desktop, then example requests with what they give back, and what to do when something goes wrong.

Plugins

  • Aftermath 0.27.2: the replay timeline and its charts follow the pointer at a larger interface size.
  • scmjs.dev 1.41.1: its Preferences page is listed before the Account dialog has been opened.

For plugin authors

  • At 115% and 130% your dialogs and panels are drawn larger with the rest of the interface. A pointer's clientX / clientY and getBoundingClientRect() are in page pixels, while clientWidth and the lengths you set are in the element's own. Turn a pointer position into a place in your element with the rectangle alone, (e.clientX - rect.left) / rect.width * element.clientWidth, or divide by element.currentCSSZoom. A tooltip function's offsetX / offsetY are page pixels too.
  • Reset everything… calls a Preferences page's reset() when the page has been shown since the dialog opened, even with another page in front.
  • animateWater, animateUnits and hdGraphics are no longer fields of Preferences. Read them with api.view.flags(). The grid, location names, the two animations and Remastered graphics are now remembered between sessions, so a plugin that changes one for a moment should set it back.
  • A notice stays up, whatever time it was given, for someone who keeps notices until they close them.
  • The API version stays 1.

Download:

Find version 0.18.0 of scmJS here.

Down the rabbit holes
Posted by Ojan

I have spent some time now going down various rabbit holes. In order to further improve AxeGraft, I realized I wanted to modernize and update MPQDraft first. A new update of it is underway, but there's still more I want to do there.

However, when updating MPQDraft, I realized that Diablo does not even play on my system, and I knew since before that StarCraft and Warcraft II give a very poor experience as well. My system is an old Lenovo Thinkpad with a 4K screen, running the fantastic labwc, a Linux Wayland compositor.

Wayland the smith

To play these games, you need Wine, a compatibility layer for running Windows programs under Linux. It seems to have been lacking a little bit in three separate areas: DPI scaling for smaller screen resolutions, repainting of the screen under certain conditions, and how its wayland driver handles window popups. I have made fixes for all those areas, so if they get merged, the experience going forward should be smoother for everyone playing with similar systems.

Diablo I still has some minor issues after this: in the main menu there are artifacts from previous screens still visible when they should be repainted. It appears that Windows 8 and above handles these situations differently than the Windows versions Diablo I was developed for. While I haven't tried this, I thus belive Wine behaves correct in how it handles this area, and attempting to run Diablo I under a modern Windows version will likely result in the same visual issues. Fixing it in Wine will make Wine deviate from its goal of behaving like modern Windows. Anyway, it is a minor issue, not a showstopper like the other fixes.

So, hopefully this gets accepted in Wine, and regardless, I have unblocked what I need in order to continue with the next version of MPQDraft.

Updated UDTA specs, added UGRD specs
Posted by Ojan

The specs for the UDTA and UGRD files of Warcraft II are now available on the formats page.

The UDTA file controls the properties of units, such as hitpoints, graphics, cost, and various flags like whether they are spellcasters and can detect submarines and much more. The UGRD file is similar but for upgrades; it controls things like costs, time, groups and flags. These files exist in both the DOS versions of the game, the Battle.net Edition, as well as inside PUDs (maps).

The files have both been checked against decompiled versions of the games, and are thus — I believe — more thorough and correct than most other similar specs out there (if there are even any available online these days).

See the formats page for all specs currently available.

mpqcli 0.13.1 released
Posted by Ojan

Thomas Laurenson recently made a new release of mpqcli. The release is mainly fixing various smaller issues.

Changes in mpqcli 0.13.1:

Changed

  • Stop printing the m, n and f flags in the flags property, which carried no information
  • Show an error's number only when the text comes from the operating system

Fixed

  • Find files given with forward slashes in read, extract, remove and rename
  • Stop add from leaving files out when one run fills the archive's file table
  • Reject a create sector size below 1024 or not a power of two, which StormLib cannot read back
  • Accept locale names in any case, so dede is deDE rather than the locale ID 0xDEDE
  • Ignore an empty listfile with a warning instead of failing
  • list and extract an archive with no entries as empty instead of failing
  • Leave no empty output directory behind when extract writes nothing or is interrupted
  • Describe Windows system errors with the Windows message rather than an unrelated one
  • Describe verify --print as writing raw bytes, not hex, in the help, docs and completions

Download:

Find version 0.13.1 of mpqcli here.

AxeGraft revealed
Posted by Ojan

After working like a madman for more days than I can count, I am now ready to reveal what I mentioned in the previous post: AxeGraft.

While many things in StarCraft and Warcraft II are stored in files that are easily editable and modifiable, a fair chunk of things are built directly into the game executable themselves. Most notably, these include what buttons and abilities each unit has, what buildings can do, and what the tech-tree looks like.

AxeGraft

With AxeGraft, this is now modifiable! It consists of an Editor where you make your edits, and a Patcher where you load a set of edits. The Editor runs directly in your browser, while the Patcher is a plugin for MPQDraft. It has support for nearly all versions of StarCraft: Brood War <= version 1.17, and for Warcraft II: Battle.net Edition.

You can just download the code and open the AxeGraft Editor yourself in the browser, or you can find it hosted here. The Patcher is available here.


This is not the first such tool. For the DOS versions of Warcraft II, there was WarHack by Merlin (Cameron Burschardt). In 1999, King Arthur (Andy Bond) released StarGraft that became incredibly popular. Later came MemGraft by DarkWizzard, and FireGraft by DiscipleOfAdun. Especially this last tool has seen much popularity for many years. All of them have been closed-source though, and Windows only.

So what's with all the similar tools, and how is AxeGraft different? What all of these have in common is that they edit a specific place in memory of the game executable. By careful reverse engineering, the authors have figured out the exact memory address of for example where a button is, and can thus change it to something else. It has been very labourious and tedious work to figure these addresses out in the past. And every time Blizzard has released a new patch, all that work is reset; the memory locations are now in different places and tool authors are either forced to start over if they want to support a new patch, or people who want to play mods are forced to downgrade their versions of the game if they want to play mods made for an older version.

With AI advancements, the work of finding these offsets became pretty much automated. AxeGraft thus supports nearly all Brood War versions up until 1.17. I intend to write a converter tool that can take in old mods and turn them into something that AxeGraft can use. The format of AxeGraft itself is version-agnostic, so once fed a catalog file with the right offset mappings, any mod will work.


I will add more improvements when I have the time. It currently lacks support for GPTP and DatExtender, and I'm hoping to provide some way to edit the tech-tree in Warcraft II, the way you can in StarCraft. Let me know if you experience any issues!

Things are brewing
Posted by Ojan

I am hard at work these days with a little secret project. I'm not going to announce what it is quite yet, but it will modernize the set of modding tools available and is something we are in dire need of. I'm targeting both StarCraft and Warcraft II with it.

A little hint for those who are old-school enough to get the reference of a so-so drawn Hydralisk:

Rippin' Joeyray a third one...

Well, let's see what this tool turns into...

PyMS for Python 3
Posted by Ojan

For StarCraft modders, PyMS has been the go-to tool for a long time. It is a cross platform BroodWar modding suite written in Python, and contains 15 programs to edit most of the file types you will encounter while modding.

It was originally announced in 2008 and written for Python 1.5, and at some point updated for Python 2. It has not, however, been officially updated for Python 3. This has started to cause problems, since Python 2 has been unsupported for nearly seven years. It is no longer easily installable on many systems, and it might not always be trivial to run Python 2 and Python 3 on the same machine.

After a long and cumbersome effort to overhaul the code base, poiuy_qwert finally made the Python 3 version the official one!

In poiuy_qwert's own words:

The old code was kind of shit and unwieldy in a lot of core places, so fixing things was a nightmare, but it generally worked and was stable enough. I could have made it python3 compatible "easily", but I didn't see the point in that unless I actually fixed some of the core issues and got some of the benefits of moving to python3 (better type hinting for example). Because I decide to do a lot of large deep re-writes and large breadth changes, I was hesitant to put it in too many hands without better testing, and with my limited time I can only dedicate that time to development not actually testing/modding. I've been stuck at "should I replace the version that is working and battle tested to be generally stable with something that is in theory much better but has much less testing so may be less stable" for a bit

Anyone who ever looked at the old code will probably mostly not recognize the new code, in a good way 😅 I feel bad for the people that had to touch the old code (I know a few people threw some curses my way about it 😝 ), but I am very happy with where it is now and hope anyone touching it will be too

poiuy_qwert

Not only was it updated for Python 3, but it also contains a ton of other updates/fixes (see the Change Log for all the details!)

I am very grateful to poiuy_qwert for continuing to support PyMS for so long, and still making efforts to modernize it.

Find PyMS on GitHub.

ThunderGraft II
Posted by Ojan

Back in the day, Quantam (Justin Olbrantz) made an MPQDraft plugin called ThunderGraft. He is, I believe, somewhat of an audiophile, and he himself considered ThunderGraft to be "possibly the coolest of the three modding tools I released". While MPQDraft certainly was more used and more widely useful, ThunderGraft was a very clever tool.

In short, what this tool does is allow you to play sound formats other than WAV in your mods. In addition to WAV, it supports MP3, FLAC and Ogg Vorbis.

Background

When Blizzard developed their games in the nineties, MP3 was far from the household name it became after Napster made music file-sharing popular in 1999. It was also patent-encumbered and relatively expensive to decode on the computers of the day. Whatever the reasons, Blizzard went another way; as Quantam wrote in a little piece about it: Diablo used raw PCM WAV audio, while Starcraft introduced (and [Warcraft II and Diablo II] used) a special "WAV compression", which compressed the audio in lossy ADPCM form, resulting in a compression ratio between 3:1 and 4:1 (though at the cost of audio quality).

This lossy audio compression was built into the MPQ format itself; the games saw what they read and wrote to the MPQs as simply PCM WAV audio, and that's all the audio streaming API was capable of playing. Quite a strange feature of an archive format.

Quantam continues: "ThunderGraft exploited the fact that the audio streaming API was encapsulated in functions supplied in Storm.dll. The fact that the functions were entirely contained in Storm meant that I could cleanly capture calls to them and redirect them. For cleanliness, I opted to simply replace the streaming API in its entirety. Anything less would have been version-dependent, as it would have required all sorts of messy code modifications inside Storm's internal functions."

As the audio engine, some custom made engine by Dark_Brood was originally used, later replaced by FMOD Ex. FMOD Ex is not open-source, however, and it needed to be shipped alongside ThunderGraft. The toolchain of ThunderGraft is also at least twenty years old by now.

Mårten Eskil Winge: Thor's Fight with the Giants (1872)

I decided to bring some life back into this project. I have replaced FMOD Ex with miniaudio, modernized the build environment and allowed it to be built on any platform. Miniaudio supports fewer formats than FMOD Ex did, but I think MP3, FLAC and Ogg Vorbis ought to be enough for most people — they bring the audio quality up and the file sizes down. Reach out if you think I should incorporate Opus support, though I'd rather not, to keep the code simpler.

One way to use the plugin is to simply put your sound files under the original music name, for example MUSIC\\TERRAN1.WAV (i.e. name it WAV even though it is a different format). A more elegant way would be to remap the names using Playlists.

Playlists and Audio Triggers

Another somewhat obscure MPQDraft plugin is ShadowFlare's Playlist Plugin: a plugin that allows you to define playlists in your mods. Inspired by ShadowFlare, I decided to incorporate that functionality straight into ThunderGraft, so that it has support for playlists too. The format she used for her plugin is supported out of the box in order to support legacy mods, but to define playlists, you should use the contemporary native plugin format instead.

By using playlists, you can map one sound to a set of sounds. It can be used to play your sound file instead of the one the game wants to play, or you can set it up to play a whole set of sound files with fades and shuffles and the like.

The playlist format allows pretty advanced things; it is really a little state machine, capable of reacting to sounds as if they were triggers. You can for example make it so that when a sound with a given filename is played, the music changes to boss-fight music (indefinitely or until another sound that you configure brings the music back into another playlist). Individual StarCraft maps can have their own playlists to make different levels more fine-grained. I recommend reading the documentation for inspiration about what you can do.

Credits

As mentioned, the original version was made by Quantam (Justin Olbrantz). ShadowFlare is the inspiration for the Playlist features. The audio engine, miniaudio, is by mackron (David Reid), with community contributions (including by myself as I found bugs during testing).

Status and download

I have done limited testing, and on StarCraft only. There are still things to polish, but I figure it's good enough for now, and the more eyeballs on this, the better.

A pre-built binary of the MPQDraft plugin and the source code are available on GitHub.

Namebreaking progress: 70 more names found
Posted by Ojan

Two weeks ago, I wrote about namebreak-bombe, the tool for cracking the last unknown filenames in Blizzard's MPQ archives on GPUs. A lot has happened since then! At the time it was just me and Heinermann running it; now people have contributed to the coordinated search, and together we have hashed more than 8 quintillion ( 8 ⋅ 10 1 8 ) candidate names. A big thanks to everyone who has joined, in particular Heinermann, lucifirius, Johnny C, Jesse and mika (and myself!), who have all found names.

namebreak-bombe

Names found since last time

StarCraft: Brood War French edition, BroodDat.mpq:

SOUND\PROTOSS\DARCHON\PDAWHT011.WAV
SOUND\PROTOSS\DARCHON\PDAWHT021.WAV
SOUND\PROTOSS\DARCHON\PDAWHT031.WAV

StarCraft: Brood War French edition, Install.exe:

NEWMUSIC\PDEFEAT.WAV
NEWMUSIC\PRDYROOM.WAV
NEWMUSIC\PROTOSS1.WAV

StarCraft German edition, StarDat.mpq:

SOUND\TERRAN\RAYNORM\TMARDY00.WAV

StarCraft: Brood War German edition, Install.exe:

CAMPAIGN\EXPTERRAN\TERRAN07\STAREDIT\WAV\T7M06STU.WAV
FILES\LOCALOLD.DLL

StarCraft Brazil edition, StarDat.mpq:

SCRIPTS\CRDT_LST.TXT

StarCraft: Brood War Brazil edition, Install.exe:

SETUPDAT\INST_F~1.$$$
SETUPDAT\STRINGS.$$$

setupdat_working_sp\bwunin.exe
setupdat_working_sp\bwunin.pif
setupdat_working_sp\cleanup.ins
setupdat_working_sp\debug.ins
setupdat_working_sp\defaults.vis
setupdat_working_sp\directx.ins
setupdat_working_sp\gendefs.ins
setupdat_working_sp\inst.ins
setupdat_working_sp\inst.vis
setupdat_working_sp\installed.ins
setupdat_working_sp\instgen.ins
setupdat_working_sp\inst_files.ins
setupdat_working_sp\inst_gen.ins
setupdat_working_sp\inst_regs.ins
setupdat_working_sp\inst_sys.ins
setupdat_working_sp\iswinnt.ins
setupdat_working_sp\license.txt
setupdat_working_sp\mainplay.vis
setupdat_working_sp\noboot.dat
setupdat_working_sp\normal.ins
setupdat_working_sp\prepbrood.ins
setupdat_working_sp\savetemp.ins
setupdat_working_sp\scr_blizzard.vis
setupdat_working_sp\scr_isp.vis
setupdat_working_sp\scr_main.vis
setupdat_working_sp\scr_options.vis
setupdat_working_sp\scunin.exe
setupdat_working_sp\scunin.pif
setupdat_working_sp\setup.vis
setupdat_working_sp\single.ins
setupdat_working_sp\spawn.ins
setupdat_working_sp\spawn.vis
setupdat_working_sp\strings.ins
setupdat_working_sp\INST_F~1.$$$
setupdat_working_sp\upgrade.ins
setupdat_working_sp\upgrade.vis
setupdat_working_sp\95\comctl32.dll
setupdat_working_sp\audio\battlenetclick.wav
setupdat_working_sp\audio\installermusic.wav
setupdat_working_sp\audio\mousedown.wav
setupdat_working_sp\audio\mouseover.wav
setupdat_working_sp\font\font.ccd
setupdat_working_sp\font\font16.fnt
setupdat_working_sp\font\font16x.fnt
setupdat_working_sp\font\font32.fnt
setupdat_working_sp\gen\allied.lst
setupdat_working_sp\gen\broodwar.lst
setupdat_working_sp\gen\bwladder.lst
setupdat_working_sp\gen\ladder.lst
setupdat_working_sp\gen\oldladder.lst
setupdat_working_sp\gen\webmaps.lst
setupdat_working_sp\images\install.pcx
setupdat_working_sp\nt\comctl32.dll
setupdat_working_sp\STRINGS.$$$
setupdat_working_sp\instcc.exe
setupdat_working_sp\riched20.dll
setupdat_working_sp\vssver.scc

The last one is particularly nice. The Brazilian Brood War installer contains 57 files, one after another, that turned out to be an older, Spanish working copy of the installer's SETUPDAT directory, but under a different name. Most of their basenames could be worked out, but the directory itself eluded us. Finding SETUPDAT_WORKING_SP thus gave names to the other 56 files in it as well, including its subdirectories 95, AUDIO, FONT, GEN, IMAGES and NT.

Also of note are SETUPDAT\INST_F~1.$$$, SETUPDAT\STRINGS.$$$ that contain the characters $ and ~ that we normally don't search for. These files themselves seemed to be half-done versions of other files, and some editors in the 90's would save temporary copies of files with .$$$ extension. The ~1 part is the filesystems of the times that would trim longer file names in this way. We were lucky to have discovered these thanks to AI that tried a bunch of more or less likely patterns.

Diablo II: Lord of Destruction Japanese edition, setup.mpq:

SETUPDAT\JPN\VSSVER.SCC
SETUPDAT\LOC_INSTALLED.INS
SETUPDAT\US_INSTALLED.INS

Encryption keys give away the basename

Several of the names above were cracked by first finding only the basename (the part after the last backslash), and then the directory separately. This is possible because many files in MPQs are encrypted, and the key a file is encrypted with is derived from a hash of its basename. Strictly speaking, the key is the basename's hash, adjusted by the file's position and size in the archive, but that adjustment is easily undone. The key itself isn't stored anywhere, but since we know what the first few bytes of an encrypted file must decrypt to, the key can be recovered from the encrypted data.

This is very useful: it means a single file gives us three hashes rather than two, and that one of them only depends on the basename. For example, the French Brood War music files were identified to be identical to PDEFEAT.WAV, PRDYROOM.WAV and PROTOSS1.WAV. Because of the encryption key, we can now verify that the files indeed has these basenames. The remaining search is then for the directory, which turned out to be NEWMUSIC. The key also lets the client discard false matches; with the number of candidates we hash, names matching both of the regular hashes purely by chance do occur, but a chance match whose basename also hashes to the key is far less likely.

I've made a pull request to mpqcli so that it can correctly show the encryption keys of files, which makes this easier for anyone wanting to look into an archive themselves. This is now part of mpqcli version 0.13.0.

New search modes: dictionary and meet-in-the-middle

So far, the client has only been able to bruteforce every combination of characters from an alphabet. That works well for short names, but every additional character multiplies the search space by around 40. I've therefore added two new search modes to the client.

Dictionary search builds the candidates out of words instead of individual characters: one word, or several with separators such as _, - or a space between them. The client comes with an English word list of about 64,000 words, and the coordinator can hand out dedicated word lists, for instance with StarCraft-related words. Long names made of real words, which are far out of reach for plain bruteforcing, can be found this way.

Meet-in-the-middle search is for finding unknown directories, and it is what cracked SETUPDAT_WORKING_SP. The MPQ hash function processes a name one character at a time, and it turns out that each step can be undone if the character is known. When many files are known to be in the same directory (as they were in this copy of SETUPDAT), it is possible to recover what the hash state must be right after that directory. The search can then work from both ends: forward from the start, building a table of every possible beginning of the directory name and which hash state each leads to, and backward from the recovered state, rewinding possible endings of the name and looking up whether they meet any of the beginnings in the table. A 5-character table costs 1.4 GB of memory, but it means that 5 characters of the name come for free, which turns a search that would take a year of GPU time into one that takes minutes. For this to be useful, we must know that several files exist in the same directory, we need to know their basenames, and we need to have enough files to be able to recover the hash state — in other words, it's quite special circumstances needed for it to be a useful search.

Both modes are available in the latest releases, both when running locally and when connected to the coordinator, on CUDA, OpenCL, Metal and the CPU.

What we're struggling with

Some targets are still stubbornly resisting:

  • The "Poor Fellar's Dog" cutscene from the Brazilian StarCraft Install.exe, a version of the music without voiceover in the MUSIC directory. Over 3 quintillion names have been tried by brute force, and dictionary searches of up to five words have been exhausted without a hit. The name is probably >= 13 characters long and made of words or abbreviations, or it contains some special character we haven't searched for.
  • Two sounds in the REZ directory of the StarCraft installers: copies of swishlock.wav and swishout.wav. Several quintillion candidates have been searched for these too.

If you find this interesting, please join the search by running namebreak-bombe on your machine! The dashboard here shows the current progress on the remaining names.

Jorsys news