Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Book Titles: The Definitive Guide  (Read 1787 times)

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Book Titles: The Definitive Guide
« on: October 31, 2021, 08:48:27 am »

One of my favorite aspects of Dwarf Fortress are the book titles. They always give me a sensible chuckle when I browse them in legends mode or otherwise. There have been a handful of threads which discuss modding the book title files, but I found all of them lacking in information. That said, here's a brief discussion on previous...discussions.

GM-X released 396 book titles as part of the Dark Ages mod. This document still works, should you want to add...an outrageous number of books to your game. (Also the Gladwell cover cracks me up) - be aware that this is from a much earlier version of DF, so just fully copying the file over will remove a few of the names Toady included since then. It will not be noticed, with the overwhelming new content.
ZM5 also dropped a few book titles some of which are truly hilarious: "[ADJ] [NOUN] Presents [ADJ] [NOUN]'s [NO_ART_NAME], Shut Up and [NOUN] Gaiden, Chapter 1 of the [ADJ] [NOUN] Saga" - many of these are likely to be hard to read or overrun the box for book titles in-game. But, hey - it's just a goof anyway.

Finally, the closest thing to an actual guide is this thread by Dahrk. Which does a good job explaining the basics, but I feel leaves out some important notes.

Inspired by GM-X's file (sent to me by a friend a few years ago), I decided to do some tests on this whole...book thing.

So let's get into the basics.
Books are named from the two txt files found in /raw/objects/text. Those files are 'book_art.txt' and 'book_instruction.txt'
book_art.txt will be used when a poem or song is created both in worldgen and by adventurers.
book_instruction.txt will be used when a book is written both in worldgen and by adventurers/fort scholars.
- - NOTE: book_art.txt is also fair game for book titles because it is always possible to just name a book after a poem/song (as long as the content is that song or poem)

These files are called upon book creation - so you can modify the files in an existing save - altering the names of all future books. It would be possible to directly name your book in adventure mode this way.

There are 7 tokens which can be used in book titling. My method for understanding these was to simply only put one token in the book_instruction.txt, generate a world, and look at the book titles in Legends mode. I also took a stab at what I thought /might/ be a token and failed miserably. As such - I discovered that poem/song names are ALWAYS available to be book titles, even if your book_instruction.txt only contains the instruction, "[ANY_PRONOUN]". I also managed to get a poem with no name at all - which could be a vanilla bug, or the game will accept a misplaced space as a title. Be careful.

These are the 7 tokens for these two txt files:
[NAME]
Examples: The Tower, The Tree, Bronzemurdered, Likot Ubendeb, Animal Behaviours
Notably, these may or may not be plural and/or have an article.
Name is directly related to the content of the book.

[NO_ART_NAME] (no article name)
Examples: Tower, Tree, Bronzemurdered, Likot Ubendeb, Animal Behaviours
Notice that the inserted text may still be plural - limiting its usage.
These likewise are related to the content of the book.

[NOUN]

Examples: Despair, Roots, Scrolls, Wheel-and-axels
Again, may or may not be plural. These seem to have very little correlation to the book's topic. If it has any relationship to the content of the book, it could be words within the author's entity's vocabulary.

[ADJ]

Examples: Boyish, Inky, Angry, Bronzed
Also seem to have little correlation to the book's topic. I also guess it is from the civ, if not purely random.

[ANY_AGE]

Examples: The Age Of Legends, The Age Of Hill Titan and Dragon
Will only pull ages from the world's history, not from all possibilities.

[ANY_PRONOUN]
Examples: He, She, We, They
I believe it only generates subject pronouns (not "Us" or "Them"). Past tense makes this easy to use.

[PHRASE]

Examples: The Fool Laughs, The Day Can Say It In The End, It Foretells Afterwards, The Day Mourns
Due to the wide variety, this is pretty hard to use. If you have any ideas, I'd love to hear them.

-=-=-=-=-=-=-

So, you can let the game do a lot of the work for you and generate more of this style:
The [ADJ] [NO_ART_NAME]
[NAME], [ADJ] [NOUN]
[PHRASE], [ADJ] [NO_ART_NAME]

Or you can be as specific as you'd like:
My Mother Always Said, [PHRASE]
[NAME], And Its Utmost Importance
[NO_ART_NAME], Do You Love Me?
I Once Saw [ADJ] [NOUN], And So I Said, [PHRASE]

You can play the madlibs yourself.

I'll also point out that you only get one roll per name per title. So "[NAME] Is Not [NAME]" will say something like "The Tower Is Not The Tower".
[NAME] and [NO_ART_NAME] are not handled separately in this case. '[NO_ART_NAME] Inside [NAME]' will result in "Tower Inside The Tower"
Rarely, this won't happen and I have no clue why. I generated a hundred books with [NAME], [NO_ART_NAME] and they all behaved as expected except "Jewel, Glories" and "Waste, Bogs". I could see these two being related words - though neither were related to the topic of the book itself. Mysterious.
All other tokens are rolled each instance, so [ADJ] [ADJ] [ADJ] [NOUN] will result in some nonsense like "Good Hungry Flaxen Obsession". Works for all of them, but keep in mind that it is a random roll. So several [ANY_PRONOUN]s is almost certain to have some repeats.

Book titles are fun and easy to add to mods. They can add a lot of tone to the world. For instance, a post-apocalypse mod might want a lot of "Salvation, Only Through [NAME]", "[NAME] And The Collapse", or "The [ADJ] End"

I hope anyone found this useful. Enjoy!
I also uploaded a small version of this type of mod. Feel free to read through it yourself and take whatever you like for your own mods.
« Last Edit: November 18, 2021, 01:23:50 am by delphonso »
Logged

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Book Titles: The Definitive Guide
« Reply #1 on: October 31, 2021, 09:19:03 am »

Very cool, thanks for making this!
Regarding the phrases, do you have any idea where they are pulled from? I can only find "fool" a few times in the string dump, and "foretells" doesn't appear anywhere. "Foretells" isn't a word in the raws either, so where did it come from? Is the string dump simply not complete?

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Book Titles: The Definitive Guide
« Reply #2 on: October 31, 2021, 09:30:58 am »

I have no idea myself. 'Foretell' can be found in that string dump near 'the fool' and 'mourn' plus what are clearly references to the book instructions. I guess there is something that gives them the right tense that we don't see. It is apparent that the words in that group are the pieces of whatever makes a [PHRASE]

Interestingly, [NOUN] is miles away from the rest of them.

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: Book Titles: The Definitive Guide
« Reply #3 on: November 01, 2021, 03:59:24 am »

Additional notes after some additional testing:

Poetic Forms are generated in the same manner as Taverns/Locations. My poetic forms are "The Massive Strikes, The Meditations of Ensorceling, The Embrace of Droplets, The Larks of Truth, The Searing Bite" All of these follow the same naming pattern as groups/governments. And, notably, my book_art.txt is a mess of tokens that certainly wouldn't lead to this sort of thing. They seem to just take anything considered flowery or art-related. I don't know the language files well enough to say any further.

I was wrong about tokens being decided once per title. NAME tokens are, but NOUN and ADJ are not. "[NOUN], [ADJ], [ADJ] [NOUN]" resulted in some of these masterpieces:
Roads, Unnameable, Squat Wings
Maggot, Stirred, Renowned Entries
Witch, Good, Carnal Spire
Cradles, Creepy, Safe Thorns

It also applies to all the other tokens ([ANY_PRONOUN], [PHRASE], and [ANY_AGE])
I'll fix the entry on the OP.

Also, NAME and NO_ART_NAME tokens may occasionally misbehave, resulting in two different words.

I am confident that ADJ and NOUN are completely random. I had dwarves writing with titles like "leafy" and nouns like "snarls". Elves wrote about "hardy" and "walls" despite being from different civs and living in different sites. Even as adventurers this continued.

I left a trailing space in the txt and also placed a line with nothing in it. It seemed to result in more Untitled works, but that could have also been chance and confirmation bias.
« Last Edit: November 18, 2021, 02:39:52 am by delphonso »
Logged