Skyrim

Displayable Kitchen (or Whatever...)

If you're interested in building a pantry (or a cupboard, dishware cupboard, weapon chest, or any other type of container), and you want to be able to have a display pop up so you can drop items into a container and have an activator (like a basket of apples) appear so that you can remove that item one at a time, this set of instructions will help you to deck out your player home appropriately.

In BYOBreezehome, I've used this method and these scripts for the drinks, pantry, dishes, ingots, soul gems, and jewelry displays.  The Potions, witch heads, and most of the displays work a little differently, and if anyone is interested on how to replicate those, I'm happy to knock out another set of instructions for those.

Preliminary Steps


Just in case you're totally new to modding, download and configure the creation kit.  Darkfox127 covers that pretty well on his YouTube tutorial.  All of the files here are located in your Skyrim directory

First, crack open the BYOBreezehome.bsa file (if NexusModManager hasn't already done this for you) and extract the following files (I use BSA Browser, but there are plenty of BSA Extractors out there):
2 scripts

  • scripts\plydisplayitemactivator.pex
  • scripts\plydisplayitemcont.pex
(feel free to extract the source files as well, if you want to read my scripts)

and as many of the food meshes as you like:
  • meshes\plymster\clutter\food\basketapplegreen.nif
  • meshes\plymster\clutter\food\basketapplered.nif
  • meshes\plymster\clutter\food\basketbread.nif
  • ... you get the idea.  They're all in that "meshes\plymster\clutter\food\" folder.

Synopsis/Quick Reference

1. Copy/build a Container. 
  • Add the "plyDisplayItemCont" script. 
  • Place it in your cell

2.  Build an Activator.  Give it...
  • An ID
  • A Name
  • A Mesh (use a static mesh)
  • A Sound (if any)
  • Change the Activate Text Override to "Take"
  • Add the "plyDisplayItemActivator" script.

3.  Configure the "plyDisplayItemActivator" script...
  • Set the "_DisplayContainer" property to point to the container you built.
  • Pick the appropriate form type (ammo, armor, book, etc)...

Select the appropriate form (like "FoodApple").
Leave the others blank.
  • Place your activator in the cell.
  • Set the activator object to "Initially Disabled".


4. Configure your container script to point to each of the Display Item Activators you've created and placed.

5. Test your activators.

Detailed Instructions

1. Copy or build a container:

Find a container you want to use, and make a copy.  For this tutorial, I typed "cup" in the search textbox on the Object Window, and chose the "UpperCupboard01".  Then click the container, pause for a second, and then click it again to rename it.  Once the container is renamed, a "Create New Object?" message box will pop up:



Click "Yes" and you'll create a copy of the container, but with a new ID.

Now, go find your newly created copy by typing in whatever you renamed it to in the search textbox. I renamed mine to plyFoodStorage, so it's easy to find when I type in "ply".

A Quick Word About Naming Conventions:
It's a good idea to make your containers and your activators easy to find by using a simple naming convention. I always start my newly created objects with "ply" so that I can find them easily. With the display item activators you'll be using, it's a good idea to name them similarly. For example, just so that my Display Activators all come up together, I start them all with "plyDA". To further group them together, I use "plyDAFood" to keep the food-related display activators together. This makes it easier to navigate them all.

You could easily argue that I should use "plyDCFoodStorage" as my ID for the Display Container, and you'd be right, but I'm not going to go back and do that just to get a screenshot.

Now open your container by double clicking on it. Edit the container as you see fit (changing the name, deleting its contents, etc), and add the "plyDisplayItemCont" script by clicking the "Add" button under the "Scripts" submenu on the right-hand side. This will take a few minutes while the creation kit initializes the scripts. It's a good time to go get a cup of coffee or something.



Now you should see a list of all the scripts currently loaded. As you start typing "plyDisplayItemCont" in the Filter textbox, your list of scripts to choose one should narrow until you see "plyDisplayItemCont". Choose this script, click "OK", and click "OK" again to close your Container dialogue box.


2. Build an Activator

In the Object Window, look for the "World Objects/Activator" folder (it's right above the "World Objects/Container" folder you were just in when you copied that container). Right-Click on any of the Activators listed, and select "New". When you create a new Activator, you'll need to add some information:

  • ID - use a reasonable naming convention so you can find it more easily later.
  • Name - This is what the player sees when he/she looks at the Activator
  • Mesh - This should be a static, immobile mesh. For our purposes use the "meshes\plymster\clutter\food\basketapplered.nif" mesh that you extracted earlier. 


About Meshes:
The meshes in BYOBreezehome for the various Activators have all been changed to be static.  This is because Activators won't just sit on their own, like a container or a static object, but can be grabbed and moved, like a miscellaneous object or weapon.  If you want to change your own mesh to be stable, you can use Nifskope to modify the mesh's collision object. The collision objects' bhkRigidBody object has three properties that will need to be set:
Motion System = MO_SYS_BOX_STABILIZED
Solver Deactivation = SOLVER_DEACTIVATOR_OFF
Quality Type = MO_QUAL_INVALID.

  • Sound - pick a sound if desired.
  • Activate Text Override - This will say "Activate" by default, but for our purposes, "Take" would probably make more sense.

Now add a script just like you did with the Container, except you're adding the "plyDisplayItemActivator" script.

3. Configure the "plyDisplayItemActivator" Script

Once you've added the "plyDisplayItemActivator" script, you'll need to configure it. Double-click it (or right-click and select "Properties").



The top property, "_DisplayContainer" is an Object Reference. Once you select it, click the "Pick Reference in Render Window" button, and select the container that you just made.

Next, determine what your object is. We're going to be making an activator for a basket of apples, and apples are located in the "Potion" form type (which sounds crazy, but "consumables" might be a better name for potions). Select the "PotionForm" property and select the "FoodApple" object.



Click OK and save your work. In fact, plan on saving frequently. After spending hours creating a few dozen Display Item Activators and Containers and then placing them in your player home, losing all of that work sucks big green donkey dicks (which I'm sure is some new Skyrim mod).

Now place your basket of apples in the world. Right click on the object, and select the checkbox that says "Initially Disabled". This will keep your basket of apples from appearing before you add any apples to the container.

Some items (like the cabbages, leeks, lavendar, and carrots, or the fish and clams, or the chicken and rabbit) are all set to appear in a single basket (the picnic basket... I think it's Basket05, or the wooden plates).  In those cases, place the Display Item Activators in the exact same location and using the same rotation as the basket that you are positioning.  You should also plan on building a static version of the basket (ie: copy a static object and change its mesh).

To save a bit of time in the future, you might consider just copying Display Item Activators based on the one you just created. This will save you the time of having to add the script (since it will already be there), pointing to the container, etc.

Once you've placed all of your Display Item Activators in the cell, you're ready for the final step...


4. Configure Your Container Script

Now you just need to open the script properties for your Display Item Container. The only property here is "DisplayItemActivators", which is an array of ObjectReferences (which is a fancy way of saying a list of things placed in the game).



Click the "Edit Value" button, and then click the "Add" button for as many Display Item Activators as you plan on having activated by this container (up to 128). Note that the numbering starts at 0, so don't get confused and add one too many records.

For each of the records you just added to the array, click the "Pick Reference in Render Window" button and select your Display Item Activator.



Once you have them all added in, click okay to close the Properties window, and click okay to close the Container window.

Don't forget to save!


5. Test your activators


It's a good idea to test your activators once you've built them. The BEST way to do this is to start a from a fresh savegame, as Activators, once placed in the game, will have their positions saved as part of the savegame. So if you put a basket of red apples on the top shelf, and later change your mind and move it to the bottom shelf, they will appear on the top shelf for the rest of that saved game. Note that this is not true of containers and static objects.

When testing things like this, you can place a bunch of individual items in the same cell, or just build a test container full of objects to test with (which I like to do if I'm testing a bunch of different activators).



An that's it.  Now go fill up all those containers to snazz up your new digs with baskets of food, stacks of ingots, soul gems, jewelry, and whatever else you can dream up!

Article information

Added on

Edited on

Written by

plymster

0 comments