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

[Wurst] HelloWorld - "Cannot load map data"

Status
Not open for further replies.
Level 1
Joined
Aug 10, 2019
Messages
7
So I was following the instructions at WurstScript • Wurst Beginner Guide and got a new WurstScript project set up in VS Code. But when I F1 > Run a wurst map, wc3 (1.28.5) runs and displays the dreaded "Cannot load map data" error... The map opens just fine in World Editor (Extended), but the same error is displayed when pressing the Test Map (Ctrl+F9) button.

After further investigation, I think it has something to do with war3map.j... In my Wurst project, I noticed two files: /wurst/war3map.j and /_build/compiled.j.txt, the latter of which I assume is Wurst's generated JASS script that it adds to the map's MPQ (after renaming it to war3map.j). If I open the map in MPQ Editor and manually replace /war3map.j with /wurst/war3map.j, then the map runs without any visible errors, but doesn't seem to display "Hello World", which leads me to believe that /wurst/war3map.j is just boilerplate jass code without any Wurst features.

Anyone know what could be the issue?
 
Level 1
Joined
Aug 10, 2019
Messages
7
So I cleared the logs, then started over with a new project, changing only the project root:

elDFQ7OxQ6S1Z-tBn3Gb3w.png



Here are the logs at this point:

Then I cleared the logs again, opened VS Code, opened the new project folder, and opened Hello.wurst:

4fhYhs_wT9OHs-hA4zN8CQ.png



Logs at this point:

Then I proceeded to run the map:

CGQyFSuKQX_HNyZhcZ5piQ.png


bDjEdUKDRGeUaDVrKpC79Q.png



RESULT:

d-tizK3TTlSlsf2w2xLdtQ.png



Logs:

Anything suspicious?
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
Code:
[D:\Games\Warcraft III\Warcraft III.exe, , -loadfile, d:\Maps\Test\WurstTestMap.w3x]

Looks a bit suspicious - the maps folder probably shouldn't be at drive root.
Seems to be an issue due to mixed partitions.
I expect the map to run if you load it into the game normally via 'Custom Game' ?
Just the wc3 start command seems a bit off.
 
Level 1
Joined
Aug 10, 2019
Messages
7
Indeed, that folder doesn't exist. My maps folder is at D:\Games\Warcraft III\Maps, and I have a symbolic link pointing to it from the %HOMEPATH%\Documents\Warcraft III folder.
Manually loading the map yields the same error.
Pointing wurst.mapDocumentPath to my maps folder also yields the same error.

In an attempt to further simplify things, I:
  • Moved my WC3 installation to C:\Games\Warcraft III
  • Uninstalled the Wurst language support extension from VSCode
  • Deleted the %HOMEPATH%\.wurst folder
  • Replaced the %HOMEPATH%\Documents\Warcraft III\Maps symlink with the actual Maps directory that it pointed to
  • Created a C:\Games\Warcraft III\Dev\Projects\Wurst folder, and moved WurstSetup.jar into it
  • Ran java -jar WurstSetup.jar install wurstscript from an administrative command prompt (from within the C:\Games\Warcraft III\Dev\Projects\Wurst folder)
  • Cleared the logs in %HOMEPATH%\.wurst\logs
  • Ran (double-clicked) WurstSetup.jar to create a new project, keeping ALL default settings
  • Reinstalled the Wurst language support extension in VSCode
Here are my new settings:

Here are the logs at this point:
And here they are again after clearing them, and attempting to run the map from VSCode:
It still gave me the same error, and so did manually attempting to load the map in a single player > custom game.
Hope to get this issue resolved soon, because, as a programmer/scripter, WurstScript has really peaked my interest.

EDIT: I just noticed that those map paths were inconsistent, and that wurst.mapDocumentPath seems to want the parent folder to the maps folder... So I just tried changing everything (on my filesystem, as well as wurst settings) to point to C:\Games\Warcraft III\, and after some testing... It still doesn't work, even though it does create AND RUN C:\Games\Warcraft III\Maps\Test\WurstTestMap.w3x... So the problem seems to lie elsewhere.

:goblin_cry:
 
Last edited:
Level 1
Joined
Aug 10, 2019
Messages
7
I just tried the same setup with the following patches:
  • 1.21............ Failed
  • 1.26............ Failed
  • 1.28.5......... Failed
  • 1.29 (PTR)... Failed
  • 1.30 (PTR)... Failed
  • 1.31 (PTR)... Worked!
Are you sure that WurstScript is backwards compatible? Maybe some JASS natives are being used that don't exist in previous versions?
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
Oh, I thought you were already doing backwards compat yourself.
Wurst is backwards compatible but the standard library is not. So you need to set up the build environment for the version you are targeting manually.

This means replacing common.j and blizzard.j in your _build folder with old versions from 1.28.5 and using the pre1.29 branch by applying the tag in your wurst.build file:
Code:
dependencies:
- https://github.com/wurstscript/wurstStdlib2:pre1.29

Then save the file and run grill install. After F1 -> reload you can try running again.

Newer versions of the standard library make use of new natives, and thus are not backwards compatible.

Sorry for the hassle, I kind of forgot you were targeting an old patch.

I am looking into adding some better wc3 version handling or at least showing some warning when using an old patch. The mainline will always focus on latest stable warcraft 3 version by blizzard.
 
Level 1
Joined
Aug 10, 2019
Messages
7
This means replacing common.j and blizzard.j in your _build folder
I assume you mean common.j and blizzard.j in the %HOMEPATH%/.wurst folder created via this step? It seems to work, but I'm not 100% sure if this is correct.

It'd be nice if users could select a target wc3 version, and maybe wurst can either provide the correct *.j files, or have the user provide them
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
I assume you mean common.j and blizzard.j in the %HOMEPATH%/.wurst folder

No I mean in the _build folder, as I stated in the sentence you quoted..

It'd be nice if users could select a target wc3 version, and maybe wurst can either provide the correct *.j files, or have the user provide them

Probably not worth the hassle for a small minority of an already small user base. The 1.29 stdlib branch isn't maintained either. It's generally not recommended to target older patches.
 
Last edited:
Level 1
Joined
Aug 10, 2019
Messages
7
No I mean in the _build folder, as I stated in the sentence you quoted
My bad, they didn't exist in there until after building. I see them now.

I wanted to target older patches to also give support to Eurobattle and Garena players, since they still have a decent sized player base but are usually a bit behind on patches.
I feel this is a good enough reason to at least include some additional instruction for map devs looking to do the same, but I understand if you don't feel the same way.

Anyhow, thanks for the help! Everything now appears to be in order on my end.
 
Status
Not open for further replies.
Top