Project

General

Profile

Feature #4326

Additional formats for ingame books

Added by David Billiot 3 months ago. Updated 23 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
ESM format
Target version:
Start date:
02/20/2018
% Done:

0%

Severity:
Normal

Description

Creating the correct html for an ingame book is pretty easy once you know how to do it but it is still a specialized process that is specific for Morrowind and the books that are created don't have a huge amount of functionality beyond just turning pages one at a time.

I suggest (for after 1.0 or whenever someone gets inspired to start working on it) that OpenMW should think about supporting at least one other ebook format and get it working in game. After looking into the various issues with various formats it looks like EPUB would be the easiest to work with. There are many light epub readers that are open source and I know of at least one other game that has a working EPUB reader built into the game (though only for the technical manual in the menus).

With a working epub reader that has basic functionality, it would mean that bookmarks and links would work in books that had them. It might also mean that players could add notes in books. By supporting epub books in game it would would make it much easier for modders to create books so more people will do it.

Pros: More content. Better content. Easier to make content.
Cons: It might cause people abandon making books the old way.

History

#1 Updated by Will Herrmann 3 months ago

The big difference with EPUB books would be that book text is now an external file, rather than a field in a record. I’m undecided if the advantages of that outweigh the downsides of differing from the old way.

#2 Updated by Chris Robinson 3 months ago

Will Herrmann wrote:

The big difference with EPUB books would be that book text is now an external file, rather than a field in a record. I’m undecided if the advantages of that outweigh the downsides of differing from the old way.

Wouldn't it be possible to just have epub-formatted text in the book record's text field?

#3 Updated by Will Herrmann 3 months ago

Chris Robinson wrote:

Wouldn't it be possible to just have epub-formatted text in the book record's text field?

ePUB files are zip files with HTML files, images, and other information within them. At the very least, an ePUB file contains:

  • At least one content document.
  • One navigation document.
  • One package document listing all publication resources.

Allowing for a modified ePUB format that could be inserted as a record would mean we're creating our own variant, which seems no better than the existing HTML variant that books use in vanilla Morrowind.

#4 Updated by Chris Robinson 3 months ago

Will Herrmann wrote:

ePUB files are zip files with HTML files, images, and other information within them. At the very least, an ePUB file contains:

  • At least one content document.
  • One navigation document.
  • One package document listing all publication resources.

Allowing for a modified ePUB format that could be inserted as a record would mean we're creating our own variant, which seems no better than the existing HTML variant that books use in vanilla Morrowind.

In that case, it would be possible to extend the book record to include a binary data field instead of a text field, where the binary data is the zip file. So a book record that contains a text field is a normal vanilla-style book, while a book record that contains the binary data field is an extended EPUB-style book.

Although, given that an EPUB file "contains, in effect, a website—including HTML files, images, CSS style sheets, and other assets", that may make it difficult to actually handle and display. There had been discussions in the past about utilizing something like librocket to handle the GUI using HTML5, which sounds like it could then also handle displaying EPUB, but between stability and security concerns vs. MyGUI, I don't think anyone took a closer look at it.

#5 Updated by David Billiot 3 months ago

Wow, I'm so happy to see all the interest in this topic.

If epub is out of the question, what about extending the amount of HTML that is supported? Maybe it doesn't have to go all the way up to HTML5 with video and audio and all but at least support enough so that a table of contents can link to the start of chapters and other links could could direct the reader back to the beginning. Normal HTML can do this but if memory serves, the html in Morrowinds books can not though I admit I haven't checked if OpenMW removed some of the restrictions. I'll have to do that this weekend while I test more mods for my other project.

Yes, I know OpenMW is just supposed to be a drop in replacement for the engine, which is why I think this is a post 1.0 feature, but if we can make the books better, I think we should. No, a book in real life doesn't have clickable links but it does have the ability to turn to whatever page you want instead of going one at a time.

I've created several Morrowind Book Mods and while what I have made works fine, I can never break from the feeling that books in Morrowind could be so much more. Imagine a prayer book in the temple that would act like a mini Tribunal breviary that the player could immerse themselves with by praying along with the priests of the Tribunal. Or the book seller having a 'choose your own adventure' style book where instead of flipping to the page you have to go to, there's a link. Maybe a learned wizard is debunking some other scholar's theory in a book and that book has footnotes at the end that the wizard can link to in the text.

From a modder's point of view, imagine being able to write up a story in Liberoffice writer and then just save it to HTML and know that it will work in OpenMW when I add it through a mod even if I have embedded images or bookmarks or styles or page breaks.

I mean, honestly, I think supporting something like Epub would be the best long term plan for when completely new games are made with OpenMW. A lot of the other ebook formats I looked into were based on XML which is rather different from the HTML that the engine already supports and Epub looked like the natural next thing to support after basic HTML for the future.

Anyway, I'm glad I actually got people talking about this.

#6 Updated by Will Herrmann 3 months ago

  • Target version set to openmw-future

David Billiot wrote:

From a modder's point of view, imagine being able to write up a story in Liberoffice writer and then just save it to HTML and know that it will work in OpenMW when I add it through a mod even if I have embedded images or bookmarks or styles or page breaks.

That's the biggest benefit that I see of adding alternative file formats. It makes it a lot easier to write up books in an external app and get it in the game. If nothing else, maybe people will actually run their text through a proper spell checker! (Yes, I'm looking at you Bethesda and the appalling number of typos in your TES books).

I also like the idea of having books as out-of-record assets, the same way that we handle images and such. This makes it easier for mods to override them if desired (perhaps to correct typos in future releases) and simplifies the writing process.

My biggest concern is with the file size overhead, since ePUB is more typically used for full-length novels and TES books are usually a dozen pages max. But maybe that's not a huge deal.

Regarding ePUB vs HTML, I like the former because it's all self-contained (any images are all together in that file), while I like the latter because of the simplicity and file size. Maybe both would work, maybe my concerns are overstated and ePUB is better.

David Billiot wrote:

Imagine a prayer book in the temple that would act like a mini Tribunal breviary that the player could immerse themselves with by praying along with the priests of the Tribunal.

My first thought with this was the table of contents for topics in the Morrowind journal, which lets you jump to topics that start with a certain letter. That's a bit different than in-book hyperlinks, but there's at least some precedent for it.

Aside form that, I'm concerned that hyperlinks might be out of place in a fantasy game, especially with the books being so short. I guess my opinion is "if we get it for free from other stuff, sure". Otherwise, I'm concerned that spending a lot of time on a feature that clashes with the tone feels like a questionable use of time.

That said, we're a long ways away from being able to implement this, and there are other voices too. Maybe others feel differently.

#7 Updated by Alexei Dobrohotov 23 days ago

  • Category set to ESM format

Also available in: Atom PDF