• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Extracting Victory/Defeat Conditions

Status
Not open for further replies.
Level 3
Joined
Sep 9, 2009
Messages
658
How do I extract the Victory/Defeat condition? I'd like to edit it so that "You will be revealed to all players if you don't build a Town Hall." message doesn't pop up.

And before anything else, no. Adding the custom hall to gameplay constants and editing its equivalencies won't fix the problem. That message only gets removed if you remove the Victory/Defeat condition :<
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
How do I extract the Victory/Defeat condition? I'd like to edit it so that "You will be revealed to all players if you don't build a Town Hall." message doesn't pop up.
It is done by the file "blizzard.j". Get this from the "War3Patch.mpq" in the Warcraft III install folder using a MPQ editor like MPQEdit. Modify the pure JASS file using any text editor or a tool like Jass Shop Pro or JASSCraft or whatever. Importing a custom "blizzard.j" file with the changes you made into the map should then work (as I know overwriting common.j using imports works so I only assume that will work as well).

You will need knowledge of JASS and it will likely add 100-200 kb to your map size.

The alternative is to extract the appropriate functions from blizzard.j and then bypass the standard melee defeat system completely with your own customized version of it. Again will require JASS knowledge but the result will be a much smaller map (since you are only including the functions you need instead of a copy of all the others). I would recommend doing this.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Thanks! Are there other unrelated functions in the blizzard.j file?
Yes, most GUI actions and function wrappers are declared in it. You could fix the leaks in a few of them if you wished.

Also what's the file path?
I do not know off the top of my head. It should be the same as in the other non-local MPQs which do have a listfile so you can use those to find it.
 
Level 3
Joined
Sep 9, 2009
Messages
658
Status
Not open for further replies.
Top