Jump to content

[LE] Add script to potion?


Recommended Posts

Little bit vague ... If they consume the potion where they find it that would be in that cell.

 

Long answer:

Guess you could make a fake potion that does nothing (minimal effect possibly just for looks) ... Do a check if they are in that cell when they drink it for instant effect (which would be actually drinking the real potion) or set a flag they did drink it if not in the cell. Most likely a global. Then when they enter the cell they are in a trigger box (with a 1 time flag set up if they drank the potion) that checks to see if the global is set and if so drinks the real potion ...

Short answer: Trigger box.

Edited by NexusComa
Link to comment
Share on other sites

Little bit vague ... If they consume the potion where they find it that would be in that cell.

 

Long answer:

Guess you could make a fake potion that does nothing (minimal effect possibly just for looks) ... Do a check if they are in that cell when they drink it for instant effect (which would be actually drinking the real potion) or set a flag they did drink it if not in the cell. Most likely a global. Then when they enter the cell they are in a trigger box (with a 1 time flag set up if they drank the potion) that checks to see if the global is set and if so drinks the real potion ...

 

Short answer: Trigger box.

Let me try to clarify:

There's a healing potion in a room.

As soon as the player enters that room, the potion sets off OnCellLoad() and a script is executed.

 

The purpose would be for the player to nev even see the healing potion but the ale the script replaces the potion with - effectively making sure that no healing potion will never be picked up or seen by the player.

 

Edit: but since you can't simply attach a script to the base potion and I want the script to apply to every instance of certain potions and going through them one by one is what I want to avoid by adding the script... well, I'm looking for a better way.

 

In short: I don't want the script to be an effect of the potion, I want it to be attached to the object instance of the potion.

Edited by TangerineDog
Link to comment
Share on other sites

You cannot attach scripts to the potion object itself. You can place an xMarker under the pre-placed potion and put your script on that. If you duplicate the default xMarker, you can apply the script to the base object of your duplicate. Place one instance of the xMarker at one potion, copy the xMarker then use the Use Info option of the right click menu of the potion(s)' base object, use the window that pops up to bring each pre-placed instance up in the render window and paste your xMarker.

 

I don't remember all the short cut key combos to copy / paste in the CK, but I do know that it is possible.

Link to comment
Share on other sites

Still a bit vague ...

You said you do not wish the player to see the health potion. You want them to see an ale that acts like the potion. I take it this is only in the cell you're working with.
So ... why not just make the potion look like the ale. Duplicate the potion by a different ID name then change the .nif file to look like the ale.

Link to comment
Share on other sites

Still a bit vague ...

 

You said you do not wish the player to see the health potion. You want them to see an ale that acts like the potion. I take it this is only in the cell you're working with.

So ... why not just make the potion look like the ale. Duplicate the potion by a different ID name then change the .nif file to look like the ale.

 

:D Alright, alright, big picture.

 

I want to delete some potions from the game.

But where their instances stood, in alchemists' stores and other interiors, I want to have different potions instead of empty spaces.

So instead of replacing every potion by hand, I'm looking for a way to script the whole thing.

Link to comment
Share on other sites

You may be better off just replacing them ... or more so editing them (as in the real potions). That would replace everything in the whole game in one shot. And that also sounds crazy! :teehee:
The mod compatibility problem would end up being a nightmare.

Edited by NexusComa
Link to comment
Share on other sites

You may be better off just replacing them ... or more so editing them (as in the real potions). That would replace everything in the whole game in one shot. And that also sounds crazy! :teehee:

The mod compatibility problem would end up being a nightmare.

 

That's what I'm afraid of :D

I'd do that, but looking at all the interiors, there's dozens of cells I have to go through for one potion alone...

Has anyone found a way to search & replace something in every interior cell at the same time in the last 2 years?

Link to comment
Share on other sites

No you wouldn't .. if you just edited the real potions they would all change to that version game wide. In fact this would really be the only way to do it.
Them potions are in lists that effect the whole game. It would be a lot more than just replacing them in the cells. You also would instantly be incompatible with
100's of mods and quests that work with the potions by doing something like this.

Edited by NexusComa
Link to comment
Share on other sites

You probably want to look into writing a script for TES5Edit that will replace X potion with Y drink throughout leveled lists and disable pre-placed X instances while placing new Y instances and save the end result in a new plugin. I do not know of any such TES5Edit script that will do that but it very well may be a plausible thing and possibly your only option short of going through everything by hand yourself.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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