• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Warsmash Mod Engine (Alpha)

Warsmash is a mostly "clean-room engineered" rewrite of Warcraft III. A combination of LibGDX game engine, and the "mdx-m3-viewer" by Ghostwolf (used in "View in 3D" button on Hive model download section) are used to emulate the Warcraft III experience without running the actual Warcraft III game. However, this emulator must get the Warcraft III assets from somewhere on your computer, and does not include them.

Using a complete remake of Warcraft III in this way creates a ton of bugs. Unlike Reforged, where bugs are introduced by breaking existing code, on this project the bugs exist because the non-bugged version -- the way we "expect" the game to operate -- never existed. Because it is completely rewritten from nothing in a totally different language (Java). For example, some people think that Warsmash is in competition with Warcraft III: Community Edition because both of these can potentially provide a platform for playing games of Warcraft III with fan upgrades. But this is an extremely odd comparison. When we launch "Warcraft III Community Edition," on a technological level the computer is running the Warcraft III software written by Blizzard Entertainment in that case. However, when we play Warsmash, the computer is not running the Warcraft III software written by Blizzard Entertainment. If people think that the two projects are the same, but only one of them is a complete remake from scratch, this would seemingly speak very well of the facade achieved by the emulated remake.

Accordingly, what is presented here is a vertical slice of features that still has many known issues:
  • Campaign - It is possible to click on "Campaign" to play single player campaign missions, but they will not automatically launch they following mission and the in-game cinematics are not working. So about half of the campaign missions probably crash from script errors, and the other half will simply be a bunch of preplaced units where the scripted map events might not work as expected
  • Custom Game - It is possible to click on "Single Player" and then "Custom Game" to play a custom game. The map selection UI is not finished and is missing the capability to descend into sub-directories. (Thanks to @bear_369 for contributing on GitHub to improve the map preview to show melee/custom status and player count!) You can play both melee maps and some custom games. For example, when I tried playing WarChasers I was able to pick a hero and run around, but eventually after about 2 bosses the player will be stuck and unable to progress.
  • "Battle.net" button - This button will connect to a Warsmash server of your choice specified in your warsmash.ini. The default one is warsmash.net which is always running and maintained by Retera. The code for this server is on the GitHub if you want to spin up your own. It is not using PvPGN and is a rewrite, so accordingly the features are minimal. /join XYZ might be able to join a custom channel, but /j XYZ shortcut is missing, etc. The only menu button on the server that works is the Custom Games button. It allows you to host games that can be joined by other players on the same server. The menus use TCP connection but when you get into a game session we switch to UDP. For some people, if their ISP blocks UDP, this may prevent the game from working as expected. If you get into a UDP multiplayer game, there is no desync detector, so in case of a desync happening the game will stupidly keep playing. This can have odd consequences

