Pre-placed books in working bookshelves?

Post » Thu Jun 21, 2012 8:40 am

I started making myself a little mod that adds a small hideout for my character, and I made a fully working bookshelf inside the house (just one at the moment).

I did it by following the guide on the CKWiki: http://www.creationkit.com/Tutorial_Bookshelves.

The thing that i want to do now is preplace specific books into this bookshelf, so that they are already there inside the bookshelf inventory, taking space and showing up properly on the bookshelf, as if the character had already placed them there from before. I've been going around the items but i can't find how to pre-place the books, is there anyway to do this or is it impossible to pre-place books in a bookshelf?
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Post » Thu Jun 21, 2012 8:11 am

you could try placing a non-respawning dummy container off in the void space and add your books to it
then attach a script that has


Event OnCellAttach()

DummyContainer.RemoveAllItems(BookShelfContainer)

EndEvent


you will need to create a dummy container for each shelf of the book case that you want to pre-populate. and make sure the total amount of books is lower than the max allowed per shelf

when the books are added, it will auto-populate the shelves when the OnItemAdded part of the bookshelf container script is triggered



alternatively you can do this without a dummy container, and just use an indexed formlist instead, but it is a little bit more advanced (whatever you do, just don't use AddItem for each book one by one in a script)
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm


Return to V - Skyrim