mrombout / Spiner

A tool to convert a Twine 2 story into a book.
https://spiner.readme.io
GNU General Public License v3.0
24 stars 0 forks source link

Spiner Story Format #72

Open mrombout opened 4 years ago

mrombout commented 4 years ago

Ideally I would like Spiner to support all story formats, but realistically EPUB2 is a much more limited format than modern browsers. While EPUB3 might allow a bit more magic through scripting, this would again split the available feature Spiner.

So in essence, users of Spiners must be very careful to only use features that work with Spiner in order to be able to export a good storybook.

Perhaps an idea would be to create a custom story format that limits the amount of available features to what is supported by Spiner. Additionally it could provide some options to simulate how things would look like on an e-reader.


As a result, it is probably better to update Spiners description from "A tool to convert a Twine 2 story into a book." to "A tool-suite to use use Twine 2 as a physical (EPUB/PDF) gamebook authoring tool" (or something along those lines, keyboard being that it now longer converts any Twine 2 story, but rather is a gamebook authoring toolkit).

mrombout commented 4 years ago

Harlowe does not use Markdown for it's formatting and would need a separate renderer on Spiners side in order to support it.

mrombout commented 4 years ago

Chapbook looks clean and almost like a book. It has a reasonable amount of features. Perhaps I can fork this one into a subset for Spiner?

Also, I really like the Forks option. It might be a good idea to come up with some additional custom formatting especially for gamebooks like Sorcery style spell tables or enemy encounters.'

Chapbook at the moment uses some alternative syntaxes for example for embedding images, which Spiner does not support. Also using when using HTML directly <img src=""/ > Spiner will not embed those images in the EPUB, which I think it should.

Chapbook allows embedding CSS in passages which could be nice to spice up formatting one some pages e.g. a page that contains a poem. Currently in Spiner it should be possible using a global CSS Stylesheet and a label, but I never officialy tested that.

Chapbook has custom inserts which basically allow to define custom blocks of reusable close (called inserts). Supporting this to it's full extend is probably going to be tricky (because Spiner won't support scripting. But at least for the example given, Spiner could "pre-process" the insert while compiling the EPUB. This would allow for example creating custom inserts to "enemy encounters", "spell tables", "stat/skill modifications". This would make it easier to keep the formatting and wording consistent without copy-pasting and allows changing it later as well. I also considered a templating language for this, but perhaps it's better to just follow what Chapbook does. Compatibility (exactly the problem what this story suggests) might still be tricky though.

mcdemarco commented 2 years ago

I like the idea of having a story format that keeps users out of trouble by not letting them do things that won't ultimately work. Chapbook doesn't really accomplish that because it has a lot more functionality than you intend to support, though a trimmed-down Chapbook might work.