1. Are you planning to upload your awesome tool to Hive? Please review the rules here.
    July 9, 2018: The rules for the Tool Section have been revised. Please be sure to read the revisions.
    Dismiss Notice
  2. 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
  3. 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
  4. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  5. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  6. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  7. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  8. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  9. 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.

Water Mesh Height Fixer

Submitted by Tommi Gustafsson
This bundle is marked as approved. It works and satisfies the submission rules.
Summary
This is a Java Application to fix a water mesh height problem that causes Area of Effect spells and items show their targeting circle at a wrong location.

Bug Corrected
This application corrects the following bug:
Editor Bug: Phantom Water Height

Tutorial
A tutorial to use this application is found on YouTube:


How it works?

It edits the war3map.w3e file and calculates a new water height for every vertex that has water mesh disabled, if the water mesh is found to be on a higher cliff level than the ground mesh.

Other tools needed
WinMPQ - to unmpq and rempq war3map.w3e (alternatively, you can use MPQ Editor)
JRE - to run Java applications

Credits
- Dr. Super Good for war3map.w3e editing tools in Java
- Sami Termonen and Tommi Gustafsson (members of Sound Mind Games) for programming the fixer application
- Tommi Gustafsson for the video tutorial

Change Log
- 21.3.2018 (v2): The tool no longer causes water cliffs. It has been modified to calculate a new water height instead of setting it straight to 0.
Contents

WaterMeshHeightFixer-v2.zip (Binary)

Reviews
eejin
Approved! Works properly and without too much hassle. Would be a nice addition to automatically extract and insert the war3map.w3e from the map archive. Maybe also change the WinMPQ link to refer to Zezula his MPQ editor which is more user friendly.
  1. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,543
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Something occurred to me. Due to water mesh interpolating height with neighbouring nodes it might be required to leave the water height of nodes that neighbour enabled water nodes unchanged, at least in a 1 x and y orientation. Otherwise one might end up with a water cliff. at the edges of water fields (areas of enabled water nodes) where the height suddenly drops to 0. In a well made map this should be under the ground mesh, but in less well made maps or border conditions it could possibly be visible.

    At least that is the theory, maybe it never happens in practice.
     
  2. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    281
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    By the way, we are thinking about adding MPQ editing functionality to the software at some point so that people wouldn't need to use WinMPQ. Do you happen to know any good libraries for MPQ extaction and editing that we could use with our Java application?
    I have just come across StormLib.dll, which is written in C++.
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,543
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    They should be using MPQEdit anyway.
    That is kind of the problem and why such tools do not already exist. The MPQEdit team wrote a C/C++ MPQ API which is reliable. All others are not. My Java MPQ API was read only, and although used by some tools does not fit the requirements here. JMPQ3 has read/write support but is highly buggy as it was written by inexperienced software engineers who tried to prematurely optimize with techniques like memory mapping.
    Such APIs are not portable like Java applications. Where as a pure Java solution works for Mac and Linux, a Java wrapped C++ DLL does not as that will only work for Windows.
     
  4. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    281
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    I have now modified the tool so that it does not cause water cliffs. Any testing is welcome.
    Please always make a backup copy of your map, before using this tool. It can still mess up some things, which I haven't tested it with.
     
  5. eejin

    eejin

    Tool Reviewer

    Joined:
    Mar 6, 2017
    Messages:
    138
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Approved! Works properly and without too much hassle. Would be a nice addition to automatically extract and insert the war3map.w3e from the map archive. Maybe also change the WinMPQ link to refer to Zezula his MPQ editor which is more user friendly.
     
  6. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    281
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    Ok. Added an alternative link to the MPQ Editor.