- Joined
- Aug 11, 2018
- Messages
- 85
Hello everyone, I am a user of World Editor from China Forum.
I have been researching custom campaigns for a while, and this is my latest result.
Here are four examples of custom campaigns I added. Their tabs are behind the Rexxar campaign.
In general, these contents are completed by editing TXT files and JS files.
Here are the steps :
If you cannot understand these steps, ignore them. Just download the ZIP package I provided. Unzip it to [Warcraft III\_retail_\]. You only need to modify the TXT, replace the PNG and WEBM materials, and then you can make a custom campaign.
I have been researching custom campaigns for a while, and this is my latest result.
Here are four examples of custom campaigns I added. Their tabs are behind the Rexxar campaign.
In general, these contents are completed by editing TXT files and JS files.
Here are the steps :
Step 0. Since version 1.30, the game has used CASC to store data files. And you should learn to use Cascview to observe and extract data files. You can visit this page to learn about Cascview.
Casc Storages - Main page
Casc Storages - Main page
Step 1. Understand how [allow local file] works. It can be described as the game will preferentially read local files instead of files in CASC, When [Allow Local Files = 1] in the registry , which under the path [HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\].
Step 2. You extract a certain media file in the game, modify it, and place it in [Warcraft III\_retail_\]. Refer to the correct path under the Cascview extraction path [war3.w3mod\]. You will find that you can replace most of the media files of the game as long as you want.
Step 3. Open [war3.w3mod\ui\campaigninforeforged.txt] in Cascview, read it, and get how it works from its comments. It has a CampaignList listing the campaigns that should be displayed in the game. It also has a series of [Tutorial], [Human], [Undead], etc. to define some of the parameters of the campaign (they are only partially useful, some have been abandoned)
Then you can add your own custom campaign project. When you are finished, put the TXT file in the correct path, refer to step 2. You open the game and you will see it, although it does not yet have any media file support, you can still see its black title and a default battle tab border.
Then you can add your own custom campaign project. When you are finished, put the TXT file in the correct path, refer to step 2. You open the game and you will see it, although it does not yet have any media file support, you can still see its black title and a default battle tab border.
Step 4. Open [war3.w3mod\webui\gluemanager.js] in Cascview and modify it.
This step is a bit complicated and requires you to have some basic knowledge of the JavaScript language.
The [gluemanager.js] is a code text file that controls the main menu interface. You will find it is confused/protected, so it is difficult to read and modify. But fortunately we have code beautification tools [Online JavaScript beautifier]. After you restore it, it will become easier to read.
Then you can look for content related to the custom campaign in the ocean of code. One trick is to search for "OrcEx", which is the name of the last campaign. When the code mentions it, it must be related to the custom campaign.
When you search for "OrcEx", you will find 8 results.
The first result is in [t.STORY_BACKGROUNDS], which determines the name of the webm background corresponding to the custom campaign opening interface. (The path of webm is [\webui\webm\])
The second result is in [t.AMBIENT_SOUNDS], which decides to customize the music used by webm used in the opening interface of the battle. (The name and path of the music are defined in [\ui\soundinfo\ambiencesounds.slk])
The third, fourth, fifth, sixth and seventh results are all in the obfuscated CSS code. You can also use [beautifier Online JavaScript beautifier] to restore them. They control the custom title font style, subtitle font style, tab image background path, and banner image path of the settlement interface.
The eighth result is to serve the getStoryBackground command and specify the serial number of the custom battle background.
After completing the addition and modification of your own campaign content in the above eight positions, I think you can achieve the same effect as mine.
This step is a bit complicated and requires you to have some basic knowledge of the JavaScript language.
The [gluemanager.js] is a code text file that controls the main menu interface. You will find it is confused/protected, so it is difficult to read and modify. But fortunately we have code beautification tools [Online JavaScript beautifier]. After you restore it, it will become easier to read.
Then you can look for content related to the custom campaign in the ocean of code. One trick is to search for "OrcEx", which is the name of the last campaign. When the code mentions it, it must be related to the custom campaign.
When you search for "OrcEx", you will find 8 results.
The first result is in [t.STORY_BACKGROUNDS], which determines the name of the webm background corresponding to the custom campaign opening interface. (The path of webm is [\webui\webm\])
The second result is in [t.AMBIENT_SOUNDS], which decides to customize the music used by webm used in the opening interface of the battle. (The name and path of the music are defined in [\ui\soundinfo\ambiencesounds.slk])
The third, fourth, fifth, sixth and seventh results are all in the obfuscated CSS code. You can also use [beautifier Online JavaScript beautifier] to restore them. They control the custom title font style, subtitle font style, tab image background path, and banner image path of the settlement interface.
The eighth result is to serve the getStoryBackground command and specify the serial number of the custom battle background.
After completing the addition and modification of your own campaign content in the above eight positions, I think you can achieve the same effect as mine.
If you cannot understand these steps, ignore them. Just download the ZIP package I provided. Unzip it to [Warcraft III\_retail_\]. You only need to modify the TXT, replace the PNG and WEBM materials, and then you can make a custom campaign.
Attachments
Last edited: