Jump to content

An underwater mod


glowplug

Recommended Posts

Inspired by Subnautica, I'm developing an underwater mod for Oblivion. Due to differences in the engines, there are various issues that need to be addressed.

Problem: Oblivion does not have an underwater air cell/pocket.
Solution: Scuba gear...err no...

Problem: Scuba gear requires an equipment slot that could conflict with other mods.
Solution: A magical item instead of scuba gear.

The item will provide a limited breathing time but will have upgrades for longer breathing.
Returning to a vehicle or the surface will restore the item's air supply.

Problem: The collision mesh required for an underwater vehicle will drive through ground mesh and any other object.
Solution: A network of travel paths automated through use of linear interpolation algorithms.

This could be changed to player driven controls but then it is up to you to follow the tunnels and caves without driving through them.

Which would you prefer, automated or self drive?

Link to comment
Share on other sites

If I may I would make some notices:

 

"Problem: Scuba gear requires an equipment slot that could conflict with other mods."

If it consits of air tank and mask, can hair and quiver slot be used? There is also Back Weapon slot, but I don't know how it will look like.

 

"Problem: The collision mesh required for an underwater vehicle will drive through ground mesh and any other object."

When I was trying to add flying to my custom version of dragon race mod, I was advised by Drake the Dragon to use SetVelocity commands as they take care of collisions too. I made my script using SetVelocity and SetVerticalVelocity, but as I found they are working only while actor is in air, I used IsOnGround function and when used classic SetPos to lift my dragon a little, which added "scratching a ground effect". Flying added is very simple and while flying you can't do anything else (except changing equip), but for me is still enjoyable. Maybe they will work underwater too?

 

"Which would you prefer, automated or self drive?"

Both, just for sure if Havok will act weirdly.

Link to comment
Share on other sites

Thanks RomanR, great feedback.

 

What it can do is use 'IsUnderWater' to add the breathing code (if not Argonian) as well as use MenuQue for the semi-opaque goggles. This does not require an equipment slot meaning no risk of conflicts - avoid 'if anything can go wrong it will'. I won't restrict it to the mod's cells due to the following...

 

The mod can do the network of travel for quests as automated. A bonus can be gaining a 'Summon Submarine' on one of the quests - if people want to use that to play 'Twenty Thousand Leagues Under the Terrain' then good luck to them. IE, both, as you suggest.

 

There's a boat mod that had code to stop us 'running aground' but would lock the boat the spot making it useless. I don't know whether that was fixed but I'd much rather spend time on other things and let people sail right under Cyrodiil.

Link to comment
Share on other sites

As quick as I posted, I remembered that a submarine, as it name states, should be 'under water'. If people summon it on some of Cyrodiil's lakes, then the next cell is probably going to be 'under terrain'. If the code makes it drop 1000 units or whatever to make it stay underwater but under terrain then what else can the code do, teleport player and sub to somewhere else?

The only problem is 'GetCellWaterType == 0' - should the code record previous cell and put them back there?

Link to comment
Share on other sites

In my opinion GetCellWaterType isn't much suitable as it returns 0 for both non-water and standard water, at least without using commands to complement it - like GetWaterHeight or similar.

 

I also must revise my first post - and not in good way, unfortunately. As I lifted some restrictions in my flying function to be enabled when on water or underwater, I got these results:

 

1. SetVelocity commands doesn't work - my flying dragon didn't move a inch.

2. When I falled back to standard SetPos approach (my function has this option for emergency), I was teleported right on water surface (regardless if exterior or interior). I was able to move, but not up or down.

Still I was testing it only on living actor (as I didn't have another suitable "test object"), so your submarine still can be OK, but in light of my tests any non-automated way chance to work right is quite grim.

 

So for summoning I would go teleporting submarine to hand-placed markers way to avoid such problems.

 

Edit: Is it me or in vanilla Oblivion doesn't exist any sort of land vehicle? As if Cyrodiilians doesn't know a thing about a wheel.

Edited by RomanR
Link to comment
Share on other sites

Again, thanks for the feedback RomanR. I wasn't thinking as the 'summon spaceship' that I did for Nagasteim puts it in the air above us. Summon submarine, however, would have to resolve the nearest water as well as interpret viable transform. I think that code to establish water height to terrain height relative to player coordinates would resolve this but I will need to test it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...