Closed: Dungeon Water Height

Need something opened in the core for your mod, or even help with research?
User avatar
Interkarma
Posts: 2589
Joined: Sun Mar 22, 2015 1:51 am

Closed: Dungeon Water Height

Post by Interkarma » Mon May 02, 2016 12:30 pm

I will go looking for this soon, but does anyone already know where individual dungeon water height is defined in game data? Would save me some time if this has already been solved.

If anyone else if willing to go looking for this, I would appreciate the help. I'm hoping to have dungeon water in ahead of the spell system (for water breathing, etc.)

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

Re: Open: Dungeon Water Height

Post by Nystul » Mon May 02, 2016 3:41 pm

nope sry, but I will add water reflections (if the reflection mod is enabled) shortly after you managed to make it work ;) or do you plan to use unity's water pro anyway - so then I might just make sure that it works hand in hand with it
I also plan to make the automap show it somehow

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

Re: Open: Dungeon Water Height

Post by Interkarma » Tue May 03, 2016 1:12 am

Haven't thought about rendering yet. :) You know me though, will likely build something super-basic at first to test then build on it later.

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

Re: Open: Dungeon Water Height

Post by LypyL » Tue May 03, 2016 2:19 am

Does the water span the entire width & length of a dungeon block? I've honestly never notice haha, but I'm assuming it's just a plane the size of the block. If that's true, it means the only thing there should be is a height value for the water, and everything below that being underwater.... I'm not sure if that's actually how the water works though. :)

Maybe one of the unknown values from the RDBHeader?

http://www.uesp.net/wiki/Daggerfall:BLO ... ck_Records

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

Re: Open: Dungeon Water Height

Post by Interkarma » Tue May 03, 2016 2:49 am

As far as I know, water is present only in W blocks - but the actual water height appears to vary by dungeon not by block. Water height is possibly in the LocationRecordElementHeader for dungeon map data. I have a theory to test, but need more time. At work at the moment and can't do much about it.

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

Re: Open: Dungeon Water Height

Post by Interkarma » Tue May 03, 2016 3:42 am

Decided to do something fun over my lunch break. Teleported into a water block in Scourg Barrow (W0000028.RDB) and used the crouch-climb trick to pop out into void. Also had water-breathing and water-walking cast.

I was then able to swim around in water within the block area. The moment I moved outside of the block bounds, I just started falling. That seems to confirm at least that water is limited to W blocks. Not sure about the plane height though. Maybe this is indeed set in block data.

Edit: I created a save game swimming in the void, but Daggerfall just crashes when loading this save. :(

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

Re: Open: Dungeon Water Height

Post by Interkarma » Tue May 03, 2016 5:15 am

More testing. Water plane height does seem able to vary by block within the same dungeon. For example, within the dungeon Aibbon-Gora/Castle Glar there are two water blocks. I positioned player right on water's edge and saved, then checked Y position in save tree. Here's the restults:

W0000023.RDB - Water plane at approx. 65275.
W0000000.RDB - Water plane at approx. 65060.

Those Y positions are in inches so that's a difference of 215" or around 5.4m. Quite substantial for two directly adjacent blocks.

Couple this with the swimming effect being removed in the void the moment player crosses out of block bounds, and it appears that water height is indeed set on a per-block basis, or at the very least in the map data for block layout. Feels like progress. :)

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

Re: Open: Dungeon Water Height

Post by Jay_H » Tue May 03, 2016 6:52 am

I may be too late, but I just thought of this. There are some underwater blocks that have chairs and tables floating against the ceiling, which are in every other way identical to certain non-water blocks. I always asked myself, "How did they program those chairs to be there if they couldn't guarantee the water would cover it?" Everything's pointing to a per-block, non-random water level: I've never found a dry block with chairs floating in the air, so it must be allocated by individual block. Sorry if this isn't much help; I was actually thinking of making a few basic attempts between blocks like you did, but I've been too busy.
**INDEFINITE HIATUS** Current priority list: 1. Writing new DFU quests; 2. Writing Archaeologist content; 3. Revamping classic DF quests. Only in free time, no guarantees made.

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

Re: Open: Dungeon Water Height

Post by Nystul » Tue May 03, 2016 7:40 am

in daggerfall castle there are floating objects in the water areas - these are hand placed and look kinda weird when water is not present. I bet they did it in the same way for chairs and tables ;)

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

Re: Open: Dungeon Water Height

Post by Interkarma » Tue May 03, 2016 1:41 pm

More testing! I hacked the dungeon layout for Privateer's Hold to change the central block from S0000999.RDB to W0000023.RDB. The only 2 bytes changed involved the bitfield for central block. And this happened:
fall_065.png
fall_065.png (24.1 KiB) Viewed 1887 times
fall_066.png
fall_066.png (21.37 KiB) Viewed 1887 times
Yep, that's a water block in Privateer's Hold.

Not only did the central block change as expected, water appeared in that block as hoped. Combined with earlier observations, I'm now almost certain the water height is defined in the block data and has nothing to do with the dungeon data.

More research needed! :)

Post Reply