Versions:
  • Jass - the Warsmash script engine is not as picky as Warcraft III and will allow you to use a new Reforged version of the script environment that declares Jass natives which do not exist on Warsmash, and it will also allow you to use a very old Patch 1.22 version of the script environment that does not declare Jass natives that Warsmash would have supported, if they had been declared. This means that we can traverse up and down Warcraft 3 game version without changing our Warsmash emulator build - we only have to change the warsmash.ini config and possibly some of the [EmulatorConstants] within it.
    • If you call a native function that is declared but has no behavior on Warsmash, the script engine will log an error but do nothing and continue running. This can be changed to be more strict with a compile setting
    • You cannot call a native function that is not declared, even if Warsmash would have had a binding for what it does
  • 1.32 - You can emulate some of the Reforged graphics on Warsmash, which load natively (without being ported), but the shaders on Warsmash are not as pretty as the ones on Reforged, and the PKB files do not work because the guys at PopcornFX replied to my email about open source projects by saying that they only support Amazon Lumberyard or O3DE or something like that, and not any other open source projects. You can also emulate classic graphics from a 1.32 install but the experience is inferior to using a legacy version of Warcraft 3, because some of the sound data fails to parse and unit responses are missing. (This is due to Reforged changes for the lip sync of Reforged graphics, which similar to PKB files use a 3rd party technology that Warsmash does not even try to emulate.)
  • 1.31 - To emulate this on Warsmash you might have to recompile and get a different CASC parser. Typically I was using a folder of extracted 1.31 assets (which doesn't require a recompile)
  • 1.29 - This should work fine. Warsmash will detect the RoC/TFT button on the menu and hook it to Warsmash functionality for changing version
  • 1.22 - 1.28 - These should work fine with the warsmashLegacy.ini file provided. Note that they use 16 players instead of 28 in the [EmulatorConstants].
  • For more information on how the versions are different from each other, see the Warsmash GitHub linked at the bottom of this page.

Project Setup:
Originally I only tested this binary distribution with the English Warcraft III edition, Patch 1.22. However, more recently, I was trying to use Patch 1.29 when possible to prepare for W3CE as the future. So if you already have Patch 1.29 and W3CE on your computer, what I mean here is that you could launch Warsmash emulation using that installation as your source of Warcraft III assets. Based on my tests, this program should be able to function if you reconfigure warsmash.ini to point to your Reforged 1.32 installation, however when you do so, some of the features of this program will be missing. And 1.33 and beyond are not supported. So if you have the latest patch, the Patch 2.0, the Warcraft 3 assets in that installation are not the correct format for Warsmash and I haven't bothered to rewrite how I parse 3D models to match the whims of Activision, so until I change this note it isn't possible for you to use those Warcraft 3 assets in your Patch 2.0 install.

For Patch 1.22 or similar patches, unzip the contents of Warsmash.zip and create a folder as a subdirectory of your Warcraft III installation, like this:
189057-a8f0aacd8019610a9116dfae70b97c82.png

Then, inside this Warsmash folder, you should see the Warsmash EXE as well as the necessary files.
It should look like this:
189058-4af075dbe283586544adf97abbaadb6d.png

If you are going to use Patch 1.28 or older, rename the "warsmashLegacy.ini" file to be named "warsmash.ini". Otherwise, if you are going to use Patch 1.29 (such as from a W3CE installation) then keep the "warsmash.ini" that comes with the ZIP.

If you double-click on the Warsmash EXE, then this should launch the Warcraft III game using the Warsmash Mod Engine (so a lot of the features that are not Warsmash-supported yet will be disabled, but you should be able to click around and maybe even have some fun!). If your virus protection deletes Warsmash.exe, you may find it more ideal to trust your virus protection software instead of trusting Retera. In that case, you can create a batch script that should be functionally identical to the EXE, by putting the following line of text inside of Warsmash.bat in the Warsmash folder:

Code:
.\bin\warsmash.bat

For some users the game will not launch at this time, because your hardware is not supported, so do not be surprised if it does not work. However, when that happens, feel free to report back here and discuss the nature of the problem. Most likely I will very soon publish a build of this tool that has improved error logging support. Based on my hardware tests thus far, I am currently requiring OpenGL 4.5 for Warsmash even though there is a solid case to be made that OpenGL 4.5 should not be required ideologically. So, backwards compatibility might be improved in the future, but on OpenGL 4.5 compatible systems right now is where I find that Warsmash really works.

Command-Line Options
At the time of writing, Warsmash supports two possible command line arguments. You can make a shortcut to Warsmash and either of these arguments to your shortcut:
Code:
-windowed
-loadfile <name>
The "loadfile" argument searches within the Warsmash game data, and not in any maps folder yet, so it is best if you test with builtin maps. One example would be "-loadfile (2)bootybay.w3m" that should work regardless of your Warcraft III version, for example. It should also load map files from the "Warsmash" folder in your game install if you are using the default configuration suggested above.
The "windowed" argument currently fights with the mouse capture system and can create nuisances that squash the render window and crash the game because it cannot process having a pixel height of 0 for the game window. When I settle on what the best bug tracker should be for this project, we can add that to the list of known bugs.

Open Source
Most of the entire point of Warsmash is to be an open source project. If you would like to build Warsmash yourself from source, you can download all of the necessary files at this location:
GitHub - Retera/WarsmashModEngine: An emulation engine to improve Warcraft III modding
Warsmash is a Gradle Java project, which means that some of the dependencies are not included in the repo above, and instead they are downloaded as a part of the build process from their respective online locations.

The source code of the Warsmash EXE that I have included in this binary build for ease of use is here:
GitHub - Retera/WarsmashWindowsWrapper: An EXE for Windows to launch Warsmash
(This is a very tiny do-nothing program that launches Java, as well as forwarding the -loadfile style arguments to the Java program.)

Check out the Hosted Project Forums here: Warsmash Mod Engine
Previews
Contents

Warsmash Multiplayer Alpha 1.1m (Binary)

Reviews
eejin
A very cool project that shows a lot of promise. Launching it is kind of inconvenient as you have to obtain the Warcraft 1.22 game data files from somewhere. I think it would really help in adoption if you'd make it default to loading data from the...
The parent folder contains Frozen Throne English version 1.27.1.7085.
When the "change email panel" is not found, this means that you are not fully loading 1.27. Instead you are loading 1.14 data or whatever, because your war3patch.mpq file was not included in the MPQ list. The fix should be simple if you modify the MPQ list and add the war3patch.mpq file, making sure to load it after/on top of the war3x.mpq file and war3xLocal.mpq file.

I have tried Reforged now with its latest version
At some point in the year 2022, Reforged did an update and reformatted all ingame MDX assets for no particularly good reason that I can see, possibly to stop programs like Warsmash from working. Rather than to play a stupid game of cat and mouse with a billion dollar corporation, I decided to upgrade my Retera Model Studio for their new format while leaving Warsmash on the legacy game model format because the Reforged modders want to load from their Reforged installs, but upgrading Warsmash to become more and more spaghetti and unreadable trash with many branches for many model format versions is frustrating and worsens the code. I don't know if you've seen the video on my YouTube channel, but after Activision changed the ingame model format, they broke the Warcraft III game itself so that it could not properly parse and render its own models, and although there are still bugs in the editor I think that in late 2023 after about a year of having literally broken visuals pushed into production on Warcraft III, they may have gotten at least the game working.

I don't want to play cat and mouse with a billion dollar corporation, but when they can't even maintain their own software stack with the billions of dollars because of their bad decisions, I do not wish to be forced to put those bad decisions into my software stack in parallel. As a user, Reforged seems reasonable. As a user, it seems like Reforged has all the classic assets. As a technologist, those assets are spaghetti exported by a hack and are no longer in the Frozen Throne format, and the differences are all stupid differences and should not be so. For example, the numeric indices in the Layers of Materials for designating which shader input the layer's texture ID is for, last time I looked, seem stupid and wrong when KMTF blocks are present and my solution on Retera Model Studio was basically to overwrite the number in the file with the number that we assume should have been there. It is bad, and it is maintained by people who are less interested in Warcraft III than I am, even though it is their job and not my job. This is the world we live in. If you doubt me, try making a pull request on Warsmash that fixes the model parser to be capable of loading SD graphics on the latest Reforged client [and maybe also HD assets, as Warsmash has an entire separate shader set up for loading and rendering HD assets, inherited from Ghostwolf's works and beefed up with Retera Model Studio shaders]. I think that if you make this pull request, and if it is done reasonably well and consistent with Warsmash code style, I would probably consider to merge it. It's possible I might hesitate because the new format is bad for SD and it makes the Warsmash code more complex, reducing the capability of my project to be educational in favor of instead being maximally compatible. But maybe if you tell me what's going on with the numbers, I might consider it. I don't know, maybe Microsoft Activision actually fixed the numbers in the models to make sense on 1.36.X when they fixed the game render pipeline to render visuals "more correctly" than 1.33 when they broke it. (Of course, there are other things they broke in 2020 with 1.32+ that are not broken in Warsmash, but we no longer complain about these things in most cases because it is unlikely to convince their corporation to fix bugs that have aged beyond a certain length. They will simply say that the new visual style, such as ribbons glitching and being very dark, is the Reforged Classic style, and people who want Frozen Throne visuals must accept the new style where you cannot even see the ribbon on the Paladin weapon or whatever. They are allowed to say that, because they own the brand, but I am allowed to say that Warsmash will be a Frozen Throne emulator instead of a Reforged Classic emulator if I want.)

