1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. Hey guys, we've posted the Results for the 30th Modeling Contest. Check them out!
    Dismiss Notice
  3. The 15th Mini-Mapping Contest came to an end. The Secrets of Warcraft 3 are soon to be revealed! Come and vote in the public poll for your favorite maps.
    Dismiss Notice
  4. The 12th incarnation of the Music Contest is LIVE! The theme is Synthwave. Knight Rider needs a song to listen to on his journey. You should definitely have some fun with this theme!
    Dismiss Notice
  5. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Tool: make WEU maps openable WE

Discussion in 'Warcraft Editing Tools' started by GhostWolf, Jun 3, 2018.

  1. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I am not sure, since it works for me. That being said, I am getting trigger compilation errors because it doesn't like trigger names starting with underscores, however the maps save.
    Is your installation non-English?
     
  2. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    My warcraft 3 is 100% english. Just out of curiosity, would you happen to know if the editor being 1.28 could possibly be causing this? I am investigating if my warcraft 3 editor is somehow out of sync with my warcraft 3 version (I know that sounds stupid, I am trying to get to the bottom of this). If it is working for you, then the issue must be on my end though, which is relieving since i originally thought it was something that could not be fixed. I will probably try a complete reinstall to see if there is any difference.
     
  3. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,633
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    You can right click your "World Editor.exe" and in the details tab you should see the version.
     
  4. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi GhostWolf, it seemed i was using 1.28 this whole time..

    Anyway, when i finally got 1.29 editor up, it was giving me these syntac errors also:
    Compilation Error


    upload_2018-6-17_16-45-19.png

    In reference to your post, can i ask, does this mean that this is occuring due to the editor not liking trigger names starting with underscores? ( I could just try to remove all of the underscores and then try saving.

    Edit1: So that error I mentioned did not crash the editor, it just showed me that box. The map apprarently still saved, since when I opened up the campaign again, the one line of lialogue that I had changed was still there.
    Change was saved

    upload_2018-6-17_16-50-59.png



    Edit 2: Ok, so i tried to go actually play the map to see if it was showing the change just out of curiosity. The custom campaign showed in the custom campaign menu area, I clicked it, but when I went to click on the first mission, it gave me this screen:
    Black Mask of Death


    upload_2018-6-17_17-1-46.png



    I did multiple testing, and I do not believe it had anything to do with the 1 line of dialogue edited. I came to this conclusion because I went back to the version of the campaign your tool gave me after converting the triggers. I tried it also, and the exact same thing happened to me. So I do not think this is related to the edit I made. I went and tried the version of the campaign I have that never underwent change by your tool. It worked perfectly (except of course the dialogue was all spaces since the computer could not read anything).

    Edit 3: Since the black mask thing did not actually crash war3 ( I had to exit it with alt f4 since there was no way I could get out of it ), there was no crash log recorded. There were only 2 files that were created at the same time the error happened, I have copy pasted them below (only 6 lines).

    Six Lines

    6/17 17:12:15.994 Error (UI\FrameDef\UI\ConsoleUI.fdf:6027): Expected ",", but found "AlphaMode"

    6/17 17:12:15.994 (UI\FrameDef\UI\ConsoleUI.fdf//6027) Warning, unknown keyword in context: Literal String
    6/17 17:12:15.994 (UI\FrameDef\UI\ConsoleUI.fdf//6027) Warning, unknown keyword in context: ,



    6/17 17:12:15.752 GameMain Started
    6/17 17:12:15.752 Command Line: "C:\Program Files (x86)\Warcraft III\Warcraft III.exe"
    6/17 17:12:15.932 Telemetry Launch Info:
    process_name: "Warcraft III.exe"
    current_expansion_version: "W3XP"
    highest_expansion_version: "W3XP"


    6/17 17:12:36.245 GameMain Ended





    I wish I could be of more help, but it seems all I can do is report what I find :/
     
    Last edited: Jun 17, 2018
  5. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Why would it work if it fails to compile the map's GUI? The next question is why renaming the triggers to something that doesn't start with an underscore does not actually update it and still cause the same exact error.
     
  6. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Well I mean, the error seems to be localized to the map that was edited. I can still "play" any other map that I did not tamper with (of course, all the dialogue is just space). I apologize if some of the things I say seem silly, I am completely out of my depth with all of this stuff.
    I have only ever used the normal editor, so I have never encountered these kinds of errors before, unless I add a JASS spell from hive and do not do it correctly. Is it possible that it might not be realistic to convert maps using YDWE, and allow for editing (I say allow for editing because technically if there was not this language issue, then your conversion tool would be the only thing necessary, there would be no need to open the map at all)


    Edit 1: I am going through every single map in the campaign to see if i can distinguish a pattern. I will make a tiny edit to a dialogue then try saving the map and see what happens.

    Edit 2: So far, maps 2,4,6,7,8 can save. Maps 1 and 3 seem to have the same problem in that the error is related to the first line of the custom script. Map 5 has a different error, it was related to a "symbol" as described in the error.

    Edit 3: Maps 9,10,11 save without problem.

    Edit 4: Map 12 has 3 errors, one beginning with play thematic music
    Map 13 has 9 errors, no identifiable problem
    Map 14 has the same error as map 1 and 3, related to the first line of custom script
    Map 15 has no problem.

    Edit 4: Maps 16, 19, 20 work.
    Map 17 has an error with the first line of custom script, but it is related to a boolean
    Map 18 has the same error as map 1,3 and 14.

    I am not sure if that helped at all. I would be happy to do any testing if that can give you feedback on what is happening in the map.

    In summary-



    Maps 2,4,6,7,8,9,10,11,15,16,19,20 all work fine (by fine I mean i can change a small thing in the dialogue and it can save).
    Maps 1,3, 14 and 18 all have the same problem with the first line of custom script
    Map 5 has an error with a "symbol"
    Map 12 has 3 errors, one beginning with play thematic music
    map 13 has 9 errors with no identifiable problem
    Map 17 also has an error with the first line of custom script but it is related to a boolean (different from map 1,3,14 and 18)
     
    Last edited: Jun 17, 2018
  7. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    After further looking, there are a couple of issues.

    Function names apparently can't start with underscores, so I changed that. String paths also didn't properly use \\ and now they do.

    Fixing these makes the map openable in the game....but not really, because the screen is black, never loads, and only the mouse is visible.

    So how to open it?

    The second trigger causes the infinite black screen - changing the event from Map Initialization to something else, e.g. "Elapsed game time is 0.0 seconds" causes the map to actually open properly.
    I have no clue if this has anything to do with YDWE, or if it's related to patch 1.29 or something else.

    I still don't know if the trigger works as intended and the cinematic runs properly, that's something you'd have to check.
     
    Last edited: Jun 17, 2018
  8. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Fixed more issues.

    I tested all of the maps you mentioned are failing, and after the fixes the results are:
    13.w3x - 2 preplaced units not found.
    14.w3x - 9 preplaced units not found + YDWETimerDestroyTimer is used.

    I don't know if the preplaced unit issues have anything to do with YDWE, since they are not referenced by names, so the Chinese shouldn't matter. I think.

    YDWETimerDestroyTimer is a custom function and a part of a larger system in Jass that YDWE implements, and cannot be replaced automatically, you'll have to handle that yourself.

    All of the other maps save with no issues as far as I can tell.
     
  9. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi Ghostwolf! Thank you so much for doing this! I will deal with map 13 and 14 myself. If you do not mind, I want to quickly clarify a few issues as sometimes I have trouble following :p

    1) According to your post above, should the first thing i do is change every trigger starting with "map initialisation" and change it to something else (like elapsed game time is 0.0 seconds)?

    2) To your knowledge, do the errors that come up from saving emerge from the editing process, or are they actually errors that exist regardless of editing. I ask this because, one solution to this mess might be me going and downloading YDWE with 1.24/1.20e warcraft 3, adding the translation there, and then using your tool to convert it so there is no need to edit.
    Note: Even if the errors are there regardless of editing, I will still probably start from the original, since this way I control the input, which gives me far more control, whereas if i just play around with the output (the map converted by your tool), I have less control anyway.

    3) Most importantly, if in the future I am trying to bring over campaigns made with YDWE to hive, would you prefer if I do not post here? I say this because there is a very strong chance I will be the only person ever using the YDWE conversion for your tool. From what i understand, the main blizzard subsidiary in their region (net ease) has found a way to allow their users to "upgrade" to 1.29 from their old war3 versions when playing ladder, but then as soon as the game is over, they "lose" the 1.29 warcraft 3. This means, there will be no driving force from their competitive melee scene (which uses 1.29 and future versions) to compel average users to upgrade to 1.29. This means their competitive melee scene and 1.20 or 1.24 custom maps scene (including campaigns) will be able to coexist, which means they will likely stay separated from the rest of the warcraft 3 community forever. As such, there will be no need for your YDWE conversion. So basically, it is just me (1 person) taking away your time to edit/code something that no-one else will ever use. Logically speaking, this is a huge waste of time from your point of view to spend time on something that has no purpose beyond my individual translation projects. I have no problem with this--it's a shame that their community will never merge with ours but that has nothing to do with us. But just let me know if you would prefer me to refrain from posting here if i have trouble with future translated campaigns based on YDWE :) It's completely ok with me.
     
  10. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    1) I don't know, this seems like a bug in WC3. Doing so made all of the maps I tested open in the game itself, rather than getting stuck in an infinite black screen. Are you getting the same results?

    2) I don't know if the missing preplaced units have anything to do with YDWE like I wrote before.

    3) Let me worry about that. Also it's not like handling YDWE is any different on my end than WEU. As you saw, the real different things, e.g. new jass-backed GUI, can't be handled automatically anyway.
     
  11. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hmm, it is interesting, opening it in YDWE, there is no custom script. I guess that is converted by the tool. It is all GUI, so I might be able to identify the issues on this end, alter them (I will try to change them to normal WE triggers on this end) and then convert them using your tool ghostwolf. Regardless, your tool is the only way this is possible (hopefully will avoid the permanent black screen haha). :)
    On a side note, poking around YDWE, this is either a very powerful editor extension, or i just have just never appreciated how much function third party editors give users in general (probably the latter).
     
  12. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    YDWE is pretty extensive. Also, of course that if you open in YDWE it will be GUI, that's the whole point of this tool, to change extended GUI :p

    But extending can mean simple things like exposing jass natives to GUI, or whole new jass libraries and values.
    E.g. one funny extension is WEU exposing custom scripts in conditions, with a function whose name is literally a space character " ".
     
  13. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi Ghostwolf, that tidbit about the function that has a space for a name is pretty scary haha.
    Anyway, I might have found the issue with the 2 preplaced issues for map 13.

    There are two peasants that have been given a trigger command to collect lumber from a specific tree each. If i remember right, you cannot order a unit to target a specific tree. *If this is wrong, then disregard this. What I need to do is actually go back and check the name of the units erroring on the 1.29 version in order to compare. But these two units just stood out to me. If I am wrong, I will continue looking :p

    Two peasants in map 13

    upload_2018-6-21_22-42-0.png


    The triggers

    upload_2018-6-21_22-43-23.png



    Edit1: Ok, if I am correct about the possibility I raised above, then I might have found the issues in map14. You mentioned 9 preplaced units have issues in map14. In map 14, there are 5 wisps that are also given specific commands to mine lumber from specific trees. And, four trees of life are given the command to entangle specific goldmines. I also note that, for all the triggers for these wisp/peasants/trees of life that concern specific trees/goldmines, the "event" is map initialization.
     
    Last edited: Jun 23, 2018
  14. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I found the two peasents and the trees. This is odd indeed. They exist, their names are correct, but WE doesn't generate their globals until you use them in some way.
    For example, open a new unit action that allows you to select a unit, select one of the peasants, then select the other one, cancel the action, and both are no longer errors. Same for the trees with a destructible action.
    How this works is not weird, but rather the fact it "forgot" about these specific units and destructibles being used.

    Kudos on debugging it, I would have never found these pre-placed objects.

    /edit
    After closing and reopening the map, the same issue occurs and you need again to "remind" WE of said units and trees.
    This behavior seems to suggest that WE will only generate globals for pre-placed objects that are referenced by GUI.
    Perhaps if a pre-placed object is only ever used in custom scripts and not in GUI in any kind of context, it is not generated?

    /edit2
    I confirmed the above. If you do not reference a pre-placed object in GUI directly (not custom scripts), then it will not get a global generated for it.
    Because these custom scripts were originally YDWE's GUI, this wasn't an issue, until they were converted.

    Perhaps it will be possible to collect the names of pre-placed objects that are accessed, and at the end do a second pass to see if they are ever used in GUI.
    Ones that are not could be...what? added to some action that will not affect them in any way in a trigger that will never run? :thinking:
     
    Last edited: Jun 21, 2018
  15. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi Ghostwolf, haha that is some confusing stuff going on :p. I can find a way to deal with those triggers, probably by changing them to not specify a specific tree/goldmine, which should do the trick. The main thing is that now we know that it is those kind of GUI triggers (with specific targets) that cause the problem.Additionally, they are very rare triggers since the AI will normally do them automatically, and with the exception of map13 where the author made them cut trees because there was no AI for that base anyway. There was actually no need for any of the map14 triggers since the AI would do them anyway (except the ones where the author makes your own builders mine, then it might be a case of the author wanting it to seem more real that the builders for the players are not just sitting around doing nothing when the mission starts).

    Changing the timer issue in map 14 was simple also, because thanks to you specifying it was a destroy timer trigger I was able to locate the GUI line and I can make a simple trigger to replace it. My issue is now, though, is that something within the last few changes you have made to your tool had made the campaign hidden in the custom campaign menu ha ha. I have tried putting in the version of the campaign before it undergoes your tool, and it appears (but of course, it still gives the blackscreen of death since it has not undergone your tool). As for the version that has undergone your tool, it now becomes invisible (I know we had this issue before and it was because I was apparently on 1.28 instead of 1.29.2, but now I am 100% sure that is not the case :p).

    I completely missed this, since I have been so busy caught up in the editor. I am 100% sure it was working a week ago, but now it will not appear. I have a link to a version that has undergone your tool if you want to see:

    DELETED*

    (Note that the issues in map 13 and 14 we discussed have not been changed in this version, since I wanted to leave changing them till I finished translating all the text (this version is 80% translated). Me not fixing these issues, however, should not be the cause of the entire campaign being invisible in the campaign menu though, since the errors were not fixed last week but the campaign could still be seen and played.


    Edit1: There is another reason why I wanted to test the map in the pastebin besides to see if everything was playable. I recently began translating the custom object data for the campaign, and I noticed that the object data for YDWE is not in the same order as the normal editor... when I saw this I was quite concerned, since I know this tool only converts the extended GUI, but probably has no effect on object data. I am not saying there was anything different about the YDWE object data, it was just in a different order from the normal object editor.
    However, the object data should not be at fault for the hidden campaign. I can still see the campaign before it undegoes your tool, so the custom data should be unrelated to this. Any errors related to the custom data would probably appear in theory once a map is clicked, since the data is global throughout the entire campaign.
     
    Last edited: Jun 23, 2018
  16. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I can take care of the references by adding a disabled trigger with actions that reference the needed preplaced objects. It's ugly, but will work.
    That being said, I didn't look yet what exactly needs it and what not.
    For example regions also miss references, but WE never complains.
    Units and trees obviously need it, as we can see, not sure what else.

    As to opening the campaign - after converting, it indeed doesn't show up, however after I open it in WE and save it back, it does show and seems to work fine.
    It could be just that I am not updating the editor version that the campaign thinks it was saved with up to 1.29 (6060).
    Will need further testing.

    The order in which things are shown in the editor is based on files used by the editor itself, and doesn't depend on a specific map or campaign.

    An odd thing I noticed is that at least the first map opens normally in the game, no issues with the map initialization event or anything.
    Perhaps loading is different for campaigns?
     
    Last edited: Jun 23, 2018
  17. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Thanks for reminding me to save first :p. I am so silly.
    Anyway, for me, I actually always got black screen when I opened map01 without altering the intialization triggers. When i changed the 2 trigger events to "time elapse is 0", then it was openable. So my situation was different from yours in that I could not open map01 without altering the events.

    Edit1: I have tried doing the same (changing all map initialization triggers) to the first playable map (03). Everything worked fine. There is a slight delay for the game entering cinematic mode (barely a second) as a result of it not being on map initialization, but everything else was working perfectly ghost wolf!
    I will soon start to do extensive testing, like seeing what happens when you beat a map, if everything carried over, etc. But really, this is only possible because you identified that changing the map initialization events would fix the black screen, so thank you! I will keep you updated.

    Edit2: I saw you specifically mention how loading might be different in campaigns. I will test this out also.

    Edit3: I tried loading a saved game for the first playable map (03), nothing went wrong. Also I removed the link to paste bin since it I am not sure if the author wants an unprotected version lying around, so i sent it to you instead.
     
    Last edited: Jun 23, 2018
  18. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Testing the map from WE causes said black screen, but opening it from the campaign itself inside the game works. Not related to the conversion in any way, but something to be aware of. Seems like the rules for when/how events happen differs for maps and campaigns.

    Or maybe it's something else. For example, it might be trying to use data from the campaign in the trigger that runs on map initialization, and thus fails to load.
    At game time stuff works differently, as I've seen previously with models that would cause loading to get stuck forever, but at the same time work in game if you spawn them after it started.
     
  19. Rui

    Rui

    Joined:
    Jan 7, 2005
    Messages:
    8,427
    Resources:
    8
    Maps:
    8
    Resources:
    8
    Indeed, unfortunately, that's how the editor works. Be it in triggers or JASS, you can only reference a preplaced unit after you've selected it using GUI.
     
  20. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    730
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi ghostwolf, just wanted to let you know, there are other places where the GUI to target a goldmine (exact same as the error from map fourteen) do not cause errors. When I say do not cause errors, I mean they never caused errors when I saved. They do not have initialization as the event though, for this one I have come across it is a timed event (after 900 seconds since game begins).

    Edit1- So in theory, I could change the triggers that make the player's wisps mine from trees to maybe 0.00 second game time (I have not tried yet, I will start more experimenting soon).