Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
vectorplexus.com is at https://vectorplexis.com until further notice. ×
  • Create an account

    Want more? Register now and get full access to our community!

Archived

This topic is now archived and is closed to further replies.

Felio

HELP - Wet specular, NiOverride & Magic effects

Recommended Posts

Hello guys. I am working on a mod (so far is for personal use because it needs a texture that I didn't have time to make myself, so I'm using a 3rd party asset) that gives the player character (but potentially every character the effect is applied to) a sweat/wet skin effect every time they're fatigued or wet. I know there are mods out there (Frostfall, wet&cold) that do the same thing, but I don't particularly like the wet shaders they apply (they are glowing effects that look more like magic that actual wet surfaces) so I decided to try my hand at making one myself

My problems are:

  • The effects don't work as intended (as long as I'm in the water it applies correctly,l but as soon as I exit the water unequipping any item removes the effect)
  • The effect doesn't trigger with weather (see point 4 below in the quote)

For those interested in what I tried to do, see quote below

Quote

After a try-and-adjust process, the mod currently works this way: 

  • I have created a Wet(bool wet, actor akReference) function that changes, through nioverride, the specular map of an actor according to the set boolean (true= wet specular, false = default specular). So far, the speculars are just for human bodies (haven't tested them on argonians and kajiit, thye probably need separate maps). It uses the AddNodeOverrideString function from nioverride and checks for SAMBody, SAMFeet, SAMHands, SAMGenitals and SAM Foreskin, plus the head node the model uses (MaleHeadNord, MaleHeadBreton, MaleHeadImperial etc.). 
  • The player character has an ability ("Wet Detection") that has a constante effect and it activates whenever stamina falls below 50% and whenever the player is swimming. The ability has no magnitude, no duration, no effects. The script attached to the ability, though, applies the Wet(true, akTarget) on effect start, and adds a second spell when the effect ends.
  • This second spell ("Wet") is another constant effect that registers for update game time on applying and it's essentially identical to the wet detection ability, except that when the timer updates it removes itself. If in the meantime the Wety ability triggers again, the spell is removed and reapplied when the actor exits the water/recovers stamina.
  • There is also in the activemagiceffect scripts a OnEquipped event that if the target of the spell equips an armor reapplies the wet effect. This works well in the Wet Detection ability but somehow it doesn't work in the wet effect.

Now, why did I do that? Because I've tried several othewr options that gave me problems:

  1. First I used a Wet quest in which I set two states: normal and WetState. The wet ability sent two ModEvents: "OnWetEnter" (sent OnEffectStart) and "OnWetExit" (sent OnEffectFinish). The OnWetEnter event changed the state to WetState and applied the wet specular, and when the OnWetExit event was received it registered for a single update of 30 seconds or something (time that was reset if the "OnWetEnter" event was sent again). Thing is, sending the mod events from the ActiveMagicEffect somehow made my game freeze if not crash altogether everytime I entered water. So I scrapped that.
  2. I then tried to use the WetAbility to cast a timed Wet spell (duration 30/20 seconds) when the actor exit water/recovers stamina, but somehow the effect didn't apply, even when casting directly the spell through console on the player. Also, the effect showed on the active magic effects tab as intended, with timer and everything, but once the timer was over it didn't disappear from the tab.
  3. I tried to use the FXShaders for the magic effects and scrap nioverride entirely, but they overlay on the diffuse color, not the specular, so I ended up with white drops on the body that looked more like dirt than wet.
  4. Also, the WetAbility used to trigger also with a GetCurrentWeather condition. It appeared to actually trigger (the effect was listed as active when the weather was correct) but the effect weren't applied.

If anyone has suggestions on how to do this/try something new, I'd appreciate it.

Share this post


Link to post
Share on other sites

That sounds very interesting, ive always wished there was a more dynamic effect for getting wet, and water physics in general.   The only thing I could suggest really is dig into the "Frostfall, wet&cold " codes and their setup to see how they built it, maybe ask them for some opinions on what you're trying, they may have hit the same pitfalls you are experiencing and thats why they chose what they did.  That said... the new Skyrim SE perhaps has better abilities for such things as you're trying.  One last thought... the modders of  Frostfall and/or wet&cold may appreciate if you brought some advancement to the new versions, they're still active mods and are both on the skyrim special edition nexus now.

Share this post


Link to post
Share on other sites
Author of the topic Posted

I kinda did that at a point, but Frostfall and Wet&Cold use a different approach: while I need niOverride to change the specular (= attach a script to the magic effect), thei use the internal membrane shaders of the engine (hence the effect that I don't like). And that's the reason they could port to the SE engine.

Unfortunately the membrane shaders seem to work as some kind of "glow maps", which is not what I'm aiming to: I want something that reacts to the light, not that generates it. :\

Share this post


Link to post
Share on other sites

Yeah that makes sense, but I have no idea how that can be accomplished,  im still way too new at the modding scene for such a huge challenge, maybe check and see if there is a similar mod in FO4, Skyrim SE is at least part of the way in advancement to that version of the engine, so there may be a few new goodies & tricks available, also we have DX11 now too :D Its still so early yet tho

Share this post


Link to post
Share on other sites

Oh I see, I just uninstalled old skyrim haha, too unstable for me, the new one really is a lot better and I figured a smarter place to start myself into modding, its at least somewhat more modern than the old skyrim and its where all the energy is. 

I really like your idea though, one thing that always got me about Wet & Cold and the others in Oldrim is the drips would happen even underwater instead of swapping to a bubbly sheen or something.  I remember many years back someone released a really cool effect, then it disappeared pretty quickly, it made the jumps into water produce a stream of bubbles and more pronounced wake behind and around the character, reducing more depending on how deep you went, it also had character wetness and drips built in, and they didn't happen if you under the water line, or pass under the water line if you were above it.

Share this post


Link to post
Share on other sites
Author of the topic Posted

that's another problem entirely. I didn't put a drip effect on mine, however the effect trriggers consistently only on two conditions: 1) PC swims (actually swims: if you're in the water neck-deep but don't wim, you don't get the effect) 2) Stamina falls under 50%.

I also din't find a way to apply a similar effect to armors. I'm starting thinking I should study the FX shaders a little better...

Share this post


Link to post
Share on other sites

Sounds like you're far more skilled than I with such things lol, I wish you the best of luck!  These sorts of effects have a tremendous impact on the richness of the game, once you get it worked out well I hope you bring it over the SSE eventually too :)  Perhaps you should ask Vector or admins to let you into the modder forum here, if you placed your post in that you might get more response or discussion around these technical aspects. 

Share this post


Link to post
Share on other sites
Author of the topic Posted

It seems I got around the problem somehow, and the effect does work. However I'd like to get more reliable wet detection conditions...

Share this post


Link to post
Share on other sites

Im sure you can create your own custom conditions and give more priority so it has better consistency, not sure how, but it must be possible afaict.

Id be willing to bet you'll have more ability with your mod in SSE, the engine got a lot of modernizing and updates... and SKSE64 beta comes next month! :D

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.