• 🏆 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!

[General] Custom EXE with custom MPQ - Questions Time

Status
Not open for further replies.
Level 14
Joined
Jul 27, 2007
Messages
793
Hi there!

I have some questions regarding the usage of custom executable for WC3 with a custom MPQ archive, much like DoC does.

  1. How easy is it to create the custom exe itself? Is it a tedious task or does it happen easily? What about Wc3 worldedit? And a JASS editor?
  2. Is it possible to edit the UI layout with a custom MPQ? I plan on using 4 different kinds of resources (Food, which is produced by farms, Wood, Gold, which replaces food housing, and Mana Crystals/Honour points). Would it be possible for me to replace the Upkeep tab with a Resource tab? If not, would it be possible to at least add an icon to it? There'll be a 30 mana crystals limit to the resource, so I can edit the text through the upkeep strings.
  3. I know that this is possible - adding three types of cliffs, just as DoC does. How stable will the game be?
  4. Is it possible to change water plane models, or use more than two? I want to create a derivative on Outland's water (void) - clouds.


I may have more questions later, but those are the ones I can think of right now.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
1. Depends on what you want to do with the .exe file I suppose. But I'd say modifying a exe file is rather advanced.
2. It's highly possible since everything exist in the game files. I got no clue where, but it's in there somewhere.
3. should that affect the stability? that makes no sense.
4. Once again, everything exist in the game filess so you are able to modify everything if you're good enough.

I can't give details on the answers because I am not good enough to do the stuff myself.

edit: I am not sure but I think it's against blizzards policy to modify those things, just saying in case you care.
 
Level 14
Joined
Jul 27, 2007
Messages
793
1. Depends on what you want to do with the .exe file I suppose. But I'd say modifying a exe file is rather advanced.
2. It's highly possible since everything exist in the game files. I got no clue where, but it's in there somewhere.
3. should that affect the stability? that makes no sense.
4. Once again, everything exist in the game filess so you are able to modify everything if you're good enough.

I can't give details on the answers because I am not good enough to do the stuff myself.

edit: I am not sure but I think it's against blizzards policy to modify those things, just saying in case you care.


1. I want it just to use custom MPQs, the cliffs thing is not necessary.
2. Thanks. Clarification - is it possible without a custom MPQ as well?
3. I've heard that although the map format supports more than two types of cliffs, it makes it rather unstable. Dunno if it's true.
4. Thanks.

Well, there've been numerous mods already (I can think of at least 2 completed - Divine Right and Shadow King), and other that have been hosted here (DoC, as I mentioned).
 
Level 29
Joined
Mar 9, 2012
Messages
1,557
1. You need actual programming for that.
2. Even if derelict code 'lies in there somewhere' you would need to 'fix it up'(basically reverse engineering it to do all from scratch up again in a compatible with current way) since it would have remaint from the medieval ages and most probably no longer functioning in current state of WcIII.
3. WcIII engine has its limits. However in princip: When done properly should remain stable enough to not cause crash/bsod/async/desync, can apply to basically everything. In that case if DoC managed to pull it off without any of those happening means you too could, theoretically
4. Something like Deepsea level - Shallowwater level, in Wc III ? Never that i heard of till now.
 
Level 14
Joined
Jul 27, 2007
Messages
793
2. Even if derelict code 'lies in there somewhere' you would need to 'fix it up'(basically reverse engineering it to do all from scratch up again in a compatible with current way) since it would have remaint from the medieval ages and most probably no longer functioning in current state of WcIII.

Ah. Pitty. Well, the second part of the question remains - I don't need to "move stuff around", I just need to find out a way to put an icon to the upkeep tab. If it's possible without a custom EXE, I'd be quite pleased.

I might as well open a new thread for that. I'll leave this one opened just for reference for people who are curious about the custom exe possibility. It seems to be too much of a hassle for me, and you, guys, have proved me right.

I'm not sure that I'm happy about this fact, though. :ogre_icwydt:

+rep to both.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
How easy is it to create the custom exe itself?
With the target compiler and source code? Probably less than an hour to build (even less after most object files are cached), doubt it is that complex.

Without the source code? Hope you are good with assembly as that is the best you can do.

it a tedious task or does it happen easily?
There are over 1,000,000 lines of assembly in the executable (obtained by disassembler). In theory all you need to do is modify and then reassemble and all is well. Good luck modifying that assembly though.

What about Wc3 worldedit?
Same as above but probably less assembly.
 
Level 14
Joined
Jul 27, 2007
Messages
793
With the target compiler and source code? Probably less than an hour to build (even less after most object files are cached), doubt it is that complex.

Without the source code? Hope you are good with assembly as that is the best you can do.

There are over 1,000,000 lines of assembly in the executable (obtained by disassembler). In theory all you need to do is modify and then reassemble and all is well. Good luck modifying that assembly though.

Same as above but probably less assembly.

Yet there are number of mods that use a custom exe. Also, JASS NewGen exists, isn't it a custom worldedit as well?
 
1. You wouldn't actually create a custom Wc3 exe. You can, but that would be stupid and too much work. Here is the general layout:
  • Your program will find the path to wc3, and run some quick checks (make sure it isn't open, make sure the editor isn't open, and make sure the MPQ's can be opened for writing).
  • Extract the data from your MPQ, and put it inside one of the MPQ's, perhaps war3local.mpq (I don't remember the loading priorities). Or you can enable local files, and then extract the files from your MPQ and put it in the warcraft III folder.
  • Start-up warcraft 3. Then you're pretty much good to go.
  • When wc3 closes, fix the files (remove the files or w/e).

It just requires planning. IMO, that would be the best option though. And add an exe to remove the files, in case the user's computer crashes or w/e.

The other option is to ship the entire Wc3 folder with the changed contents, so they can run it in a completely separate client from their own wc3, but that has a few issues:
  • Large file size
  • Illegal (or, at least more illegal than just giving an exe to modify the files, since you'd be essentially giving away your own wc3 + your cd keys, unless you clear that somehow)

Anyway, you would need to be familiar with C++ (you could use a different language, but most mpq libraries are built around C++ use) and some MPQ library (e.g. StormLib, which is the one I would recommend. Else, use SFMPQ).

2. Well, it would be difficult to change the functionality. The most I would expect is to change the text. But it is worth looking into. Check out the FDF files in the MPQ, and play around with them. Note that these are loaded only when Wc3 is opened, so you can't import custom ones for a map. Custom fdf files would require a separate mod (as you are describing).
 
Status
Not open for further replies.
Top