- Joined
- Mar 29, 2011
- Messages
- 2,607
Tools: Windows OS, Command Prompt, .BAT to .EXE Converter, Notepad Difficulty: Advanced |
This is a tutorial about creation of custom executable to automatically open your map inside Warcraft 3 without actually starting Warcraft 3 manually. Extremely useful for Single Player maps. This allows you to embed files into a single .EXE. This method works exactly the same as the Test Map button located in the World Editor. |
Definitions: Command Prompt (CMD.exe) - A command-line interface (CLI), also known as command-line user interface, console user interface, and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines). More information. .BAT (Batch File) - In DOS, OS/2, and also Microsoft Windows, batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter (Command Prompt). More information. Notepad - Notepad is a simple text editor for Microsoft Windows. It has been included in all versions of Microsoft Windows since Windows 1.0 in 1985. More information. |
To start, open up a Notepad and create a new text file. Now copy and paste this code into the Notepad: Now save it as a .BAT file. This will start War3.exe in the same directory that your .BAT is located. Alternatively you can write down the actual path to the War3.exe or even have the command prompt auto find your War3.exe. Click Here for more information. -loadfile YourMap.w3x - is a code to start Warcraft 3 and automatically load the given map without the need of selecting any buttons. A good example would be the Test Map button in the World Editor. Note: You can also write down a path, -loadfile C:\Users\Admin\Desktop\YourMap.w3x YourMap.w3x - is the file name of your project map. Ex: YourMap.w3x In addition, you can experiment with many script codes and commands from command prompt. Such as: @Echo Off.. @Echo Off - Hides the command prompt text in your custom script (program). Command Prompt list of commands.. Now you will have to convert .BAT to .EXE. Why? Because it protects your script code, can contain embedded resources inside-it and is a popular general file that can have many custom changes such as custom .ICO (Icon). You will find many great freeware software that can easily convert BAT To EXE. Click Here. You can also customize your .EXE and even embed the map file inside it. This will protect your map by making it an .EXE thus disabling all outside access to it. More information. Now run your .EXE program and test it out if you did everything in -order, it should Launch War3.exe and start your map automatically. Note: In this tutorial your .EXE must be in the same folder as-is the War3.exe. You can also customize your .EXE by adding a splash image, custom icon (.ICO) or any other customization of the style and or appearance. Resource Hacker, this program will help you. Furthermore, if you have any questions or anything you'd like to ask, feel free to comment. |
Last edited: