CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.31k stars 4.14k forks source link

Player-readable book text #73222

Open MNG-cataclysm opened 5 months ago

MNG-cataclysm commented 5 months ago

Is your feature request related to a problem? Please describe.

I had this epiphany a little while ago regarding books in the game. Currently, all reading activities are represented by a little pass in time, along with a few messages. But what if it could be more than that, and allow the player themselves to actually read the book?

Solution you would like.

When the character starts the activity to read a book, a popup window appears prompting the player as to if they would like to view the contents or not. If the yes option is selected, then a dialogue box appears with the contents of the book displayed, and the player can browse through it as they please. For example, when reading the Bible (any version), viewing the contents opens to Genesis 1:1; "In the beginning, God created the heavens and the Earth...".

Describe alternatives you have considered.

Not doing this, or having the dialogue box give some sort of link to a PDF version of the book on a website.

Additional context

This wouldn't/shouldn't be possible for all books, since some of the ones which exist in Cataclysm either don't exist in real life or are parodies of copyrighted works, the owners of which would not take kindly to having included in the game. I also doubt that someone would be willing to write a whole book just for a fluff item. The primary candidates of this idea I was thinking of were public domain texts like the Bible, Mark Twain's' writings, or H.P Lovecraft's work.

I-am-Erk commented 5 months ago

I've wanted this for years. We could use it to add a huge amount more lore.

Zireael07 commented 5 months ago

Nitpick: I would change the title to "Player readable book text", as we have readable books already ;)

Qrox commented 5 months ago

Finding public domain translations of public domain books might not be that straightfoward though, if we want to support all languages.

ADekema commented 5 months ago

A catagory of books that should be excluded should be dangerous books. Think stuff that contains recipies for bomb, weapons etc.

PGR-14 commented 5 months ago

A good resource for this could be project gutenburg: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjFront3tqFAxXkbzABHdtUAHoQFnoECBMQAQ&url=https%3A%2F%2Fwww.gutenberg.org%2F&usg=AOvVaw2JauHli9xqcV1GtEpGjrSL&opi=89978449

It also includes books for leveling up skills, like mechanics.

Zireael07 commented 5 months ago

Project Gutenberg is great but often even if the original is public domain translation is not because, well, it came later

PGR-14 commented 5 months ago

Also, maybe we could add in survivor diaries? Not from you, but from random people. (Would mostly be found in most places survivor notes can, but rarer & not in spots like cash registers).

They'd be longer than regular survivor notes, w/ a few randomized events in them.

ADekema commented 5 months ago

Adding dairies of people that witnessed the cataclysm or people experienceing blob psychoses would be interesting.

PGR-14 commented 5 months ago

Yeah, & maybe research logs could be added in as well. Perhaps this could be integrated into terminals for more lore?

Xaleth commented 5 months ago

How will this reading of the contents work in parallel to the actual skill leveling up that the game makes you wait for?

Should we read the contents during the leveling up? Or before? Or after?

MNG-cataclysm commented 5 months ago

How will this reading of the contents work in parallel to the actual skill leveling up that the game makes you wait for?

Should we read the contents during the leveling up? Or before? Or after?

I was thinking that the player would be able to read the contents after the wait was over, allowing them to get right back to playing after closing the book.

Xaleth commented 5 months ago

Yes, that makes sense. So it should essentially look like this:

-Add a "readable_text": JSON object to a book item which you put in text or a snippet.

-In read_activity_actor::player_read() we should call a new function that creates the popup via ImGUI when it checks that the player is done with the in-game reading and skill leveling. I'm not sure if this is the right function to make that call or it should be done elsewhere? I am new to C++ so this is based off of speculation.

-Then when the dialog is selected "Yes", close that one and open a new dialog that displays the "readable_text" contents in the style of the diary that we already have.

Drew4484 commented 4 months ago

While this function (player readable books) is a great idea, I don't think it would be beneficial to the project to load up complete novels, even public domain works. Aside from adding a large amount of data to the base game and the game lacking things like bookmarking, there exists a potential copyright headache for any future additions contributors make. While that last concern is true of any submitted text, the option to add a complete work could lead to us distributing copyrighted content without being aware.

I-am-Erk commented 4 months ago

I think if we were to have any public domain novels their addition would have to be like an Easter egg, and probably only Kevin and I should be doing the adding, because it could easily explode into 50gb of text files and be impossible to review because you'd have to literally read a novel to see if someone slipped something bad in.

That said, I'd be quite in favour of having one or two on theme full text books in game, like Frankenstein and the King in Yellow. After that I mostly see this as a feature for people to add their own readable short stories to the game.