Sorry if that is long-winded, but I hope it helps you to understand my position. It is not that I do not want the emulator to run off of the latest live Warcraft III client. It is rather than one of the purposes for my emulation is to avoid giving up on features that are bulldozed by a major corporation, so in certain instances when they bulldoze good things they do not appreciate, I am loathe to do likewise.
 
Level 28
Joined
Feb 2, 2006
Messages
1,633
When the "change email panel" is not found, this means that you are not fully loading 1.27. Instead you are loading 1.14 data or whatever, because your war3patch.mpq file was not included in the MPQ list. The fix should be simple if you modify the MPQ list and add the war3patch.mpq file, making sure to load it after/on top of the war3x.mpq file and war3xLocal.mpq file.


At some point in the year 2022, Reforged did an update and reformatted all ingame MDX assets for no particularly good reason that I can see, possibly to stop programs like Warsmash from working. Rather than to play a stupid game of cat and mouse with a billion dollar corporation, I decided to upgrade my Retera Model Studio for their new format while leaving Warsmash on the legacy game model format because the Reforged modders want to load from their Reforged installs, but upgrading Warsmash to become more and more spaghetti and unreadable trash with many branches for many model format versions is frustrating and worsens the code. I don't know if you've seen the video on my YouTube channel, but after Activision changed the ingame model format, they broke the Warcraft III game itself so that it could not properly parse and render its own models, and although there are still bugs in the editor I think that in late 2023 after about a year of having literally broken visuals pushed into production on Warcraft III, they may have gotten at least the game working.

I don't want to play cat and mouse with a billion dollar corporation, but when they can't even maintain their own software stack with the billions of dollars because of their bad decisions, I do not wish to be forced to put those bad decisions into my software stack in parallel. As a user, Reforged seems reasonable. As a user, it seems like Reforged has all the classic assets. As a technologist, those assets are spaghetti exported by a hack and are no longer in the Frozen Throne format, and the differences are all stupid differences and should not be so. For example, the numeric indices in the Layers of Materials for designating which shader input the layer's texture ID is for, last time I looked, seem stupid and wrong when KMTF blocks are present and my solution on Retera Model Studio was basically to overwrite the number in the file with the number that we assume should have been there. It is bad, and it is maintained by people who are less interested in Warcraft III than I am, even though it is their job and not my job. This is the world we live in. If you doubt me, try making a pull request on Warsmash that fixes the model parser to be capable of loading SD graphics on the latest Reforged client [and maybe also HD assets, as Warsmash has an entire separate shader set up for loading and rendering HD assets, inherited from Ghostwolf's works and beefed up with Retera Model Studio shaders]. I think that if you make this pull request, and if it is done reasonably well and consistent with Warsmash code style, I would probably consider to merge it. It's possible I might hesitate because the new format is bad for SD and it makes the Warsmash code more complex, reducing the capability of my project to be educational in favor of instead being maximally compatible. But maybe if you tell me what's going on with the numbers, I might consider it. I don't know, maybe Microsoft Activision actually fixed the numbers in the models to make sense on 1.36.X when they fixed the game render pipeline to render visuals "more correctly" than 1.33 when they broke it. (Of course, there are other things they broke in 2020 with 1.32+ that are not broken in Warsmash, but we no longer complain about these things in most cases because it is unlikely to convince their corporation to fix bugs that have aged beyond a certain length. They will simply say that the new visual style, such as ribbons glitching and being very dark, is the Reforged Classic style, and people who want Frozen Throne visuals must accept the new style where you cannot even see the ribbon on the Paladin weapon or whatever. They are allowed to say that, because they own the brand, but I am allowed to say that Warsmash will be a Frozen Throne emulator instead of a Reforged Classic emulator if I want.)

