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. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. 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. Regno

    Regno

    Joined:
    Sep 16, 2016
    Messages:
    91
    Resources:
    0
    Resources:
    0
    Hello Regno here,

    As of the time I am writing this, the map is being checked by the tool. I will report back each hour of the progress. If there will be any 00))

    edit:

    Passed 1 hour mark

    edit2: Many hours have passed, signing off. I give up : D
     
    Last edited: Jun 24, 2018
  2. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Added GUI references to preplaced units and destructibles, however it seems like I have some issues with my MPQ code, and it makes 13.w3x not save correctly, in addition to another map that uses WEU.
    Gotta check that first.

    Injecting the new trigger file into the map with MPQEditor is possible, but obviously not very user friendly :p

    What?
     

    Attached Files:

    Last edited: Jun 24, 2018
  3. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    The GUI references are now added.

    In addition, fixed conversion of GUI child types.
    For example, quotes need to be added to strings, but GUI has many types that are really strings, but not called strings. Such types (same for ID integers) are now converted correctly.

    The MPQ issue was fixed too, which didn't affect the campaign, but affected another map.

    Possibly WE can work with custom script conditions just fine, as I found out due to incorrect conversions. This may reduce the need to convert many things, like whole if-then-else blocks.
    This is however only relevant to "multiple" variations, e.g. if-then-else-multiple, for-force-multiple, etc.

    As far as the campaign goes, I think beyond the need to save it, and the YDWE timed destroy timer action, there are no issues left.
    To be honest, it makes sense you'd have to save it, since I do not generate a new war3map.j, so no matter what conversions are done, they are invisible to the game until a new one is generated, generally via a map save in WE.
    Only the actual custom YDWE function should not work in-game without a save if I were to figure how to fix this, but I don't know if it's worth bothering.
     
    Last edited: Jun 25, 2018
  4. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Haha, yes that would probably be not user friend :D. Thanks for finding a way around that.

    So Ghostwolf, can I just check, does what you just said here mean that the GUI with the tree/goldmine as targets, + the issues with changing every single "map initialization" action to "elapse time is 0" are automatically dealt with? Sorry I just wanted to check, since I couldnt follow exactly :p

    The save issue is irrelevant- it was my fault for not remembering :p.
    Anyway, with this out of the way, would you like it if I post issues I come across from your tool when converting other campaigns? This one is essentially done now, all thanks to your tool!
     
  5. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    If a map is going to lose used references to preplaced units/destructibles due to conversions to custom scripts, a reference will be added via an initially off trigger named PreplacedObjectReferences.
    This trigger is added to the first trigger category (folder in the trigger editor).
    You can see it in action for 13.w3x and 14.w3x.

    I am not touching the map initialization since it's not related to the conversion, it has something to do with map and campaign handling by the game. Like I said, the event works as expected in these maps when they are launched in the context of the campaign. Why not in the context of a map, I don't know. Probably due to campaign data not being loaded, and the loading phase and game phase handling bad/missing data differently.

    If you have any isses, feel free to post them.
    If any of them have to do with custom YDWE functions, you will have to handle them manually though.
     
  6. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    - Custom script conditions are now used when possible. This allows to not convert full blocks such as If-Then-Else-Multiple if their conditions need to be converted. It may look weird at first to see custom scripts in conditions :p
    - The converted triggers file is now re-read with only the standard WE trigger data, to validate that it is not plain broken.
    - Added GUI conversion of IsUnitType when the type is UnitTypedead (which both WEU and YDWE define for UNIT_TYPE_DEAD) and it's inside a top-level condition. In other words, this only applies to trigger conditions. It is replaced with IsUnitDeadBJ, which actually works different, and may have side effects (that's the reason it is not changed in non-trigger-conditions, where it can be replaced with custom scripts).
    - Implemented the conversion of array variable sets/gets which didn't add the [index] part.
    - The messages on the page now have a little style to them, to make the output slightly less unreadable. The page is also scrolled to the bottom after the conversion.
    - Changed the whole design of the code, and fixed many problems. Every valid map that I have in my possession now converts successfully (that is not to say everything is implemented, because certainly not everything is).
    - It's also a lot more optimized and fast, but I don't know if you'll notice it.

    I am thinking about changing RoC versions of blocks (IfThenElse, ForForce, ForGroup, etc.) to TFT versions (IfThenElseMultiple, ForForceMultiple, etc.) when their conditions, or actions, need to be converted.
    This will allow to still keep around the GUI logical structure, rather than have them converted to full custom scripts.
    It will also allow to not generate extra functions in the map's header for these blocks, which is a nice side effect of finding custom script conditions.
    You can in fact have any "action" in GUI in a condition, and WE translates it just fine. It just doesn't give you the option to add these actions.

    Still need to look closely at AndMultiple and OrMultiple, although I believe AndMultiple should already work correctly, and for OrMultiple all that needs to change is "false" to "true".
     
    Last edited: Jun 26, 2018
  7. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    - Fixed the inlined custom script conditions to behave correctly for IfThenElseMultiple/AndMultiple/OrMultiple.
    - Added the needed boilerplate code to be able to handle RoC->TFT conversions of control flow blocks. For now only IfThenElse->IfThenElseMultiple is implemented. This allows for example to only convert the ThenAction part to custom script, rather than the whole IfThenElse block.

    I think this is the final update for now, not much to change until I see maps that fail to convert. Most notably full trigger conversion is not implemented.
     
  8. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Hi Ghostwolf, yes it seems there are less changes being made, if that is what you meant by the optimization.

    Edit1: I might have encountered the issue that guy above me posted about. Basically, whereas in the past where there would be a pop up almost instantly after dropping the file into your tool for the download for the no_weu file, now when i do it, no box ever pops up. I tried searching for it in case it auto downloaded somewhere, but couldn't find anything.
    No Download


    upload_2018-6-27_23-51-20.png




    Edit2: Tried again, exact same thing. I am 100% it did not automatically download anywhere on my computer. Not sure if it makes any different, but I purposely left some of the YDWE custom stuff in there because I was going to play around with it to see what edits I can make without altering the missions too much.
     

    Attached Files:

    Last edited: Jun 27, 2018
  9. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Had a small typo, fixed.

    /edit
    Just because it was fast and easy:
    - Added RoC->TFT conversions also for ForGroup and ForForce.
    - Added GUI replacement for IsUnitRace in an OperatorCompareBoolean to a GetUnitRace in an OperatorCompareRace.

    With these changes, the whole campaign doesn't need any generated functions anymore.
     
    Last edited: Jun 27, 2018
  10. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Hi ghost, thanks for all the edits. One quick question, is it possible that there are errors going on with the buttons on the campaign being hidden.

    Edit: What I mean is, I have now made all the buttons "missions" hidden, so it now follows a normal campaign where you need to beat each mission to unlock the next. When I did this, so now only the first mission can be selected, it is suddenly giving the black screen (yes, I did save it on 1.29 this time).

    I have the updated file here:

    Final button hidden | HIVE

    The only other change I made was to change all map initialization events in the entire campaign to elapse time is 0.00

    Edit2: When I say black screen, I mean when you open it in game and try to click the first mission.


    Edit3: Ok, so this is strange. When I save the individual map, I can then play it when I open up the campaign on warcraft 3. I was only saving the campaign as a whole, not saving each individual map. I mean, I do not mind saving each individual map and then saving the campaign as a whole if that is the solution. I just did not realize this was the case.

    Edit4: This issue actually might have been here all along, since in the early stages I was always saving the map itself before saving the campaign since I was testing for if the script error was going to come up.
     
    Last edited: Jun 29, 2018
  11. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I don't know why the game doesn't like it when the maps are not saved with WE, perhaps it's the fact that I automatically remove the (attributes) file, or perhaps something else.
     
  12. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Hi Ghostwolf! I forgot to mention that I fully translated that campaign without problems, thanks to your tool! I added you to the special thanks section (it is temporarily removed because I uploaded the wrong version).
    Anyway, I used your tool to convert another campaign, and it came across the following issue: ( the first picture is the error that popped up directly after saving, and the second picture was a consequent one I took)

    Screenshots


    upload_2018-7-6_23-28-0.png



    upload_2018-7-6_23-29-39.png






    Based on the fact that it had YDWE in it, I'm guessing its jass YDWE thing that I need to fix myself, but I am posting it just in case it is not. Anyway, that was the only issue for the entire campaign, which is a super compliment to your tool!

    Edit1: Interesting Fact. One of the maps constantly gave me memory crash errors on the version it was made (I might have been given a test version of the campaign, not sure), but after using your tool, I could open it and play it on 1.29. Hilarious.
     
    Last edited: Jul 6, 2018
  13. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    That is indeed a part of YDWE's custom code, so you'll have to figure what to do with it.

    Nice to hear it works also for other files.
     
  14. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Hihi ghostwolf!
    Sorry to bother you again. I was just wondering if you had altered the code recently that would affect the map saving.

    I used your tool, and everything works fine. I saved every map and it was all fine. But when i was going back to correct a small error today, I saved a map (01), but then it gave me an error, and started listing everything single imported resource in use in the campaign as being unable to be added to the archive:

    Screenshot

    upload_2018-7-11_0-22-27.png



    I am not sure how many it could not archive, since I had to alt +f4 to exit. I will keep looking into it. Its just that I have never seen this error before.


    Edit1: I have noticed the campaign is now saving at 1/5 of the time that it normally would.

    Edit2: I have tried to recreate the issue multiple times. The long saving time persists, but for one time, it did not error, even though I did nothing different. I first thought it was me copy pasting things with spaces at the end that was causing it, but it seems random.
     
    Last edited: Jul 10, 2018
  15. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I have stopped developing the viewer, which this is a part of, so I am probably not going to work on this more. That being said, I don't mind checking if I messed something up, however I deleted lots and lots of models, maps, and other mess I had, and the campaign was one of the files, so you'll have to upload it again, sorry.
     
  16. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    That is the most terrible news I could hear. Well, I still appreciate what you have done, and you are in the special thanks section for the current translated campaign and all other ones that I use your converter for. Just out of curiosity, by discontinuing your tool, will it still be available for just but just not developed, or will it be taken down completely.

    As for the file, let me quickly see how many times I can recreate the error first so if I can narrow the possibilities down, since right now it's very random.

    Edit1: Just incase the error persists, would you need the pre-converted file or post-converted file
     
    Last edited: Jul 10, 2018
  17. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Nothing will be taken down, it's all open source in the first place.

    If the issue is really with the converter and not something else, I would need the pre-converted file.

    /Edit

    Added conversions from 1.29 PTR functions to their equivalent non-PTR functions.
    E.g.
    SetHeroProperName
    ->
    BlzSetHeroProperName
    .

    PlaySpecialEffect
    and
    PlaySpecialEffectWithTimeScale
    are defined in 1.29 PTR, but not in 1.29, and thus require the 1.30 PTR, if they were used.
     
    Last edited: Jul 10, 2018
  18. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,662
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Thank you, helped me unlocked an old map of mine.
     
  19. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,836
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Added string table inlining, to avoid losing the strings.
    Due to silly limits on the amount of text that can be put in a custom script (259 characters?), and due to not knowing the final size of a custom script when converting strings that are a part of it, a function in the map header will be added for each inlined string, which simply returns it.
     
  20. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    808
    Resources:
    7
    Maps:
    7
    Resources:
    7
    Hi ghostwolf, I thought I had replied to you earlier. That issue I encountered seemed to be a one time thing. Everything else is working fine. Your tool is a really amazing bridge to allow us to convert non standard GUI back to the normal editor. Thank you! If you do ever decide to pick this up again (I know you dropped it), feel free to drop a line. It is a really fantastic tool.