Jump to content

Closed-faced helmets prevent food and potion consumption.


dalescooper

Recommended Posts

I'm working on a mod for a custom race that makes helmets a blessing and a curse.

 

One of my "curse" ideas is to make it impossible to use potions while wearing closed face helmets. I've looked on the creation kit wiki for a place to start, but I've still no idea. I guess the solution may have something to do with BlockActivation, but can you apply that to inventory items?

Link to comment
Share on other sites

Sadly no, I've been coupling with this issue in a project I am working on and eventually gave up on the idea. I did manage to prevent consumption via adding items to a reference alias and enabling the quest item check box (this required some fiddling with papyrus due to items in inventories typically not having a reference), but it was buggy and only worked half the time even after going over it multiple times... which I can only assume is due to a stack not counting as one object. I also tried using perks to block activation through entry points but that doesn't work either.

 

You can prevent the effects though if you don't mind the fx still playing, by using a perk which modifies incoming spell duration / spell magnitude to zero (conditioned to potions only) will cause the potion to do nothing but it still technically consumes the potion.

 

If you do find a solution, I wouldn't mind knowing :D good luck.

Link to comment
Share on other sites

I was afraid that was the case!

 

Your effect prevention idea is definitely the next best thing though, as we can reason that the FX playing is due to the player being drenched in the magical solution after smashing the bottle on their face. Losing the potion can then serve as an adequate... "punishment" so to speak? I guess then all we'd need then would be a scripted message explaining what happened to the player, and perhaps a way to change the sound effects to reflect this.

Link to comment
Share on other sites

I think you could change the sound, you can condition sounds to only play on certain conditions so perhaps if you used a global variable to indicate if the player was wearing a close-faced helmet or not you could stop the sound playing. Then just play your own sound, not so sure about replacing the sound but that could work too, I think SKSE has functions to do that.

Edited by Arocide
Link to comment
Share on other sites

  • Recently Browsing   0 members

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