Sorry if that is long-winded, but I hope it helps you to understand my position. It is not that I do not want the emulator to run off of the latest live Warcraft III client. It is rather than one of the purposes for my emulation is to avoid giving up on features that are bulldozed by a major corporation, so in certain instances when they bulldoze good things they do not appreciate, I am loathe to do likewise.
thx for the reply. I have added the missing war3patch.mpq and now at least I can start it. I tried selecting my map to start it but it crashes. Logging says:


Code:
Exception in thread "LWJGL Application" com.etheller.interpreter.ast.debug.JassException: Exception on Line -1
    at com.etheller.warsmash.parsers.jass.Jass2$ConfigEnvironment.config(Jass2.java:4715)
    at com.etheller.warsmash.viewer5.handlers.w3x.ui.MenuUI$17.onSelectionChanged(MenuUI.java:1158)
    at com.etheller.warsmash.parsers.fdf.frames.ListBoxFrame.touchDown(ListBoxFrame.java:324)
    at com.etheller.warsmash.parsers.fdf.frames.AbstractUIFrame.touchDown(AbstractUIFrame.java:73)
    at com.etheller.warsmash.parsers.fdf.frames.AbstractUIFrame.touchDown(AbstractUIFrame.java:73)
    at com.etheller.warsmash.parsers.fdf.frames.AbstractUIFrame.touchDown(AbstractUIFrame.java:73)
    at com.etheller.warsmash.viewer5.handlers.w3x.ui.MenuUI.touchDown(MenuUI.java:2227)
    at com.etheller.warsmash.WarsmashGdxMenuScreen.touchDown(WarsmashGdxMenuScreen.java:755)
    at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:329)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:247)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:138)
Caused by: java.lang.IllegalStateException: Can only create thread from user function
    at com.etheller.interpreter.ast.scope.GlobalScope.createThread(GlobalScope.java:362)
    at com.etheller.warsmash.parsers.jass.Jass2$ConfigEnvironment.config(Jass2.java:4709)
    ... 10 more

I think it is fine to not support the latest strange Reforged changes as long as it is possible to load the maps created with the Reforged editor (JASS natives and object data formats etc. could still be supported). I found this line of code: WarsmashModEngine/jassparser/src/com/etheller/interpreter/ast/scope/GlobalScope.java at 69f8397d68f9ce9c07f23c78fecf16cd70237edd · Retera/WarsmashModEngine
Maybe add the function name to the text of the exception which would help me analyzing which function causes this issue. Btw. the map uses a custom common.j and common.ai imported but I guess this is supported?
 
Btw. the map uses a custom common.j and common.ai imported but I guess this is supported?
Yes, generally this should be supported. Of course there are still compatibility issues, however. I recently saw a situation where a map that someone tried to play on Warsmash was using Units\UnitData.slk as an import. But the file load ordering tried to look for Custom_V1\Units\UnitData.slk first, and it ended up grabbing the file from inside the MPQ first instead of getting the file from the map. That's obviously wrong -- on War3, the map import takes priority even if it doesn't have the Custom_V1 prefix, somehow. So obviously there are going to be some compatibility issues like that on Warsmash, due to it being designed differently.

Hello, Retera! I'm a big fan of this project (and your youtube). Best of luck
Thanks! Hope you're doing well. When I think of you, I'm reminded of that attachment app we made a few years ago. I haven't looked at it in a while, so I guess it probably wasn't updated for Reforged.
 
Top