Difference between revisions of "Tutorial Bookshelves"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(→‎Making A Bookshelf: tabular data, that's where we use tables for)
imported>Dwarduk
m (Formatted the table the last editor added)
Line 27: Line 27:
Here is an example below:
Here is an example below:


{|  
{| style="margin-left: auto; margin-right: auto; border: 1px solid #000;" cellpadding="3" cellspacing="0" rules="all"
  ! Keyword
  ! Keyword
  ! Reference
  ! Reference
  ! ID
  ! ID
  |- style="border-collapse: separate; border-bottom: 2px solid black;"
  |-  
  | BookShelfBook01
  | BookShelfBook01
  | DefaultBookShelfBookMarker
  | DefaultBookShelfBookMarker

Revision as of 13:01, 12 February 2012

200px Alert image.png TAKE NOTICE!

This article has been flagged as incomplete or inaccurate. Take any information here with a grain of salt.

Help out! If you have the knowledge needed, please edit this article so we can remove the Incomplete flag.


Bookshelves

There are many bookshelves littered about Skyrim. Bookshelves provide players with a convenient and aesthetically pleasing way to store books. This tutorial covers the creation of a bookcase.

The Pieces

A bookshelf contains five main non-physics components:

  • A visual static object that the books will rest on
  • A container for each shelf
  • A marker for each book on the shelf
  • A click trigger for the player to use it
  • A trigger that keeps track of the books on the shelf

Making A Bookshelf

1. Start out by opening the desired world space.

2. Pick a bookshelf model and place it in the area to work with. An easy one to start with is "CommonShelf01" under Static>CLUTTER.

3. Find the marker for a book called "DefaultBookShelfBookMarker" under Items>Book>DummyItems. Be careful not to select "DummyBook." Place it vertically and rotate it so it would be able to rest on the shelf. Press F to easily rest it on the surface of the shelf. Once you placed it correctly, press Ctrl+D in order to duplicate it. Drag the duplicated marker and repeat as many times as necessary. For this shelf, 18 books should fit perfectly.

4. Now, the books need a place to "be stored." Find the "PlayerBookShelfContainer" under WorldObjects>Container>Markers. Drag it into the render window and place it somewhere near the bookshelf.

5. In order for the books to "be stored" by the newly placed container, they need to be referenced to it. So right-click on the container and select Edit. Under the Linked Ref tab, should appear a blank list. Right click inside the white-space and select New. This will bring up the Choose Reference window. If your camera is focused on the shelf, using the "Select Reference in Render Window" button will make things easy. A target will show up as the cursor, and hover over the first book marker on the shelf. The target should turn white. Double-click the book marker and it will fill out the Cell, and Ref fields automatically. For the keyword, scroll down (or hit B) and select "BookShelfBook01". Hit Okay and repeat the process until you have all 18 books referenced.

  • Note: Each time, change the keyword to the number of the book respectively. e.g 01,02,03,04,...,16,17,18.

Here is an example below:

Keyword Reference ID
BookShelfBook01 DefaultBookShelfBookMarker 00000001
BookShelfBook02 DefaultBookShelfBookMarker 00000002
BookShelfBook03 DefaultBookShelfBookMarker 00000003
BookShelfBook04 DefaultBookShelfBookMarker 00000004

Adding The Triggers

We now have a working bookcase, but we don't have a way for the player to use it. We need two triggers to do this.

1. Create a trigger press the T at the top of the screen, in the main toolbar, then click where you want it to be placed inside of the render window.

2. The first needed is a click trigger. Find a "PlayerBookShelfClickTrigger" under WorldObjects>Activator. Accept it and it will create a red box in the reference window. The size of this trigger should stretch the length of the shelf.

3. Now, the click trigger needs to be linked to the container. Link it to the container and set the keyword to be "BookShelfContainer." Go under the Primitive tab, and make sure to check the box for "Player Activation". Hit OK.

4. Next, find the trigger called "PlayerBookShelfTrigger" under WorldObjects>Activator. Expand it to a decent size by pressing "2" and dragging the arrows.

Note: The standard size should encase all of the book markers, but it is not necessary.

5. This trigger will need to be linked to the container as well. Leave the keyword blank. Under the Primitive tab, make sure that the Collision Layer is: "L_TRIGGER".

6. The container has to have a link to the "PlayerBookShelfTrigger" as well. So edit the container and add the reference. The keyword should be "BookShelfTrigger01".

Hit OK and that should be it.

Containment of Books

The player needs some way to prevent the books from falling out of the book case and preventing the "PlayerBookShelfTrigger" from not working.

1. Create a Collision Cube by clicking the icon in the toolbar with a C inside a cube. Click inside the reference window and it will create a yellow box.

2. Expand the box using the arrows from the origin and cover the entire front of the bookshelf. The Cube can have a paper thin width but the length must cover the whole opening of the shelf(s).

3. Edit the Collision Cube and under the Primitive tab, change the Collision Layer to "L_UNIDENTIFIED". This allows the player to access the books but not allow them to fall off of the shelf.

  • Note: When moving the cube to cover the shelves' openings, try not to leave any room for the books to fall out if they get knocked around from havoc.

Additions

  • After managing to reverse engineer it after hours of tedious setting changing and reference editing, this is what I came up with, and it seems to work fine so far. So if anyone has additional comments or ways to easily duplicate or creating multiple bookcases in a decent time, feel free to add to the above sections.
  • WARNING: for a lot of standard modifications you can load your last save game(spawned in the cell your modifying) and all should go allright. With bookshelves this is not the case! The scripts used by the triggers and container are dependent on the loading (entering) of the cell. Result: no book references are added to the container & the click trigger will not work.


Enjoy your bookshelf!