Example Story in Chapbook to learn from?

Hello,
I’ve never coded before and am mostly useless. I read the Chapbook how-to, and am now looking for a story to learn from. I’ve found a few stories download-able as .tws, which sounds like a Twine file, but haven’t been able to open them in Twine. It’s possible I’m missing something very obvious. Thanks for any help! Andy

Please specify version and format if asking for help, or apply optional tags above:
Twine Version: 2.3.7
Story Format: Chapbook

The main Chapbook page includes a link to “Cloak of Darkness”. You could simply download that HTML file and import it into Twine to take a look at the code.

The .TWS files are “Twee” source files. Basically, text files written in Twee notation to make them able to be converted into Twine HTML file using tools like Tweego (a command line Twine compiler). However, if you have the HTML version of a Twine/Chapbook game, then you can just import that directly into the Twine 2 editor.

Hope that helps! :smiley:

1 Like

The older Twine 1.x application assigned a tws file extension to its project files (1), so those files may not be TWEE Notation based.

(1) This project file is actually a Python pickle file, which is a binary like serialisation format, and as such can’t be loaded by the new Twine 2.x application.

1 Like

Here are a bunch of small Chapbook examples, which are written in text files using Twee notation, that you could look at as well.

1 Like

My first difficulty with Chapbook was find a way to change text colour.
Please remove the space after <_

Some text about a passage

< style >
h1 {
color: green;
}
p {
color: blue;
}
< /style>

< h1 >green bigger words
< p >blue smaller ones

[continue]

< style>
b {
color: red;
}
< /style>
< b>some other small/normal and red.
[continue]

my second and harder difficulty was just to insert an image

after all it was easier (please remove space after <_ )
one does NOT need any CSS section or else, just into the middle of text story

< img src=“https://images.pexels.com/photos/8431379/pexels-photo-8431379.jpeg” alt=“tea cup” height=“100” width=“100”>

[[some passage]]

The comment field’s toolbar includes a </> option which you can use to include code examples in your comments.
eg. Your first code example… (with a couple of HTML end-tags added)

<style>
h1 {
	color: green;
}
p {
	color: blue;
}
</style>

<h1>green bigger words</h1>
<p>blue smaller ones</p>

[continue]

<style>
b {
	color: red;
}
</style>
<b>some other small/normal and red.</b>
[continue]

eg. Your 2nd code example…

<img src="https://images.pexels.com/photos/8431379/pexels-photo-8431379.jpeg" alt="tea cup" height="100" width="100">

[[some passage]]
1 Like

The next difficulty I felt was how to test a very simple Twine file into itch.io
Even following the recommended steps, I surely was missing something.

It seemed the filename must be index.html …

but, even so …

it just opened a blank page after pressing the button.

my error was uploading the Archive made html file.
it was just 3 KB

no no it must be the one for publishing

you find this option after opening the story.

Also, I would like to look how to upload a Twine simple test file at neocities.

There is already there an index.html for a newcomer demo file.

So the upload file was andando.html, the one with 146 KB not the Archive.

Inside the demo code I inserted

<p><a href="/andando.html">Twine test</a></p>

and… it did not show it…

the BASIC situation one must refresh the page with CTRL+F5

and it worked also at neocities.

Very good this Twine :slight_smile:

And for ending the kick-off I searched for a web editor who would be light and simple.
This one, a gold edition from 2007, complied with the above requirements:

It is not needed for Twine, but useful for having an index and presentation page.