Jump to content

Photo

Possible to change the "water height" of a cell with a script?


  • Please log in to reply
8 replies to this topic

#1
YouDoNotKnowMyName

YouDoNotKnowMyName

    Overseer of Vault 114 / Destroyer of Precombines

  • Members
  • PipPipPipPip
  • 1,217 posts

Good afternoon everybody!

 

Is it possible to change the water level of a cell (interior or exterior) with a script?

 

The reason why I want to do this:

I am working on a custom worldspace mod.

That worldspace is pretty much a small (size of the "commonwealth worldspace, stupid worldspace size limit!) island with a large inactive volcanic crater on it.

That crater is partially filled with water.

 

I am thinking about creating a script that increases the water level during rainy weather and gradually makes the water level decrease over time.

 

Just to add a bit of immersion (sea what I did there? Ok, I will stop now ...)

 

 

I know that it would take A LOT of rain over A LOT of time to significantly increase the level of a lake, so this isn't really all that realistic, but it might help make the worldspace feel less "static" ...



#2
HeyYou

HeyYou

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 10,354 posts

Yeah, it's gotta be. The quest for Greygarden comes immediately to mind. Flipping the switches in the water treatment plant lowers the water level.

 

Now, in an exterior cell, having the water level above grade in some areas, may make it a bit more interesting....... I don't really know how 'localized' the water plane is in exterior cells.



#3
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 3,411 posts

@Heyyou. In this case it's being handled via activators. Niston's waterlock also does use this method.

 

Issue with raising worldspace water is that even if it would work you'd still have to manage the LODs water level.

 

Most likely you could create a giant activator (That uses "Is Full LOD") but then the texture would also scale with it.

 

So tl;dr:

It's possible using water planes and scripting with Translateto() but for really large areas it can get problematic due to LOD and whatnot



#4
YouDoNotKnowMyName

YouDoNotKnowMyName

    Overseer of Vault 114 / Destroyer of Precombines

  • Members
  • PipPipPipPip
  • 1,217 posts

@Heyyou. In this case it's being handled via activators. Niston's waterlock also does use this method.

 

Issue with raising worldspace water is that even if it would work you'd still have to manage the LODs water level.

 

Most likely you could create a giant activator (That uses "Is Full LOD") but then the texture would also scale with it.

 

So tl;dr:

It's possible using water planes and scripting with Translateto() but for really large areas it can get problematic due to LOD and whatnot

Well you could use lots of "normal sized" water plane "activators", make them all "IsFullLOD" and move them with a script, right?

And make them "not respawn", so they are persistant and can be moved by a script even if they are in a currently not loaded cell.Isn

 

I always thought the "greygarden quest water stuff" was done with "water plane activators", but I might have to look at that stuff in the CK to figure out what is really going on ...



#5
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 3,411 posts

Sure it's possible. It all depends on how big you're talking about and how much you're willing to take.

 

Useful side info:

I found out that if you (maybe by accident) have "normal" water under an activator water plane you fall through the world.

Or maybe you just die, at least look out for that ;)



#6
YouDoNotKnowMyName

YouDoNotKnowMyName

    Overseer of Vault 114 / Destroyer of Precombines

  • Members
  • PipPipPipPip
  • 1,217 posts

Sure it's possible. It all depends on how big you're talking about and how much you're willing to take.

 

Useful side info:

I found out that if you (maybe by accident) have "normal" water under an activator water plane you fall through the world.

Or maybe you just die, at least look out for that :wink:

Oh not too big ...

Just a "rectangular area" about 4 by 3 cells big ...

 

About the "normal water" under the activator:

So, the "normal cell water" level should be under the ground, so that the "landscape" mesh is between the "activator water" and the "real water".

 

Ok, that might work.

 

But there is another problem:

The "water plane activator" water only goes down a few meters. It does not go down "ininetley". (But you don't see that in the CK)

So if the player "dives down" to a certain point, they will just fall (because they are not "in water" any more)

I would need it to go down about like 50 meters, or maybe even deeper ...



#7
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 3,411 posts

Yes it needs to be under the landscape. Other than that I can't say much more



#8
YouDoNotKnowMyName

YouDoNotKnowMyName

    Overseer of Vault 114 / Destroyer of Precombines

  • Members
  • PipPipPipPip
  • 1,217 posts

As first I just thought "well, I will just put another water activator below there", but like you said, two water things above each other are not something that the engine can handle ...



#9
niston

niston

    For Matilda!

  • Premium Member
  • 1,295 posts

One thing I would try if I were to remake the Forest Grove Waterlock mod: I'd use TranslateTo() on *one* of the water planes, and refattach the other planes to that.

Using TranslateTo() on all the planes will sometimes make some of the planes lag behind, especially when you've got a large number of them.






IPB skins by Skinbox
Page loaded in: 0.961 seconds