0 votes
by (210 points)

Hi ! I'm fresh new to Twine 2 - i have a web dev background - and maybe it's not helping because I got habits but I've been reading doc and forum all day long without finding a clear answer .

What's the best way to make , let's say, a 2 column template, text on left, picture on right, for every page the simplest way possible ? A simple thing like this :

<div class="container"><div class="left">Text</div><div class="right"><img src="[..]" /></div></div>

Is it about copying this html in every passage ? It feels like Twine is way more smart than that but I can't figure out. What if there's some mind change and you want to edit this template : you need to edit every single passage ?

thanks for helping me understand angel

bonus question : how can I use jquery in Twine ?


2 Answers

0 votes
by (2.7k points)
edited by
Best answer

Hi c13303,

there are different story formats prepared for use with Twine2.

They differ - among other things - in the amount of javascript and css work an author has to add by himself to the passages text/code.

Did you already choose one? Or may s.o. give hints for choosing the format, that fits best your needs?

Kind regards,



PS: I forgot to insert the links:  http://twinery.org/wiki/twine2:how_to_choose_a_story_format
http://twinery.org/wiki/twine2:add_html - the links from there to the storyformats may lead to older format versions, 
in case of Harlowe2, the correct link might be (see the given data-raw css class): https://twine2.neocities.org/#markup_html

by (210 points)
I understand better, thanks, story format itself is actually what i was looking for, they are the main template, i guess i must not stick to harlowe. Snowman sounds good , i will investigate !

Best, charles
by (63.1k points)
SugarCube allows you to create and use a custom html layout using the StoryInterface passage: http://www.motoslave.net/sugarcube/2/docs/special-names.html#special-passages-storyinterface
0 votes
by (159k points)

The Story Format is more than just a (visual) template, it is actually a mini single page web-application into which the Passages of your project are embedded to act as that web-application's Javascript based engine's meta data.

Each story format is responsible for supplying all the core-functionality as well as the default HTML layout and CSS styling the Author will use to write their story (game).

by (210 points)
Understood ! It's also the compiler, reading the script language, into web application, right ? So every story has its own code tags and "macros".

I believe you can create your own macros ? Like a header macro too (example) ?

Its feels it would be nice to edit one story format to get more control on it, but it may be a bit more complicated I guess.

Also, I ended up to Sugarcube for now, I'll learn a bit its format.