Results 1 to 13 of 13

Thread: water_info.xml - A Collective Understanding

  1. #1
    Scavenger NLBlackEagle's Avatar
    Join Date
    Nov 2014
    Location
    SwordCoast
    Posts
    55
    Rep Power
    1

    water_info.xml - A Collective Understanding

    Hello everyone and welkom to my first 7d2d guide.

    In this guide I will explain some basics I found out whilst experimenting with water. A first will be that in my understanding a lot of people tend to be afraid of water and rather not use it. Do not worry as while it may be buggy from time to time it isnt the monster everyone thinks it is.

    The reason I named this thread "A Collective Understanding" is because I would love to see more and more information regarding water in this thread, questions and anwsers fire them away as it can only help!



    The Coordinate String
    After a whole lot of searching around the web I only found ONE entry made by guppy asking for an explaination on water. It turned out that without his question including very important information I wouldn't have figured out how it works as guppy's question is the only place that included the full coordinate string of water.
    Spoiler: 

    So here goes my attempt to explain this and the very first thing you'll need to know is that a water body needs 4 coordinates drawing up a cube or rectangular which are MaxX, MaxZ and MinX, MinZ. To save you and myself some headaches I've decided to draw up a example:

    Code:
    <Water pos="X, Y, Z" maxx="PositiveX" maxz="PositiveZ" minx="NegativeX" minz="NegativeZ"/>


    To save you a headache here's an example of how I did it ingame:


    Resulting in:
    Code:
    <Water pos="-1388, 98, -770" maxx="-1138" maxz="-482" minx="-1824" minz="-1100"/>
    Which is roughly:



    What if water collides?
    So, what if one body of water overlaps another body of water? If this is the case the body with the highest priority will override the one with the lower body as shown in the paint example below. The way the priority is established depends on how high the entry is within the water_info.xml file.
    Spoiler: 


    Code:
    <WaterSources>
        <Water pos="X, Y, Z"/> ( p1 )
        <Water pos="X, Y, Z"/> ( p2 )
        <Water pos="X, Y, Z"/> ( p3 )
    </WaterSources>


    Hope this all wasn't too confusing and I did a proper job of explaining it. Took me quite some time to write it all up so let's hope this will be of good use!

    Do not hesistate if you have information to add!!

  2. #2
    Scavenger PeterB's Avatar
    Join Date
    Jan 2019
    Location
    Germany
    Posts
    44
    Rep Power
    1
    Acknowledged and appreciated.Thanks.

  3. #3
    Community Moderator xyth's Avatar
    Join Date
    Dec 2016
    Location
    Florida, USA
    Posts
    1,823
    Rep Power
    1
    Nice addition to the knowledge base. Thanks!

  4. #4
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    22,315
    Rep Power
    1
    I get it! =) Thanks homie! The white pic is what made it "click" for me.

  5. #5
    Scavenger NLBlackEagle's Avatar
    Join Date
    Nov 2014
    Location
    SwordCoast
    Posts
    55
    Rep Power
    1
    Haha nice, I love to hear it when my paints are explanatory

  6. #6
    Refugee
    Join Date
    Sep 2019
    Posts
    8
    Rep Power
    0
    This started to make sense to me, right up until I opened the water_info file and noticed it contained hundreds of entries, each of which seems to have a max/minx max/minz that covers the entirety of the map. Shouldn't there be entries for each individual water pool?

  7. #7
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    22,315
    Rep Power
    1
    Yeh but the generator just makes them overlap for ease's sake.

    The first entry for an area takes precedence I think. So it'll ignore subsequent overlappings.

    Otherwise the generator would have to determine the specific coordinates of each lake.

  8. #8
    Tracker Sam_Neill's Avatar
    Join Date
    Sep 2018
    Location
    Germany
    Posts
    197
    Rep Power
    1
    Quote Originally Posted by LunariusH View Post
    This started to make sense to me, right up until I opened the water_info file and noticed it contained hundreds of entries, each of which seems to have a max/minx max/minz that covers the entirety of the map. Shouldn't there be entries for each individual water pool?
    In my map a had to add an entry for each inner curving of the island to make water spawn. You can make all entries manual, or use an Excel file to do the work for you, or you can pregenerate a map and edit the values.

    Depends on how you want to edit - the info of NLBlackEagle is precious, cause if you have an existing map you can just add your wanted water source at the to of the file, and it will work.

    No need to sort all other entries.

  9. #9
    Ranger
    Join Date
    Jul 2017
    Posts
    346
    Rep Power
    1
    What do you mean by "override" on overlapping water sources? What difference does it make? If "water" contained a block type, I could see it mattering but... if you change the order of p1, p2 and p3, what would be the actual change on the generated map?

  10. #10
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    22,315
    Rep Power
    1
    The higher one on the list would dictate the height.

  11. #11
    Colony Founder DUST2DEATH's Avatar
    Join Date
    Jun 2014
    Location
    AU - HDHQ Overhaul
    Posts
    1,872
    Rep Power
    1
    even I mostly understood* it all. Well done.

    *had to read it 3 times over

  12. #12
    Ranger
    Join Date
    Jul 2017
    Posts
    346
    Rep Power
    1
    Quote Originally Posted by Guppycur View Post
    The higher one on the list would dictate the height.
    So that would apply to all regions that are overlapping? So, in that example, p1, p2 and p3 would all be "watered" up to p1's elevation?
    Last edited by dcsobral; 2 Weeks Ago at 05:54 PM.

  13. #13
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    22,315
    Rep Power
    1
    No, just where the overlap is. You can do some weird ♥♥♥♥ with water...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •