Closed: Dungeon Water Height

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Open: Dungeon Water Height

Post by LypyL »

I wrote a little script to put together some of the various data from the different location / DFBlock structs. I'm going to sleep soon so I won't be able to do much else with it, but I was able to find the dungeon with the most water blocks in daggerfall - Isle of Balfiera/The Sahulessa Hermitage - has 4 water blocks (it's nothing but border blocks and water blocks, nasty :lol: ). It might be a good place to work with.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Open: Dungeon Water Height

Post by Interkarma »

Cheers mate. That is definitely a nasty dungeon for the RNG to spit out. :D

I've also tried a few more experiments hacking in water blocks to different dungeons, and have confirmed the water height is consistent to the block itself, not the dungeon. For example, W0000000.RDB and W0000023.RDB both have very different water heights and those heights stay the same no matter which dungeon I hack that block into.

So just need to find that setting in the binary data and confirm by modding water level in game. I've worked through the known unknowns without any luck so far. Feels like just a matter of time and patience now.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Open: Dungeon Water Height

Post by Interkarma »

Just floating an idea to see if it holds water (pun mode enabled).

What if this is a lot simpler than first thought? Check out the following two water blocks. Wx29 on the left and Wx00 on the right.

Image

These two blocks are one of the tallest and one of the shortest respectively. In game space, the taller block has a lower water level than the shorter block. But in local space the water level appears to be the same relative to the bottom of the block.

I've tested around half of the water blocks in game, and so far the main variable influencing water level seems to be the height of the block itself.

This could just be a case of correlation != causation, but I've worked through modding unknown data several times and nothing seems to explicitly control the water level. A simple offset from bottom of block wouldn't need any other data, which could explain why that data is so hard to find.

I'm going to test this idea out thoroughly when I can. It could be wildly wrong (I've been wrong lots of times before solving something), but it's still valuable to think out loud sometimes.

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Open: Dungeon Water Height

Post by LypyL »

Sounds like a good theory! If you find that almost all blocks have the same offset, look at the unknown1 value of DFBlock.RdbBlock.Header. It's 260 for like 95% of blocks, but then there are a few 258s and maybe some others that I haven't seen (if it's the same for every block, then ignore this :) )

Assuming that would be in inches from the bottom of the block to the water level, it seems to be correct (just estimating it with some planes in unity).

http://i.imgur.com/JtkVsoX.png

Worst case scenario, there are only like 30 water blocks - it will be easy enough to work out the water height for each :D

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Open: Dungeon Water Height

Post by LypyL »

I feel confident that this is how it works now - I just remembered the special block with water in it in Cast Daggerfall Sx0160 (that's important on it's own I guess, that some special blocks have water...)

Sx0160 has an Unknown1 value of 292, which I haven't seen anywhere else. That puts the water height right here (represented by the ugly plane), which is where it is in Daggerfall.
http://i.imgur.com/AwWT3Fi.png

edit hmmm...maybe not. The numbers seem to match for the blocks I've tried, but changing the values in Blocks.BSA doesn't seem to have any effect in Daggerfall.

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Open: Dungeon Water Height

Post by Jay_H »

I don't know if this is helpful, but in a dungeon I realized how the water level is decided.

This block is likely familiar; it's the half-submerged tower block. On the right is a door to a new block.

Before crossing over into the new block, the water level persists. After crossing over, the water level changes. The same effect is visible if looking back into the tower block; it'll be dry until the door is crossed.

This tells that the water level is decided by each block as the character enters it.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Open: Dungeon Water Height

Post by Nystul »

did the daggerfall automap highlight underwater section or showed them as underwater sections somehow? can't remember and test right now

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Open: Dungeon Water Height

Post by LypyL »

I just checked, and it doesn't.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Open: Dungeon Water Height

Post by R.D. »

We've got this one now, so it needn't be Open anymore.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Closed: Dungeon Water Height

Post by Interkarma »

A huge thank you is in order to Allofich/R.D. for all his work on locating the block water height value and implementing swim code right down to movement, breath handling, sound effects, surface detection, dive detection, and exposing all the values needed for me to add the visual side of water later.

This has been a great experience of collaboration - thank you! :)

Post Reply