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

[General] Campaign maps -and- Jass

Status
Not open for further replies.
Level 18
Joined
Nov 21, 2012
Messages
835
They don't like each other:D Or is it only me?
I edit map from campaign map list and add some jass function. After save and test: black screen appears in game when select this edited map.

As long as I use gui only its ok, but when added jass its become more complicated. I must edit map outside campaing --> save --> then import-and-replace map to the campaing. Then I can play this map in game, all ok. I wonder is it normal? I also noticed something: by edit map using campaing map list, and then save - no jass helper appears during save process.
 
@ZiBitheWand3r3r: Awesome. I'm really glad to hear it worked. Would you mind posting steps on how you got it work? It would be great for those who encounter the same issue. :)

just for those who are wondering, for some reason the one that is already in the JNGP(2.0.7), it will not work, it will always say that the map could not be opened for some reason

Does the one in the xgm link work for you?

That means that we can still use JNGP to code normal JASS, right?

Yes. Normal JASS will work just fine in campaigns. The issue (for those curious) is that the normal save map process is different from the campaign save map process. JNGP doesn't intercept the campaign save map process, so it ends up being saved with vJASS instead of the compiled JASS, which means it can't be opened in Wc3. The tool that I linked before has its own "Save campaign" which will save the campaign using the normal process, then it will run jasshelper on the files within the campaign archive and reinject the compiled maps into the archive.

But if you just use normal JASS, there shouldn't be any issues.
 
Level 18
Joined
Nov 21, 2012
Messages
835
How to make campaign maps work with vJass.
  • Download ScExp.rar file from http://xgm.guru/forum/showthread.php?t=30967&page=1&pp=20
  • Unpack, find wehack.lua file, edit it with notepad:
    find and delete this:
    JASS:
    function compilemap()
        mappath = wehack.findmappath()
        compilemap_path(mappath)
    end

    copy and paste below code at the place where previous deleted code was
    JASS:
    dofile("ScExp\\ScExp.lua")
    
    function compilemap()
            mappath = wehack.findmappath()
        if mappath == "" then
            scexpBuildCampaign()
        else
            compilemap_path(mappath)
        end
    end
  • move ScExp directory with all 4 files inside into your Jass directory
    example: E:\xxxxxxx\_Jassnewgenpack5d\ScExp
  • run War3WorldEditor, you should have new tab in menu:
    ScExpOK.jpg

    2 options: "Enable CampaignBuilder" and "Use 'Recent Document' as current campaign" should be On.
  • Open your campaign, Edit map from campaign maps menu, make changes in map, Save MAP. End ;]
  • ---problems:
  • If you have error like this:
    error1.jpg

    you have to edit the Windows registry. Find a key Grimoire and check if you have String-type variable named: "GrimPath" with value (example): "D:\Documents and Settings\Alex\Мо\Making\jassnewgenpack5d_experemental\" .The value is your path to Jass directory. Edit this string -or- add new one if you don't have.
    regString.jpg


    In my case I had to add a string variable with path to jass directory. Also look at these 2 options in registry Grimoire key:
    "Enable CampaignBuilder"
    "Use "Recent Document" as current campaign"
    they should be set to ON.

once again the best compliments for Purge for knowing this issue and help

zibi
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
The "GrimPath" is nice, but I have hard time finding it, so I wonder where in registry to look for it

edit: found it, ctrl-f for the win!

So apparently I didnt have GrimPath set up, so maybe thats the reason why it didnt work(not tested yet), so thank you so much ZiBi for translation, because I couldnt really translate the error myself
 
Status
Not open for further replies.
Top