IsUnique flag ignored in custom books?

Discuss modding questions and implementation details.
Post Reply
User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

IsUnique flag ignored in custom books?

Post by haloterm »

I just noticed that despite me having flagged several books as unique in my .json mapping file, they still appear in public libraries.

For example, in my Black Horse Courier mod, latest version, among others I have this:

Code: Select all

{
    "Name": "MDBHCB08.TXT",
    "Title": "Account of a Life and Death",
    "ID": 94525824,
    "IsUnique": "True"
}
(That is a snippet of the actual json file)

According to the books docs, "If true this book is not found inside random loots or bookshelves and must be made available directly by mods." (https://www.dfworkshop.net/projects/dag ... ing/books/)

But I still just found it in a bookshelf...

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

Re: IsUnique flag ignored in custom books?

Post by Hazelnut »

I already said this on Discord, but just for the record the JSON file should specify it like this:

Code: Select all

   "IsUnique": true
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply