Jump to content

water_info.xml - A Collective Understanding


NLBlackEagle

Recommended Posts

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!

 

thedamthing.png

 

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.

 

 

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:


<Water pos="[color="#FF0000"]X, Y, Z[/color]" maxx="[color="#0000FF"]PositiveX[/color]" maxz="[color="#00FF00"]PositiveZ[/color]" minx="[color="#FFFF00"]NegativeX[/color]" minz="[color="#EE82EE"]NegativeZ[/color]"/>

coordinates.png

 

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

 

ingamecoords.png

Resulting in:

<Water pos="-1388, 98, -770" maxx="-1138" maxz="-482" minx="-1824" minz="-1100"/>

Which is roughly:

coordinatesmap.png

 

 

 

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.

 

 


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

 

priorities.png

 

 

 

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

Link to comment
Share on other sites

  • 3 weeks later...
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...