So hot, so cold...

Post » Thu May 03, 2012 8:15 am

In working on Sunfall, I've realized that it would make for a greater level of immersion and depth if I could apply the type of health-damaging aspect to really cold water (the kind that's surrounded by walls of ice) that lava carries. Is this possible, and if so, how can it be done?
User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Thu May 03, 2012 4:31 pm

I think that might be possible using lava with a custom mesh and texture, but it wouldn't look like normal water, which would be a pain if you're using mge.
Edit: I think scripting would be possible, but I have no idea how. So consider this post a bump.
User avatar
Liv Staff
 
Posts: 3473
Joined: Wed Oct 25, 2006 10:51 pm

Post » Thu May 03, 2012 1:56 pm

I wouldn't want to modify the lava, because what I want to use is water, partially because of the MGE issue you noted, partially because the game's water looks like water already, so why make something else look like water when you have water already, right?

I figured scripting would be the way to go, but I wouldn't begin to know how to set that up either.
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am

Post » Thu May 03, 2012 4:43 pm

You could just use an invisible mesh that causes damage.
User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Thu May 03, 2012 11:34 am

I've seen some Skyrim mods that apply cold damage from extreme weather, and freezing water. You might look at their scripts.
User avatar
..xX Vin Xx..
 
Posts: 3531
Joined: Sun Jun 18, 2006 6:33 pm

Post » Thu May 03, 2012 8:34 am

You could just use an invisible mesh that causes damage.

Unless I'm misinterpreting what you're proposing, this would only be useful in very specific applications, which is not really my goal. I want to have as much flexibility in the design of my interiors as possible.

I've seen some Skyrim mods that apply cold damage from extreme weather, and freezing water. You might look at their scripts.

Is the scripting language used by Skyrim really that similar to Morrowind's?
User avatar
Emily Graham
 
Posts: 3447
Joined: Sat Jul 22, 2006 11:34 am

Post » Thu May 03, 2012 5:37 am

There's actually a mod that does this. Check it out and see if you can adapt it.

Temperature
by Zappara (At Planet Elder Scrolls)
[I apparently do not have permission to post links]

I played with it as part of my mod load for a while, but ultimately removed it because I found it to be game-breaking. There are small effects like a light burden walking around in warm weather, and a fatigue drain in cold water - Seriously, playing through Bloodmoon with blizzards everywhere and your character jumping in and out of water without a problem? So, I looked up this mod.

But, if you get too close to lava, you get hit with a spell effect that hurts you and drops you to the ground - in some caves, there's some lava up on a cliff next to you and you have no idea why your character is getting paralyzed and hurt. A lot of mods and scenarios bring you close to lava, but not into it, and you can't do that with this mod installed. Breath sounds and breath vapor are brilliant, but again, the cold damage comes from a spell effect, which of course has a sound attached to it that has very little to do with walking around in the cold. To be honest, maybe I missed some way to configure it, but I don't remember at this point.

Maybe you can see how Zappara scripted this and do something similar for Sunfall. Maybe you can find configuration or work-arounds that I didn't find. It comes with a modder's resource file, which is dandy.
User avatar
michael danso
 
Posts: 3492
Joined: Wed Jun 13, 2007 9:21 am

Post » Thu May 03, 2012 3:28 pm

Seriously what's up with this forum? I had to use Firebug just to get the textarea to show...

Anyway, it's been a while since I've done any modding, but this should be perfectly doable.
if ( getDistance player < 100 )    if ( globalFlag != 1 )        set globalFlag to 1    endifelse    if ( globalFlag == 1 )        set globalFlag to 0    endifendif
Applying a script like this to those walls of ice would set a global variable (globalFlag), then you could run either a startscript or a local script applied to an object in each cell you want this to work for. Something like this.
if ( globalFlag != 1 )    returnendifif ( getInterior == 1 )    if ( player->getPosition Z > getWaterLevel )        return    endifelse    if ( player->getPosition Z > 0 ) ;water level, outside... not sure if getWaterLevel works outside        return    endifendifplayer->modCurrentHealth -5 ;or whatever
You can even take into account a player's frost resistance. Here's a script I wrote two years ago that makes fire resistance work for lava damage:
begin lavashort DamageRatefloat timerif ( menumode == 1 )    returnendifif ( CellChanged == 0 )    if ( GetSoundPlaying "lava layer" == 0 )        PlayLoopSound3DVP "lava layer", 1.0, 1.0    endifendifif ( player->GetResistFire > 99 )    set DamageRate to 0elseif ( player->GetResistFire < 100 )    if ( PCRace == 3 )        if ( player->GetResistFire < 80 )        ;Dunmer damage balances out with normal when they get 80% or more            Set DamageRate to ( ( -100 + player->GetResistFire - 40 ) / 4 )        else            Set DamageRate to ( ( -100 + player->GetResistFire ) / 4 )        endif    else        Set DamageRate to ( ( -100 + player->GetResistFire ) / 4 )    endifendifset timer to ( timer + GetSecondsPassed )if ( GetStandingPC == 1 )    if ( timer >= 1 )                    ;hurt/heal player once every second not frame!        player->ModCurrentHealth DamageRate    ;X pts of damage a sec (By Default most races get 25, Dunmers get 16.25)        player->ModCurrentHealth 20            ;heal PC so no double damage is inflicted        set timer to 0    endifendifHurtStandingActor 20                    ;for NPC's/creatures (they get 20 pts per second by default)end lava
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am

