Skip to content

Commit 66563c6

Browse files
authored
Merge pull request #64 from vuvictor1/main
.md version of help, updated sections, new screenshots
2 parents 65ae635 + b9a3fb2 commit 66563c6

File tree

1 file changed

+190
-0
lines changed

1 file changed

+190
-0
lines changed

help_doc.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# Help Documentation
2+
### WC3 Map Deprotector
3+
4+
**Last Updated:** 10/5/2025
5+
6+
## Table of Contents
7+
*(Click a section to jump to it)*
8+
9+
1. [Bug Testing](#1-bug-testing)
10+
2. [Editor Crashes](#2-editor-crashes)
11+
3. [Jass Triggers](#3-jass-triggers)
12+
- 3.1 [Jass Compiler](#31-jass-compiler-new)
13+
- 3.2 [Fixing Errors](#32-fixing-errors-new)
14+
4. [Unknown Files](#4-unknown-files)
15+
- 4.1 [Merging Listfiles – Find more unknown files](#41-merging-listfiles--find-more-unknown-files-new)
16+
5. [Duplicate Units](#5-duplicate-units)
17+
6. [Object Manager – Missing units or wrong attributes](#6-object-manager--missing-units-or-wrong-attributes)
18+
7. [Campaigns](#7-campaigns)
19+
20+
---
21+
22+
## 1. Bug Testing
23+
24+
Deprotection is not perfect. Please thoroughly test the map and manually correct any issues that are found. The most common bugs are:
25+
26+
- Compiler errors in JASS Triggers
27+
- Duplicate Units/etc (see above)
28+
- Missing pre-placed objects [Units/Items/Doodads/Cameras/Regions] in the Object Manager module
29+
- Wrong values on pre-placed objects (Item Droptables, etc.)
30+
- Incorrect Object Editor data
31+
32+
## 2. Editor Crashes
33+
34+
World Editor crashes frequently in HD mode, but works much better in SD mode. You can still play the game in HD mode even if the editor is in SD mode.
35+
36+
You can change this in the editor by clicking **File/Preferences** and choosing **SD** under "Asset Mode". This will not affect map gameplay; only the editor will be affected.
37+
38+
<img width="484" height="645" alt="img_0" src="https://github.com/user-attachments/assets/6168d4b2-12c9-4150-ae93-c126dd66626d" />
39+
40+
## 3. Jass Triggers
41+
42+
The deprotected JASS will be in plain text coding format. You can see it by clicking on the root icon of the trigger editor.
43+
44+
<img width="1157" height="480" alt="img_1" src="https://github.com/user-attachments/assets/3c23c14e-beba-43b4-8b8b-d359e2272804" />
45+
46+
### 3.1 Jass Compiler
47+
48+
Before attempting to modify the JASS code, ensure that JassHelper is enabled. JassHelper is a vital compiler that helps identify errors and makes debugging easier.
49+
50+
<img width="211" height="260" alt="img_2" src="https://github.com/user-attachments/assets/a9677d38-0cc8-4410-869f-66f1be1c620a" />
51+
52+
### 3.2 Fixing Errors
53+
54+
If there are JASS errors, simply copy the error message and code output by JassHelper and paste it into an LLM, such as ChatGPT, for a solution. Then, in the "Custom Script Code" section, replace the affected code with your fix. You may need to repeat this process several times. It may be helpful to work in a text editor.
55+
56+
<img width="1281" height="923" alt="img_3" src="https://github.com/user-attachments/assets/34fdd85f-1a14-44a1-ac6a-2d1ad758ab6e" />
57+
58+
## 4. Unknown Files
59+
60+
The MPQ file format converts all filenames to numbers (called hashes) for quicker loading. The world editor still needs the real file name, but the game only needs the hash. Protectors delete the filenames, leaving only the hashes. This is what's called an "unknown" file. These are typically 3D models, textures, or sounds. The deprotector attempts to recover the original file names, but it's not 100% successful for all files.
61+
62+
When a name cannot be recovered, it may mean the actual file is not in use. For example, maybe the author added a 3D model but never assigned it to a unit. The only way to verify this is by testing the map for bugs after deprotection.
63+
64+
> **Note:** "Unknown" does not mean the file is missing or corrupt; it means we don't know the correct file name. It can still be opened in an image editor.
65+
66+
An "unknown" 3D model will display in the world editor as a **green box**. An "unknown" texture will display in the world editor as a unit that's **completely white**. The purple boxes are pathing blockers and can be ignored.
67+
68+
The deprotector utilizes all known automated methods to recover the file names; any remaining "unknowns" must be recovered manually.
69+
70+
<img width="1147" height="668" alt="img_4" src="https://github.com/user-attachments/assets/46aca06a-c553-495a-899e-19a299e655b6" />
71+
72+
### Manual Recovery Process
73+
74+
To view the "unknown" files, you need to use MPQEditor to export the (listfile) from the deprotected map and import it into the original map. Any remaining `File00000###.blp` (or mdx, wav, mp3, etc) files are the "Unknowns".
75+
76+
To fix them:
77+
78+
1. Extract them in a viewer program, such as [Hive's "Model Checker"](https://www.hiveworkshop.com/pages/model-checker)
79+
2. Pick a new name for the file and add it using the Module/Asset Manager in World Editor
80+
3. Locate all locations in the World Editor where the asset should be referenced and select the new file name
81+
- Usually found in the Object Editor under attributes such as "Art – Icon" or "Art – Model"
82+
- For sounds, it may be in the Jass
83+
4. Open the MDX file in a model editing program and correct all the texture references to use the new name
84+
85+
### Finding Correct Names
86+
87+
If you can discover the correct name, it will save you the step of correcting all the asset references. A possible way to do this is by using [Hive's "Asset Scanner"](https://www.hiveworkshop.com/asset-scanner). Even though the "unknown" file has the wrong name, the scanner can still find other maps containing the identical file because it searches the actual data in the file, not the name.
88+
89+
### 4.1 Merging Listfiles – Find more unknown files
90+
91+
Warcraft 3 maps utilize a file called "Listfiles" to identify the names of all components and assets within a map. The world editor requires these names to properly view and interact with data. If too many files cannot be identified, it makes deprotection difficult.
92+
93+
WC3 Map Deprotector includes a fairly comprehensive listfile saved at this location:
94+
```
95+
C:\Users\Your Username\AppData\Roaming\WC3MapDeprotector
96+
```
97+
98+
The filenames included cover some of the more common map types, such as Anime RPGs and custom games. However, it is not fully complete, as maps are constantly being updated with new assets/filenames.
99+
100+
<img width="894" height="614" alt="img_5" src="https://github.com/user-attachments/assets/14518eca-bed0-47c3-948c-527988cc54c6" />
101+
102+
#### Listfile Merging Process
103+
104+
One technique that can be applied is listfile merging. It's essentially rebuilding a listfile specially tailored for the map you want to deprotect.
105+
106+
1. Download **MPQ Editor** (Available on MPQ Archive through Google search)
107+
2. Open the MPQ of the map you want to deprotect
108+
3. Go to **Tools****W3X Name Scanner**
109+
4. Hit **Scan**, then **Merge Listfiles**
110+
5. Point to where the listfile in the WC3 Map Deprotector is stored
111+
6. Re-run the deprotection tool
112+
113+
<img width="638" height="650" alt="img_6" src="https://github.com/user-attachments/assets/68a41ae8-f63b-4fff-b282-d2caf183b46c" />
114+
115+
By combining the listfile scanners from WC3 Map Deprotector and MPQ Editor, you can identify more files, making them much more manageable to work with.
116+
117+
<img width="429" height="410" alt="img_7" src="https://github.com/user-attachments/assets/e93f3463-d858-48fc-bb9e-daea4bc2eb30" />
118+
119+
## 5. Duplicate Units
120+
121+
<img width="603" height="582" alt="img_8" src="https://github.com/user-attachments/assets/9d6dfbaf-eeae-4bf6-9692-b62aae322b00" />
122+
123+
The world editor tracks units placed in the render window inside the W3X archive with a file named `War3MapUnits.doo`. Upon saving, these are converted into a function in the `War3Map.j` file called `CreateAllUnits`.
124+
125+
Protection deletes the `war3mapunits.doo` file and de-protection attempts to recover it. If successful, it comments out the original `CreateAllUnits`. However, if protection also scrambled the code inside `CreateAllUnits`, de-protection might fail to comment out the correct lines of code.
126+
127+
### Fix Process
128+
129+
To fix this, you must search the triggers in the world editor for where these duplicate units are created and comment them out manually:
130+
- Start by looking at `main_old` and read the code & function calls from there
131+
- This can also happen with items, cameras, sounds, and regions
132+
133+
## 6. Object Manager – Missing units or wrong attributes
134+
135+
There are auto-generated native functions such as `CreateUnitsForPlayer1`. This is the Jass version of the objects displayed in the render window (shown in Object Manager).
136+
137+
Protection empties the "Object Manager" and obfuscates the Jass by scrambling the code (renaming `CreateUnitsForPlayer1` to random characters, such as `NXE`). When de-protection can decipher the code, it adds them back to the "Object Manager" & render window. If it fails to decipher the code, units will be lost or their attributes will be wrong.
138+
139+
To help you determine what was deciphered and what was lost, it comments out the portion of the Jass that was deciphered correctly (since it will be re-generated by "World Editor" on save).
140+
141+
<img width="732" height="315" alt="img_9" src="https://github.com/user-attachments/assets/44798959-959f-4484-962b-8aacaaa3fb57" />
142+
143+
<img width="1397" height="1259" alt="img_10" src="https://github.com/user-attachments/assets/fca47b97-22b3-4c4b-9dc9-808f74684cca" />
144+
145+
<img width="1406" height="1074" alt="img_11" src="https://github.com/user-attachments/assets/194e8572-ccd5-4400-a3c9-c071e6efc999" />
146+
147+
### Example Issues
148+
149+
- **Missing Units:** A unit like "War Room" with FourCC `'h995'` might be shown in-game on the protected map but missing from the Object Manager in the World Editor
150+
- **Incorrect Attributes:** A unit might be created with default values instead of custom ones (e.g., Mana left at default instead of being reset to 0)
151+
152+
<img width="610" height="539" alt="img_12" src="https://github.com/user-attachments/assets/f11e8fa2-d477-4fbc-adab-be3cddcb12f0" />
153+
154+
### Troubleshooting
155+
156+
You can resolve these issues by:
157+
1. Manually re-adding the objects to the render window
158+
2. Reading the code for clues about what attributes to set on the unit
159+
3. Using ChatGPT to explain the Jass if you don't understand it
160+
161+
### Identifying Failed Deciphering
162+
163+
You will know that deciphering the JASS into ObjectManager failed if, after saving in World Editor, you test the map and find bugs. Use the **WinMerge** app to find clues:
164+
165+
1. Open the deprotected map in MPQEditor
166+
2. Extract `war3map.j`
167+
3. Compare it against the World Editor triggers
168+
4. Look for sections where part of the code is commented out and part isn't
169+
170+
> **Important:** Remember that Object Manager attributes are tied to a specific instance of a unit placed in the render window; this is different from the "Object Editor" where you set default values for all units of that type.
171+
172+
<img width="1288" height="323" alt="img_13" src="https://github.com/user-attachments/assets/0f84a290-d570-4f28-b3c0-486dfaa7ebf5" />
173+
174+
## 7. Campaigns
175+
176+
Campaign files have the `.w3n` file extension. This is still the same MPQ format that all WC3 maps use; however, it shares resources (3D models/textures/etc) in the base archive, and each mission is embedded as a separate W3X inside the W3N.
177+
178+
### Deprotecting Campaigns
179+
180+
This tool only supports deprotecting `.w3x` files, but there is an easy workaround:
181+
182+
1. Download [Xetanth87's Campaign Splitter](https://www.hiveworkshop.com/threads/xetanth87s-campaign-splitter-turn-custom-campaigns-into-separate-maps-now-with-archon-mode.340521)
183+
2. Open a command prompt and run:
184+
```bash
185+
java -jar XT87CampaignSplitterGUI.jar
186+
```
187+
3. After your campaign is split into separate files, run the deprotector on each `.w3x` file separately
188+
189+
---
190+
© 2025 WC3 Map Deprotector Team • Licensed under MIT

0 commit comments

Comments
 (0)