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

[Crash] How to edit war3map.j without map crashing

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

I tried editing a war3map.j and it had no syntax errors, but the map crashes upon view and I get this error.


What did I do wrong?

2wd3tde.png
 
Try closing the editor or Warcraft III while you are making the changes. Also, make sure that the file's attributes remain the same (for war3map.j). When you're in the MPQ editor, it should show attributes listed on the side (saying whether the file is compressed, encrypted, has a delete marker, has a file sector CRC, and/or is single-unit). I'm guessing that those attributes are being changed, which is why it may fail to load the map.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
why are you editing the raw war3map.j? you should never need to do that unless you are hacking, which isn't supported here.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
I am doing it out of scientific reasons--I've just been curious about some of the translations mechanisms for vJASS and been reading the actual JASS script. Nothing wrong with that?
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I am doing it out of scientific reasons--I've just been curious about some of the translations mechanisms for vJASS and been reading the actual JASS script. Nothing wrong with that?

Uh... no..?

I tried editing a war3map.j and it had no syntax errors, but the map crashes upon view and I get this error.

If you're truly viewing it, than just open it in read only or make a new copy.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you can very simply view pure Jass script, if you force error like this:
JASS:
private function f takes nothing returns nothing
    local integer i = 0
endfunction
a

this will print the whole Jass script inside the error box, you can copy that into notepad++ or subline text and check it there
 
I thought it does go through all the phases. Maybe it depends on the error. I remember reading the // INLINED!! message though, idk. :p I usually force the error with:
JASS:
globals
 a b
endglobals
And then read the script. Alternatively, when you save, the outputwar3map.j should be in your jassnewgenpack folder, in the logs folder or something.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Try closing the editor or Warcraft III while you are making the changes. Also, make sure that the file's attributes remain the same (for war3map.j). When you're in the MPQ editor, it should show attributes listed on the side (saying whether the file is compressed, encrypted, has a delete marker, has a file sector CRC, and/or is single-unit). I'm guessing that those attributes are being changed, which is why it may fail to load the map.

How do I make the attributes stay the same?
I exported and edited unit data (war3map.w3u), and also abilities data (war3map.w3a) from my map and then reimported with MPQ, but it always changes from DE_ to DEX when I import it back. That causes my map not to be able to load.
 
How do I make the attributes stay the same?
I exported and edited unit data (war3map.w3u), and also abilities data (war3map.w3a) from my map and then reimported with MPQ, but it always changes from DE_ to DEX when I import it back. That causes my map not to be able to load.

Which MPQ editor are you using? I recommend using Ladik's:
http://www.zezula.net/en/mpq/download.html

I'm not sure if the others give you full control over file attributes.

  • Open Ladik's MPQ editor. Go to File -> Open and open the MPQ/map.
  • Make sure you don't open it as readonly. Also, make sure that Warcraft III and the editor don't have the map open at the moment.
  • Right click anywhere, and select "Add File". Add the file you want, the .w3u or .w3a.
  • You should get a window with some options. Click the "Options" next to *File, and make sure they are set up properly. IIRC, Warcraft III can read it as either Compressed & Encrypted or just Compressed.
    2ujiel2.jpg
  • Make sure the compression type is ZLIB. Then just hit "OK".

If you have any more issues with it, let me know.
 
Status
Not open for further replies.
Top