Oblivion

File information

Last updated

Original upload

Created by

Horny Quintus - v1 -- Langy - v2

Uploaded by

Langy

Virus scan

Safe to use

About this mod

You can now \'activate\' book shelves in the player houses. This will allow you to add books to a \'container\' and stacked neatly (most of the time) onto the shelf. Now compatible with mod-added books!

Permissions and credits
There is a new version of this mod available here: http://www.tesnexus.com/downloads/file.php?id=10561

---------------------
THIS FILE IS OBSOLETE
---------------------

---------------------------------
Version 2.0 (OBSE Release)
---------------------------------
Version 1.0/1.1 by Horny Quintus, Version 2.0 by Langy

Version 1.1, which doesn't require OBSE, can be found here: http://www.tesnexus.com/downloads/file.php?id=10561

You can now 'activate' book shelves in the player houses. This will allow you to add books to a 'container' and stacked neatly (most of the time) onto the shelf. Activate while sneaking to get a brief menu of options. Activating while standing will only work with a cupboard, bringing you to the normal inventory menu of the cupboard.

I have also added 2 types of containers with shelving. One in Benirus Manor, the other 2 in Bruma. Activate while standing to access the inventory. Note, the original cupboards are still there so you will not lose your stuff when running this mod.

Note, the script does not actually know what books are on the shelf. Once the shelf has been filled you will not be able to stack any more books. Even if you pick up all the books, the script still thinks the shelf is full. To work around this, select the option to 'clear' the shelf. This resets the shelf's memory and you can use it as if for the first time. You still need to pick up all the books.


---------------------------------
Changes in Version 2.0
---------------------------------

-Requires OBSE

-Now bookshelves link to a container, allowing you to add whichever books you wish to the shelf rather than including all of them in your inventory

-Book placing is nearly instantaneous, with no noticeable framerate lag or stutter - the books simply appear suddenly in place

-Mod-added books using the vanilla book models or book models utilizing the vanilla naming system (naming the model after the size of the book) will work automatically

-Fully compatible with both Book Jackets and non-Book Jackets - no matter what, books will be put into the correct size category

-When you put too many books in a shelf, or things other than books into the shelf, the extra books or items will be placed back in your inventory. I've used a workaround to make it so those messages don't appear, as otherwise they can go on for quite some time - but this may be a cause of some confusion, as occasionally some shelves can't fit all sizes of books and if you try and place some wrong-sized books in the shelves they won't get placed and you'll see no message informing you that it didn't work.

---------------------------------
Known Bugs
---------------------------------

Occasionally strange collision problems will occur, especially if you try to clear the shelves without actually removing the books first. Also, the bookshelf in the Skingrad basement has a known error in the placement algorithm - the first few books on any shelf will fall through, as if the collision model on that shelf isn't correct. This may occur on other shelves - I have not tested them all, though I have tested at least a half dozen and they all work perfectly.

---------------------------------
Future Releases
---------------------------------

I'm planning on trying to squash the few bugs left and adding in some better messages informing the user when books don't fit on a shelf. I'm also planning on adding in options to lock specific shelves - this would mean you could tell the script to not put any more books on, say, the top shelf, or to only put them on the third shelf. Finally, I'm researching a way to allow you to pick up all of the books at once and to track the last book's position on the shelf. At the moment this would require an OBSE function known to be buggy (SetScript) and 'token' books, but hopefully this won't prove to be too difficult - unfortunately, it's too early to tell if it's a viable method or not.

---------------------------------
How to add to another house mod
---------------------------------

If you like this and want to add it to your house mod and release it, feel free. No need to ask my permission. Just credit me somewhere down the line to keep my ego happy!


1. Use ScripterRon's excellent utility (http://www.tessource.net/files/file.php?id=3083) to merge 'AutoBookPlacer_Resource.esp' with your mod
or
Use AutoBookPlacer_Resource as the start of a new mod.

2. Add / replace bookshelves. They can be found under Activators in the Object Window, named like this:
ABPshelf[Type]
ABPcboard[Type]
Where [Type] is an abbreviation of the mesh used. Example, MiddleBookShelf02 has the abbreviation M02

3. If you want to include the shelves as part of a house upgrade - initially disabled - like the furniture in the vanilla houses are done, look for these lines in the script:
;CHECK IF PART OF A FURNITURE SET PLAYER NEEDS TO BUY
;---------------------------------------------
;Your House Here
;---------------------------------------------
;if ( getInSameCell, ***ID_TO_CHECK_FOR*** )
;if ( bShelfX > 0 );bShelfY, bShelfZ
;set furnCheck to ***ID_TO_CHECK_FOR***
;set contRef to ***ID_OF_ORIGINAL_CONTAINER***
;endif
;endif


Bethesda used a parent ref which was enabled when you bought the furniture in question. My script checks if in same cell as that parent ref and then only enables the book shelf when the parent ref has been enabled. Substitute ***ID_TO_CHECK_FOR*** with the ID of the parent ref and it should work fine.

Obviously you will need to uncomment the lines.

If you have a number of shelves in the same cell and need to determine which is which, use bShelfX or another coordinate to differentiate by position. These variables directly correspond to the coordinates in the reference properties window.

If you use one of the activators named ABPcboard to replace a cupboard, do not delete the original cupboard. Instead:
1. Move the original out of sight
2. Bring up its reference properties window (double click) and tick 'Persistent Reference'
3. At the top of the reference properties window is a text box labelled 'Reference Editor ID'. Type a unique name in here. Copy name to clipboard.
4. Close the properties window, go to the part of the script shown above, and replace ***ID_OF_ORIGINAL_CONTAINER*** with the ID you typed in step 3.

4. Boot up the mod and test...