Jump to content

Potion Racks


SDLMMclovin

Recommended Posts

I'm currently making my first Skyrim-mod. Just relearning how to use the creation kit, after it's been such a long time since I modded anything in Oblivion.

 

After finally getting all my weapon racks, plaques and bookshelves to work, I've started looking at the potion racks. I'm having some major problems here though, and just wanted to ask if anyone else has had a chance to look into the potion rack situation, and if you could help me out.

 

So I'm using the bookshelves as my guide. My Potion rack has a PlayerPotionRackContainer, 8 DefaultPotionRackPotionMarkers where the potions should be placed, but that is as far as I have gotten.

I linked the markers to the container, but there aren't any specific keywords. What I ended up doing was using the LinkCustom01-LinkCustom08 keywords. I didn't know what else to use and this seemed to fit best...

 

Another problem I'm having is when I spawn a PlayerPotionRackClickTrigger and PlayerPotionRackTrigger, they both don't show up as models in the rendering window? There is just nothing to click on to select them. Is there anyway to Fix this? Because the "Primitives" tab doesn't show up when I try to edit the objects either.

What I ended up doing was copying the PlayerBookShelfTrigger and PlayerBookShelfClickTrigger and renaming them and changing the scripts on them. This gave me a primitive.

*edit* I found out how to spawn triggers with a primitive. You need to click the Cube with the T in it on the Toolbar. Hope this helps anyone having problems spawning triggers, and them not appearing as objects.

 

So I have; A shelf, a container, the markers, a clicktrigger, a normal trigger and a collisonmarker.

 

What I don't have are Keywords, like for the bookcase, and I can't click on the PlayerPotionRackTrigger ingame, only the Container.

 

*edit* Also, clicking on the container ingame will bring up a container, but I can't place anything in it. The potion is removed from my inventory, and then placed right back again. You see the weight go up and down as the Item is removed and readded, but nothing shows up on the shelf or in the container.

 

Hopefully someone else will have looked into this problem and maybe be able to help me out.

 

Mclovin

Edited by SDLMMclovin
Link to comment
Share on other sites

  • 3 weeks later...
Okay so Ive been looking into this for the last few hours, and it appears we might have to make completely new keywords as they hold specific pieces of logic for certain things. This is the best I can surmise. If anything we might need to message someone at Bethesda and find out if the potion containers are broken and we have to script our own from scratch.
Link to comment
Share on other sites

There's some ingame 'remnants' of an attempt to make a potion rack.

Whoever started it didn't get much further than copying chunks of the bookshelf code.

So don't feel bad about trying to figure it out to work for potions. Bethesda gave up on the idea, for some reason or other.

 

The reason you're getting your potions returned is as that's by design of the script.

There's a condition check within the OnItemAdd() event that casts the object to Book.

If it fails to cast to book then you get it back. So you'll have to edit that condition for the objects you wish to display.

 

One thing you won't be able to display using the same method as the bookshelf, is user-created-potions.

These will lose all their properties and return to the dummy base object. Just the same as happens with the bookshelf if you store all your Bounty notes in.

 

There's another minor annoyance with the bookshelf code too.

ie. if somebody added 20 potions of minor health, I'd just display the one and the others could stay in a container. The logic on the bookshelf fills the shelves with identical items.

 

It's a cool idea, which is why I'm working on porting a 1-click Sortomatic for Sklrim :)

Don't hold your breath on that though, as the scripting is a totally different animal it's more like a rewrite than a port.

Link to comment
Share on other sites

  • 3 months later...
Just wondering if anyone had continued to work on this idea and got the triggers/activators/scripts working to where the potions actually left inventory and went to the shelf?
Link to comment
Share on other sites

  • 2 months later...

Just wondering if anyone had continued to work on this idea and got the triggers/activators/scripts working to where the potions actually left inventory and went to the shelf?

 

Hi, sorry to drag up an old thread, but I thought I would chime in. I did the following and it has made working potion racks using the existing items that are in the creation kit.

 

Firstly delete the 3 existing potion rack scripts, they are just copies of old bookshelf scripts!

 

1) Make a copy of the 3 bookshelf scripts, which are the trigger, clicktrigger and container.

2) Name the scripts as follows:

 

PlayerBookShelfClickTriggerSCRIPT.psc

PlayerBookShelfContainerScript.psc

PlayerBookShelfTriggerSCRIPT.psc

 

Replace BookShelf with PotionRack in the file names, so PlayerBookShelfClickTriggerSCRIPT.psc becomes PlayerPotionRackClickTriggerSCRIPT.psc etc

 

3) Open the 3 new scripts in a text editor and replace all instances of the following (note it must be in the same case!)

 

BookShelf with PotionRack

Book with Potion

book with potion

BOOK with POTION

 

4) Edit the Container script and edit this line :

 

Int Property CurrentPotionAmount Auto Hidden

change it to

Int Property CurrentPotionAmount=0 Auto Hidden

 

I found the game does not initialise this variable, and it will say the rack is full.

 

Now the scripts are done.

 

5) Open Creation Kit and you will need to edit the three base objects

PlayerPotionRackClickTrigger

PlayerPotionRackContainer

PlayerPotionRackTrigger

 

Go to scripts on each one, select Edit Source and build then save the scripts to compile them, they should compile without error (might need to do them in a certain order IIRC)

 

6) Find this object: LItemBookClutter and duplicate it, rename the new one to LItemPotionClutter, edit this new object and remove all the current books inside it and add some potions (any will do) (I don't think you need this step, but for completeness)

 

7) You need to create the missing keywords, which are for the PotionRackPotionMarker01 to 18

PotionRackClickTrigger, PotionRackTrigger01 to 04, PotionRackContainer...Basically just duplicate all the bookshelf keywords and replace the words BookShelf with PotionRack etc

 

8) Edit the properties of the script for the PotionRackContainer base object and insert all the relevent keywords, do the same for PotionRackTrigger, and PotionRackClickTrigger.

 

9) Lastly, just make sure all the other settings are the same ie the primitive settings for each of the three PotionRack base objects.

 

Now make your potion rack the same as you would a book shelf and presto! It works. I have it working in a mod I am working on at the moment.

 

I might eventually do a youtube tutorial on the above to show it all, but no time at the moment. But I thought I would share this info as I have searched long and hard for this info!

 

One thing is I have not tested it to see if it stores player created potions etc, but it stores built-in potions no problems.

Edited by windaddict
Link to comment
Share on other sites

Great info winaddict. I appreciate the post and will be trying it out. The "mod" linked above seems a little dubious, and not nearly as well-explained as your post. Plus I'm more of a DIY guy anyway.

 

One thing I don't really understand after just reading your post though: My bookshelves use DefaultBookShelfBookMarker objects, as per the official tutorial: http://www.creationkit.com/Tutorial_Bookshelves

 

How is it that we don't need a DefaultPotionRackPotionMarker? Do you just use the DefaultBookShelfBookMarker and let the customized scripts handle the rest?

Edited by Guest
Link to comment
Share on other sites

  • Recently Browsing   0 members

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