Post » Thu May 03, 2012 6:47 am

Is the scripting language used by Skyrim really that similar to Morrowind's?
No, they're completely different. Maybe taking a look at how they detect the player being in water might help somewhat, but I doubt it. For starters, Skyrim has a nice IsSwimming function, which is lacking in Morrowind.

if ( player->getPosition Z > 0 ) ;water level, outside... not sure if getWaterLevel works outside
getWaterLevel doesn't work in exteriors.
User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Thu May 03, 2012 12:01 pm

Unless I'm misinterpreting what you're proposing, this would only be useful in very specific applications, which is not really my goal. I want to have as much flexibility in the design of my interiors as possible.
It would just be a mesh that has a script in it that would cause damage when the player came into contact. The script posted above though I like more as you could have various levels of damage take place according to distance from a certain point.
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Thu May 03, 2012 4:34 am

No, they're completely different. Maybe taking a look at how they detect the player being in water might help somewhat, but I doubt it. For starters, Skyrim has a nice IsSwimming function, which is lacking in Morrowind.


getWaterLevel doesn't work in exteriors.
Surely in exteriors you could just do a check to see if the player is below 0. If the player is below 0 then the player is definitely in water
User avatar
Dragonz Dancer
 
Posts: 3441
Joined: Sat Jun 24, 2006 11:01 am

Post » Thu May 03, 2012 1:40 am

I believe I've used GetWaterLevel for exteriors before in my Ravenous Hunger mod and it works just fine for determining if the player is swimming or not, just as Gortwog said. However, inside it often reads strangely depending on the cell that you are in.
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Post » Thu May 03, 2012 10:09 am

Needs of Morrowind coems with something called Water Level Fix, for interiors.... not sure exactly what it does, but that might fix the problems with checking interior water levels.
User avatar
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Thu May 03, 2012 10:42 am

I thank everyone for the advice, but I think at this point it would be simpler and easier to utilize aquatic monsters and clever level design in order to discourage players from taking a dip.
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Thu May 03, 2012 10:55 am

Abot has a very nice script for interior water detection, based on Zappara's temperature mod.

    ; interior water check based on Zappara's temperature mod script    ; player must be moving / not levitating to detect    if ( GetInterior )        set i1 to 0        if ( ab01wlNoInterior != 3 ) ; 3 = splish splashing only, not used            if ( GetWindSpeed >= 0.01 ) ; ATTENTION 2 digits only!                if ( lastInterior == 0 ) ; only if not just entered                    set i1 to 5                endif            endif        endif                set lastInterior to GetInterior        if ( i1 == 0 )            if ( player->GetSoundPlaying "FootWaterRight" )                set i1 to 1            elseif ( player->GetSoundPlaying "FootWaterLeft" )                set i1 to 2            ;elseif ( player->GetSoundPlaying "Swim Right" )                ;set i1 to 3            ;elseif ( player->GetSoundPlaying "Swim Left" )                ;set i1 to 4            endif        endif        if ( i1 == 0 )            return        endif	   ; the script does its things starting here.
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Thu May 03, 2012 2:39 am

Needs of Morrowind coems with something called Water Level Fix, for interiors.... not sure exactly what it does, but that might fix the problems with checking interior water levels.
If I recall, vanilla Morrowind had bugs with detecting water levels in interiors. I think MCP fixes this, but a few people also fixed it with mods.
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm


Return to III - Morrowind