0 votes
by (2.4k points)
Hello there once again!

I'm still there with my questions which seem to have obvious answers to everyone else than me, as I literally can't find anything explaining how the UI Bar works.

I've been reading the Q&A helped with the key word "UI" or "Bar" for some time now, but I couldn't find anything that would provide me with basic informations :( (Is there a tutorial somewhere I've missed? Please tell me and I'd go and read it right now!)

I figured that you might be able to change what's within the UI Bar with special passage names "StoryMenu" "StoryAuthor"...

... But how does it work ? If I open a passage called "StoryMenu" and write something in there, nothing appears in the UI bar ? How does it work ?
Let's say I'd just want for one variable, $Money, to be displayed on the UI Bar through the entire game, how would I do that ?...

I'm sorry for such simple questions, but I really couldn't find any information on how it's supposed to work. None that I'd understand.

Thanks a lot !

1 Answer

0 votes
by (63.1k points)
selected by
 
Best answer

StoryMenu only accepts links. Generally, StoryCaption is where you put things like text or stats. Information on special passages can be found here

Some things to keep in mind: 

  • StoryTitle shouldn't include any dynamic content, or really anything other than text. Not used in Twine 2. 
  • StoryMenu should only include links, though control macros work. Most other code or content will be suppressed. 
  • You can always make one special passage look like another via the stylesheet, or hide elements you don't want to have shown. 
  • You can construct a "menu" system with some additional functionality by using StoryCaption, which will occupy (almost) the same space as StoryMenu, if StoryMenu is omitted. 
  • There's also a "core" menu (where saves and restart appear). If you use certain systems like StoryShare or the settings API, these elements will appear here. 

I don't want to come off as down on tutorials, but most of the ones I've read or seen tend to have problems. It's very likely that I just haven't found a good one to recommend, though, so maybe someone else can help there. 

Regardless, keep in mind that most Twine tutorials need to be treated with some level as skepticism, as a lot of them handle issues in ways that are outdated, risky, incomplete, or needlessly complex. It's probably a decent starting point to work from, so I don't discourage seeking them out. 

While info you learn on the Q&A might occasionally be off (especially with my answers), we have the benefit of being on an official channel where the patience of various experienced programmers and Twine and story format developers can help correct any issues or ignorance. 

by (2.4k points)
Thanks for the answer!

The link you provided is where I found out about "StoryMenu" and co. I wouldn't say there is any information here though, which is a shame. Shouldn't what you said to me be written in there ? "StoryMenu should only include links", for instance?

As it is, it seems to me it's impossible to use those well only by reading what little information is provided here and there. At least for someone new-ish to Twine :(

Indeed, the Q&A is awesome, and without it I'd never have been able to do anything on SugarCube. But the more I try stuff, the more questions I have. And I wouldn't want to be flooding the Q&A with incessant questionning. It could get annoying, I guess.

It'd be great if the basics were written somewhere. Some kind of "How to", presenting the most used mecanisms of Twine.

Anyway, thanks again for your answer, and I'll go see what I can do with that :D
by (68.6k points)

About StoryMenu: It's more correct to say that StoryMenu will only display links.  It renders content just as any other passage does, however, instead of displaying the rendered output as-is, it picks through the output and builds its menu from only the generated links.

And yes, the docs should mention that bit of information.

by (63.1k points)

@TheMadExile: 

Thanks. That's what I meant, but not at all what I even came close to saying. 

@Seyru: 

The documentation does have a few gaps, and even if it didn't, it's a great place to find what you need when you know what you're looking for, but not always the best place to to get guidance on where to start. There's a project under development called the Twine cookbook, and its being worked on by contributors to Twine itself and some people from this Q&A. Unfortunately, it's still very much in its infancy, and I wouldn't consider it a great resource just yet. I'm just pointing it out because you aren't alone in feeling like Twine lacks some sort of official tutorial resource, and steps are being made. 

The Twine wiki also exists, and it's not the best if I'm honest, but there are people actively working to improve it, and it has improved greatly over the last few months. 

For right now, though, I think the best solution is exactly what you've been doing; search the old forum archive, take a look around the Q&A, and then just ask questions here if you can't figure it out. No one's forcing any of the answerers here to be here, we all choose to be a resource to this community to the extent of our abilities, and if you need to ask a million questions, that's fine (provided, of course, that you make a good-faith effort to find an answer on your own first). This isn't a perfect solution because it takes time to get an answer--time you could be using to write your story, but you shouldn't feel like not asking is somehow sparing the rest of us. 

It's also worth pointing out that this Q&A itself will also become a more useful and more complete collection of advice and guidance as more questions are asked, so in a sense, you help too when you post here. 

...