Jump to content

[LE] Magic effect like 'Well Rested'. How to do it?


cumbrianlad

Recommended Posts

Hi.

 

I'm modifying Severin manor, which needs an overhaul in my opinion.

 

I've got the place looking quite spectacular, but I wanted to add something not available in any other player home.

 

Off the bedroom area I've added a small sauna, all in dark elf style. My thought was that when the player uses one of the benches in the sauna, they get a magic effect that makes health, magicka and stamina regenerate, say 25% faster for an hour or two.

 

Obviously, the benches have to be unique and prompt the player to 'use sauna'. After that I create the effect to regenerate health faster, if one doesn't already exist that I can use. What I can't see is how to trigger this magic effect when the player uses the sauna benches. I've messed around for a while looking at beds but I can't see how the 'Well-rested' perk is applied. I'm assuming that I'd need to do something similar.

 

Any ideas as to how to do this?

 

I'm thinking do it like a shrine. I've made the spell, so I attach the following script to the sauna benches..

 

Scriptname SaunaBoonScript extends ObjectReference Conditional

 

Spell Property SFLxSaunaSpell Auto

 

Event OnActivate(ObjectReference akActionRef)

 

SFLxSaunaSpell.Cast(akActionRef, akActionRef)

if akActionRef == Game.GetPlayer()
SFLxSaunaMessage.Show()
endif

 

EndEvent

 

Message Property SFLxSaunaMessage Auto

 

I then add my message to tell the player that health, stamina and magicka recover 25% faster for two hours (as set up in the spell).

Link to comment
Share on other sites

Location, location, location!

 

Seriously though, take a look at the PlayerSleepQuestScript (In the scripts.7z-archive, if you haven't unpacked it already)

It's a script that runs every time you wake up and checks is the location you're in has a certain keyword. If so, you get the well rested-perk.

 

It's just that the script uses the event OnSleepStop, and I don't know if there is an event like OnSItStop, so shrine-style seems like a good idea.

 

All you need then is to create an activator object that uses the TempleBlessingScript - you can just duplicate a shrine, give it a bench-mesh, name it bench and, in the properties of teh script, change whatever blessing it gives to your spell.

 

Voilà, a bench that, upon activation, gives you the blessing of... sweating?

Link to comment
Share on other sites

Thanks for the answer.

 

In the meantime I've been playing around. My spell is definitely working, but with some unwanted effects.

 

I'm getting the message that I wrote both when I sit at the sauna bench and also when I leave it... unsatisfactory.

 

To check that the spell was running, I altered one of the effects to fortify shouts. Forgetting that this isn't a percentage, I put 50 for the magnitude. Oh my! I left the sauna being able to shout with no cool-down period at all! Fus-Ro-Dah! Fus-ro-dah! If I hadn't put the DefaultDisableHavocOnLoad script onto my clutter items, the place would have been a shambles.

 

The other thing that is going wrong is that I had three effects on the spell. Three showed up in the active effects tab but all were listed as Fortify Shouts, and all were 'Fortify Shouts 20%'. I most definitely did not fortify shouts by a measly 20%, for starters. The others should have been fortify healing rate and fortify magicka rate.

 

I must be missing something.

 

The last thing is that I expected to be able to alter the prompt for the sauna bench to say 'use, sauna' But all I can get it to do is to say 'sit, sauna'. A minor point but one that's irritating.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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