Jump to content

Infinite potion bottle in inventory


Recommended Posts

Greetings, quick question: is it possible to create a potion bottle that doesn't disappear from the inventory when used? Let me say that I do not need to say that "go to magic effects and make enchantment or something there", I am interested in the bottle itself does not disappear when used and you could use the potion an infinite number of times, like for example an eternal lockpick or bone key

Is there such a possibility to do it somehow or is it impossible according to the game itself? 

Thanks in advance for the answer

Link to comment
Share on other sites

Here was my approach to working around an item in the potion / food / ingredient categories that get consumed on use:  I created a single effect with a short duration with an attached script that used the OnEffectFinish event to re-add a new instance of the object.

The White Phial on the other hand utilizes two separate quest scripts, one which is told by the player what effect it will be using, adds the pre-defined version of the white phial with that effect.  The effect uses OnEffectStart to call the second quest script which adds the empty version of the phial and registers for an update.  After which, the first quest script once again adds the pre-defined version, and the process can repeat as much as possible.

The difference in the two approaches:

  • My approach will show the item leaving the inventory and returning only after the player has exited the inventory and the effect duration completes.
  • The White Phial approach will show the full item leaving with the empty version appearing almost immediately.
  • My approach works best for an item flagged as a quest item that cannot leave the player inventory (at least manually).
  • The White Phial approach will also work wherever the phial might be placed (container or ground) as it is also designed to track its location.
Link to comment
Share on other sites

There's also the player's OnMagicEffectApply, that will trigger when you consume the potion.

I you don't want timeouts or empty bottles, you can use the OnMagicEffectApply or OnEffectStart events to add a potion back when it is consumed;  you'll see it disappear and reappear immediately in the inventory.

Link to comment
Share on other sites

Here is what you could do, you could create a misc item with your potion model, and attach this script to it:

Quote

ScriptName MyScript Extends ObjectReference  

Spell Property MySpell Auto

Event OnEquipped(Actor akActor)
    MySpell.Cast(akActor, akActor)
EndEvent

You should fill the MySpell property with a new spell:

  • self
  • fire and forget
  • uncheck auto calculate set the spell cost to 0
  • add any number of potion magic effects, and configure them properly

When the player clicks on this magic item he will get the potion effect but the item will not be consumed. The main issue with this approach is that your potion will be on the Misc item tab.

Edited by SkyrimThiago
Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

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