Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Repeating a "status block" on every passage

jxfjxf
edited October 2014 in Help! with 1.x
I'd like a status block on every passage that displays some basic information, e.g. player's remaining health, and current location from passage(). Initially I thought the <<display>> would be appropriate, but it looks like I'd have to remember to manually include it on every relevant page, which seems cumbersome.

I was hoping there was a way to get Twine to always include it on every passage, and to style it specially so that it stands out from the rest of the passage (e.g. surrounded in a border). Is there a tutorial on how to do this that I could read somewhere? Or failing that, is there an obvious way to do it that I'm missing?

If this makes a difference, I'm currently using Twine 2.0 on the site, but it's kind of crashy so I've been considering a switch to Sugarcube. (I'm on Xubuntu Linux 14.04.)

Comments

  • I suspect someone else will give an awesomer answer than mine, but here is the answer I know:

    - In Twine's File menu, you could Export> Twee Source Code
    - then open the twee file in a text editor and search for all instances of "::" (passage title) and replace with "<<display 'Your Status Passage Here'>> ::" (using whatever functionality your text editor has for also inserting a couple of line returns between your status passage text and your "::")
    - save the changes and import the Twee source code back into Twine

    - or perhaps you could test your status passage to confirm it's working and then wait to do the above mass search-and-replace until you're nearly done with your game. Because the drawback of the above is that you will lose the positioning of your passages when you import your Twee file back into Twine.

    This is why I'm writing my Twine game in a text editor and not in Twine. If you go this route, there's a simple way to use Twine to build and rebuild your game as you write. Create a Twine game. Delete all passages except one called "StoryIncludes". In the StoryIncludes passage, list the name of your Twee file. Such as "MyGame.twee". MyGame.twee should be in the same folder as your Twine game. Now you can use the options in Twine's Build menu to your hearts content, and Twine will build/rebuild/test etc. your Twee file.
  • You don't indicate which story format you're using. If you're using SugarCube, you can just put <<display "Status">> in the PassageDone special passage, which runs after every passage is displayed.. (Sorry, I'm not sure whether the vanilla headers offer a "PassageDone" special passage.) You could also potentially stick something in using postrender in any format.
  • Erik wrote:

    You don't indicate which story format you're using.


    Thanks Erik; sorry, I'm a Twine newbie (just started yesterday) so it's not apparent to me what specificity was required to be helpful. I've been using vanilla Twine 2.0 on the site so far, but it's pretty crashy so I might be switching to something like Sugarcube, as you suggest.

    Will update the OP.
  • Twine 2.0 is still in beta so is not a finished/released product and currently only supports a single Story Format named Harlowe, it is also not as feature rich as 1.4.2.

    Twine 1.4.2 has a number of different Story Formats you can choose from, some come with the software like Sugarcane, Responsive and Jonah, and others you have to download separately like SugarCube. (this is the one Erik Temple suggested.)
Sign In or Register to comment.