Place a specific book in dungeon

For all talk about quest development - creation, testing, and quest system bug diagnosis.
Post Reply
haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

Place a specific book in dungeon

Post by haloterm » Wed Feb 05, 2020 11:05 pm

Another one of my stupid questions:

I want to place a specific book (from Daggerfall's default books) into a dungeon.

I know I can define an item as

Code: Select all

Item _BHCBook_ book
but how do I set the book I want?

Should I use

Code: Select all

Item _BHCBook_ item class ... subclass ...
instead? If so, how do I know the item class and subclass of a specific book?

The Tipton docs on the Template language state that the UESP has an overview on all item classes and subclasses, but I don't find anything like that there. The book pages in the UESP give the text, but no class info.

As a workaround I could copy the book's text and give it as a letter to the player, but a "real" book would be better, esp. as it already exists in the game world.

Thanks!

User avatar
Hazelnut
Posts: 2138
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Place a specific book in dungeon

Post by Hazelnut » Wed Feb 05, 2020 11:34 pm

You can't currently create a specific book, only a random one. I can change this for you when I get some time if you like so that you can specify the book id. Nag me in a couple of weeks if I forget. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

haloterm
Posts: 101
Joined: Sat Feb 16, 2019 5:21 am

Re: Place a specific book in dungeon

Post by haloterm » Thu Feb 06, 2020 12:38 am

Hazelnut wrote:
Wed Feb 05, 2020 11:34 pm
You can't currently create a specific book, only a random one. I can change this for you when I get some time if you like so that you can specify the book id. Nag me in a couple of weeks if I forget. :)
Oh, I see. Well it is not urgent. I may use the workaround then. But if you find time to make such a change, it would be great. Prefarablly in a way that also allows to use any custom books added with the "experimental" DFU setting.

User avatar
Jay_H
Posts: 3151
Joined: Tue Aug 25, 2015 1:54 am

Re: Place a specific book in dungeon

Post by Jay_H » Thu Feb 06, 2020 3:05 am

My workaround would just be something like "Excerpt from [Horror of Castle Xyr]" and explaining it as such, using a letter ;) But if Hazelnut can add this function, all the better.
Come join Lysandus' Tomb, a Daggerfall Unity fan Discord.
See the Daggerfall Unity Wiki on the UESP.

User avatar
Hazelnut
Posts: 2138
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Place a specific book in dungeon

Post by Hazelnut » Thu Feb 06, 2020 4:59 pm

haloterm wrote:
Thu Feb 06, 2020 12:38 am
Hazelnut wrote:
Wed Feb 05, 2020 11:34 pm
You can't currently create a specific book, only a random one. I can change this for you when I get some time if you like so that you can specify the book id. Nag me in a couple of weeks if I forget. :)
Oh, I see. Well it is not urgent. I may use the workaround then. But if you find time to make such a change, it would be great. Prefarablly in a way that also allows to use any custom books added with the "experimental" DFU setting.
Yeah it will allow for custom books, which are no longer experimental. (there's one in my Archaeologists mod :))
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Hazelnut
Posts: 2138
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Place a specific book in dungeon

Post by Hazelnut » Fri Feb 21, 2020 6:00 pm

Okay have submitted PR#1715 with this feature, you can now add specific books by specifying a key which is the book id. This is the test code I used, b1 = the Archaeologists guild hall locations book which has an id of 1000, and the second is a random book. You can use the classic book id's or the id's you configure for your custom books. Make permanent to ensure they don't have a green background and aren't removed when the quest ends.

Code: Select all

Item _b1_ book key 1000
Item _b2_ book

    get item _b1_
    make _b1_ permanent
    get item _b2_
    make _b2_ permanent
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply