• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How does Warcraft 3 actually work?

Hi! I'm Retera, the Advocate of Warsmash. Warsmash is the idea that most people think is stupid -- and that I knew from the moment I decided to build the technology prototype that people thought it was stupid -- wherein I take the social stance that modding Warcraft III would be easier if we could each compile our own derivative work of the original game, but since I'm not legally allowed to do that instead I build an emulator/simulator of the game that is my own work that people are allowed to build derivative works of.

But, I'm not Blizzard/Activision/Microsoft and I don't have insider information. So from 2019 to today, I was making my game simulator typically based off of gameplay experiences and clean room engineering -- just making whatever I wanted based on how I wanted it to be. My theory is that because Warcraft 3 was made by smart people in a hurry, if I try to hack something together in a hurry likewise, then most of the time my creation would come out looking like a halfway decent simulator of Warcraft III.


But recently I ran into a problem. Someone was able to create a custom map on Warcraft III that would be categorically impossible for Warsmash to mimic, because my understanding of what a unit is and how these objects functions in the game environment turns out to have been totally incorrect.

In particular, what we can do to create the counter example to Warsmash is to give the Orc ability called "Berserk" a "Stats - Casting Time" value. Apparently, this allows a unit to begin casting Berserk while performing its other actions, but because of the casting time on Berserk the unit will highlight both the in-progress berserk ability, and also Move or Stop or any other action on the command card. So, the unit is fundamentally performing two ongoing operations simultaneously -- the incomplete casting of Berserk, and the moving or stopping action -- without either action interrupting the other action.

However, on Warsmash, I constructed a simulation based on my imaginary idea that every unit performs one thing and one thing only at a time, at a very fundamental level. Abilities like Berserk that could activate without interrupting the current unit order -- on Warsmash -- operate by using a checkBeforeUse callback where they can apply some effect and then cancel themselves before being added to the unit's queue of orders for what to do next. But, I do not have a system, fundamentally, for a unit to perform an ongoing Berserk action in addition to his other actions. What is that? How does that work? What is an ability on Warcraft III? How many abilities can a unit be performing at the same time? Does anybody know?

Thank you for your time.
 
Last edited:
I did some quick testing. Berserk is only registered as an order until the casting times expires. Only then does it register as an ability being cast. So it appears that the ability is queued so to speak until the casting time expires, and that's why the ability is highlighted. It simultaneously begins, finishes and stops casting the ability as well as starts the effects of the ability at the end of the casting time.

So maybe the unit isn't actually performing two actions at once, but simply waiting some time before performing an action (berserk), and still being able to perform other actions while it waits?
 
Top